aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-01 23:49:05 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-01 23:49:05 +0800
commit85ccf22f3d2340e80ce2a109bbe610da1b92ca7d (patch)
tree8127dc287d9a4df6a6c7985e55087491153b5523 /qmidiplayer-desktop
parent90f018721ae7ee6ac154d757516378b9c45ec1bf (diff)
downloadQMidiPlayer-85ccf22f3d2340e80ce2a109bbe610da1b92ca7d.tar.xz
Give the visualization a clearer look...
Now highlights playing notes. Avoid a crash in file reading.
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp5
-rw-r--r--qmidiplayer-desktop/qmpsettingswindow.cpp2
-rw-r--r--qmidiplayer-desktop/qmpsettingswindow.hpp5
3 files changed, 10 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index 7a250ff..ce041ec 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -120,11 +120,16 @@ void qmpPluginAPI::unregisterVisualizationIntf(int intfhandle)
void qmpPluginAPI::registerOptionInt(std::string,std::string,int,int,int){}
int qmpPluginAPI::getOptionInt(std::string){return 0;}
+void qmpPluginAPI::setOptionInt(std::string,int){}
void qmpPluginAPI::registerOptionUint(std::string,std::string,unsigned,unsigned,unsigned){}
unsigned qmpPluginAPI::getOptionUint(std::string){return 0;}
+void qmpPluginAPI::setOptionUint(std::string,unsigned){}
void qmpPluginAPI::registerOptionBool(std::string,std::string,bool){}
bool qmpPluginAPI::getOptionBool(std::string){return false;}
+void qmpPluginAPI::setOptionBool(std::string,bool){}
void qmpPluginAPI::registerOptionDouble(std::string,std::string,double,double,double){}
double qmpPluginAPI::getOptionDouble(std::string){return 0;}
+void qmpPluginAPI::setOptionDouble(std::string,double){}
void qmpPluginAPI::registerOptionString(std::string,std::string,std::string){}
std::string qmpPluginAPI::getOptionString(std::string){return "";}
+void qmpPluginAPI::setOptionString(std::string,std::string){}
diff --git a/qmidiplayer-desktop/qmpsettingswindow.cpp b/qmidiplayer-desktop/qmpsettingswindow.cpp
index d59d2be..a0daf48 100644
--- a/qmidiplayer-desktop/qmpsettingswindow.cpp
+++ b/qmidiplayer-desktop/qmpsettingswindow.cpp
@@ -265,9 +265,7 @@ void qmpSettingsWindow::on_pbAdd_clicked()
{
QStringList sl=QFileDialog::getOpenFileNames(this,"Add File","","SoundFont files (*.sf2)");
for(int i=0;i<sl.size();++i)
- {
ui->lwSoundfont->addItem(new QListWidgetItem(sl.at(i)));
- }
}
void qmpSettingsWindow::on_pbRemove_clicked()
diff --git a/qmidiplayer-desktop/qmpsettingswindow.hpp b/qmidiplayer-desktop/qmpsettingswindow.hpp
index f7bfae9..554afd3 100644
--- a/qmidiplayer-desktop/qmpsettingswindow.hpp
+++ b/qmidiplayer-desktop/qmpsettingswindow.hpp
@@ -1,11 +1,13 @@
#ifndef QMPSETTINGSWINDOW_H
#define QMPSETTINGSWINDOW_H
+#include <map>
#include <QDialog>
#include <QCloseEvent>
#include <QSettings>
#include <QListWidget>
#include <QComboBox>
+#include <QFormLayout>
#include "qmpplugin.hpp"
namespace Ui {
@@ -23,6 +25,7 @@ class qmpSettingsWindow:public QDialog
void settingsInit();
QListWidget* getSFWidget();
void updatePluginList(qmpPluginManager *pmgr);
+ int getOptionInt(std::string key);
signals:
void dialogClosing();
@@ -43,6 +46,8 @@ class qmpSettingsWindow:public QDialog
private:
Ui::qmpSettingsWindow *ui;
void settingsUpdate();
+ std::map<std::string,QWidget*> customOptWidgets;
+ std::map<std::string,QFormLayout*> customOptPages;
static QSettings *settings;
static QComboBox* outwidget;
public: