-
Notifications
You must be signed in to change notification settings - Fork 9
/
slicedialog.h
101 lines (77 loc) · 2.24 KB
/
slicedialog.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef SLICEDIALOG_H
#define SLICEDIALOG_H
#include <QDialog>
#include <QFileDialog>
#include <QDir>
#include <QDebug>
#include <QProcess>
#include "stlview.h"
namespace Ui {
class SliceDialog;
}
class SliceDialog : public QDialog
{
Q_OBJECT
public:
explicit SliceDialog(const QGLWidget * shareWidget = 0, QWidget *parent = 0);
~SliceDialog();
void clearObjects();
void setLastDir(QString dir);
void setTableSize(int x, int y);
public slots:
void addObject(QString file="");
void updateConfigs(QString dir);
void updateSlicerPath(QString path);
void updateOutputPath(QString path);
void updateStlView();
inline void setMaterialList(QList<Material*>* list) {materials=list; stlView->setMaterialList(list);}
private slots:
void on_addBtn_clicked();
void on_sliceBtn_clicked();
void slicingFinished(int exitCode, QProcess::ExitStatus exitStatus);
void updateStatus();
void setOffset(QPointF);
void rotateObject(int);
void scaleObject(int);
void objectScaled(int);
void objectRotated(int);
void moveObjectX(double);
void moveObjectY(double);
void nonManifold(QString name);
void on_exportStlBtn_clicked();
void on_confCombo_currentIndexChanged(const QString &arg1);
void updateProgress(int value, int max, QString text);
void on_selectTool_clicked();
void on_delTool_clicked();
void on_moveTool_clicked();
void on_rotateTool_clicked();
void on_toolButton_clicked();
void processingFinished(bool);
void on_centerTool_clicked();
void on_cloneTool_clicked();
void on_mirrorTool_clicked();
void on_boxTool_clicked();
void on_repairTool_clicked();
void on_sliceTool_clicked();
void on_materialTool_clicked();
void on_layerSlider_valueChanged(int value);
void on_showLayers_toggled(bool checked);
private:
QList<Material*>* materials;
Ui::SliceDialog *ui;
QString lastDir;
QString slicerPath;
QString outputPath;
QString configPath;
QString outputFile;
int xSize;
int ySize;
QPoint printCenter;
QProcess *slicerProcess;
StlView *stlView;
QString saveStl(QString fileName);
int lastRot;
signals:
void fileSliced(QString);
};
#endif // SLICEDIALOG_H