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 |
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); |
230 |
// Done. |
// Done. |
231 |
m_iDirtySetup--; |
m_iDirtySetup--; |
232 |
stabilizeForm(); |
stabilizeForm(); |
|
|
|
|
// Done. |
|
|
m_iDirtySetup--; |
|
|
stabilizeForm(); |
|
233 |
} |
} |
234 |
|
|
235 |
|
|
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(); |