/[svn]/qsampler/trunk/src/qsamplerOptions.h
ViewVC logotype

Annotation of /qsampler/trunk/src/qsamplerOptions.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4070 - (hide annotations) (download) (as text)
Wed Jan 3 15:38:52 2024 UTC (3 months, 3 weeks ago) by capela
File MIME type: text/x-c++hdr
File size: 3783 byte(s)
- Updated copyright headers into the New Year (2024).
1 capela 102 // qsamplerOptions.h
2     //
3     /****************************************************************************
4 capela 4070 Copyright (C) 2004-2024, rncbc aka Rui Nuno Capela. All rights reserved.
5 capela 3067 Copyright (C) 2007,2008,2015 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 capela 1558 namespace QSampler {
34 capela 102
35     //-------------------------------------------------------------------------
36 capela 1558 // QSampler::Options - Prototype settings class.
37 capela 102 //
38    
39 capela 1558 class Options
40 capela 102 {
41     public:
42    
43 capela 1509 // Constructor.
44 capela 1558 Options();
45 capela 1509 // Default destructor.
46 capela 1558 ~Options();
47 capela 102
48 capela 1509 // The settings object accessor.
49     QSettings& settings();
50 capela 102
51 capela 2028 // explicit I/O methods.
52     void loadOptions();
53     void saveOptions();
54    
55 capela 1509 // Command line arguments parser.
56 capela 1890 bool parse_args(const QStringList& args);
57 capela 4024 #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
58     void show_error(const QString& msg);
59     #else
60 capela 1509 // Command line usage helper.
61 capela 1890 void print_usage(const QString& arg0);
62 capela 4024 #endif
63 capela 102
64 capela 4067 // Startup supplied session file(s).
65     QStringList sessionFiles;
66 capela 102
67 capela 1509 // Server options...
68     QString sServerHost;
69     int iServerPort;
70     int iServerTimeout;
71     bool bServerStart;
72     QString sServerCmdLine;
73     int iStartDelay;
74 capela 102
75 capela 1738 // Logging options...
76     bool bMessagesLog;
77     QString sMessagesLogPath;
78    
79 capela 1509 // Display options...
80     QString sDisplayFont;
81     bool bDisplayEffect;
82     bool bAutoRefresh;
83     int iAutoRefreshTime;
84     int iMaxVolume;
85     QString sMessagesFont;
86     bool bMessagesLimit;
87     int iMessagesLimitLines;
88     bool bConfirmRemove;
89 capela 2722 bool bConfirmReset;
90     bool bConfirmRestart;
91     bool bConfirmError;
92 capela 1509 bool bKeepOnTop;
93     bool bStdoutCapture;
94     bool bCompletePath;
95     bool bInstrumentNames;
96 capela 1749 int iBaseFontSize;
97 capela 102
98 capela 3648 QString sCustomColorTheme;
99     QString sCustomStyleTheme;
100    
101 capela 1509 // View options...
102     bool bMenubar;
103     bool bToolbar;
104     bool bStatusbar;
105     bool bAutoArrange;
106 capela 102
107 capela 1509 // Default options...
108     QString sSessionDir;
109     QString sInstrumentDir;
110     QString sEngineName;
111     QString sAudioDriver;
112     QString sMidiDriver;
113 capela 980 int iMidiMap;
114     int iMidiBank;
115     int iMidiProg;
116     int iVolume;
117     int iLoadMode;
118 capela 102
119 capela 1509 // Recent file list.
120     int iMaxRecentFiles;
121     QStringList recentFiles;
122 capela 102
123 capela 1509 // Widget geometry persistence helper prototypes.
124 capela 2077 void saveWidgetGeometry(QWidget *pWidget, bool bVisible = false);
125     void loadWidgetGeometry(QWidget *pWidget, bool bVisible = false);
126 capela 102
127 capela 1509 // Combo box history persistence helper prototypes.
128     void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
129     void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
130 capela 102
131 schoenebeck 1803 int getMaxVoices();
132     int getEffectiveMaxVoices();
133     void setMaxVoices(int iMaxVoices);
134    
135     int getMaxStreams();
136     int getEffectiveMaxStreams();
137     void setMaxStreams(int iMaxStreams);
138    
139     void sendFineTuningSettings();
140    
141 capela 102 private:
142    
143 capela 1509 // Settings member variables.
144     QSettings m_settings;
145 schoenebeck 1803
146     // Tuning
147     int iMaxVoices;
148     int iMaxStreams;
149 capela 102 };
150    
151 capela 1558 } // namespace QSampler
152 capela 102
153 capela 1558
154 capela 102 #endif // __qsamplerOptions_h
155    
156    
157     // end of qsamplerOptions.h
158 capela 3067

  ViewVC Help
Powered by ViewVC