1 |
capela |
102 |
// qsamplerOptions.h |
2 |
|
|
// |
3 |
|
|
/**************************************************************************** |
4 |
schoenebeck |
1461 |
Copyright (C) 2004-2007, 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 |
|
|
|
34 |
|
|
//------------------------------------------------------------------------- |
35 |
|
|
// qsamplerOptions - Prototype settings class. |
36 |
|
|
// |
37 |
|
|
|
38 |
|
|
class qsamplerOptions |
39 |
|
|
{ |
40 |
|
|
public: |
41 |
|
|
|
42 |
capela |
1509 |
// Constructor. |
43 |
|
|
qsamplerOptions(); |
44 |
|
|
// Default destructor. |
45 |
|
|
~qsamplerOptions(); |
46 |
capela |
102 |
|
47 |
capela |
1509 |
// The settings object accessor. |
48 |
|
|
QSettings& settings(); |
49 |
capela |
102 |
|
50 |
capela |
1509 |
// 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 |
capela |
102 |
|
55 |
capela |
1509 |
// Startup supplied session file. |
56 |
|
|
QString sSessionFile; |
57 |
capela |
102 |
|
58 |
capela |
1509 |
// Server options... |
59 |
|
|
QString sServerHost; |
60 |
|
|
int iServerPort; |
61 |
|
|
int iServerTimeout; |
62 |
|
|
bool bServerStart; |
63 |
|
|
QString sServerCmdLine; |
64 |
|
|
int iStartDelay; |
65 |
capela |
102 |
|
66 |
capela |
1509 |
// 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 |
capela |
102 |
|
81 |
capela |
1509 |
// View options... |
82 |
|
|
bool bMenubar; |
83 |
|
|
bool bToolbar; |
84 |
|
|
bool bStatusbar; |
85 |
|
|
bool bAutoArrange; |
86 |
capela |
102 |
|
87 |
capela |
1509 |
// Default options... |
88 |
|
|
QString sSessionDir; |
89 |
|
|
QString sInstrumentDir; |
90 |
|
|
QString sEngineName; |
91 |
|
|
QString sAudioDriver; |
92 |
|
|
QString sMidiDriver; |
93 |
capela |
980 |
int iMidiMap; |
94 |
|
|
int iMidiBank; |
95 |
|
|
int iMidiProg; |
96 |
|
|
int iVolume; |
97 |
|
|
int iLoadMode; |
98 |
capela |
102 |
|
99 |
capela |
1509 |
// Recent file list. |
100 |
|
|
int iMaxRecentFiles; |
101 |
|
|
QStringList recentFiles; |
102 |
capela |
102 |
|
103 |
capela |
1509 |
// Widget geometry persistence helper prototypes. |
104 |
|
|
void saveWidgetGeometry(QWidget *pWidget); |
105 |
|
|
void loadWidgetGeometry(QWidget *pWidget); |
106 |
capela |
102 |
|
107 |
capela |
1509 |
// Combo box history persistence helper prototypes. |
108 |
|
|
void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); |
109 |
|
|
void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); |
110 |
capela |
102 |
|
111 |
|
|
private: |
112 |
|
|
|
113 |
capela |
1509 |
// Settings member variables. |
114 |
|
|
QSettings m_settings; |
115 |
capela |
102 |
}; |
116 |
|
|
|
117 |
|
|
|
118 |
|
|
#endif // __qsamplerOptions_h |
119 |
|
|
|
120 |
|
|
|
121 |
|
|
// end of qsamplerOptions.h |