-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
58 lines (45 loc) · 1.22 KB
/
mainwindow.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
51
52
53
54
55
56
57
58
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QLabel>
#include <QPushButton>
#include <QDoubleSpinBox>
#include <QBoxLayout>
#include <QStandardItemModel>
#include <QTableView>
#include <QDebug>
#include "lagrange.h"
#include "pointform.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
signals:
void modelDataChanged();
private:
QTableView *table;
QStandardItemModel *model;
Lagrange lagrange;
QPushButton *add_btn = new QPushButton("Add");
QPushButton *edit_btn = new QPushButton("Edit");
QPushButton *remove_btn = new QPushButton("Remove");
QPushButton *reset_btn = new QPushButton("Reset");
QPushButton *calc_btn = new QPushButton("Calculate");
QPushButton *quit_btn = new QPushButton("Quit");
QDoubleSpinBox *arg_in = nullptr;
QLabel *result = nullptr;
QLabel *value = nullptr;
private slots:
void addPoint(double x, double y);
void editPoint(double x, double y);
void removePoint();
void onModelDataChanged();
void reset();
void calculate();
void createForm();
void activate();
void disableCalc(bool disable);
};
#endif // MAINWINDOW_H