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> |
27 |
#include <QStringList> |
28 |
|
29 |
|
30 |
class QWidget; |
31 |
class QComboBox; |
32 |
|
33 |
|
34 |
//------------------------------------------------------------------------- |
35 |
// qsamplerOptions - Prototype settings class. |
36 |
// |
37 |
|
38 |
class qsamplerOptions |
39 |
{ |
40 |
public: |
41 |
|
42 |
// Constructor. |
43 |
qsamplerOptions(); |
44 |
// Default destructor. |
45 |
~qsamplerOptions(); |
46 |
|
47 |
// The settings object accessor. |
48 |
QSettings& settings(); |
49 |
|
50 |
// Command line arguments parser. |
51 |
bool parse_args(int argc, char **argv); |
52 |
// Command line usage helper. |
53 |
void print_usage(const char *arg0); |
54 |
|
55 |
// Startup supplied session file. |
56 |
QString sSessionFile; |
57 |
|
58 |
// Server options... |
59 |
QString sServerHost; |
60 |
int iServerPort; |
61 |
int iServerTimeout; |
62 |
bool bServerStart; |
63 |
QString sServerCmdLine; |
64 |
int iStartDelay; |
65 |
|
66 |
// Display options... |
67 |
QString sDisplayFont; |
68 |
bool bDisplayEffect; |
69 |
bool bAutoRefresh; |
70 |
int iAutoRefreshTime; |
71 |
int iMaxVolume; |
72 |
QString sMessagesFont; |
73 |
bool bMessagesLimit; |
74 |
int iMessagesLimitLines; |
75 |
bool bConfirmRemove; |
76 |
bool bKeepOnTop; |
77 |
bool bStdoutCapture; |
78 |
bool bCompletePath; |
79 |
bool bInstrumentNames; |
80 |
|
81 |
// View options... |
82 |
bool bMenubar; |
83 |
bool bToolbar; |
84 |
bool bStatusbar; |
85 |
bool bAutoArrange; |
86 |
|
87 |
// Default options... |
88 |
QString sSessionDir; |
89 |
QString sInstrumentDir; |
90 |
QString sEngineName; |
91 |
QString sAudioDriver; |
92 |
QString sMidiDriver; |
93 |
int iMidiMap; |
94 |
int iMidiBank; |
95 |
int iMidiProg; |
96 |
int iVolume; |
97 |
int iLoadMode; |
98 |
|
99 |
// Recent file list. |
100 |
int iMaxRecentFiles; |
101 |
QStringList recentFiles; |
102 |
|
103 |
// Widget geometry persistence helper prototypes. |
104 |
void saveWidgetGeometry(QWidget *pWidget); |
105 |
void loadWidgetGeometry(QWidget *pWidget); |
106 |
|
107 |
// Combo box history persistence helper prototypes. |
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 |