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"
3
6
7namespace sf
8{
9
10namespace Ui
11{
12// Forward definition of auto generated class.
13class CustomFieldsPropertyPage;
14}// namespace Ui
15
17{
18 Q_OBJECT
19
20 public:
24 CustomFieldsPropertyPage(CustomFields* target, QWidget* parent);
25
30 void getListData(const QModelIndex& index, int role, QVariant& data);
31 void setListData(const QModelIndex& index, int role, const QVariant& data);
32
34 bool isPageModified() const override;
35
37 void applyPage() override;
38
40 void updatePage() override;
41
43 void storeState(ConfigStore& cfg_store, bool save) override;
44
47
48 private:
50 Ui::CustomFieldsPropertyPage* ui;
52 ListModel* _listModel;
54 CustomFields* _target;
56 QList<QPair<QString, QString>> _data;
57};
58
59}// namespace sf
Class to store application configuration. Uses the global application settings or a given ini-file.
Definition ConfigStore.h:17
Definition CustomFieldsPropertyPage.h:17
~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:46
void setListData(const QModelIndex &index, int role, const QVariant &data)
void getListData(const QModelIndex &index, int role, QVariant &data)
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