| Chris@0 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */ | 
| Chris@0 | 2 | 
| Chris@0 | 3 /* | 
| Chris@0 | 4     Sonic Visualiser | 
| Chris@0 | 5     An audio file viewer and annotation editor. | 
| Chris@0 | 6     Centre for Digital Music, Queen Mary, University of London. | 
| Chris@0 | 7     This file copyright 2006 Chris Cannam. | 
| Chris@0 | 8 | 
| Chris@0 | 9     This program is free software; you can redistribute it and/or | 
| Chris@0 | 10     modify it under the terms of the GNU General Public License as | 
| Chris@0 | 11     published by the Free Software Foundation; either version 2 of the | 
| Chris@0 | 12     License, or (at your option) any later version.  See the file | 
| Chris@0 | 13     COPYING included with this distribution for more information. | 
| Chris@0 | 14 */ | 
| Chris@0 | 15 | 
| Chris@1837 | 16 #ifndef SV_PREFERENCES_DIALOG_H | 
| Chris@1837 | 17 #define SV_PREFERENCES_DIALOG_H | 
| Chris@0 | 18 | 
| Chris@0 | 19 #include <QDialog> | 
| Chris@436 | 20 #include <QMap> | 
| Chris@1448 | 21 #include <QColor> | 
| Chris@0 | 22 | 
| Chris@0 | 23 #include "base/Window.h" | 
| Chris@0 | 24 | 
| Chris@9 | 25 class WindowTypeSelector; | 
| Chris@0 | 26 class QPushButton; | 
| Chris@180 | 27 class QLineEdit; | 
| Chris@436 | 28 class QTabWidget; | 
| Chris@1397 | 29 class QComboBox; | 
| Chris@1837 | 30 class PluginPathConfigurator; | 
| Chris@0 | 31 | 
| Chris@0 | 32 class PreferencesDialog : public QDialog | 
| Chris@0 | 33 { | 
| Chris@0 | 34     Q_OBJECT | 
| Chris@0 | 35 | 
| Chris@0 | 36 public: | 
| Chris@528 | 37     PreferencesDialog(QWidget *parent = 0); | 
| Chris@9 | 38     virtual ~PreferencesDialog(); | 
| Chris@0 | 39 | 
| Chris@436 | 40     enum Tab { | 
| Chris@436 | 41         GeneralTab, | 
| Chris@1436 | 42         AudioIOTab, | 
| Chris@436 | 43         AppearanceTab, | 
| Chris@436 | 44         AnalysisTab, | 
| Chris@1812 | 45         TemplateTab, | 
| Chris@1812 | 46         PluginTab | 
| Chris@436 | 47     }; | 
| Chris@436 | 48     void switchToTab(Tab tab); | 
| Chris@436 | 49 | 
| Chris@1413 | 50 signals: | 
| Chris@1413 | 51     void audioDeviceChanged(); | 
| Chris@1448 | 52     void coloursChanged(); | 
| Chris@1413 | 53 | 
| Chris@163 | 54 public slots: | 
| Chris@163 | 55     void applicationClosing(bool quickly); | 
| Chris@163 | 56 | 
| Chris@0 | 57 protected slots: | 
| Chris@9 | 58     void windowTypeChanged(WindowType type); | 
| Chris@115 | 59     void spectrogramSmoothingChanged(int state); | 
| Chris@299 | 60     void spectrogramXSmoothingChanged(int state); | 
| Chris@1096 | 61     void spectrogramGColourChanged(int state); | 
| Chris@1096 | 62     void spectrogramMColourChanged(int state); | 
| Chris@1097 | 63     void colour3DColourChanged(int state); | 
| Chris@1448 | 64     void overviewColourChanged(int state); | 
| Chris@0 | 65     void propertyLayoutChanged(int layout); | 
| Chris@0 | 66     void tuningFrequencyChanged(double freq); | 
| Chris@1397 | 67     void audioImplementationChanged(int impl); | 
| Chris@1397 | 68     void audioPlaybackDeviceChanged(int device); | 
| Chris@1397 | 69     void audioRecordDeviceChanged(int device); | 
| Chris@180 | 70     void resampleOnLoadChanged(int state); | 
| Chris@1379 | 71     void gaplessModeChanged(int state); | 
| Chris@1275 | 72     void vampProcessSeparationChanged(int state); | 
| Chris@180 | 73     void tempDirRootChanged(QString root); | 
| Chris@180 | 74     void backgroundModeChanged(int mode); | 
| Chris@337 | 75     void timeToTextModeChanged(int mode); | 
| Chris@906 | 76     void showHMSChanged(int state); | 
| Chris@702 | 77     void octaveSystemChanged(int system); | 
| Chris@225 | 78     void viewFontSizeChanged(int sz); | 
| Chris@237 | 79     void showSplashChanged(int state); | 
| Chris@436 | 80     void defaultTemplateChanged(int); | 
| Chris@658 | 81     void localeChanged(int); | 
| Chris@686 | 82     void networkPermissionChanged(int state); | 
| Chris@950 | 83     void retinaChanged(int state); | 
| Chris@1837 | 84     void pluginPathsChanged(); | 
| Chris@180 | 85 | 
| Chris@180 | 86     void tempDirButtonClicked(); | 
| Chris@0 | 87 | 
| Chris@0 | 88     void okClicked(); | 
| Chris@0 | 89     void applyClicked(); | 
| Chris@0 | 90     void cancelClicked(); | 
| Chris@0 | 91 | 
| Chris@0 | 92 protected: | 
| Chris@9 | 93     WindowTypeSelector *m_windowTypeSelector; | 
| Chris@0 | 94     QPushButton *m_applyButton; | 
| Chris@180 | 95 | 
| Chris@436 | 96     QTabWidget *m_tabs; | 
| Chris@436 | 97     QMap<Tab, int> m_tabOrdering; | 
| Chris@436 | 98 | 
| Chris@180 | 99     QLineEdit *m_tempDirRootEdit; | 
| Chris@436 | 100 | 
| Chris@1397 | 101     QComboBox *m_audioPlaybackDeviceCombo; | 
| Chris@1397 | 102     QComboBox *m_audioRecordDeviceCombo; | 
| Chris@1397 | 103     void rebuildDeviceCombos(); | 
| Chris@1837 | 104 | 
| Chris@1837 | 105     PluginPathConfigurator *m_pluginPathConfigurator; | 
| Chris@1397 | 106 | 
| Chris@436 | 107     QString m_currentTemplate; | 
| Chris@436 | 108     QStringList m_templates; | 
| Chris@658 | 109 | 
| Chris@658 | 110     QString m_currentLocale; | 
| Chris@658 | 111     QStringList m_locales; | 
| Chris@0 | 112 | 
| Chris@9 | 113     WindowType m_windowType; | 
| Chris@180 | 114     int m_spectrogramSmoothing; | 
| Chris@299 | 115     int m_spectrogramXSmoothing; | 
| Chris@1096 | 116     int m_spectrogramGColour; | 
| Chris@1096 | 117     int m_spectrogramMColour; | 
| Chris@1097 | 118     int m_colour3DColour; | 
| Chris@1448 | 119     QColor m_overviewColour; | 
| Chris@180 | 120     int m_propertyLayout; | 
| Chris@922 | 121     double m_tuningFrequency; | 
| Chris@1397 | 122     int m_audioImplementation; | 
| Chris@1397 | 123     int m_audioPlaybackDevice; | 
| Chris@1397 | 124     int m_audioRecordDevice; | 
| Chris@180 | 125     bool m_resampleOnLoad; | 
| Chris@1379 | 126     bool m_gapless; | 
| Chris@1275 | 127     bool m_runPluginsInProcess; | 
| Chris@686 | 128     bool m_networkPermission; | 
| Chris@950 | 129     bool m_retina; | 
| Chris@180 | 130     QString m_tempDirRoot; | 
| Chris@180 | 131     int m_backgroundMode; | 
| Chris@337 | 132     int m_timeToTextMode; | 
| Chris@906 | 133     bool m_showHMS; | 
| Chris@702 | 134     int m_octaveSystem; | 
| Chris@225 | 135     int m_viewFontSize; | 
| Chris@237 | 136     bool m_showSplash; | 
| Chris@180 | 137 | 
| Chris@1413 | 138     bool m_audioDeviceChanged; | 
| Chris@1448 | 139     bool m_coloursChanged; | 
| Chris@180 | 140     bool m_changesOnRestart; | 
| Chris@0 | 141 }; | 
| Chris@0 | 142 | 
| Chris@0 | 143 #endif |