Mercurial > hg > svgui
comparison widgets/PluginParameterDialog.cpp @ 1275:3ca1be2e2c91
Tidy
author | Chris Cannam |
---|---|
date | Thu, 26 Apr 2018 15:06:41 +0100 |
parents | 97d977091d4e |
children | c8a6fd3f9dff |
comparison
equal
deleted
inserted
replaced
1274:97d977091d4e | 1275:3ca1be2e2c91 |
---|---|
87 versionLabel->setWordWrap(true); | 87 versionLabel->setWordWrap(true); |
88 | 88 |
89 QLabel *copyrightLabel = new QLabel(plugin->getCopyright().c_str()); | 89 QLabel *copyrightLabel = new QLabel(plugin->getCopyright().c_str()); |
90 copyrightLabel->setWordWrap(true); | 90 copyrightLabel->setWordWrap(true); |
91 | 91 |
92 // QLabel *typeLabel = new QLabel(plugin->getType().c_str()); | |
93 // typeLabel->setWordWrap(true); | |
94 // typeLabel->setFont(boldFont); | |
95 | |
96 QLabel *descriptionLabel = 0; | 92 QLabel *descriptionLabel = 0; |
97 if (plugin->getDescription() != "") { | 93 if (plugin->getDescription() != "") { |
98 descriptionLabel = new QLabel(plugin->getDescription().c_str()); | 94 descriptionLabel = new QLabel(plugin->getDescription().c_str()); |
99 descriptionLabel->setWordWrap(true); | 95 descriptionLabel->setWordWrap(true); |
100 descriptionLabel->setFont(italicFont); | 96 descriptionLabel->setFont(italicFont); |
115 m_moreInfo->hide(); | 111 m_moreInfo->hide(); |
116 | 112 |
117 row++; | 113 row++; |
118 | 114 |
119 if (descriptionLabel) { | 115 if (descriptionLabel) { |
120 // label = new QLabel(tr("Description:")); | |
121 // label->setAlignment(Qt::AlignTop | Qt::AlignLeft); | |
122 // subgrid->addWidget(label, row, 0); | |
123 subgrid->addWidget(descriptionLabel, row, 1, 1, 2); | 116 subgrid->addWidget(descriptionLabel, row, 1, 1, 2); |
124 row++; | 117 row++; |
125 } | 118 } |
126 | 119 |
127 if (version >= 0) { | 120 if (version >= 0) { |
129 label->setAlignment(Qt::AlignTop | Qt::AlignLeft); | 122 label->setAlignment(Qt::AlignTop | Qt::AlignLeft); |
130 subgrid->addWidget(label, row, 0); | 123 subgrid->addWidget(label, row, 0); |
131 subgrid->addWidget(versionLabel, row, 1); | 124 subgrid->addWidget(versionLabel, row, 1); |
132 row++; | 125 row++; |
133 } | 126 } |
134 | |
135 // label = new QLabel(tr("Type:")); | |
136 // label->setAlignment(Qt::AlignTop | Qt::AlignLeft); | |
137 // subgrid->addWidget(label, row, 0); | |
138 // subgrid->addWidget(typeLabel, row, 1); | |
139 // row++; | |
140 | 127 |
141 label = new QLabel(tr("Maker:")); | 128 label = new QLabel(tr("Maker:")); |
142 label->setAlignment(Qt::AlignTop | Qt::AlignLeft); | 129 label->setAlignment(Qt::AlignTop | Qt::AlignLeft); |
143 subgrid->addWidget(label, row, 0); | 130 subgrid->addWidget(label, row, 0); |
144 subgrid->addWidget(makerLabel, row, 1); | 131 subgrid->addWidget(makerLabel, row, 1); |
594 } | 581 } |
595 | 582 |
596 void | 583 void |
597 PluginParameterDialog::setAdvancedVisible(bool visible) | 584 PluginParameterDialog::setAdvancedVisible(bool visible) |
598 { | 585 { |
599 // m_advanced->setVisible(visible); | |
600 | |
601 if (visible) { | 586 if (visible) { |
602 m_advancedButton->setText(tr("Advanced <<")); | 587 m_advancedButton->setText(tr("Advanced <<")); |
603 m_advancedButton->setChecked(true); | 588 m_advancedButton->setChecked(true); |
604 m_advanced->show(); | 589 m_advanced->show(); |
605 } else { | 590 } else { |
606 m_advanced->hide(); | 591 m_advanced->hide(); |
607 m_advancedButton->setText(tr("Advanced >>")); | 592 m_advancedButton->setText(tr("Advanced >>")); |
608 m_advancedButton->setChecked(false); | 593 m_advancedButton->setChecked(false); |
609 } | 594 } |
610 | 595 |
611 // cerr << "resize to " << sizeHint().width() << " x " << sizeHint().height() << endl; | |
612 | |
613 // setMinimumHeight(sizeHint().height()); | |
614 adjustSize(); | 596 adjustSize(); |
615 | |
616 // (sizeHint()); | |
617 | 597 |
618 m_advancedVisible = visible; | 598 m_advancedVisible = visible; |
619 | 599 |
620 QSettings settings; | 600 QSettings settings; |
621 settings.beginGroup("PluginParameterDialog"); | 601 settings.beginGroup("PluginParameterDialog"); |
622 settings.setValue("advancedvisible", visible); | 602 settings.setValue("advancedvisible", visible); |
623 settings.endGroup(); | 603 settings.endGroup(); |
624 | |
625 // if (visible) setMaximumHeight(sizeHint().height()); | |
626 // adjustSize(); | |
627 } | 604 } |
628 | 605 |
629 void | 606 void |
630 PluginParameterDialog::channelComboChanged(int index) | 607 PluginParameterDialog::channelComboChanged(int index) |
631 { | 608 { |