/[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 267 by capela, Wed Oct 6 15:42:59 2004 UTC revision 1509 by capela, Thu Nov 22 11:10:44 2007 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-2007, 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;
# Line 36  class qsamplerOptions Line 39  class qsamplerOptions
39  {  {
40  public:  public:
41    
42      // Constructor.          // Constructor.
43      qsamplerOptions();          qsamplerOptions();
44      // Default destructor.          // Default destructor.
45      ~qsamplerOptions();          ~qsamplerOptions();
46    
47      // The settings object accessor.          // The settings object accessor.
48      QSettings& settings();          QSettings& settings();
49    
50      // Command line arguments parser.          // Command line arguments parser.
51      bool parse_args(int argc, char **argv);          bool parse_args(int argc, char **argv);
52      // Command line usage helper.          // Command line usage helper.
53      void print_usage(const char *arg0);          void print_usage(const char *arg0);
54    
55      // Startup supplied session file.          // Startup supplied session file.
56      QString sSessionFile;          QString sSessionFile;
57    
58      // Server options...          // Server options...
59      QString sServerHost;          QString sServerHost;
60      int     iServerPort;          int     iServerPort;
61      int     iServerTimeout;          int     iServerTimeout;
62      bool    bServerStart;          bool    bServerStart;
63      QString sServerCmdLine;          QString sServerCmdLine;
64      int     iStartDelay;          int     iStartDelay;
65    
66      // Display options...          // Display options...
67      QString sDisplayFont;          QString sDisplayFont;
68      bool    bDisplayEffect;          bool    bDisplayEffect;
69      bool    bAutoRefresh;          bool    bAutoRefresh;
70      int     iAutoRefreshTime;          int     iAutoRefreshTime;
71      int     iMaxVolume;          int     iMaxVolume;
72      QString sMessagesFont;          QString sMessagesFont;
73      bool    bMessagesLimit;          bool    bMessagesLimit;
74      int     iMessagesLimitLines;          int     iMessagesLimitLines;
75      bool    bConfirmRemove;          bool    bConfirmRemove;
76      bool    bStdoutCapture;          bool    bKeepOnTop;
77      bool    bCompletePath;          bool    bStdoutCapture;
78            bool    bCompletePath;
79      // View options...          bool    bInstrumentNames;
80      bool    bMenubar;  
81      bool    bToolbar;          // View options...
82      bool    bStatusbar;          bool    bMenubar;
83      bool    bAutoArrange;          bool    bToolbar;
84            bool    bStatusbar;
85      // Default options...          bool    bAutoArrange;
86      QString sSessionDir;  
87      QString sInstrumentDir;          // Default options...
88      QString sEngineName;          QString sSessionDir;
89      QString sAudioDriver;          QString sInstrumentDir;
90      QString sMidiDriver;          QString sEngineName;
91            QString sAudioDriver;
92      // Recent file list.          QString sMidiDriver;
93      int     iMaxRecentFiles;          int     iMidiMap;
94      QStringList recentFiles;          int     iMidiBank;
95            int     iMidiProg;
96      // Widget geometry persistence helper prototypes.          int     iVolume;
97      void saveWidgetGeometry(QWidget *pWidget);          int     iLoadMode;
98      void loadWidgetGeometry(QWidget *pWidget);  
99            // Recent file list.
100      // Combo box history persistence helper prototypes.          int     iMaxRecentFiles;
101      void add2ComboBoxHistory(QComboBox *pComboBox, const QString& sNewText, int iLimit = 8, int iIndex = -1);          QStringList recentFiles;
102      void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);  
103      void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);          // Widget geometry persistence helper prototypes.
104            void saveWidgetGeometry(QWidget *pWidget);
105            void loadWidgetGeometry(QWidget *pWidget);
106    
107            // Combo box history persistence helper prototypes.
108            void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
109            void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8);
110    
111  private:  private:
112    
113      // Settings member variables.          // Settings member variables.
114      QSettings m_settings;          QSettings m_settings;
115  };  };
116    
117    

Legend:
Removed from v.267  
changed lines
  Added in v.1509

  ViewVC Help
Powered by ViewVC