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@0
|
16 #ifndef _PREFERENCES_DIALOG_H_
|
Chris@0
|
17 #define _PREFERENCES_DIALOG_H_
|
Chris@0
|
18
|
Chris@0
|
19 #include <QDialog>
|
Chris@436
|
20 #include <QMap>
|
Chris@0
|
21
|
Chris@0
|
22 #include "base/Window.h"
|
Chris@0
|
23
|
Chris@9
|
24 class WindowTypeSelector;
|
Chris@0
|
25 class QPushButton;
|
Chris@180
|
26 class QLineEdit;
|
Chris@436
|
27 class QTabWidget;
|
Chris@0
|
28
|
Chris@0
|
29 class PreferencesDialog : public QDialog
|
Chris@0
|
30 {
|
Chris@0
|
31 Q_OBJECT
|
Chris@0
|
32
|
Chris@0
|
33 public:
|
Chris@528
|
34 PreferencesDialog(QWidget *parent = 0);
|
Chris@9
|
35 virtual ~PreferencesDialog();
|
Chris@0
|
36
|
Chris@436
|
37 enum Tab {
|
Chris@436
|
38 GeneralTab,
|
Chris@436
|
39 AppearanceTab,
|
Chris@436
|
40 AnalysisTab,
|
Chris@436
|
41 TemplateTab
|
Chris@436
|
42 };
|
Chris@436
|
43 void switchToTab(Tab tab);
|
Chris@436
|
44
|
Chris@163
|
45 public slots:
|
Chris@163
|
46 void applicationClosing(bool quickly);
|
Chris@163
|
47
|
Chris@0
|
48 protected slots:
|
Chris@9
|
49 void windowTypeChanged(WindowType type);
|
Chris@115
|
50 void spectrogramSmoothingChanged(int state);
|
Chris@299
|
51 void spectrogramXSmoothingChanged(int state);
|
Chris@0
|
52 void propertyLayoutChanged(int layout);
|
Chris@0
|
53 void tuningFrequencyChanged(double freq);
|
Chris@263
|
54 void audioDeviceChanged(int device);
|
Chris@32
|
55 void resampleQualityChanged(int quality);
|
Chris@180
|
56 void resampleOnLoadChanged(int state);
|
Chris@180
|
57 void tempDirRootChanged(QString root);
|
Chris@180
|
58 void backgroundModeChanged(int mode);
|
Chris@337
|
59 void timeToTextModeChanged(int mode);
|
Chris@906
|
60 void showHMSChanged(int state);
|
Chris@702
|
61 void octaveSystemChanged(int system);
|
Chris@225
|
62 void viewFontSizeChanged(int sz);
|
Chris@237
|
63 void showSplashChanged(int state);
|
Chris@436
|
64 void defaultTemplateChanged(int);
|
Chris@658
|
65 void localeChanged(int);
|
Chris@686
|
66 void networkPermissionChanged(int state);
|
Chris@950
|
67 void retinaChanged(int state);
|
Chris@180
|
68
|
Chris@180
|
69 void tempDirButtonClicked();
|
Chris@0
|
70
|
Chris@0
|
71 void okClicked();
|
Chris@0
|
72 void applyClicked();
|
Chris@0
|
73 void cancelClicked();
|
Chris@0
|
74
|
Chris@0
|
75 protected:
|
Chris@9
|
76 WindowTypeSelector *m_windowTypeSelector;
|
Chris@0
|
77 QPushButton *m_applyButton;
|
Chris@180
|
78
|
Chris@436
|
79 QTabWidget *m_tabs;
|
Chris@436
|
80 QMap<Tab, int> m_tabOrdering;
|
Chris@436
|
81
|
Chris@180
|
82 QLineEdit *m_tempDirRootEdit;
|
Chris@436
|
83
|
Chris@436
|
84 QString m_currentTemplate;
|
Chris@436
|
85 QStringList m_templates;
|
Chris@658
|
86
|
Chris@658
|
87 QString m_currentLocale;
|
Chris@658
|
88 QStringList m_locales;
|
Chris@0
|
89
|
Chris@9
|
90 WindowType m_windowType;
|
Chris@180
|
91 int m_spectrogramSmoothing;
|
Chris@299
|
92 int m_spectrogramXSmoothing;
|
Chris@180
|
93 int m_propertyLayout;
|
Chris@922
|
94 double m_tuningFrequency;
|
Chris@263
|
95 int m_audioDevice;
|
Chris@180
|
96 int m_resampleQuality;
|
Chris@180
|
97 bool m_resampleOnLoad;
|
Chris@686
|
98 bool m_networkPermission;
|
Chris@950
|
99 bool m_retina;
|
Chris@180
|
100 QString m_tempDirRoot;
|
Chris@180
|
101 int m_backgroundMode;
|
Chris@337
|
102 int m_timeToTextMode;
|
Chris@906
|
103 bool m_showHMS;
|
Chris@702
|
104 int m_octaveSystem;
|
Chris@225
|
105 int m_viewFontSize;
|
Chris@237
|
106 bool m_showSplash;
|
Chris@180
|
107
|
Chris@180
|
108 bool m_changesOnRestart;
|
Chris@0
|
109 };
|
Chris@0
|
110
|
Chris@0
|
111 #endif
|