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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 341 - (hide annotations) (download) (as text)
Tue Jan 18 11:29:01 2005 UTC (19 years, 3 months ago) by capela
File MIME type: text/x-c++hdr
File size: 3118 byte(s)
* Actual instrument names are now optionally retrieved
  from the instrument file, even though libgig is available,
  avoiding excessively annoying load times while on the
  channel dialog, when huge instrument files are selected.

1 capela 102 // qsamplerOptions.h
2     //
3     /****************************************************************************
4 capela 341 Copyright (C) 2003-2005, 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     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19    
20     *****************************************************************************/
21    
22     #ifndef __qsamplerOptions_h
23     #define __qsamplerOptions_h
24    
25     #include <qsettings.h>
26    
27     class QWidget;
28     class QComboBox;
29    
30    
31     //-------------------------------------------------------------------------
32     // qsamplerOptions - Prototype settings class.
33     //
34    
35     class qsamplerOptions
36     {
37     public:
38    
39     // Constructor.
40     qsamplerOptions();
41     // Default destructor.
42     ~qsamplerOptions();
43    
44     // The settings object accessor.
45     QSettings& settings();
46    
47     // Command line arguments parser.
48     bool parse_args(int argc, char **argv);
49     // Command line usage helper.
50     void print_usage(const char *arg0);
51    
52     // Startup supplied session file.
53     QString sSessionFile;
54    
55     // Server options...
56     QString sServerHost;
57     int iServerPort;
58     int iServerTimeout;
59     bool bServerStart;
60     QString sServerCmdLine;
61     int iStartDelay;
62    
63     // Display options...
64     QString sDisplayFont;
65 capela 267 bool bDisplayEffect;
66 capela 102 bool bAutoRefresh;
67     int iAutoRefreshTime;
68 capela 119 int iMaxVolume;
69 capela 102 QString sMessagesFont;
70     bool bMessagesLimit;
71     int iMessagesLimitLines;
72     bool bConfirmRemove;
73     bool bStdoutCapture;
74     bool bCompletePath;
75 capela 341 bool bInstrumentNames;
76 capela 102
77     // View options...
78     bool bMenubar;
79     bool bToolbar;
80     bool bStatusbar;
81     bool bAutoArrange;
82    
83     // Default options...
84     QString sSessionDir;
85     QString sInstrumentDir;
86 capela 176 QString sEngineName;
87     QString sAudioDriver;
88     QString sMidiDriver;
89 capela 102
90     // Recent file list.
91     int iMaxRecentFiles;
92     QStringList recentFiles;
93    
94     // Widget geometry persistence helper prototypes.
95     void saveWidgetGeometry(QWidget *pWidget);
96     void loadWidgetGeometry(QWidget *pWidget);
97    
98     // Combo box history persistence helper prototypes.
99     void add2ComboBoxHistory(QComboBox *pComboBox, const QString& sNewText, int iLimit = 8, int iIndex = -1);
100     void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
101     void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
102    
103     private:
104    
105     // Settings member variables.
106     QSettings m_settings;
107     };
108    
109    
110     #endif // __qsamplerOptions_h
111    
112    
113     // end of qsamplerOptions.h

  ViewVC Help
Powered by ViewVC