1 |
// qsamplerOptions.h |
2 |
// |
3 |
/**************************************************************************** |
4 |
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, Christian Schoenebeck |
6 |
|
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 |
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 |
|
21 |
*****************************************************************************/ |
22 |
|
23 |
#ifndef __qsamplerOptions_h |
24 |
#define __qsamplerOptions_h |
25 |
|
26 |
#include <qsettings.h> |
27 |
#include <QStringList> |
28 |
|
29 |
class QWidget; |
30 |
class QComboBox; |
31 |
|
32 |
|
33 |
//------------------------------------------------------------------------- |
34 |
// qsamplerOptions - Prototype settings class. |
35 |
// |
36 |
|
37 |
class qsamplerOptions |
38 |
{ |
39 |
public: |
40 |
|
41 |
// Constructor. |
42 |
qsamplerOptions(); |
43 |
// Default destructor. |
44 |
~qsamplerOptions(); |
45 |
|
46 |
// The settings object accessor. |
47 |
QSettings& settings(); |
48 |
|
49 |
// Command line arguments parser. |
50 |
bool parse_args(int argc, char **argv); |
51 |
// Command line usage helper. |
52 |
void print_usage(const char *arg0); |
53 |
|
54 |
// Startup supplied session file. |
55 |
QString sSessionFile; |
56 |
|
57 |
// Server options... |
58 |
QString sServerHost; |
59 |
int iServerPort; |
60 |
int iServerTimeout; |
61 |
bool bServerStart; |
62 |
QString sServerCmdLine; |
63 |
int iStartDelay; |
64 |
|
65 |
// Display options... |
66 |
QString sDisplayFont; |
67 |
bool bDisplayEffect; |
68 |
bool bAutoRefresh; |
69 |
int iAutoRefreshTime; |
70 |
int iMaxVolume; |
71 |
QString sMessagesFont; |
72 |
bool bMessagesLimit; |
73 |
int iMessagesLimitLines; |
74 |
bool bConfirmRemove; |
75 |
bool bKeepOnTop; |
76 |
bool bStdoutCapture; |
77 |
bool bCompletePath; |
78 |
bool bInstrumentNames; |
79 |
|
80 |
// View options... |
81 |
bool bMenubar; |
82 |
bool bToolbar; |
83 |
bool bStatusbar; |
84 |
bool bAutoArrange; |
85 |
|
86 |
// Default options... |
87 |
QString sSessionDir; |
88 |
QString sInstrumentDir; |
89 |
QString sEngineName; |
90 |
QString sAudioDriver; |
91 |
QString sMidiDriver; |
92 |
int iMidiMap; |
93 |
int iMidiBank; |
94 |
int iMidiProg; |
95 |
int iVolume; |
96 |
int iLoadMode; |
97 |
|
98 |
// Recent file list. |
99 |
int iMaxRecentFiles; |
100 |
QStringList recentFiles; |
101 |
|
102 |
// Widget geometry persistence helper prototypes. |
103 |
void saveWidgetGeometry(QWidget *pWidget); |
104 |
void loadWidgetGeometry(QWidget *pWidget); |
105 |
|
106 |
// Combo box history persistence helper prototypes. |
107 |
void add2ComboBoxHistory(QComboBox *pComboBox, const QString& sNewText, int iLimit = 8, int iIndex = -1); |
108 |
void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); |
109 |
void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); |
110 |
|
111 |
private: |
112 |
|
113 |
// Settings member variables. |
114 |
QSettings m_settings; |
115 |
}; |
116 |
|
117 |
|
118 |
#endif // __qsamplerOptions_h |
119 |
|
120 |
|
121 |
// end of qsamplerOptions.h |