Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
ProjectWidget.h
Go to the documentation of this file.
1#pragma once
2#include <QWidget>
5#include <ipj/iface/global.h>
6
7namespace sf
8{
9class ListModel;
10
11namespace Ui
12{
13class ProjectWidget;
14}
15
16class _IPJ_CLASS ProjectWidget final : public QWidget
17{
18 Q_OBJECT
19
20 public:
24 explicit ProjectWidget(QWidget* parent);
25
29 ~ProjectWidget() override;
30
34 void storeState(bool rd);
35
59
64 bool isProjectActive() const;
66
73 void manageProjectData(bool create);
74
75 private:
76 QString getFieldText(int row, EColumnField cf);
77 using ImageInfo = QPair<QString, QColor>;
78 ImageInfo getFieldImageResource(int row, EColumnField cf);
79 void createColumns();
80 void getListData(const QModelIndex& index, int role, QVariant& data);
81 void setListData(const QModelIndex& index, int role, const QVariant& data);
82
83 Ui::ProjectWidget* ui;
84 ProjectData* _projectData;
85 StoreProject _storeProject;
86 ListModel* _listModel;
87 QList<EColumnField> _columFields;
88};
89
90}// namespace sf
Definition ListModel.h:13
Definition ProjectData.h:23
Definition ProjectWidget.h:17
bool store(StoreProject::EAction action)
Action to take on the project file.
~ProjectWidget() override
Overridden destructor.
ProjectWidget(QWidget *parent)
Default Qt constructor.
EColumnField
Enumeration of displayable fields.
Definition ProjectWidget.h:40
@ cfInspectionState
Definition ProjectWidget.h:48
@ cfMaterial
Definition ProjectWidget.h:47
@ cfMethod
Definition ProjectWidget.h:52
@ cfCalibrationSet
Definition ProjectWidget.h:49
@ cfSettings
Definition ProjectWidget.h:50
@ cfFilterConfig
Definition ProjectWidget.h:51
@ cfCommand
Definition ProjectWidget.h:53
@ cfElement
Definition ProjectWidget.h:46
@ cfScanState
Definition ProjectWidget.h:54
@ cfUsername
Definition ProjectWidget.h:55
@ cfDateTime
Definition ProjectWidget.h:56
@ cfTool
Tool used for .
Definition ProjectWidget.h:44
void storeState(bool rd)
Stores and restores the state of the widget.
ProjectData * getProjectData()
Gets the project data associated with this widget.
void manageProjectData(bool create)
bool isProjectActive() const
Class to manage the storing of a part project.
Definition StoreProject.h:14
EAction
Requested actions.
Definition StoreProject.h:22
#define _IPJ_CLASS
Definition ipj/iface/global.h:35
Definition ApplicationPropertyPage.h:7
Definition Application.h:10