annotate main/PreferencesDialog.h @ 1198:56f6bd84c2b4 spectrogram-minor-refactor

Far more pragmatic update strategy
author Chris Cannam
date Mon, 11 Jul 2016 14:37:03 +0100
parents df73c834764c
children 5e6e1e074080 5a1a3538ff4e
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@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@1096 52 void spectrogramGColourChanged(int state);
Chris@1096 53 void spectrogramMColourChanged(int state);
Chris@1097 54 void colour3DColourChanged(int state);
Chris@0 55 void propertyLayoutChanged(int layout);
Chris@0 56 void tuningFrequencyChanged(double freq);
Chris@263 57 void audioDeviceChanged(int device);
Chris@32 58 void resampleQualityChanged(int quality);
Chris@180 59 void resampleOnLoadChanged(int state);
Chris@180 60 void tempDirRootChanged(QString root);
Chris@180 61 void backgroundModeChanged(int mode);
Chris@337 62 void timeToTextModeChanged(int mode);
Chris@906 63 void showHMSChanged(int state);
Chris@702 64 void octaveSystemChanged(int system);
Chris@225 65 void viewFontSizeChanged(int sz);
Chris@237 66 void showSplashChanged(int state);
Chris@436 67 void defaultTemplateChanged(int);
Chris@658 68 void localeChanged(int);
Chris@686 69 void networkPermissionChanged(int state);
Chris@950 70 void retinaChanged(int state);
Chris@180 71
Chris@180 72 void tempDirButtonClicked();
Chris@0 73
Chris@0 74 void okClicked();
Chris@0 75 void applyClicked();
Chris@0 76 void cancelClicked();
Chris@0 77
Chris@0 78 protected:
Chris@9 79 WindowTypeSelector *m_windowTypeSelector;
Chris@0 80 QPushButton *m_applyButton;
Chris@180 81
Chris@436 82 QTabWidget *m_tabs;
Chris@436 83 QMap<Tab, int> m_tabOrdering;
Chris@436 84
Chris@180 85 QLineEdit *m_tempDirRootEdit;
Chris@436 86
Chris@436 87 QString m_currentTemplate;
Chris@436 88 QStringList m_templates;
Chris@658 89
Chris@658 90 QString m_currentLocale;
Chris@658 91 QStringList m_locales;
Chris@0 92
Chris@9 93 WindowType m_windowType;
Chris@180 94 int m_spectrogramSmoothing;
Chris@299 95 int m_spectrogramXSmoothing;
Chris@1096 96 int m_spectrogramGColour;
Chris@1096 97 int m_spectrogramMColour;
Chris@1097 98 int m_colour3DColour;
Chris@180 99 int m_propertyLayout;
Chris@922 100 double m_tuningFrequency;
Chris@263 101 int m_audioDevice;
Chris@180 102 int m_resampleQuality;
Chris@180 103 bool m_resampleOnLoad;
Chris@686 104 bool m_networkPermission;
Chris@950 105 bool m_retina;
Chris@180 106 QString m_tempDirRoot;
Chris@180 107 int m_backgroundMode;
Chris@337 108 int m_timeToTextMode;
Chris@906 109 bool m_showHMS;
Chris@702 110 int m_octaveSystem;
Chris@225 111 int m_viewFontSize;
Chris@237 112 bool m_showSplash;
Chris@180 113
Chris@180 114 bool m_changesOnRestart;
Chris@0 115 };
Chris@0 116
Chris@0 117 #endif