drumstick 2.0.0
fluidsettingsdialog.h
Go to the documentation of this file.
1/*
2 Virtual Piano test using the MIDI Sequencer C++ library
3 Copyright (C) 2006-2020, Pedro Lopez-Cabanillas <plcl@users.sf.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef FLUIDSETTINGSDIALOG_H
20#define FLUIDSETTINGSDIALOG_H
21
22#include <QDialog>
23#include <QShowEvent>
24
29
30namespace drumstick {
31namespace widgets {
32
33namespace Ui {
34 class FluidSettingsDialog;
35}
36
37class FluidSettingsDialog : public QDialog
38{
39 Q_OBJECT
40
41public:
42 explicit FluidSettingsDialog(QWidget *parent = nullptr);
43 ~FluidSettingsDialog();
44 void readSettings();
45 void writeSettings();
46 void changeSoundFont(const QString& fileName);
47
48public slots:
49 void accept() override;
50 void showEvent(QShowEvent *event) override;
51 void restoreDefaults();
52 void showFileDialog();
53
54public:
55 static const QString QSTR_PREFERENCES;
56 static const QString QSTR_INSTRUMENTSDEFINITION;
57 static const QString QSTR_DATADIR;
58 static const QString QSTR_DATADIR2;
59 static const QString QSTR_SOUNDFONT;
60 static const QString QSTR_AUDIODRIVER;
61 static const QString QSTR_PERIODSIZE;
62 static const QString QSTR_PERIODS;
63 static const QString QSTR_SAMPLERATE;
64 static const QString QSTR_CHORUS;
65 static const QString QSTR_REVERB;
66 static const QString QSTR_GAIN;
67 static const QString QSTR_POLYPHONY;
68
69 static const int DEFAULT_PERIODSIZE = 3072;
70 static const int DEFAULT_PERIODS = 1;
71 static const double DEFAULT_SAMPLERATE;
72 static const int DEFAULT_CHORUS = 0;
73 static const int DEFAULT_REVERB = 0;
74 static const double DEFAULT_GAIN;
75 static const int DEFAULT_POLYPHONY = 32;
76
77private:
78 QString defaultAudioDriver() const;
79 Ui::FluidSettingsDialog *ui;
80};
81
82}} // namespace drumstick::widgets
83
84#endif // FLUIDSETTINGSDIALOG_H
Drumstick Widgets library MIDI related widgets and functions.
Drumstick common.