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 <QShortcut>
5#include <QSortFilterProxyModel>
7#include <gii/qt/Namespace.h>
8
9namespace sf
10{
11
12namespace Ui
13{
14class InformationSelectDialog;
15}
16
20class _GII_CLASS InformationSelectDialog final : public QDialog
21{
22 public:
26 explicit InformationSelectDialog(QWidget* parent = nullptr);
27
34 InformationTypes::IdVector execute(gii::SelectionMode mode = gii::Single, gii::TypeId idType = gii::Variable);
35
41
42 private:
43 void childrenExpandCollapse(bool expand, const QModelIndex& index = {});
44
45 void stateSaveRestore(bool save);
46
47 void applyFilter(const QString& filter);
48
49 Ui::InformationSelectDialog* ui;
50
51 QSettings* _settings{nullptr};
52
53 QSortFilterProxyModel* _proxyModel;
54
55 sf::InformationItemModel* _itemModel{nullptr};
56
57 QAction* _actionCollapseAll{nullptr};
58
59 QAction* _actionExpandAll{nullptr};
60
61 gii::SelectionMode _mode{gii::Single};
62
63 gii::IdType _selectedId{0};
64
65 QShortcut* _shortcut;
66};
67
68}// namespace sf
Item model for viewing Variables in a tree view.
Definition InformationItemModel.h:15
Dialog for selecting single or multiple variable or result-data information id's.
Definition InformationSelectDialog.h:21
InformationSelectDialog(QWidget *parent=nullptr)
Default Qt constructor.
InformationTypes::IdVector getSelectedIds() const
Get the selected id's after execution.
InformationTypes::IdVector execute(gii::SelectionMode mode=gii::Single, gii::TypeId idType=gii::Variable)
Executes the dialog in the required mode.
#define _GII_CLASS
Definition gii/global.h:38
Definition ApplicationPropertyPage.h:7
SelectionMode
Mode of item selection.
Definition gii/qt/Namespace.h:34
TypeId
Types of id's.
Definition gii/qt/Namespace.h:22
Definition Application.h:10