drumstick 2.3.1
fluidsettingsdialog.h
Go to the documentation of this file.
1/*
2 Virtual Piano test using the MIDI Sequencer C++ library
3 Copyright (C) 2006-2021, 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#include <QSettings>
25
31namespace drumstick {
32
33namespace rt {
34 class MIDIOutput;
35}
36
37namespace widgets {
38
39namespace Ui {
40 class FluidSettingsDialog;
41}
42
43class FluidSettingsDialog : public QDialog
44{
45 Q_OBJECT
46
47public:
48 explicit FluidSettingsDialog(QWidget *parent = nullptr);
49 ~FluidSettingsDialog();
50 void readSettings();
51 void writeSettings();
52 void changeSoundFont(const QString& fileName);
53 void chkDriverProperties(QSettings* settings);
54
55public slots:
56 void accept() override;
57 void showEvent(QShowEvent *event) override;
58 void restoreDefaults();
59 void showFileDialog();
60
61public:
62 static const QString QSTR_PREFERENCES;
63 static const QString QSTR_INSTRUMENTSDEFINITION;
64 static const QString QSTR_DATADIR;
65 static const QString QSTR_DATADIR2;
66 static const QString QSTR_SOUNDFONT;
67 static const QString QSTR_AUDIODRIVER;
68 static const QString QSTR_PERIODSIZE;
69 static const QString QSTR_PERIODS;
70 static const QString QSTR_SAMPLERATE;
71 static const QString QSTR_CHORUS;
72 static const QString QSTR_REVERB;
73 static const QString QSTR_GAIN;
74 static const QString QSTR_POLYPHONY;
75
76 static const int DEFAULT_PERIODSIZE = 3072;
77 static const int DEFAULT_PERIODS = 1;
78 static const double DEFAULT_SAMPLERATE;
79 static const int DEFAULT_CHORUS = 0;
80 static const int DEFAULT_REVERB = 0;
81 static const double DEFAULT_GAIN;
82 static const int DEFAULT_POLYPHONY = 32;
83
84private:
85 QString defaultAudioDriver() const;
86
87 Ui::FluidSettingsDialog *ui;
89};
90
91}} // namespace drumstick::widgets
92
93#endif // FLUIDSETTINGSDIALOG_H
The QSettings class provides persistent platform-independent application settings.
MIDI OUT interface.
Definition: rtmidioutput.h:112
void DRUMSTICK_EXPORT changeSoundFont(const QString driver, const QString fileName, QWidget *parent=nullptr)
Changes the sound font configuration Some RT output drivers accept soundfonts.
Drumstick common.
Definition: alsaclient.cpp:68