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

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

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

revision 2068 by capela, Thu Feb 19 11:44:57 2009 UTC revision 2069 by capela, Mon Mar 15 10:45:35 2010 UTC
# Line 1  Line 1 
1  // qsamplerInstrumentForm.cpp  // qsamplerInstrumentForm.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, Christian Schoenebeck     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
# Line 50  namespace QSampler { Line 50  namespace QSampler {
50  // QSampler::InstrumentForm -- Instrument map item form implementation.  // QSampler::InstrumentForm -- Instrument map item form implementation.
51  //  //
52    
53  InstrumentForm::InstrumentForm ( QWidget* pParent )  InstrumentForm::InstrumentForm ( QWidget *pParent )
54          : QDialog(pParent)          : QDialog(pParent)
55  {  {
56          m_ui.setupUi(this);          m_ui.setupUi(this);
# Line 230  void InstrumentForm::setup ( Instrument Line 230  void InstrumentForm::setup ( Instrument
230          // Done.          // Done.
231          m_iDirtySetup--;          m_iDirtySetup--;
232          stabilizeForm();          stabilizeForm();
   
         // Done.  
         m_iDirtySetup--;  
         stabilizeForm();  
233  }  }
234    
235    
# Line 402  void InstrumentForm::changed (void) Line 398  void InstrumentForm::changed (void)
398  // Stabilize current form state.  // Stabilize current form state.
399  void InstrumentForm::stabilizeForm (void)  void InstrumentForm::stabilizeForm (void)
400  {  {
401          bool bValid =          bool bValid = !m_ui.NameLineEdit->text().isEmpty()
402                  !m_ui.NameLineEdit->text().isEmpty() &&                  && m_ui.EngineNameComboBox->currentIndex() >= 0
403                  m_ui.EngineNameComboBox->currentIndex() >= 0 &&                  && m_ui.EngineNameComboBox->currentText() != Channel::noEngineName();
                 m_ui.EngineNameComboBox->currentText() !=  
                 Channel::noEngineName();  
404    
405          const QString& sPath = m_ui.InstrumentFileComboBox->currentText();          const QString& sPath = m_ui.InstrumentFileComboBox->currentText();
406          bValid = bValid && !sPath.isEmpty() && QFileInfo(sPath).exists();          bValid = bValid && !sPath.isEmpty() && QFileInfo(sPath).exists();

Legend:
Removed from v.2068  
changed lines
  Added in v.2069

  ViewVC Help
Powered by ViewVC