MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / switchContextWidget

Method switchContextWidget

src/plugins/core/uicontroller/controller.cpp:772–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

770}
771
772void 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
794void Controller::addWidgetToTopTool(AbstractWidget *abstractWidget, bool addSeparator, bool addToLeft, quint8 priority)
795{

Callers 4

startMethod · 0.80
eventProcessMethod · 0.80
installCondaMethod · 0.80
checkToolInstalledMethod · 0.80

Calls 8

isHiddenMethod · 0.80
containsMethod · 0.45
showMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
setCheckedMethod · 0.45
valueMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected