Mercurial > hg > svgui
comparison widgets/PluginParameterDialog.cpp @ 456:035d62c4cddf
* Permit viewing (though not editing) colour 3d plot layer data in
the spreadsheet data viewer dialog
* Add somewhat simplistic RDF export for layers
* Fix display of peak frequencies in spectrum layer
* Fix (I hope) sizing of plugin parameter dialog
author | Chris Cannam |
---|---|
date | Tue, 02 Dec 2008 17:17:25 +0000 |
parents | c803eb18ebba |
children | 5f9a257598d8 |
comparison
equal
deleted
inserted
replaced
455:747a58d45d56 | 456:035d62c4cddf |
---|---|
237 QSettings settings; | 237 QSettings settings; |
238 settings.beginGroup("PluginParameterDialog"); | 238 settings.beginGroup("PluginParameterDialog"); |
239 m_advancedVisible = settings.value("advancedvisible", false).toBool(); | 239 m_advancedVisible = settings.value("advancedvisible", false).toBool(); |
240 settings.endGroup(); | 240 settings.endGroup(); |
241 | 241 |
242 m_advanced->setVisible(false); | 242 m_advanced->hide(); |
243 | 243 |
244 hbox->addWidget(m_advancedButton); | 244 hbox->addWidget(m_advancedButton); |
245 m_advancedButton->hide(); | 245 m_advancedButton->hide(); |
246 | 246 |
247 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok | | 247 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok | |
253 setAdvancedVisible(m_advancedVisible); | 253 setAdvancedVisible(m_advancedVisible); |
254 } | 254 } |
255 | 255 |
256 PluginParameterDialog::~PluginParameterDialog() | 256 PluginParameterDialog::~PluginParameterDialog() |
257 { | 257 { |
258 } | |
259 | |
260 int | |
261 PluginParameterDialog::exec() | |
262 { | |
263 show(); | |
264 setAdvancedVisible(m_advancedVisible); | |
265 return QDialog::exec(); | |
258 } | 266 } |
259 | 267 |
260 | 268 |
261 void | 269 void |
262 PluginParameterDialog::setOutputLabel(QString text, | 270 PluginParameterDialog::setOutputLabel(QString text, |
582 } | 590 } |
583 | 591 |
584 void | 592 void |
585 PluginParameterDialog::setAdvancedVisible(bool visible) | 593 PluginParameterDialog::setAdvancedVisible(bool visible) |
586 { | 594 { |
587 m_advanced->setVisible(visible); | 595 // m_advanced->setVisible(visible); |
588 | 596 |
589 if (visible) { | 597 if (visible) { |
590 m_advancedButton->setText(tr("Advanced <<")); | 598 m_advancedButton->setText(tr("Advanced <<")); |
591 m_advancedButton->setChecked(true); | 599 m_advancedButton->setChecked(true); |
600 m_advanced->show(); | |
592 } else { | 601 } else { |
602 m_advanced->hide(); | |
593 m_advancedButton->setText(tr("Advanced >>")); | 603 m_advancedButton->setText(tr("Advanced >>")); |
594 m_advancedButton->setChecked(false); | 604 m_advancedButton->setChecked(false); |
595 } | 605 } |
606 | |
607 std::cerr << "resize to " << sizeHint().width() << " x " << sizeHint().height() << std::endl; | |
608 | |
609 // setMinimumHeight(sizeHint().height()); | |
610 adjustSize(); | |
611 | |
612 // (sizeHint()); | |
613 | |
614 m_advancedVisible = visible; | |
596 | 615 |
597 QSettings settings; | 616 QSettings settings; |
598 settings.beginGroup("PluginParameterDialog"); | 617 settings.beginGroup("PluginParameterDialog"); |
599 settings.setValue("advancedvisible", visible); | 618 settings.setValue("advancedvisible", visible); |
600 settings.endGroup(); | 619 settings.endGroup(); |
601 | 620 |
602 // std::cerr << "resize to " << sizeHint().width() << " x " << sizeHint().height() << std::endl; | |
603 | |
604 setMinimumHeight(sizeHint().height()); | |
605 adjustSize(); | |
606 | |
607 m_advancedVisible = visible; | |
608 | |
609 // if (visible) setMaximumHeight(sizeHint().height()); | 621 // if (visible) setMaximumHeight(sizeHint().height()); |
610 // adjustSize(); | 622 // adjustSize(); |
611 } | 623 } |
612 | 624 |
613 void | 625 void |