AtCore  1.0.70
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
2  Copyright (C) <2017>
3 
4  Authors:
5  Chris Rizzitello <rizzitello@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) version 3, or any
11  later version accepted by the membership of KDE e.V. (or its
12  successor approved by the membership of KDE e.V.), which shall
13  act as a proxy defined in Section 6 of version 3 of the license.
14 
15  This library is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 */
23 #pragma once
24 
25 #include <QFile>
26 
27 #include "atcore.h"
28 
36 class ATCORE_EXPORT PrintThread : public QObject
37 {
38  Q_OBJECT
39 public:
45  PrintThread(AtCore *parent, const QString &fileName);
46 signals:
50  void finished();
51 
56  void error(QString err);
57 
61  void printProgressChanged(const float);
62 
67  void nextCommand(const QString &comm);
68 
73  void stateChanged(const AtCore::STATES &state);
74 
75 public slots:
79  void start();
80 private slots:
84  void processJob();
85 
90  void setState(const AtCore::STATES &state);
91 
92 private:
96  void nextLine();
97 
101  void endPrint();
102 
145  void injectCommand(QString &command);
146 
152 };
The PrintThreadPrivate class.
Definition: printthread.cpp:36
The AtCore class aims to provides a high level interface for serial based gcode devices ...
Definition: atcore.h:60
The PrintThread class A Thread for running a print job.
Definition: printthread.h:36
PrintThreadPrivate * d
Definition: printthread.h:150
STATES
STATES enum Possible states the printer can be in.
Definition: atcore.h:91