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