diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-05-02 23:51:25 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-05-02 23:51:25 +0800 |
commit | bb82e7dfe2c6f3ee40a79f949db68cdd2c28456b (patch) | |
tree | 1b68efe784c44f7ce661c65adb7db2e80eb74380 /qmidiplayer-desktop/qmpsettingswindow.hpp | |
parent | 85ccf22f3d2340e80ce2a109bbe610da1b92ca7d (diff) | |
download | QMidiPlayer-bb82e7dfe2c6f3ee40a79f949db68cdd2c28456b.tar.xz |
Finally finished the option proxying infrastructure...
Diffstat (limited to 'qmidiplayer-desktop/qmpsettingswindow.hpp')
-rw-r--r-- | qmidiplayer-desktop/qmpsettingswindow.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpsettingswindow.hpp b/qmidiplayer-desktop/qmpsettingswindow.hpp index 554afd3..13442fd 100644 --- a/qmidiplayer-desktop/qmpsettingswindow.hpp +++ b/qmidiplayer-desktop/qmpsettingswindow.hpp @@ -14,6 +14,13 @@ namespace Ui { class qmpSettingsWindow; } +struct qmpCustomOption +{ + QWidget* widget; + std::string desc;int type; + QVariant defaultval,minv,maxv; +}; + class qmpSettingsWindow:public QDialog { Q_OBJECT @@ -25,7 +32,9 @@ class qmpSettingsWindow:public QDialog void settingsInit(); QListWidget* getSFWidget(); void updatePluginList(qmpPluginManager *pmgr); + void registerOptionInt(std::string tab,std::string desc,std::string key,int min,int max,int defaultval); int getOptionInt(std::string key); + void SetOptionInt(std::string key,int val); signals: void dialogClosing(); @@ -46,8 +55,9 @@ class qmpSettingsWindow:public QDialog private: Ui::qmpSettingsWindow *ui; void settingsUpdate(); - std::map<std::string,QWidget*> customOptWidgets; + std::map<std::string,qmpCustomOption> customOptions; std::map<std::string,QFormLayout*> customOptPages; + void updateCustomeOptions(); static QSettings *settings; static QComboBox* outwidget; public: |