/[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 1803 by schoenebeck, Sun Dec 7 13:58:16 2008 UTC
# Line 1  Line 1 
1  // qsamplerOptions.h  // qsamplerOptions.h
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, Christian Schoenebeck     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
# 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...          // Logging options...
68      QString sDisplayFont;          bool    bMessagesLog;
69      bool    bDisplayEffect;          QString sMessagesLogPath;
70      bool    bAutoRefresh;  
71      int     iAutoRefreshTime;          // Display options...
72      int     iMaxVolume;          QString sDisplayFont;
73      QString sMessagesFont;          bool    bDisplayEffect;
74      bool    bMessagesLimit;          bool    bAutoRefresh;
75      int     iMessagesLimitLines;          int     iAutoRefreshTime;
76      bool    bConfirmRemove;          int     iMaxVolume;
77      bool    bKeepOnTop;          QString sMessagesFont;
78      bool    bStdoutCapture;          bool    bMessagesLimit;
79      bool    bCompletePath;          int     iMessagesLimitLines;
80      bool    bInstrumentNames;          bool    bConfirmRemove;
81            bool    bKeepOnTop;
82      // View options...          bool    bStdoutCapture;
83      bool    bMenubar;          bool    bCompletePath;
84      bool    bToolbar;          bool    bInstrumentNames;
85      bool    bStatusbar;          int     iBaseFontSize;
86      bool    bAutoArrange;  
87            // View options...
88      // Default options...          bool    bMenubar;
89      QString sSessionDir;          bool    bToolbar;
90      QString sInstrumentDir;          bool    bStatusbar;
91      QString sEngineName;          bool    bAutoArrange;
92      QString sAudioDriver;  
93      QString sMidiDriver;          // Default options...
94            QString sSessionDir;
95            QString sInstrumentDir;
96            QString sEngineName;
97            QString sAudioDriver;
98            QString sMidiDriver;
99          int     iMidiMap;          int     iMidiMap;
100          int     iMidiBank;          int     iMidiBank;
101          int     iMidiProg;          int     iMidiProg;
102          int     iVolume;          int     iVolume;
103          int     iLoadMode;          int     iLoadMode;
104    
105      // Recent file list.          // Recent file list.
106      int     iMaxRecentFiles;          int     iMaxRecentFiles;
107      QStringList recentFiles;          QStringList recentFiles;
108    
109      // Widget geometry persistence helper prototypes.          // Widget geometry persistence helper prototypes.
110      void saveWidgetGeometry(QWidget *pWidget);          void saveWidgetGeometry(QWidget *pWidget);
111      void loadWidgetGeometry(QWidget *pWidget);          void loadWidgetGeometry(QWidget *pWidget);
112    
113      // Combo box history persistence helper prototypes.          // Combo box history persistence helper prototypes.
114      void add2ComboBoxHistory(QComboBox *pComboBox, const QString& sNewText, int iLimit = 8, int iIndex = -1);          void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
115      void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);          void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
116      void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);  
117            int  getMaxVoices();
118            int  getEffectiveMaxVoices();
119            void setMaxVoices(int iMaxVoices);
120    
121            int  getMaxStreams();
122            int  getEffectiveMaxStreams();
123            void setMaxStreams(int iMaxStreams);
124    
125            void sendFineTuningSettings();
126    
127  private:  private:
128    
129      // Settings member variables.          // Settings member variables.
130      QSettings m_settings;          QSettings m_settings;
131    
132            // Tuning
133            int iMaxVoices;
134            int iMaxStreams;
135  };  };
136    
137    } // namespace QSampler
138    
139    
140  #endif  // __qsamplerOptions_h  #endif  // __qsamplerOptions_h
141    

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

  ViewVC Help
Powered by ViewVC