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

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

  ViewVC Help
Powered by ViewVC