Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
CustomFieldsPropertyPage.h
Go to the documentation of this file.
1#pragma once
2#include "misc/qt/ListModel.h"
5
6namespace sf
7{
8
9namespace Ui
10{
11// Forward definition of an auto-generated class.
12class CustomFieldsPropertyPage;
13}// namespace Ui
14
16{
17 Q_OBJECT
18
19 public:
23 CustomFieldsPropertyPage(CustomFields* target, QWidget* parent);
24
29
31 bool isPageModified() const override;
32
34 void applyPage() override;
35
37 void updatePage() override;
38
40 void storeState(ConfigStore& cfg_store, bool save) override;
41
44
45 private:
47 void getListData(const QModelIndex& index, int role, QVariant& data);
48
50 void setListData(const QModelIndex& index, int role, const QVariant& data);
51
53 Ui::CustomFieldsPropertyPage* ui;
55 ListModel* _listModel;
57 CustomFields* _target;
59 QList<QPair<QString, QString>> _data;
60};
61
62}// namespace sf
Class to store application configuration. Uses the global application settings or a given ini-file.
Definition ConfigStore.h:17
Definition CustomFieldsPropertyPage.h:16
~CustomFieldsPropertyPage() override
Virtual destructor.
bool isPageModified() const override
Overridden from base class.
void updatePage() override
Overridden from base class.
void applyPage() override
Overridden from base class.
void storeState(ConfigStore &cfg_store, bool save) override
Overridden from base class.
TClosure< void, QWidget * > onApply
Closure triggered when page is applied.
Definition CustomFieldsPropertyPage.h:43
CustomFieldsPropertyPage(CustomFields *target, QWidget *parent)
Constructor.
Definition CustomFields.h:12
Definition ListModel.h:14
Widget to create a page in a PropertySheet dialog.
Definition PropertyPage.h:15
Encapsulates the std::function() template.
Definition TClosure.h:14
Definition ApplicationPropertyPage.h:7
Definition Application.h:10