comparison widgets/PluginParameterDialog.cpp @ 155:8c730f49b9b3

...
author Chris Cannam
date Wed, 04 Oct 2006 14:01:28 +0000
parents 3dade4b025b7
children dd6dd983e8ef
comparison
equal deleted inserted replaced
154:30d624900564 155:8c730f49b9b3
276 if (!found) { 276 if (!found) {
277 blockSizeCombo->addItem(QString("%1").arg(size)); 277 blockSizeCombo->addItem(QString("%1").arg(size));
278 blockSizeCombo->setCurrentIndex(blockSizeCombo->count() - 1); 278 blockSizeCombo->setCurrentIndex(blockSizeCombo->count() - 1);
279 } 279 }
280 blockSizeCombo->setValidator(new QIntValidator(1, pow(2, 18), this)); 280 blockSizeCombo->setValidator(new QIntValidator(1, pow(2, 18), this));
281 connect(blockSizeCombo, SIGNAL(textChanged(QString)), 281 connect(blockSizeCombo, SIGNAL(editTextChanged(const QString &)),
282 this, SLOT(blockSizeComboChanged(QString))); 282 this, SLOT(blockSizeComboChanged(const QString &)));
283 windowLayout->addWidget(blockSizeCombo, 0, 1); 283 windowLayout->addWidget(blockSizeCombo, 0, 1);
284 284
285 windowLayout->addWidget(new QLabel(tr("Window increment:")), 1, 0); 285 windowLayout->addWidget(new QLabel(tr("Window increment:")), 1, 0);
286 286
287 QComboBox *incrementCombo = new QComboBox; 287 QComboBox *incrementCombo = new QComboBox;
298 if (!found) { 298 if (!found) {
299 incrementCombo->addItem(QString("%1").arg(increment)); 299 incrementCombo->addItem(QString("%1").arg(increment));
300 incrementCombo->setCurrentIndex(incrementCombo->count() - 1); 300 incrementCombo->setCurrentIndex(incrementCombo->count() - 1);
301 } 301 }
302 incrementCombo->setValidator(new QIntValidator(1, pow(2, 18), this)); 302 incrementCombo->setValidator(new QIntValidator(1, pow(2, 18), this));
303 connect(incrementCombo, SIGNAL(textChanged(QString)), 303 connect(incrementCombo, SIGNAL(editTextChanged(const QString &)),
304 this, SLOT(incrementComboChanged(QString))); 304 this, SLOT(incrementComboChanged(const QString &)));
305 windowLayout->addWidget(incrementCombo, 1, 1); 305 windowLayout->addWidget(incrementCombo, 1, 1);
306 306
307 if (showFrequencyDomainOptions) { 307 if (showFrequencyDomainOptions) {
308 308
309 windowLayout->addWidget(new QLabel(tr("Window shape:")), 2, 0); 309 windowLayout->addWidget(new QLabel(tr("Window shape:")), 2, 0);
370 windowType = m_windowType; 370 windowType = m_windowType;
371 return; 371 return;
372 } 372 }
373 373
374 void 374 void
375 PluginParameterDialog::blockSizeComboChanged(QString text) 375 PluginParameterDialog::blockSizeComboChanged(const QString &text)
376 { 376 {
377 m_blockSize = text.toInt(); 377 m_blockSize = text.toInt();
378 std::cerr << "Block size changed to " << m_blockSize << std::endl; 378 std::cerr << "Block size changed to " << m_blockSize << std::endl;
379 } 379 }
380 380
381 void 381 void
382 PluginParameterDialog::incrementComboChanged(QString text) 382 PluginParameterDialog::incrementComboChanged(const QString &text)
383 { 383 {
384 m_stepSize = text.toInt(); 384 m_stepSize = text.toInt();
385 //!!! rename increment to step size throughout 385 //!!! rename increment to step size throughout
386 std::cerr << "Increment changed to " << m_stepSize << std::endl; 386 std::cerr << "Increment changed to " << m_stepSize << std::endl;
387 } 387 }