Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
optionsdialog.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright 2015 Haye Hinrichsen, Christoph Wick
3  *
4  * This file is part of Entropy Piano Tuner.
5  *
6  * Entropy Piano Tuner is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * Entropy Piano Tuner is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * Entropy Piano Tuner. If not, see http://www.gnu.org/licenses/.
18  *****************************************************************************/
19 
20 #ifndef OPTIONSDIALOG_H
21 #define OPTIONSDIALOG_H
22 
23 #include <QDialog>
24 #include <QAudioDeviceInfo>
25 #include <QVBoxLayout>
26 #include <QGridLayout>
27 #include <QFormLayout>
28 #include <QTabWidget>
29 #include <QListWidget>
30 #include <QDialogButtonBox>
31 #include <QComboBox>
32 #include <QLabel>
33 #include <QPushButton>
34 #include <QToolBar>
35 #include <QButtonGroup>
36 
37 class Core;
38 class AudioBase;
40 class AudioPlayerAdapter;
41 class MainWindow;
42 
43 namespace options
44 {
45 
46 class CentralWidgetInterface;
47 
48 class OptionsDialog : public QDialog
49 {
50  Q_OBJECT
51 public:
53  {
56  };
57 
58  OptionsDialog(MainWindow *mainWindow);
59  virtual ~OptionsDialog();
60 
61 
62  Core *getCore() const {return mCore;}
64 
65 protected:
66  void accept() override final;
67  void reject() override final;
68 
69 protected slots:
70  void onCurrentSelectionChanged(int);
71  void onApply();
72  void onChangesMade();
73 
74 private:
75  bool checkForChanges(bool allowCancel);
76  void clearPages();
77  void addPageButton (QIcon icon, QString text, QButtonGroup *group, QToolBar *tb, OptionPages page);
78 
79 private:
82  QGridLayout *mMainLayout;
84  QLabel *mTitle;
85  QButtonGroup *mPageButtons;
87 };
88 
89 } // namespace options
90 
91 #endif // OPTIONSDIALOG_H
bool checkForChanges(bool allowCancel)
MainWindow * mMainWindow
Definition: optionsdialog.h:80
Abstract adapter class for recording audio signals.
void accept() overridefinal
void reject() overridefinal
MainWindow * getMainWindow() const
Definition: optionsdialog.h:63
QButtonGroup * mPageButtons
Definition: optionsdialog.h:85
QGridLayout * mMainLayout
Definition: optionsdialog.h:82
CentralWidgetInterface * mCentralWidget
Definition: optionsdialog.h:83
OptionsDialog(MainWindow *mainWindow)
CORE : Class managing the core.
Definition: core.h:45
Core * getCore() const
Definition: optionsdialog.h:62
void onCurrentSelectionChanged(int)
void addPageButton(QIcon icon, QString text, QButtonGroup *group, QToolBar *tb, OptionPages page)
The main window.
Definition: mainwindow.h:49
Abstract adapter class for PCM-based audio output drivers.
Abstract base class for audio interfaces.
Definition: audiobase.h:43