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