| 25 | using namespace KDevelop; |
| 26 | |
| 27 | AreaDisplay::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 | |
| 55 | void AreaDisplay::newArea(Sublime::Area* area) |
| 56 | { |
nothing calls this directly
no test coverage detected