Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
StoreProjectDialog.h
Go to the documentation of this file.
1#pragma once
2#include <QAbstractButton>
3#include <QDialog>
4#include <ipj/iface/global.h>
5
6namespace sf
7{
8
9// Forward declaration.
10class PartProject;
11
12namespace Ui
13{
14// Forward definition of auto generated class.
15class StoreProjectDialog;
16}// namespace Ui
17
21class _IPJ_CLASS StoreProjectDialog final : public QDialog
22{
23 // Macro required for Qt's meta-object system (signals/slots)
24 Q_OBJECT
25
26 public:
30 enum EOption : int
31 {
33 opSave = 1 << 0,
35 opMustExist = 1 << 1,
37 opOverwritePrompt = 1 << 2,
39 opNoPartChange = 1 << 3,
41 opPartSelect = 1 << 4,
43 opShowHelp = 1 << 5
44 };
45
49 typedef QFlags<EOption> Options;
53 explicit StoreProjectDialog(QWidget* parent = nullptr);
54
59
64 void setOptions(Options options);
65
70
75 void setPartProject(const PartProject* part_project);
76
81
85 int exec() override;
86
87 private:
91 void changedPartSelection();
92 void changedProjectSelection();
96 void nameChanged(const QString&);
97
101 void changeHandler(void* sender);
102
106 bool canClose() const;
107
111 void clicked(QAbstractButton* button);
112
116 Ui::StoreProjectDialog* ui;
120 Options _options;
124 PartProject* _partProject;
125};
126
127}// namespace sf
Definition PartProject.h:10
Dialog to select a part and project to 'open' or 'save'.
Definition StoreProjectDialog.h:22
int exec() override
Overridden from base class.
QFlags< EOption > Options
Options type.
Definition StoreProjectDialog.h:49
Options options() const
Gets the options set with setOptions and see EOption for the information.
EOption
Options flags for behavior of this dialog.
Definition StoreProjectDialog.h:31
const PartProject * getPartProject() const
Gets the local part project pointer.
StoreProjectDialog(QWidget *parent=nullptr)
Default Qt constructor.
void setPartProject(const PartProject *part_project)
Assigns the data from the given part project to teh local one.
~StoreProjectDialog() override
Overridden destructor.
void setOptions(Options options)
Sets the options for operation of the dialog and see EOption for the information.
#define _IPJ_CLASS
Definition ipj/iface/global.h:35
Definition ApplicationPropertyPage.h:7
Definition Application.h:10