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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1558 - (hide annotations) (download) (as text)
Thu Dec 6 09:35:33 2007 UTC (16 years, 4 months ago) by capela
File MIME type: text/x-c++hdr
File size: 3058 byte(s)
* Qt4 migration: complete QSampler namespace overhaul.

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 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 1509 // Command line arguments parser.
52     bool parse_args(int argc, char **argv);
53     // Command line usage helper.
54     void print_usage(const char *arg0);
55 capela 102
56 capela 1509 // Startup supplied session file.
57     QString sSessionFile;
58 capela 102
59 capela 1509 // Server options...
60     QString sServerHost;
61     int iServerPort;
62     int iServerTimeout;
63     bool bServerStart;
64     QString sServerCmdLine;
65     int iStartDelay;
66 capela 102
67 capela 1509 // Display options...
68     QString sDisplayFont;
69     bool bDisplayEffect;
70     bool bAutoRefresh;
71     int iAutoRefreshTime;
72     int iMaxVolume;
73     QString sMessagesFont;
74     bool bMessagesLimit;
75     int iMessagesLimitLines;
76     bool bConfirmRemove;
77     bool bKeepOnTop;
78     bool bStdoutCapture;
79     bool bCompletePath;
80     bool bInstrumentNames;
81 capela 102
82 capela 1509 // View options...
83     bool bMenubar;
84     bool bToolbar;
85     bool bStatusbar;
86     bool bAutoArrange;
87 capela 102
88 capela 1509 // Default options...
89     QString sSessionDir;
90     QString sInstrumentDir;
91     QString sEngineName;
92     QString sAudioDriver;
93     QString sMidiDriver;
94 capela 980 int iMidiMap;
95     int iMidiBank;
96     int iMidiProg;
97     int iVolume;
98     int iLoadMode;
99 capela 102
100 capela 1509 // Recent file list.
101     int iMaxRecentFiles;
102     QStringList recentFiles;
103 capela 102
104 capela 1509 // Widget geometry persistence helper prototypes.
105     void saveWidgetGeometry(QWidget *pWidget);
106     void loadWidgetGeometry(QWidget *pWidget);
107 capela 102
108 capela 1509 // Combo box history persistence helper prototypes.
109     void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
110     void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
111 capela 102
112     private:
113    
114 capela 1509 // Settings member variables.
115     QSettings m_settings;
116 capela 102 };
117    
118 capela 1558 } // namespace QSampler
119 capela 102
120 capela 1558
121 capela 102 #endif // __qsamplerOptions_h
122    
123    
124     // end of qsamplerOptions.h

  ViewVC Help
Powered by ViewVC