| 770 | } |
| 771 | |
| 772 | void Controller::switchContextWidget(const QString &title) |
| 773 | { |
| 774 | if (!d->contextWidgets.contains(title)) { |
| 775 | qWarning() << "No ContextWidget named: " << title; |
| 776 | return; |
| 777 | } |
| 778 | |
| 779 | d->stackContextWidget->setCurrentWidget(d->contextWidgets[title]); |
| 780 | if (d->stackContextWidget->isHidden()) { |
| 781 | d->contextWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); |
| 782 | d->stackContextWidget->show(); |
| 783 | } |
| 784 | if (d->tabButtons.contains(title)) |
| 785 | d->tabButtons[title]->show(); |
| 786 | |
| 787 | for (auto it = d->tabButtons.begin(); it != d->tabButtons.end(); ++it) { |
| 788 | it.value()->setChecked(false); |
| 789 | if (it.key() == title) |
| 790 | it.value()->setChecked(true); |
| 791 | } |
| 792 | } |
| 793 | |
| 794 | void Controller::addWidgetToTopTool(AbstractWidget *abstractWidget, bool addSeparator, bool addToLeft, quint8 priority) |
| 795 | { |
no test coverage detected