comparison main/PreferencesDialog.h @ 436:6d827453657f templating

Add default session template to Preferences; tidy up menu functions and states
author Chris Cannam
date Mon, 23 May 2011 16:13:30 +0100
parents a3b2cba73143
children 33d0632255b5 e5e6625deb85
comparison
equal deleted inserted replaced
435:586eb6764a2b 436:6d827453657f
15 15
16 #ifndef _PREFERENCES_DIALOG_H_ 16 #ifndef _PREFERENCES_DIALOG_H_
17 #define _PREFERENCES_DIALOG_H_ 17 #define _PREFERENCES_DIALOG_H_
18 18
19 #include <QDialog> 19 #include <QDialog>
20 #include <QMap>
20 21
21 #include "base/Window.h" 22 #include "base/Window.h"
22 23
23 class WindowTypeSelector; 24 class WindowTypeSelector;
24 class QPushButton; 25 class QPushButton;
25 class QLineEdit; 26 class QLineEdit;
27 class QTabWidget;
26 28
27 class PreferencesDialog : public QDialog 29 class PreferencesDialog : public QDialog
28 { 30 {
29 Q_OBJECT 31 Q_OBJECT
30 32
31 public: 33 public:
32 PreferencesDialog(QWidget *parent = 0, Qt::WFlags flags = 0); 34 PreferencesDialog(QWidget *parent = 0, Qt::WFlags flags = 0);
33 virtual ~PreferencesDialog(); 35 virtual ~PreferencesDialog();
36
37 enum Tab {
38 GeneralTab,
39 AppearanceTab,
40 AnalysisTab,
41 TemplateTab
42 };
43 void switchToTab(Tab tab);
34 44
35 public slots: 45 public slots:
36 void applicationClosing(bool quickly); 46 void applicationClosing(bool quickly);
37 47
38 protected slots: 48 protected slots:
47 void tempDirRootChanged(QString root); 57 void tempDirRootChanged(QString root);
48 void backgroundModeChanged(int mode); 58 void backgroundModeChanged(int mode);
49 void timeToTextModeChanged(int mode); 59 void timeToTextModeChanged(int mode);
50 void viewFontSizeChanged(int sz); 60 void viewFontSizeChanged(int sz);
51 void showSplashChanged(int state); 61 void showSplashChanged(int state);
62 void defaultTemplateChanged(int);
52 63
53 void tempDirButtonClicked(); 64 void tempDirButtonClicked();
54 65
55 void okClicked(); 66 void okClicked();
56 void applyClicked(); 67 void applyClicked();
58 69
59 protected: 70 protected:
60 WindowTypeSelector *m_windowTypeSelector; 71 WindowTypeSelector *m_windowTypeSelector;
61 QPushButton *m_applyButton; 72 QPushButton *m_applyButton;
62 73
74 QTabWidget *m_tabs;
75 QMap<Tab, int> m_tabOrdering;
76
63 QLineEdit *m_tempDirRootEdit; 77 QLineEdit *m_tempDirRootEdit;
78
79 QString m_currentTemplate;
80 QStringList m_templates;
64 81
65 WindowType m_windowType; 82 WindowType m_windowType;
66 int m_spectrogramSmoothing; 83 int m_spectrogramSmoothing;
67 int m_spectrogramXSmoothing; 84 int m_spectrogramXSmoothing;
68 int m_propertyLayout; 85 int m_propertyLayout;