Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
VariableListView.h
Go to the documentation of this file.
1#pragma once
2#include <QTreeView>
3#include <QtUiPlugin/QDesignerExportWidget>
5
6namespace sf
7{
8
9// Forward declaration.
10class VariableListModel;
11
15class QDESIGNER_WIDGET_EXPORT VariableListView
16 : public QTreeView
17 , public ObjectExtension
18{
19 Q_OBJECT
20 Q_PROPERTY(int nameLevel READ getNameLevel WRITE setNameLevel)
21 Q_PROPERTY(bool rowCheckbox READ hasRowCheckbox WRITE setRowCheckbox)
22
23 public:
28 explicit VariableListView(QWidget* parent = nullptr);
29
33 bool isRequiredProperty(const QString& name) override;
34
39 VariableListModel* getVariableListModel() const;
40
44 [[nodiscard]] int getNameLevel() const;
45
49 void setNameLevel(int level = -1) const;
50
55 void setRowCheckbox(bool enabled) const;
56
61 bool hasRowCheckbox() const;
62
66 void setColumnResizeMode() const;
67
68 protected:
75 virtual void handleClipboard(bool flag);
76
81 int editableColumn() const;
82
87 bool editRow() const;
88
93 bool toggleRow();
94
98 void keyPressEvent(QKeyEvent* event) override;
99
103 void initSelection() const;
104
105 private:
106 struct Private;
107 Private* _p;
108
109 Q_DISABLE_COPY(VariableListView)
110};
111
112}// namespace sf
Interface class to multiple inherit when the sf::FormWriter class needs to be restricted in writing o...
Definition ObjectExtension.h:17
List model for a sf::Variable list.
Definition VariableListModel.h:18
Implements a tree view (table) for a variable list.
Definition VariableListView.h:18
Definition Application.h:10