-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmainwindow.h
More file actions
62 lines (53 loc) · 1.4 KB
/
mainwindow.h
File metadata and controls
62 lines (53 loc) · 1.4 KB
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
59
60
61
62
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QFileDialog>
#include <QDebug>
#include <QXmlStreamReader>
#include <QMessageBox>
#include <QGraphicsScene>
#include "svgitem.h"
#include "gcodeviewer.h"
#include <QTimer>
#include <QDoubleSpinBox>
#include "line.h"
#include "circle.h"
#include "qbezier.h"
#include "polygon.h"
#include "transform.h"
#include <QString>
#include "arc.h"
#include "basicpolygon.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
//enum Cmds { none, Move, move, Circle, circle };
private slots:
void openSvg();
void read(QIODevice *device);
void readSVG();
void updateBoundary(float &w, float&h, float x1, float x2, float y1, float y2);
void generateGCode();
QVector<double> parseSVGNumbers(QString cmd);
QList<BasicPolygon*> searchPolygons(BasicPolygon *previous, QList<BasicPolygon*> fullLst);
void fitToView();
private:
Ui::MainWindow *ui;
QXmlStreamReader xml;
QGraphicsScene * scene;
SvgItem * svgItem;
QList<Line*> lineList;
QList<Circle*> circleList;
QList<QBezier*> qBezierList;
QList<BasicPolygon*> polyList;
QList<Arc*> arcList;
double elevation;
QGraphicsRectItem *bedBoundary;
};
#endif // MAINWINDOW_H