-
Notifications
You must be signed in to change notification settings - Fork 1
/
solverdialog.h
50 lines (38 loc) · 1.17 KB
/
solverdialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef SOLVERDIALOG_H
#define SOLVERDIALOG_H
#include <QDialog>
#include "ui_solverdialog.h"
#include "error.h"
class SolverParams : public QObject
{
Q_OBJECT
public:
Q_PROPERTY(unsigned dimArgs READ getDimArgs WRITE setDimArgs NOTIFY dimArgsChanged)
Q_PROPERTY(unsigned dimParams READ getDimParams WRITE setDimParams NOTIFY dimParamsChanged)
SolverParams() : dimArgs(0), dimParams(0) {}
SolverParams(unsigned args, unsigned params) : dimArgs(args), dimParams(params) {}
unsigned getDimArgs() const { return dimArgs; }
void setDimArgs(unsigned d) { dimArgs = d; }
unsigned getDimParams() const { return dimParams; }
void setDimParams(unsigned d) { dimParams = d; }
signals:
void dimArgsChanged();
void dimParamsChanged();
private:
unsigned dimArgs;
unsigned dimParams;
};
class SolverDialog : public QDialog
{
Q_OBJECT
public:
explicit SolverDialog(const QUrl &source, SolverParams * params, QWidget *parent = 0);
~SolverDialog();
QString getParameters() const;
int isSolveByArgs(bool &rc) const;
private:
Ui::SolverDialogUi ui;
QObject * root;
SolverParams * params;
};
#endif // SOLVERDIALOG_H