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

Legend:
Removed from v.1464  
changed lines
  Added in v.1558

  ViewVC Help
Powered by ViewVC