Refactored InsightWindow class to inherit from QMainWindow, as opposed to a standard QObject

Replaced QWidget left panel with new PanelWidget instance
Also introduced a bottom panel (empty ATM)
Removed obsolete widgets
Added panel size adjustment on window resize
This commit is contained in:
Nav
2021-10-06 00:39:40 +01:00
parent 74b8e41e1b
commit 104f09f7c9
15 changed files with 561 additions and 449 deletions

View File

@@ -2,6 +2,7 @@
#include <QWidget>
#include <QLineEdit>
#include <QScrollArea>
#include <set>
#include <QSize>
#include <QString>
@@ -9,7 +10,8 @@
#include <optional>
#include "ItemWidget.hpp"
#include "../SvgToolButton.hpp"
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/PanelWidget.hpp"
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgToolButton.hpp"
#include "src/Insight/InsightWorker/InsightWorker.hpp"
#include "src/Targets/TargetState.hpp"
#include "src/Targets/TargetDescriptor.hpp"
@@ -25,7 +27,7 @@ namespace Bloom::Widgets
const Targets::TargetDescriptor& targetDescriptor;
InsightWorker& insightWorker;
QWidget* parent = nullptr;
PanelWidget* parent = nullptr;
QWidget* container = nullptr;
QWidget* toolBar = nullptr;
@@ -33,6 +35,7 @@ namespace Bloom::Widgets
SvgToolButton* expandAllButton = nullptr;
QLineEdit* searchInput = nullptr;
QScrollArea* itemScrollArea = nullptr;
QWidget* itemContainer = nullptr;
ItemWidget* selectedItemWidget = nullptr;
@@ -58,7 +61,7 @@ namespace Bloom::Widgets
TargetRegistersPaneWidget(
const Targets::TargetDescriptor& targetDescriptor,
InsightWorker& insightWorker,
QWidget *parent
PanelWidget *parent
);
[[nodiscard]] QSize minimumSizeHint() const override {