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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1499 - (hide annotations) (download) (as text)
Tue Nov 20 16:48:04 2007 UTC (16 years, 5 months ago) by capela
File MIME type: text/x-c++hdr
File size: 3199 byte(s)
* Qt4 migration: one first step forward to kiss Qt3Support goodbye.

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     // 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 capela 267 bool bDisplayEffect;
69 capela 102 bool bAutoRefresh;
70     int iAutoRefreshTime;
71 capela 119 int iMaxVolume;
72 capela 102 QString sMessagesFont;
73     bool bMessagesLimit;
74     int iMessagesLimitLines;
75     bool bConfirmRemove;
76 capela 454 bool bKeepOnTop;
77 capela 102 bool bStdoutCapture;
78     bool bCompletePath;
79 capela 341 bool bInstrumentNames;
80 capela 102
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 capela 176 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     // 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

  ViewVC Help
Powered by ViewVC