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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1461 - (hide annotations) (download) (as text)
Sun Oct 28 23:30:36 2007 UTC (16 years, 5 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 3265 byte(s)
* started to port QSampler to Qt4 (NOTE: this version is yet broken, use
  the latest tarball release 0.1.5 until the Qt4 port is completed)

1 capela 102 // qsamplerOptions.h
2     //
3     /****************************************************************************
4 schoenebeck 1461 Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5 capela 102
6     This program is free software; you can redistribute it and/or
7     modify it under the terms of the GNU General Public License
8     as published by the Free Software Foundation; either version 2
9     of the License, or (at your option) any later version.
10    
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     GNU General Public License for more details.
15    
16 capela 920 You should have received a copy of the GNU General Public License along
17     with this program; if not, write to the Free Software Foundation, Inc.,
18     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 capela 102
20     *****************************************************************************/
21    
22     #ifndef __qsamplerOptions_h
23     #define __qsamplerOptions_h
24    
25     #include <qsettings.h>
26 schoenebeck 1461 #include <QStringList>
27 capela 102
28     class QWidget;
29     class QComboBox;
30    
31    
32     //-------------------------------------------------------------------------
33     // qsamplerOptions - Prototype settings class.
34     //
35    
36     class qsamplerOptions
37     {
38     public:
39    
40     // Constructor.
41     qsamplerOptions();
42     // Default destructor.
43     ~qsamplerOptions();
44    
45     // The settings object accessor.
46     QSettings& settings();
47    
48     // Command line arguments parser.
49     bool parse_args(int argc, char **argv);
50     // Command line usage helper.
51     void print_usage(const char *arg0);
52    
53     // Startup supplied session file.
54     QString sSessionFile;
55    
56     // Server options...
57     QString sServerHost;
58     int iServerPort;
59     int iServerTimeout;
60     bool bServerStart;
61     QString sServerCmdLine;
62     int iStartDelay;
63    
64     // Display options...
65     QString sDisplayFont;
66 capela 267 bool bDisplayEffect;
67 capela 102 bool bAutoRefresh;
68     int iAutoRefreshTime;
69 capela 119 int iMaxVolume;
70 capela 102 QString sMessagesFont;
71     bool bMessagesLimit;
72     int iMessagesLimitLines;
73     bool bConfirmRemove;
74 capela 454 bool bKeepOnTop;
75 capela 102 bool bStdoutCapture;
76     bool bCompletePath;
77 capela 341 bool bInstrumentNames;
78 capela 102
79     // View options...
80     bool bMenubar;
81     bool bToolbar;
82     bool bStatusbar;
83     bool bAutoArrange;
84    
85     // Default options...
86     QString sSessionDir;
87     QString sInstrumentDir;
88 capela 176 QString sEngineName;
89     QString sAudioDriver;
90     QString sMidiDriver;
91 capela 980 int iMidiMap;
92     int iMidiBank;
93     int iMidiProg;
94     int iVolume;
95     int iLoadMode;
96 capela 102
97     // Recent file list.
98     int iMaxRecentFiles;
99     QStringList recentFiles;
100    
101     // Widget geometry persistence helper prototypes.
102     void saveWidgetGeometry(QWidget *pWidget);
103     void loadWidgetGeometry(QWidget *pWidget);
104    
105     // Combo box history persistence helper prototypes.
106     void add2ComboBoxHistory(QComboBox *pComboBox, const QString& sNewText, int iLimit = 8, int iIndex = -1);
107     void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
108     void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
109    
110     private:
111    
112     // Settings member variables.
113     QSettings m_settings;
114     };
115    
116    
117     #endif // __qsamplerOptions_h
118    
119    
120     // end of qsamplerOptions.h

  ViewVC Help
Powered by ViewVC