1 |
// qsamplerOptionsForm.cpp |
// qsamplerOptionsForm.cpp |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-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 |
133 |
QObject::connect(m_ui.MaxStreamsSpinBox, |
QObject::connect(m_ui.MaxStreamsSpinBox, |
134 |
SIGNAL(valueChanged(int)), |
SIGNAL(valueChanged(int)), |
135 |
SLOT(maxStreamsChanged(int))); |
SLOT(maxStreamsChanged(int))); |
136 |
QObject::connect(m_ui.OkPushButton, |
QObject::connect(m_ui.DialogButtonBox, |
137 |
SIGNAL(clicked()), |
SIGNAL(accepted()), |
138 |
SLOT(accept())); |
SLOT(accept())); |
139 |
QObject::connect(m_ui.CancelPushButton, |
QObject::connect(m_ui.DialogButtonBox, |
140 |
SIGNAL(clicked()), |
SIGNAL(rejected()), |
141 |
SLOT(reject())); |
SLOT(reject())); |
142 |
} |
} |
143 |
|
|
325 |
m_pOptions->saveComboBoxHistory(m_ui.ServerCmdLineComboBox); |
m_pOptions->saveComboBoxHistory(m_ui.ServerCmdLineComboBox); |
326 |
m_pOptions->saveComboBoxHistory(m_ui.MessagesLogPathComboBox); |
m_pOptions->saveComboBoxHistory(m_ui.MessagesLogPathComboBox); |
327 |
|
|
328 |
|
// Save/commit to disk. |
329 |
|
m_pOptions->saveOptions(); |
330 |
|
|
331 |
// Just go with dialog acceptance. |
// Just go with dialog acceptance. |
332 |
QDialog::accept(); |
QDialog::accept(); |
333 |
} |
} |
344 |
QSAMPLER_TITLE ": " + tr("Warning"), |
QSAMPLER_TITLE ": " + tr("Warning"), |
345 |
tr("Some settings have been changed.\n\n" |
tr("Some settings have been changed.\n\n" |
346 |
"Do you want to apply the changes?"), |
"Do you want to apply the changes?"), |
347 |
tr("Apply"), tr("Discard"), tr("Cancel"))) { |
QMessageBox::Apply | |
348 |
case 0: // Apply... |
QMessageBox::Discard | |
349 |
|
QMessageBox::Cancel)) { |
350 |
|
case QMessageBox::Apply: |
351 |
accept(); |
accept(); |
352 |
return; |
return; |
353 |
case 1: // Discard |
case QMessageBox::Discard: |
354 |
break; |
break; |
355 |
default: // Cancel. |
default: // Cancel. |
356 |
bReject = false; |
bReject = false; |
397 |
m_ui.MessagesLimitLinesSpinBox->setEnabled( |
m_ui.MessagesLimitLinesSpinBox->setEnabled( |
398 |
m_ui.MessagesLimitCheckBox->isChecked()); |
m_ui.MessagesLimitCheckBox->isChecked()); |
399 |
|
|
400 |
m_ui.OkPushButton->setEnabled(bValid); |
m_ui.DialogButtonBox->button(QDialogButtonBox::Ok)->setEnabled(bValid); |
401 |
} |
} |
402 |
|
|
403 |
|
|
455 |
QPalette pal; |
QPalette pal; |
456 |
pal.setColor(QPalette::Foreground, Qt::green); |
pal.setColor(QPalette::Foreground, Qt::green); |
457 |
if (bOn) { |
if (bOn) { |
458 |
QPixmap pm(":/icons/displaybg1.png"); |
QPixmap pm(":/images/displaybg1.png"); |
459 |
pal.setBrush(QPalette::Background, QBrush(pm)); |
pal.setBrush(QPalette::Background, QBrush(pm)); |
460 |
} else { |
} else { |
461 |
pal.setColor(QPalette::Background, Qt::black); |
pal.setColor(QPalette::Background, Qt::black); |