Mercurial > hg > svgui
comparison widgets/PluginParameterDialog.cpp @ 148:4e7980e3b48e
* Handle plugins with weird block size requirements properly
author | Chris Cannam |
---|---|
date | Wed, 20 Sep 2006 15:47:16 +0000 |
parents | e2ad3543c8a1 |
children | 3dade4b025b7 |
comparison
equal
deleted
inserted
replaced
147:e2ad3543c8a1 | 148:4e7980e3b48e |
---|---|
273 blockSizeCombo->setValidator(new QIntValidator(1, pow(2, 18), this)); | 273 blockSizeCombo->setValidator(new QIntValidator(1, pow(2, 18), this)); |
274 connect(blockSizeCombo, SIGNAL(textChanged(QString)), | 274 connect(blockSizeCombo, SIGNAL(textChanged(QString)), |
275 this, SLOT(blockSizeComboChanged(QString))); | 275 this, SLOT(blockSizeComboChanged(QString))); |
276 windowLayout->addWidget(blockSizeCombo, 0, 1); | 276 windowLayout->addWidget(blockSizeCombo, 0, 1); |
277 | 277 |
278 windowLayout->addWidget(new QLabel(tr("Window increment:")), 1, 0); | |
279 | |
280 QComboBox *incrementCombo = new QComboBox; | |
281 incrementCombo->setEditable(true); | |
282 found = false; | |
283 for (int i = 0; i < 14; ++i) { | |
284 int val = pow(2, i + 3); | |
285 incrementCombo->addItem(QString("%1").arg(val)); | |
286 if (val == increment) { | |
287 incrementCombo->setCurrentIndex(i); | |
288 found = true; | |
289 } | |
290 } | |
291 if (!found) { | |
292 incrementCombo->addItem(QString("%1").arg(increment)); | |
293 incrementCombo->setCurrentIndex(incrementCombo->count() - 1); | |
294 } | |
295 incrementCombo->setValidator(new QIntValidator(1, pow(2, 18), this)); | |
296 connect(incrementCombo, SIGNAL(textChanged(QString)), | |
297 this, SLOT(incrementComboChanged(QString))); | |
298 windowLayout->addWidget(incrementCombo, 1, 1); | |
299 | |
278 if (showFrequencyDomainOptions) { | 300 if (showFrequencyDomainOptions) { |
279 | |
280 windowLayout->addWidget(new QLabel(tr("Window increment:")), 1, 0); | |
281 | |
282 QComboBox *incrementCombo = new QComboBox; | |
283 incrementCombo->setEditable(true); | |
284 found = false; | |
285 for (int i = 0; i < 14; ++i) { | |
286 int val = pow(2, i + 3); | |
287 incrementCombo->addItem(QString("%1").arg(val)); | |
288 if (val == increment) { | |
289 incrementCombo->setCurrentIndex(i); | |
290 found = true; | |
291 } | |
292 } | |
293 if (!found) { | |
294 incrementCombo->addItem(QString("%1").arg(increment)); | |
295 incrementCombo->setCurrentIndex(incrementCombo->count() - 1); | |
296 } | |
297 incrementCombo->setValidator(new QIntValidator(1, pow(2, 18), this)); | |
298 connect(incrementCombo, SIGNAL(textChanged(QString)), | |
299 this, SLOT(incrementComboChanged(QString))); | |
300 windowLayout->addWidget(incrementCombo, 1, 1); | |
301 | 301 |
302 windowLayout->addWidget(new QLabel(tr("Window shape:")), 2, 0); | 302 windowLayout->addWidget(new QLabel(tr("Window shape:")), 2, 0); |
303 WindowTypeSelector *windowTypeSelector = new WindowTypeSelector; | 303 WindowTypeSelector *windowTypeSelector = new WindowTypeSelector; |
304 connect(windowTypeSelector, SIGNAL(windowTypeChanged(WindowType type)), | 304 connect(windowTypeSelector, SIGNAL(windowTypeChanged(WindowType type)), |
305 this, SLOT(windowTypeChanged(type))); | 305 this, SLOT(windowTypeChanged(type))); |