iVS3D v2.0.9
Loading...
Searching...
No Matches
exportwidget.h
1#ifndef EXPORTWIDGET_H
2#define EXPORTWIDGET_H
3
4#include <QWidget>
5#include <QFileDialog>
6#include <QCheckBox>
7#include <QPushButton>
8#include <QDoubleSpinBox>
9
10#include "applicationsettings.h" // used to determin text color depending on GUI style
11#include "maskstackview.h"
12
13enum class ExportFormat {
14 SameAsInput,
15 Png,
16 Jpg,
17 Unknown,
18};
19
20QString toExportFormatKey(ExportFormat format);
21ExportFormat exportFormatFromKey(const QString &formatKey);
22
23namespace Ui {
24class ExportWidget;
25}
26
42class ExportWidget : public QWidget
43{
44 Q_OBJECT
45
46public:
47
52 explicit ExportWidget(QWidget *parent = nullptr);
54
55 std::shared_ptr<MaskStackView> getMaskStackView();
60 void setOutputPath(QString path);
61
66 void enableExport(bool enabled);
67
72 void enableExportPathEditable(bool enabled);
73
78 void enableReconstruct(bool enabled);
79
80 void setResolutionList(QStringList resList, int idx);
81 void setResolution(QString resolution);
82 void setResolutionValid(bool valid);
83
84 QString getExportFormat();
85 ExportFormat getExportFormatEnum();
86 bool setOutputFormat(QString format);
87 bool setOutputFormat(ExportFormat format);
88
93 void setAltitudeVisible(bool visible);
94
99 void setAltitude(double altitude);
100
101 double getAltitude();
102
103 void enableFormat(QString format, bool enable);
104 void enableFormat(ExportFormat format, bool enable);
105
106signals:
107
112 void sig_pathChanged(QString path);
113
118
123
128
133 void sig_resChanged(QString resolution);
134
138 void sig_altitudeChanged(double altitude);
139
140private slots:
141 void on_pushButton_browse_clicked();
142 void on_pushButton_export_clicked();
143 void on_pushButton_reconstruct_clicked();
144 void on_pushButton_addAuto_clicked();
145 void on_lineEdit_textChanged(const QString &text);
146 void on_spinBox_altitude_valueChanged(double d);
147
148private:
149 Ui::ExportWidget *ui;
150
151 QDoubleSpinBox *m_altitudeSpinBox;
152
153 std::shared_ptr<MaskStackView> m_maskStackView;
154
155};
156
157#endif // EXPORTWIDGET_H
The ExportWidget class provides a user interface to configure export:
Definition exportwidget.h:43
void setOutputPath(QString path)
setOutputPath sets the text in the path text box to given path.
Definition exportwidget.cpp:72
void sig_export()
[signal] sig_export() is emitted on export button pressed.
void setAltitudeVisible(bool visible)
setAltitudeVisible will show or hide the altitude selector
Definition exportwidget.cpp:174
void sig_altitudeChanged(double altitude)
[signal] sig_altitudeChanged() is emitted when the altitude is changed by the user.
void sig_resChanged(QString resolution)
[signal] sig_resChanged(...) is emitted if the resolution in the combo box is changed
void setAltitude(double altitude)
setAltitude sets the value of the altitude selector
Definition exportwidget.cpp:199
void sig_addAuto()
[signal] sig_addAuto() is emitted on Add to automatic button pressed.
void sig_reconstruct()
[signal] sig_reconstruct() is emitted on reconstruct button pressed.
void enableExport(bool enabled)
enableExport enables / disables the export button.
Definition exportwidget.cpp:74
void sig_pathChanged(QString path)
[signal] sig_pathChanged(...) is emitted if the selected path changed.
void enableExportPathEditable(bool enabled)
enableExportPathEditable enables / disables editting of the export path.
Definition exportwidget.cpp:78
void enableReconstruct(bool enabled)
enableReconstruct enables / disables the reconstruct button.
Definition exportwidget.cpp:91