aboutsummaryrefslogtreecommitdiffstats
path: root/utils/alsoft-config/mainwindow.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-06-23 22:47:51 -0700
committerChris Robinson <[email protected]>2013-06-23 22:47:51 -0700
commit144059b062bd357cdec27416010872f37ef69cba (patch)
treed88c0c5ef43975e5c9b61712dba5dacd25ebcab4 /utils/alsoft-config/mainwindow.h
parent4017e4a96a41ce2e781bcd99695c7f9dfc503c5f (diff)
Add a configuration UI application
Not complete, but it's a decent start. Some problems: * Only some otions are handled (backend-specific options in particular aren't handled). * Does not warn when quitting with unsaved changes. * Some options are missing tooltips.
Diffstat (limited to 'utils/alsoft-config/mainwindow.h')
-rw-r--r--utils/alsoft-config/mainwindow.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/utils/alsoft-config/mainwindow.h b/utils/alsoft-config/mainwindow.h
new file mode 100644
index 00000000..28e109a2
--- /dev/null
+++ b/utils/alsoft-config/mainwindow.h
@@ -0,0 +1,54 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QListWidget>
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ explicit MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+private slots:
+ void saveCurrentConfig();
+
+ void saveConfigAsFile();
+ void loadConfigFromFile();
+
+ void updatePeriodSizeEdit(int size);
+ void updatePeriodSizeSlider();
+ void updatePeriodCountEdit(int size);
+ void updatePeriodCountSlider();
+
+ void addHrtfFile();
+ void removeHrtfFile();
+
+ void showEnabledBackendMenu(QPoint pt);
+ void showDisabledBackendMenu(QPoint pt);
+
+ void updateReverbBoostEdit(int size);
+ void updateReverbBoostSlider(QString value);
+
+private:
+ Ui::MainWindow *ui;
+
+ QValidator *mPeriodSizeValidator;
+ QValidator *mPeriodCountValidator;
+ QValidator *mSourceCountValidator;
+ QValidator *mEffectSlotValidator;
+ QValidator *mSourceSendValidator;
+ QValidator *mSampleRateValidator;
+ QValidator *mReverbBoostValidator;
+
+ void loadConfig(const QString &fname);
+ void saveConfig(const QString &fname) const;
+};
+
+#endif // MAINWINDOW_H