Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
HierarchyViewer.h
Go to the documentation of this file.
1#pragma once
2#include <QSortFilterProxyModel>
3#include <QWidget>
6
7namespace sf
8{
9
10namespace Ui
11{
12class HierarchyViewer;
13}
14
15class HierarchyViewer : public QWidget
16{
17 Q_OBJECT
18
19 public:
20 explicit HierarchyViewer(QWidget* parent = nullptr);
21
22 ~HierarchyViewer() override;
23
25
26 void selectObject(QObject* obj);
27
31 void documentModified() const;
32
36 // ReSharper disable once CppFunctionIsNotImplemented
37 Q_SIGNAL void objectSelectChange(QObject* obj);
38
39 private:
40 void editObject() const;
41
42 void addObject();
43
44 void removeObject();
45
46 void editorDisconnect(const QObject* obj);
47
53 QObject* objectSelected(const QModelIndex& index = {});
54
55 Ui::HierarchyViewer* ui;
56
57 QSortFilterProxyModel* _proxyModel{nullptr};
58
59 QAction* _actionCollapseAll{nullptr};
60 QAction* _actionExpandAll{nullptr};
61 QAction* _actionEdit{nullptr};
62 QAction* _actionAdd{nullptr};
63 QAction* _actionRemove{nullptr};
64 LayoutEditor* _layoutEditor{nullptr};
65};
66
67}// namespace sf
Definition HierarchyViewer.h:16
~HierarchyViewer() override
Q_SIGNAL void objectSelectChange(QObject *obj)
Signal emitted when the selected object has changed.
void setEditor(sf::LayoutEditor *editor)
void selectObject(QObject *obj)
HierarchyViewer(QWidget *parent=nullptr)
void documentModified() const
When a layout editor is present it will call its documentModified().
Definition LayoutEditor.h:16
Definition ApplicationPropertyPage.h:7
Definition Application.h:10