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 <gii/global.h>
5
6namespace sf
7{
8
9// Forward declaration.
10class VariableListModel;
11
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 Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
23
24 public:
29 explicit VariableListView(QWidget* parent = nullptr);
30
34 bool isRequiredProperty(const QString& name) override;
35
40 VariableListModel* getVariableListModel() const;
41
45 int getNameLevel() const;
46
50 void setNameLevel(int level = -1) const;
51
56 void setRowCheckbox(bool enabled) const;
57
62 bool hasRowCheckbox() const;
63
67 void setColumnResizeMode() const;
68
72 bool isReadOnly() const;
73
77 void setReadOnly(bool flag);
78
79 protected:
86 virtual void handleClipboard(bool flag);
87
92 int editableColumn() const;
93
98 bool editRow() const;
99
104 bool toggleRow();
105
109 void keyPressEvent(QKeyEvent* event) override;
110
114 void initSelection() const;
115
116 private:
117 class Private;
118 Private* _p;
119
120 Q_DISABLE_COPY(VariableListView)
121};
122
123}// 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
#define _GII_CLASS
Definition gii/global.h:38
Definition Application.h:10