diff --git a/src/plugins/projectexplorer/panelswidget.cpp b/src/plugins/projectexplorer/panelswidget.cpp index 35198c422b2..4baf92d6159 100644 --- a/src/plugins/projectexplorer/panelswidget.cpp +++ b/src/plugins/projectexplorer/panelswidget.cpp @@ -13,26 +13,18 @@ #include #include #include -#include #include #include using namespace Utils; -namespace ProjectExplorer { -namespace { +namespace ProjectExplorer::Internal { const int ABOVE_HEADING_MARGIN = 10; const int CONTENTS_MARGIN = 5; const int BELOW_CONTENTS_MARGIN = 16; -} - -/// -// PanelsWidget -/// - -PanelsWidget::PanelsWidget(QWidget *parent, bool addStretch) : QWidget(parent) +PanelsWidget::PanelsWidget(bool addStretch) { m_root = new QWidget(nullptr); m_root->setFocusPolicy(Qt::NoFocus); @@ -66,14 +58,14 @@ PanelsWidget::PanelsWidget(QWidget *parent, bool addStretch) : QWidget(parent) } PanelsWidget::PanelsWidget(const QString &displayName, QWidget *widget, bool addStretch) - : PanelsWidget(nullptr, addStretch) + : PanelsWidget(addStretch) { addPropertiesPanel(displayName); addWidget(widget); } PanelsWidget::PanelsWidget(const QString &displayName, ProjectSettingsWidget *widget) - : PanelsWidget(nullptr, !widget->expanding()) + : PanelsWidget(!widget->expanding()) { addPropertiesPanel(displayName); addGlobalSettingsProperties(widget); @@ -156,4 +148,4 @@ void PanelsWidget::addGlobalSettingsProperties(ProjectSettingsWidget *widget) m_layout->addWidget(Layouting::createHr()); } -} // ProjectExplorer +} // ProjectExplorer::Internal diff --git a/src/plugins/projectexplorer/panelswidget.h b/src/plugins/projectexplorer/panelswidget.h index 64ef56265df..8abb08624ee 100644 --- a/src/plugins/projectexplorer/panelswidget.h +++ b/src/plugins/projectexplorer/panelswidget.h @@ -3,36 +3,32 @@ #pragma once -#include "projectexplorer_export.h" #include "projectsettingswidget.h" -#include - QT_BEGIN_NAMESPACE class QVBoxLayout; QT_END_NAMESPACE -namespace ProjectExplorer { +namespace ProjectExplorer::Internal { -class PROJECTEXPLORER_EXPORT PanelsWidget : public QWidget +class PanelsWidget final : public QWidget { - Q_OBJECT + explicit PanelsWidget(bool addStretch); public: - explicit PanelsWidget(QWidget *parent = nullptr, bool addStretch = true); PanelsWidget(const QString &displayName, QWidget *widget, bool addStretch = true); PanelsWidget(const QString &displayName, ProjectSettingsWidget *widget); - ~PanelsWidget() override; - - void addPropertiesPanel(const QString &displayName); - void addGlobalSettingsProperties(ProjectSettingsWidget *widget); - void addWidget(QWidget *widget); + ~PanelsWidget() final; static int constexpr PanelVMargin = 14; private: + void addPropertiesPanel(const QString &displayName); + void addGlobalSettingsProperties(ProjectSettingsWidget *widget); + void addWidget(QWidget *widget); + QVBoxLayout *m_layout; QWidget *m_root; }; -} // namespace ProjectExplorer +} // ProjectExplorer::Internal