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. |
326 |
} // namespace QSampler |
} // namespace QSampler |
327 |
|
|
328 |
|
|
|
// end of qsamplerOptionsForm.cpp |
|
329 |
|
// end of qsamplerOptionsForm.cpp |