SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
genericform.h
Go to the documentation of this file.
1#ifndef GENERICFORM_H
2#define GENERICFORM_H
3
4#include <QWidget>
5#include "QJsonObject"
6#include "QPushButton"
7#include "QComboBox"
8#include "QLineEdit"
9#include "QCheckBox"
10#include "QSpinBox"
12
13
14class MainWindow;
15
18{
19 QString Discription;
21 QWidget *InputWidget=nullptr;
22 QString DefaultValue;
23 QString value()
24 {
26 {
27 return dynamic_cast<QLineEdit*>(InputWidget)->text();
28 }
30 {
31 return dynamic_cast<QComboBox*>(InputWidget)->currentText();
32 }
34 {
35 if (dynamic_cast<QCheckBox*>(InputWidget)->checkState()==Qt::CheckState::Checked)
36 return "true";
37 else
38 return "false";
39 }
41 {
42 return QString::number(dynamic_cast<QSpinBox*>(InputWidget)->value());
43 }
45 {
46 return dynamic_cast<FileBrowserPushButtom*>(InputWidget)->text();
47 }
48 return "";
49 }
50};
51
52namespace Ui {
53class GenericForm;
54}
55
56class GenericForm : public QWidget
57{
58 Q_OBJECT
59
60public:
61 explicit GenericForm(QJsonObject *formdata, QWidget *parent, MainWindow *mainwindow);
62 QVector<parameter_property> Parameter_Properties;
64 bool SetCommand(const QString &cmd);
65
66private:
67 QPushButton *buttonOk = nullptr;
68 QPushButton *buttonCancel = nullptr;
69 Ui::GenericForm *ui;
71 QString command;
73public slots:
74
75 void onProceed();
76 void onCancel();
77};
78
79#endif // GENERICFORM_H
MainWindow * mainwindow()
QString command
Definition genericform.h:71
Ui::GenericForm * ui
Definition genericform.h:69
bool SetCommand(const QString &cmd)
QPushButton * buttonCancel
Definition genericform.h:68
QPushButton * buttonOk
Definition genericform.h:67
MainWindow * mainWindow
Definition genericform.h:72
QVector< parameter_property > Parameter_Properties
Definition genericform.h:62
Main application window for SedSAT3 source apportionment analysis.
Definition mainwindow.h:41
delegate_type
Definition genericform.h:16
QWidget * InputWidget
Definition genericform.h:21
delegate_type Type
Definition genericform.h:20