AtCore  1.0.72
AtCore is a API to manage the serial connection between the computer and 3D Printers.
printthread.h
Go to the documentation of this file.
1 /* AtCore KDE Libary for 3D Printers
2  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
3  SPDX-FileCopyrightText: 2017-2018, 2020 Chris Rizzitello <rizzitello@kde.org>
4  SPDX-FileCopyrightText: 2018 Tomaz Canabrava <tcanabrava@kde.org>
5  SPDX-FileCopyrightText: 2018 Leandro Santiago <leandrosansilva@gmail.com>
6 */
7 
8 #pragma once
9 
10 #include <QFile>
11 
12 #include "atcore.h"
13 
21 class ATCORE_EXPORT PrintThread : public QObject
22 {
23  Q_OBJECT
24 public:
30  PrintThread(AtCore *parent, const QString &fileName);
31  ~PrintThread();
32 signals:
36  void finished();
37 
42  void error(QString err);
43 
47  void printProgressChanged(const float);
48 
53  void nextCommand(const QString &comm);
54 
59  void stateChanged(const AtCore::STATES &state);
60 
61 public slots:
65  void start();
66 private slots:
70  void processJob();
71 
76  void setState(const AtCore::STATES &state);
77 
78 private:
82  void nextLine();
83 
87  void endPrint();
88 
131  void injectCommand(QString &command);
132 
136  class PrintThreadPrivate;
138 };
The AtCore class aims to provides a high level interface for serial based gcode devices
Definition: atcore.h:45
STATES
STATES enum Possible states the printer can be in.
Definition: atcore.h:75
The PrintThreadPrivate class.
Definition: printthread.cpp:23
The PrintThread class A Thread for running a print job.
Definition: printthread.h:22
void stateChanged(const AtCore::STATES &state)
Printer state was changed.
void nextCommand(const QString &comm)
the next command of the job
void error(QString err)
A command has caused an error.
PrintThreadPrivate * d
Definition: printthread.h:136
void printProgressChanged(const float)
The print job's progress has changed.
void finished()
Print job has finished.