MCPcopy Create free account
hub / github.com/KDE/kdevelop / setShowTextEditorStatusBar

Method setShowTextEditorStatusBar

kdevplatform/shell/partcontroller.cpp:93–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void PartController::setShowTextEditorStatusBar(bool show)
94{
95 Q_D(PartController);
96
97 if (d->m_showTextEditorStatusBar == show)
98 return;
99
100 d->m_showTextEditorStatusBar = show;
101
102 // update
103 const auto areas = Core::self()->uiControllerInternal()->allAreas();
104 for (Sublime::Area* area : areas) {
105 const auto views = area->views();
106 for (const auto* const view : views) {
107 auto* const widget = view->widget();
108 if (!widget) {
109 continue;
110 }
111
112 auto* const textView = qobject_cast<KTextEditor::View*>(widget);
113 if (textView) {
114 textView->setStatusBarEnabled(show);
115 }
116 }
117 }
118
119 // also notify active view that it should update the "view status"
120 auto* textView = qobject_cast<TextView*>(Core::self()->uiControllerInternal()->activeSublimeWindow()->activeView());
121 if (textView) {
122 emit textView->statusChanged(textView);
123 }
124}
125
126//MOVE BACK TO DOCUMENTCONTROLLER OR MULTIBUFFER EVENTUALLY
127bool PartController::isTextType(const QMimeType& mimeType)

Callers

nothing calls this directly

Calls 6

allAreasMethod · 0.80
uiControllerInternalMethod · 0.80
activeSublimeWindowMethod · 0.80
viewsMethod · 0.45
widgetMethod · 0.45
activeViewMethod · 0.45

Tested by

no test coverage detected