annotate main/PreferencesDialog.h @ 1661:fad5960ac61a sv_v3.0.1

Formatting
author Chris Cannam
date Tue, 07 Mar 2017 13:53:14 +0000
parents 11484141d969
children 0fa6b7896968
rev   line source
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@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@0 30
Chris@0 31 class PreferencesDialog : public QDialog
Chris@0 32 {
Chris@0 33 Q_OBJECT
Chris@0 34
Chris@0 35 public:
Chris@528 36 PreferencesDialog(QWidget *parent = 0);
Chris@9 37 virtual ~PreferencesDialog();
Chris@0 38
Chris@436 39 enum Tab {
Chris@436 40 GeneralTab,
Chris@1436 41 AudioIOTab,
Chris@436 42 AppearanceTab,
Chris@436 43 AnalysisTab,
Chris@436 44 TemplateTab
Chris@436 45 };
Chris@436 46 void switchToTab(Tab tab);
Chris@436 47
Chris@1413 48 signals:
Chris@1413 49 void audioDeviceChanged();
Chris@1448 50 void coloursChanged();
Chris@1413 51
Chris@163 52 public slots:
Chris@163 53 void applicationClosing(bool quickly);
Chris@163 54
Chris@0 55 protected slots:
Chris@9 56 void windowTypeChanged(WindowType type);
Chris@115 57 void spectrogramSmoothingChanged(int state);
Chris@299 58 void spectrogramXSmoothingChanged(int state);
Chris@1096 59 void spectrogramGColourChanged(int state);
Chris@1096 60 void spectrogramMColourChanged(int state);
Chris@1097 61 void colour3DColourChanged(int state);
Chris@1448 62 void overviewColourChanged(int state);
Chris@0 63 void propertyLayoutChanged(int layout);
Chris@0 64 void tuningFrequencyChanged(double freq);
Chris@1397 65 void audioImplementationChanged(int impl);
Chris@1397 66 void audioPlaybackDeviceChanged(int device);
Chris@1397 67 void audioRecordDeviceChanged(int device);
Chris@180 68 void resampleOnLoadChanged(int state);
Chris@1379 69 void gaplessModeChanged(int state);
Chris@1275 70 void vampProcessSeparationChanged(int state);
Chris@180 71 void tempDirRootChanged(QString root);
Chris@180 72 void backgroundModeChanged(int mode);
Chris@337 73 void timeToTextModeChanged(int mode);
Chris@906 74 void showHMSChanged(int state);
Chris@702 75 void octaveSystemChanged(int system);
Chris@225 76 void viewFontSizeChanged(int sz);
Chris@237 77 void showSplashChanged(int state);
Chris@436 78 void defaultTemplateChanged(int);
Chris@658 79 void localeChanged(int);
Chris@686 80 void networkPermissionChanged(int state);
Chris@950 81 void retinaChanged(int state);
Chris@180 82
Chris@180 83 void tempDirButtonClicked();
Chris@0 84
Chris@0 85 void okClicked();
Chris@0 86 void applyClicked();
Chris@0 87 void cancelClicked();
Chris@0 88
Chris@0 89 protected:
Chris@9 90 WindowTypeSelector *m_windowTypeSelector;
Chris@0 91 QPushButton *m_applyButton;
Chris@180 92
Chris@436 93 QTabWidget *m_tabs;
Chris@436 94 QMap<Tab, int> m_tabOrdering;
Chris@436 95
Chris@180 96 QLineEdit *m_tempDirRootEdit;
Chris@436 97
Chris@1397 98 QComboBox *m_audioPlaybackDeviceCombo;
Chris@1397 99 QComboBox *m_audioRecordDeviceCombo;
Chris@1397 100 void rebuildDeviceCombos();
Chris@1397 101
Chris@436 102 QString m_currentTemplate;
Chris@436 103 QStringList m_templates;
Chris@658 104
Chris@658 105 QString m_currentLocale;
Chris@658 106 QStringList m_locales;
Chris@0 107
Chris@9 108 WindowType m_windowType;
Chris@180 109 int m_spectrogramSmoothing;
Chris@299 110 int m_spectrogramXSmoothing;
Chris@1096 111 int m_spectrogramGColour;
Chris@1096 112 int m_spectrogramMColour;
Chris@1097 113 int m_colour3DColour;
Chris@1448 114 QColor m_overviewColour;
Chris@180 115 int m_propertyLayout;
Chris@922 116 double m_tuningFrequency;
Chris@1397 117 int m_audioImplementation;
Chris@1397 118 int m_audioPlaybackDevice;
Chris@1397 119 int m_audioRecordDevice;
Chris@180 120 bool m_resampleOnLoad;
Chris@1379 121 bool m_gapless;
Chris@1275 122 bool m_runPluginsInProcess;
Chris@686 123 bool m_networkPermission;
Chris@950 124 bool m_retina;
Chris@180 125 QString m_tempDirRoot;
Chris@180 126 int m_backgroundMode;
Chris@337 127 int m_timeToTextMode;
Chris@906 128 bool m_showHMS;
Chris@702 129 int m_octaveSystem;
Chris@225 130 int m_viewFontSize;
Chris@237 131 bool m_showSplash;
Chris@180 132
Chris@1413 133 bool m_audioDeviceChanged;
Chris@1448 134 bool m_coloursChanged;
Chris@180 135 bool m_changesOnRestart;
Chris@0 136 };
Chris@0 137
Chris@0 138 #endif