/[svn]/qsampler/trunk/src/qsamplerOptionsForm.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerOptionsForm.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1461 by schoenebeck, Sun Oct 28 23:30:36 2007 UTC revision 1473 by capela, Mon Nov 5 19:07:26 2007 UTC
# Line 1  Line 1 
1    // qsamplerOptionsForm.cpp
2    //
3    /****************************************************************************
4       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
8       modify it under the terms of the GNU General Public License
9       as published by the Free Software Foundation; either version 2
10       of the License, or (at your option) any later version.
11    
12       This program is distributed in the hope that it will be useful,
13       but WITHOUT ANY WARRANTY; without even the implied warranty of
14       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15       GNU General Public License for more details.
16    
17       You should have received a copy of the GNU General Public License along
18       with this program; if not, write to the Free Software Foundation, Inc.,
19       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20    
21    *****************************************************************************/
22    
23  #include "qsamplerOptionsForm.h"  #include "qsamplerOptionsForm.h"
24    
25  #include "qsamplerAbout.h"  #include "qsamplerAbout.h"
# Line 8  Line 30 
30    
31  namespace QSampler {  namespace QSampler {
32    
33  OptionsForm::OptionsForm(QWidget* parent) : QDialog(parent) {  OptionsForm::OptionsForm(QWidget* parent) : QDialog(parent)
34      ui.setupUi(this);  {
35            ui.setupUi(this);
     // No settings descriptor initially (the caller will set it).  
     m_pOptions = NULL;  
   
     // Initialize dirty control state.  
     m_iDirtySetup = 0;  
     m_iDirtyCount = 0;  
36    
37      // Set dialog validators...          // No settings descriptor initially (the caller will set it).
38      ui.ServerPortComboBox->setValidator(new QIntValidator(ui.ServerPortComboBox));          m_pOptions = NULL;
39    
40      // Try to restore old window positioning.          // Initialize dirty control state.
41      adjustSize();          m_iDirtySetup = 0;
42            m_iDirtyCount = 0;
43    
44            // Set dialog validators...
45            ui.ServerPortComboBox->setValidator(new QIntValidator(ui.ServerPortComboBox));
46    
47            // Try to restore old window positioning.
48            adjustSize();
49    
50            QObject::connect(ui.ServerHostComboBox,
51                    SIGNAL(textChanged(const QString&)),
52                    SLOT(optionsChanged()));
53            QObject::connect(ui.ServerPortComboBox,
54                    SIGNAL(textChanged(const QString&)),
55                    SLOT(optionsChanged()));
56            QObject::connect(ui.ServerTimeoutSpinBox,
57                    SIGNAL(valueChanged(int)),
58                    SLOT(optionsChanged()));
59            QObject::connect(ui.ServerStartCheckBox,
60                    SIGNAL(stateChanged(int)),
61                    SLOT(optionsChanged()));
62            QObject::connect(ui.ServerCmdLineComboBox,
63                    SIGNAL(textChanged(const QString&)),
64                    SLOT(optionsChanged()));
65            QObject::connect(ui.StartDelaySpinBox,
66                    SIGNAL(valueChanged(int)),
67                    SLOT(optionsChanged()));
68            QObject::connect(ui.DisplayFontPushButton,
69                    SIGNAL(clicked()),
70                    SLOT(chooseDisplayFont()));
71            QObject::connect(ui.DisplayEffectCheckBox,
72                    SIGNAL(toggled(bool)),
73                    SLOT(toggleDisplayEffect(bool)));
74            QObject::connect(ui.AutoRefreshCheckBox,
75                    SIGNAL(stateChanged(int)),
76                    SLOT(optionsChanged()));
77            QObject::connect(ui.AutoRefreshTimeSpinBox,
78                    SIGNAL(valueChanged(int)),
79                    SLOT(optionsChanged()));
80            QObject::connect(ui.MaxVolumeSpinBox,
81                    SIGNAL(valueChanged(int)),
82                    SLOT(optionsChanged()));
83            QObject::connect(ui.MessagesFontPushButton,
84                    SIGNAL(clicked()),
85                    SLOT(chooseMessagesFont()));
86            QObject::connect(ui.MessagesLimitCheckBox,
87                    SIGNAL(stateChanged(int)),
88                    SLOT(optionsChanged()));
89            QObject::connect(ui.MessagesLimitLinesSpinBox,
90                    SIGNAL(valueChanged(int)),
91                    SLOT(optionsChanged()));
92            QObject::connect(ui.ConfirmRemoveCheckBox,
93                    SIGNAL(stateChanged(int)),
94                    SLOT(optionsChanged()));
95            QObject::connect(ui.KeepOnTopCheckBox,
96                    SIGNAL(stateChanged(int)),
97                    SLOT(optionsChanged()));
98            QObject::connect(ui.StdoutCaptureCheckBox,
99                    SIGNAL(stateChanged(int)),
100                    SLOT(optionsChanged()));
101            QObject::connect(ui.MaxRecentFilesSpinBox,
102                    SIGNAL(valueChanged(int)),
103                    SLOT(optionsChanged()));
104            QObject::connect(ui.CompletePathCheckBox,
105                    SIGNAL(stateChanged(int)),
106                    SLOT(optionsChanged()));
107            QObject::connect(ui.InstrumentNamesCheckBox,
108                    SIGNAL(stateChanged(int)),
109                    SLOT(optionsChanged()));
110            QObject::connect(ui.OkPushButton,
111                    SIGNAL(clicked()),
112                    SLOT(accept()));
113            QObject::connect(ui.CancelPushButton,
114                    SIGNAL(clicked()),
115                    SLOT(reject()));
116  }  }
117    
118  OptionsForm::~OptionsForm() {  OptionsForm::~OptionsForm()
119    {
120  }  }
121    
122  // Populate (setup) dialog controls from settings descriptors.  // Populate (setup) dialog controls from settings descriptors.
# Line 233  void OptionsForm::toggleDisplayEffect ( Line 324  void OptionsForm::toggleDisplayEffect (
324  }  }
325    
326  } // namespace QSampler  } // namespace QSampler
327    
328    
329    // end of qsamplerOptionsForm.cpp

Legend:
Removed from v.1461  
changed lines
  Added in v.1473

  ViewVC Help
Powered by ViewVC