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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 119 by capela, Wed Jun 9 20:24:48 2004 UTC revision 2028 by capela, Wed Nov 4 18:59:57 2009 UTC
# Line 1  Line 1 
1  // qsamplerOptions.h  // qsamplerOptions.h
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2003-2004, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved.
5       Copyright (C) 2007, Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 13  Line 14 
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.     GNU General Public License for more details.
16    
17     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License along
18     along with this program; if not, write to the Free Software     with this program; if not, write to the Free Software Foundation, Inc.,
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20    
21  *****************************************************************************/  *****************************************************************************/
22    
23  #ifndef __qsamplerOptions_h  #ifndef __qsamplerOptions_h
24  #define __qsamplerOptions_h  #define __qsamplerOptions_h
25    
26  #include <qsettings.h>  #include <QSettings>
27    #include <QStringList>
28    
29    
30  class QWidget;  class QWidget;
31  class QComboBox;  class QComboBox;
32    
33    namespace QSampler {
34    
35  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
36  // qsamplerOptions - Prototype settings class.  // QSampler::Options - Prototype settings class.
37  //  //
38    
39  class qsamplerOptions  class Options
40  {  {
41  public:  public:
42    
43      // Constructor.          // Constructor.
44      qsamplerOptions();          Options();
45      // Default destructor.          // Default destructor.
46      ~qsamplerOptions();          ~Options();
47    
48      // The settings object accessor.          // The settings object accessor.
49      QSettings& settings();          QSettings& settings();
50    
51      // Command line arguments parser.          // explicit I/O methods.
52      bool parse_args(int argc, char **argv);          void loadOptions();
53      // Command line usage helper.          void saveOptions();
54      void print_usage(const char *arg0);  
55            // Command line arguments parser.
56      // Startup supplied session file.          bool parse_args(const QStringList& args);
57      QString sSessionFile;          // Command line usage helper.
58            void print_usage(const QString& arg0);
59      // Server options...  
60      QString sServerHost;          // Startup supplied session file.
61      int     iServerPort;          QString sSessionFile;
62      int     iServerTimeout;  
63      bool    bServerStart;          // Server options...
64      QString sServerCmdLine;          QString sServerHost;
65      int     iStartDelay;          int     iServerPort;
66            int     iServerTimeout;
67      // Display options...          bool    bServerStart;
68      QString sDisplayFont;          QString sServerCmdLine;
69      bool    bAutoRefresh;          int     iStartDelay;
70      int     iAutoRefreshTime;  
71      int     iMaxVolume;          // Logging options...
72      QString sMessagesFont;          bool    bMessagesLog;
73      bool    bMessagesLimit;          QString sMessagesLogPath;
74      int     iMessagesLimitLines;  
75      bool    bConfirmRemove;          // Display options...
76      bool    bStdoutCapture;          QString sDisplayFont;
77      bool    bCompletePath;          bool    bDisplayEffect;
78            bool    bAutoRefresh;
79      // View options...          int     iAutoRefreshTime;
80      bool    bMenubar;          int     iMaxVolume;
81      bool    bToolbar;          QString sMessagesFont;
82      bool    bStatusbar;          bool    bMessagesLimit;
83      bool    bAutoArrange;          int     iMessagesLimitLines;
84            bool    bConfirmRemove;
85      // Default options...          bool    bKeepOnTop;
86      QString sSessionDir;          bool    bStdoutCapture;
87      QString sInstrumentDir;          bool    bCompletePath;
88            bool    bInstrumentNames;
89      // Recent file list.          int     iBaseFontSize;
90      int     iMaxRecentFiles;  
91      QStringList recentFiles;          // View options...
92            bool    bMenubar;
93      // Widget geometry persistence helper prototypes.          bool    bToolbar;
94      void saveWidgetGeometry(QWidget *pWidget);          bool    bStatusbar;
95      void loadWidgetGeometry(QWidget *pWidget);          bool    bAutoArrange;
96    
97      // Combo box history persistence helper prototypes.          // Default options...
98      void add2ComboBoxHistory(QComboBox *pComboBox, const QString& sNewText, int iLimit = 8, int iIndex = -1);          QString sSessionDir;
99      void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);          QString sInstrumentDir;
100      void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);          QString sEngineName;
101            QString sAudioDriver;
102            QString sMidiDriver;
103            int     iMidiMap;
104            int     iMidiBank;
105            int     iMidiProg;
106            int     iVolume;
107            int     iLoadMode;
108    
109            // Recent file list.
110            int     iMaxRecentFiles;
111            QStringList recentFiles;
112    
113            // Widget geometry persistence helper prototypes.
114            void saveWidgetGeometry(QWidget *pWidget);
115            void loadWidgetGeometry(QWidget *pWidget);
116    
117            // Combo box history persistence helper prototypes.
118            void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
119            void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
120    
121            int  getMaxVoices();
122            int  getEffectiveMaxVoices();
123            void setMaxVoices(int iMaxVoices);
124    
125            int  getMaxStreams();
126            int  getEffectiveMaxStreams();
127            void setMaxStreams(int iMaxStreams);
128    
129            void sendFineTuningSettings();
130    
131  private:  private:
132    
133      // Settings member variables.          // Settings member variables.
134      QSettings m_settings;          QSettings m_settings;
135    
136            // Tuning
137            int iMaxVoices;
138            int iMaxStreams;
139  };  };
140    
141    } // namespace QSampler
142    
143    
144  #endif  // __qsamplerOptions_h  #endif  // __qsamplerOptions_h
145    

Legend:
Removed from v.119  
changed lines
  Added in v.2028

  ViewVC Help
Powered by ViewVC