/[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 341 by capela, Tue Jan 18 11:29:01 2005 UTC revision 1738 by capela, Wed May 14 15:24:22 2008 UTC
# Line 1  Line 1 
1  // qsamplerOptions.h  // qsamplerOptions.h
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2003-2005, 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
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.          // 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    bStdoutCapture;          QString sMessagesFont;
78      bool    bCompletePath;          bool    bMessagesLimit;
79      bool    bInstrumentNames;          int     iMessagesLimitLines;
80            bool    bConfirmRemove;
81      // View options...          bool    bKeepOnTop;
82      bool    bMenubar;          bool    bStdoutCapture;
83      bool    bToolbar;          bool    bCompletePath;
84      bool    bStatusbar;          bool    bInstrumentNames;
85      bool    bAutoArrange;  
86            // View options...
87      // Default options...          bool    bMenubar;
88      QString sSessionDir;          bool    bToolbar;
89      QString sInstrumentDir;          bool    bStatusbar;
90      QString sEngineName;          bool    bAutoArrange;
91      QString sAudioDriver;  
92      QString sMidiDriver;          // Default options...
93            QString sSessionDir;
94      // Recent file list.          QString sInstrumentDir;
95      int     iMaxRecentFiles;          QString sEngineName;
96      QStringList recentFiles;          QString sAudioDriver;
97            QString sMidiDriver;
98      // Widget geometry persistence helper prototypes.          int     iMidiMap;
99      void saveWidgetGeometry(QWidget *pWidget);          int     iMidiBank;
100      void loadWidgetGeometry(QWidget *pWidget);          int     iMidiProg;
101            int     iVolume;
102      // Combo box history persistence helper prototypes.          int     iLoadMode;
103      void add2ComboBoxHistory(QComboBox *pComboBox, const QString& sNewText, int iLimit = 8, int iIndex = -1);  
104      void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);          // Recent file list.
105      void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);          int     iMaxRecentFiles;
106            QStringList recentFiles;
107    
108            // Widget geometry persistence helper prototypes.
109            void saveWidgetGeometry(QWidget *pWidget);
110            void loadWidgetGeometry(QWidget *pWidget);
111    
112            // Combo box history persistence helper prototypes.
113            void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
114            void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
115    
116  private:  private:
117    
118      // Settings member variables.          // Settings member variables.
119      QSettings m_settings;          QSettings m_settings;
120  };  };
121    
122    } // namespace QSampler
123    
124    
125  #endif  // __qsamplerOptions_h  #endif  // __qsamplerOptions_h
126    

Legend:
Removed from v.341  
changed lines
  Added in v.1738

  ViewVC Help
Powered by ViewVC