Swiftray  1.0
gcode-player.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QDialog>
4 #include <QFrame>
5 #include <QThread>
6 
7 #ifndef Q_OS_IOS
8 
9 #include <QSerialPort>
10 #include <connection/serial-job.h>
11 #include <widgets/base-container.h>
12 
13 #endif
14 
15 namespace Ui {
16  class GCodePlayer;
17 }
18 
19 class GCodePlayer : public QFrame, BaseContainer {
20 Q_OBJECT
21 
22 public:
23 
24  explicit GCodePlayer(QWidget *parent = nullptr);
25 
26  ~GCodePlayer();
27 
28  void setSerialPort();
29 
30  void setGCode(const QString &string);
31 
32  void showError(const QString &string);
33 
34  void updateProgress();
35 
36 private:
37 
38  void loadSettings() override;
39 
40  void registerEvents() override;
41 
42  Ui::GCodePlayer *ui;
43 
44 #ifndef Q_OS_IOS
45  QList<SerialJob *> jobs_;
46 #endif
47 };
A class template for widget containers.
Definition: base-container.h:7
Definition: gcode-player.h:19
void showError(const QString &string)
Definition: gcode-player.cpp:60
~GCodePlayer()
Definition: gcode-player.cpp:76
GCodePlayer(QWidget *parent=nullptr)
Definition: gcode-player.cpp:12
void setSerialPort()
void setGCode(const QString &string)
Definition: gcode-player.cpp:72
void updateProgress()
Definition: gcode-player.cpp:67
Definition: layer-list-item.h:7