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
13class ConfigStore;
14
15namespace Ui
16{
17class InformationSelectDialog;
18}
19
23class _GII_CLASS InformationSelectDialog final : public QDialog
24{
25 public:
29 explicit InformationSelectDialog(QWidget* parent = nullptr);
30
38
44
45 private:
47 Ui::InformationSelectDialog* ui;
49 void storeState(bool rd);
51 void childrenExpandCollapse(bool expand, const QModelIndex& index = {});
53 void applyFilter(const QString& filter);
55 QSortFilterProxyModel* _proxyModel;
57 InformationItemModel* _itemModel{nullptr};
59 gii::SelectionMode _mode{gii::Single};
61 gii::IdType _selectedId{0};
63 QString _lastIndex;
64};
65
66}// namespace sf
Class to store application configuration. Uses the global application settings or a given ini-file.
Definition ConfigStore.h:17
Item model for viewing Variables in a tree view.
Definition InformationItemModel.h:15
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.
TVector< id_type > IdVector
Vector for lists of information ID's.
Definition InformationBase.h:54
#define _GII_CLASS
Definition gii/global.h:38
Definition SelectImplementationDialog.h:12
TypeId
Types of id's.
Definition gii/qt/Namespace.h:22
@ Variable
Type of the id is a variable.
Definition gii/qt/Namespace.h:25
SelectionMode
Mode of item selection.
Definition gii/qt/Namespace.h:35
@ Single
Single item.
Definition gii/qt/Namespace.h:37
Definition Application.h:10
_MISC_FUNC std::string filter(std::string str, const std::string &filter)
Filters all characters from the passed string and returns the resulting string.