1 |
capela |
102 |
// qsamplerOptions.h |
2 |
|
|
// |
3 |
|
|
/**************************************************************************** |
4 |
capela |
1890 |
Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
capela |
1464 |
Copyright (C) 2007, Christian Schoenebeck |
6 |
capela |
102 |
|
7 |
|
|
This program is free software; you can redistribute it and/or |
8 |
|
|
modify it under the terms of the GNU General Public License |
9 |
|
|
as published by the Free Software Foundation; either version 2 |
10 |
|
|
of the License, or (at your option) any later version. |
11 |
|
|
|
12 |
|
|
This program is distributed in the hope that it will be useful, |
13 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
|
|
GNU General Public License for more details. |
16 |
|
|
|
17 |
capela |
920 |
You should have received a copy of the GNU General Public License along |
18 |
|
|
with this program; if not, write to the Free Software Foundation, Inc., |
19 |
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20 |
capela |
102 |
|
21 |
|
|
*****************************************************************************/ |
22 |
|
|
|
23 |
|
|
#ifndef __qsamplerOptions_h |
24 |
|
|
#define __qsamplerOptions_h |
25 |
|
|
|
26 |
capela |
1499 |
#include <QSettings> |
27 |
schoenebeck |
1461 |
#include <QStringList> |
28 |
capela |
102 |
|
29 |
capela |
1499 |
|
30 |
capela |
102 |
class QWidget; |
31 |
|
|
class QComboBox; |
32 |
|
|
|
33 |
capela |
1558 |
namespace QSampler { |
34 |
capela |
102 |
|
35 |
|
|
//------------------------------------------------------------------------- |
36 |
capela |
1558 |
// QSampler::Options - Prototype settings class. |
37 |
capela |
102 |
// |
38 |
|
|
|
39 |
capela |
1558 |
class Options |
40 |
capela |
102 |
{ |
41 |
|
|
public: |
42 |
|
|
|
43 |
capela |
1509 |
// Constructor. |
44 |
capela |
1558 |
Options(); |
45 |
capela |
1509 |
// Default destructor. |
46 |
capela |
1558 |
~Options(); |
47 |
capela |
102 |
|
48 |
capela |
1509 |
// The settings object accessor. |
49 |
|
|
QSettings& settings(); |
50 |
capela |
102 |
|
51 |
capela |
2028 |
// explicit I/O methods. |
52 |
|
|
void loadOptions(); |
53 |
|
|
void saveOptions(); |
54 |
|
|
|
55 |
capela |
1509 |
// Command line arguments parser. |
56 |
capela |
1890 |
bool parse_args(const QStringList& args); |
57 |
capela |
1509 |
// Command line usage helper. |
58 |
capela |
1890 |
void print_usage(const QString& arg0); |
59 |
capela |
102 |
|
60 |
capela |
1509 |
// Startup supplied session file. |
61 |
|
|
QString sSessionFile; |
62 |
capela |
102 |
|
63 |
capela |
1509 |
// Server options... |
64 |
|
|
QString sServerHost; |
65 |
|
|
int iServerPort; |
66 |
|
|
int iServerTimeout; |
67 |
|
|
bool bServerStart; |
68 |
|
|
QString sServerCmdLine; |
69 |
|
|
int iStartDelay; |
70 |
capela |
102 |
|
71 |
capela |
1738 |
// Logging options... |
72 |
|
|
bool bMessagesLog; |
73 |
|
|
QString sMessagesLogPath; |
74 |
|
|
|
75 |
capela |
1509 |
// Display options... |
76 |
|
|
QString sDisplayFont; |
77 |
|
|
bool bDisplayEffect; |
78 |
|
|
bool bAutoRefresh; |
79 |
|
|
int iAutoRefreshTime; |
80 |
|
|
int iMaxVolume; |
81 |
|
|
QString sMessagesFont; |
82 |
|
|
bool bMessagesLimit; |
83 |
|
|
int iMessagesLimitLines; |
84 |
|
|
bool bConfirmRemove; |
85 |
|
|
bool bKeepOnTop; |
86 |
|
|
bool bStdoutCapture; |
87 |
|
|
bool bCompletePath; |
88 |
|
|
bool bInstrumentNames; |
89 |
capela |
1749 |
int iBaseFontSize; |
90 |
capela |
102 |
|
91 |
capela |
1509 |
// View options... |
92 |
|
|
bool bMenubar; |
93 |
|
|
bool bToolbar; |
94 |
|
|
bool bStatusbar; |
95 |
|
|
bool bAutoArrange; |
96 |
capela |
102 |
|
97 |
capela |
1509 |
// Default options... |
98 |
|
|
QString sSessionDir; |
99 |
|
|
QString sInstrumentDir; |
100 |
|
|
QString sEngineName; |
101 |
|
|
QString sAudioDriver; |
102 |
|
|
QString sMidiDriver; |
103 |
capela |
980 |
int iMidiMap; |
104 |
|
|
int iMidiBank; |
105 |
|
|
int iMidiProg; |
106 |
|
|
int iVolume; |
107 |
|
|
int iLoadMode; |
108 |
capela |
102 |
|
109 |
capela |
1509 |
// Recent file list. |
110 |
|
|
int iMaxRecentFiles; |
111 |
|
|
QStringList recentFiles; |
112 |
capela |
102 |
|
113 |
capela |
1509 |
// Widget geometry persistence helper prototypes. |
114 |
|
|
void saveWidgetGeometry(QWidget *pWidget); |
115 |
|
|
void loadWidgetGeometry(QWidget *pWidget); |
116 |
capela |
102 |
|
117 |
capela |
1509 |
// Combo box history persistence helper prototypes. |
118 |
|
|
void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); |
119 |
|
|
void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); |
120 |
capela |
102 |
|
121 |
schoenebeck |
1803 |
int getMaxVoices(); |
122 |
|
|
int getEffectiveMaxVoices(); |
123 |
|
|
void setMaxVoices(int iMaxVoices); |
124 |
|
|
|
125 |
|
|
int getMaxStreams(); |
126 |
|
|
int getEffectiveMaxStreams(); |
127 |
|
|
void setMaxStreams(int iMaxStreams); |
128 |
|
|
|
129 |
|
|
void sendFineTuningSettings(); |
130 |
|
|
|
131 |
capela |
102 |
private: |
132 |
|
|
|
133 |
capela |
1509 |
// Settings member variables. |
134 |
|
|
QSettings m_settings; |
135 |
schoenebeck |
1803 |
|
136 |
|
|
// Tuning |
137 |
|
|
int iMaxVoices; |
138 |
|
|
int iMaxStreams; |
139 |
capela |
102 |
}; |
140 |
|
|
|
141 |
capela |
1558 |
} // namespace QSampler |
142 |
capela |
102 |
|
143 |
capela |
1558 |
|
144 |
capela |
102 |
#endif // __qsamplerOptions_h |
145 |
|
|
|
146 |
|
|
|
147 |
|
|
// end of qsamplerOptions.h |