Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
InformationSelectDialog.h
Go to the documentation of this file.
1#pragma once
2#include <QDialog>
3#include <QSettings>
4#include <QSortFilterProxyModel>
6#include <gii/qt/Namespace.h>
7
8namespace sf
9{
10
11namespace Ui
12{
13class InformationSelectDialog;
14}
15
16class _GII_CLASS InformationSelectDialog : public QDialog
17{
18 public:
19 explicit InformationSelectDialog(QWidget* parent = nullptr);
20
21 InformationTypes::IdVector execute(gii::SelectionMode mode = gii::Single, gii::TypeId idType = gii::Variable, QSettings* settings = nullptr);
22
24
25 protected:
26 bool eventFilter(QObject* watched, QEvent* event) override;
27
28 private:
29 void childrenExpandCollapse(bool expand, const QModelIndex& index = {});
30
31 void stateSaveRestore(bool save);
32
33 void applyFilter(const QString& filter);
34
35 Ui::InformationSelectDialog* ui;
36
37 QSettings* _settings{nullptr};
38
39 QSortFilterProxyModel* _proxyModel;
40
41 sf::InformationItemModel* _itemModel{nullptr};
42
43 QAction* _actionCollapseAll{nullptr};
44
45 QAction* _actionExpandAll{nullptr};
46
47 gii::SelectionMode _mode{gii::Single};
48
49 gii::IdType _selectedId{0};
50};
51
52}// namespace sf
Item model for viewing Variables in a tree view.
Definition InformationItemModel.h:15
Definition InformationSelectDialog.h:17
InformationSelectDialog(QWidget *parent=nullptr)
InformationTypes::IdVector getSelectedIds() const
InformationTypes::IdVector execute(gii::SelectionMode mode=gii::Single, gii::TypeId idType=gii::Variable, QSettings *settings=nullptr)
bool eventFilter(QObject *watched, QEvent *event) override
Counted vector having additional methods and operators for ease of usage.
Definition TVector.h:25
#define _GII_CLASS
Definition gii/global.h:38
Definition ApplicationPropertyPage.h:8
SelectionMode
Mode of item selection.
Definition Namespace.h:34
TypeId
Types of id's.
Definition Namespace.h:22
Definition Application.h:10