/[svn]/qsampler/trunk/src/qsamplerOptionsForm.ui.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerOptionsForm.ui.h

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

revision 102 by capela, Fri Jun 4 10:30:56 2004 UTC revision 871 by capela, Thu Jun 1 09:32:01 2006 UTC
# Line 2  Line 2 
2  //  //
3  // ui.h extension file, included from the uic-generated form implementation.  // ui.h extension file, included from the uic-generated form implementation.
4  /****************************************************************************  /****************************************************************************
5     Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved.
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 20  Line 20 
20    
21  *****************************************************************************/  *****************************************************************************/
22    
23    #include "qsamplerAbout.h"
24    #include "qsamplerOptions.h"
25    
26  #include <qvalidator.h>  #include <qvalidator.h>
27  #include <qmessagebox.h>  #include <qmessagebox.h>
28  #include <qfontdialog.h>  #include <qfontdialog.h>
29    
 #include "qsamplerOptions.h"  
   
 #include "config.h"  
   
30    
31  // Kind of constructor.  // Kind of constructor.
32  void qsamplerOptionsForm::init (void)  void qsamplerOptionsForm::init (void)
# Line 86  void qsamplerOptionsForm::setup ( qsampl Line 85  void qsamplerOptionsForm::setup ( qsampl
85      DisplayFontTextLabel->setFont(font);      DisplayFontTextLabel->setFont(font);
86      DisplayFontTextLabel->setText(font.family() + " " + QString::number(font.pointSize()));      DisplayFontTextLabel->setText(font.family() + " " + QString::number(font.pointSize()));
87    
88      // Auto-refresh option.      // Display effect.
89        DisplayEffectCheckBox->setChecked(m_pOptions->bDisplayEffect);
90        toggleDisplayEffect(m_pOptions->bDisplayEffect);
91    
92        // Auto-refresh and maximum volume options.
93      AutoRefreshCheckBox->setChecked(m_pOptions->bAutoRefresh);      AutoRefreshCheckBox->setChecked(m_pOptions->bAutoRefresh);
94      AutoRefreshTimeSpinBox->setValue(m_pOptions->iAutoRefreshTime);      AutoRefreshTimeSpinBox->setValue(m_pOptions->iAutoRefreshTime);
95            MaxVolumeSpinBox->setValue(m_pOptions->iMaxVolume);
96    
97      // Messages font.      // Messages font.
98      if (m_pOptions->sMessagesFont.isEmpty() || !font.fromString(m_pOptions->sMessagesFont))      if (m_pOptions->sMessagesFont.isEmpty() || !font.fromString(m_pOptions->sMessagesFont))
99          font = QFont("Fixed", 8);          font = QFont("Fixed", 8);
# Line 102  void qsamplerOptionsForm::setup ( qsampl Line 106  void qsamplerOptionsForm::setup ( qsampl
106    
107      // Other options finally.      // Other options finally.
108      ConfirmRemoveCheckBox->setChecked(m_pOptions->bConfirmRemove);      ConfirmRemoveCheckBox->setChecked(m_pOptions->bConfirmRemove);
109        KeepOnTopCheckBox->setChecked(m_pOptions->bKeepOnTop);
110      StdoutCaptureCheckBox->setChecked(m_pOptions->bStdoutCapture);      StdoutCaptureCheckBox->setChecked(m_pOptions->bStdoutCapture);
111      CompletePathCheckBox->setChecked(m_pOptions->bCompletePath);      CompletePathCheckBox->setChecked(m_pOptions->bCompletePath);
112        InstrumentNamesCheckBox->setChecked(m_pOptions->bInstrumentNames);
113      MaxRecentFilesSpinBox->setValue(m_pOptions->iMaxRecentFiles);      MaxRecentFilesSpinBox->setValue(m_pOptions->iMaxRecentFiles);
114    
115    #ifndef CONFIG_LIBGIG
116        InstrumentNamesCheckBox->setEnabled(false);
117    #endif
118    
119      // Done.      // Done.
120      m_iDirtySetup--;      m_iDirtySetup--;
121      stabilizeForm();      stabilizeForm();
# Line 118  void qsamplerOptionsForm::accept (void) Line 128  void qsamplerOptionsForm::accept (void)
128      // Save options...      // Save options...
129      if (m_iDirtyCount > 0) {      if (m_iDirtyCount > 0) {
130          // Server settings....          // Server settings....
131          m_pOptions->sServerHost          = ServerHostComboBox->currentText().stripWhiteSpace();          m_pOptions->sServerHost         = ServerHostComboBox->currentText().stripWhiteSpace();
132          m_pOptions->iServerPort          = ServerPortComboBox->currentText().toInt();          m_pOptions->iServerPort         = ServerPortComboBox->currentText().toInt();
133          m_pOptions->iServerTimeout       = ServerTimeoutSpinBox->value();          m_pOptions->iServerTimeout      = ServerTimeoutSpinBox->value();
134          m_pOptions->bServerStart         = ServerStartCheckBox->isChecked();          m_pOptions->bServerStart        = ServerStartCheckBox->isChecked();
135          m_pOptions->sServerCmdLine       = ServerCmdLineComboBox->currentText().simplifyWhiteSpace();          m_pOptions->sServerCmdLine      = ServerCmdLineComboBox->currentText().stripWhiteSpace();
136          m_pOptions->iStartDelay          = StartDelaySpinBox->value();          m_pOptions->iStartDelay         = StartDelaySpinBox->value();
137          // Channel display options...          // Channels options...
138          m_pOptions->sDisplayFont         = DisplayFontTextLabel->font().toString();          m_pOptions->sDisplayFont        = DisplayFontTextLabel->font().toString();
139          m_pOptions->bAutoRefresh         = AutoRefreshCheckBox->isChecked();          m_pOptions->bDisplayEffect      = DisplayEffectCheckBox->isChecked();
140          m_pOptions->iAutoRefreshTime     = AutoRefreshTimeSpinBox->value();          m_pOptions->bAutoRefresh        = AutoRefreshCheckBox->isChecked();
141          // Message window options...          m_pOptions->iAutoRefreshTime    = AutoRefreshTimeSpinBox->value();
142          m_pOptions->sMessagesFont        = MessagesFontTextLabel->font().toString();          m_pOptions->iMaxVolume          = MaxVolumeSpinBox->value();
143          m_pOptions->bMessagesLimit       = MessagesLimitCheckBox->isChecked();          // Messages options...
144          m_pOptions->iMessagesLimitLines  = MessagesLimitLinesSpinBox->value();          m_pOptions->sMessagesFont       = MessagesFontTextLabel->font().toString();
145            m_pOptions->bMessagesLimit      = MessagesLimitCheckBox->isChecked();
146            m_pOptions->iMessagesLimitLines = MessagesLimitLinesSpinBox->value();
147          // Other options...          // Other options...
148          m_pOptions->bConfirmRemove       = ConfirmRemoveCheckBox->isChecked();          m_pOptions->bConfirmRemove      = ConfirmRemoveCheckBox->isChecked();
149          m_pOptions->bStdoutCapture       = StdoutCaptureCheckBox->isChecked();          m_pOptions->bKeepOnTop          = KeepOnTopCheckBox->isChecked();
150          m_pOptions->bCompletePath        = CompletePathCheckBox->isChecked();          m_pOptions->bStdoutCapture      = StdoutCaptureCheckBox->isChecked();
151          m_pOptions->iMaxRecentFiles      = MaxRecentFilesSpinBox->value();          m_pOptions->bCompletePath       = CompletePathCheckBox->isChecked();
152            m_pOptions->bInstrumentNames    = InstrumentNamesCheckBox->isChecked();
153            m_pOptions->iMaxRecentFiles     = MaxRecentFilesSpinBox->value();
154          // Reset dirty flag.          // Reset dirty flag.
155          m_iDirtyCount = 0;          m_iDirtyCount = 0;
156      }      }
# Line 158  void qsamplerOptionsForm::reject (void) Line 172  void qsamplerOptionsForm::reject (void)
172    
173      // Check if there's any pending changes...      // Check if there's any pending changes...
174      if (m_iDirtyCount > 0) {      if (m_iDirtyCount > 0) {
175          switch (QMessageBox::warning(this, tr("Warning"),          switch (QMessageBox::warning(this,
176                            QSAMPLER_TITLE ": " + tr("Warning"),
177              tr("Some settings have been changed.\n\n"              tr("Some settings have been changed.\n\n"
178                 "Do you want to apply the changes?"),                 "Do you want to apply the changes?"),
179              tr("Apply"), tr("Discard"), tr("Cancel"))) {              tr("Apply"), tr("Discard"), tr("Cancel"))) {
# Line 230  void qsamplerOptionsForm::chooseMessages Line 245  void qsamplerOptionsForm::chooseMessages
245  }  }
246    
247    
248    // The channel display effect demo changer.
249    void qsamplerOptionsForm::toggleDisplayEffect ( bool bOn )
250    {
251        QPixmap pm;
252        if (bOn)
253            pm = QPixmap::fromMimeSource("displaybg1.png");
254        DisplayFontTextLabel->setPaletteBackgroundPixmap(pm);
255    
256        optionsChanged();
257    }
258    
259    
260  // end of qsamplerOptionsForm.ui.h  // end of qsamplerOptionsForm.ui.h
261    

Legend:
Removed from v.102  
changed lines
  Added in v.871

  ViewVC Help
Powered by ViewVC