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

Method AreaDisplay

kdevplatform/shell/areadisplay.cpp:27–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25using namespace KDevelop;
26
27AreaDisplay::AreaDisplay(KDevelop::MainWindow* parent)
28 : QWidget(parent)
29 , m_mainWindow(parent)
30{
31 setLayout(new QHBoxLayout);
32 m_separator = new QLabel(QStringLiteral("|"), this);
33 m_separator->setEnabled(false);
34 m_separator->setVisible(false);
35 layout()->addWidget(m_separator);
36
37 layout()->setContentsMargins(0, 0, 0, 0);
38 auto closedWorkingSets = Core::self()->workingSetControllerInternal()->createSetManagerWidget(m_mainWindow);
39 closedWorkingSets->setParent(this);
40 layout()->addWidget(closedWorkingSets);
41
42 m_button = new QToolButton(this);
43 m_button->setToolTip(i18n(
44 "Execute actions to change the area.<br />"
45 "An area is a tool view configuration for a specific use case. "
46 "From here you can also navigate back to the default code area."));
47 m_button->setAutoRaise(true);
48 m_button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
49 m_button->setPopupMode(QToolButton::InstantPopup);
50 layout()->addWidget(m_button);
51
52 connect(parent, &MainWindow::areaChanged, this, &AreaDisplay::newArea);
53}
54
55void AreaDisplay::newArea(Sublime::Area* area)
56{

Callers

nothing calls this directly

Calls 7

setToolTipMethod · 0.80
setEnabledMethod · 0.45
setVisibleMethod · 0.45
addWidgetMethod · 0.45
setParentMethod · 0.45

Tested by

no test coverage detected