AtCore  1.0.70
AtCore is a API to manage the serial connection between the computer and 3D Printers.
ifirmware.h
Go to the documentation of this file.
1 /* AtCore
2  Copyright (C) <2016>
3 
4  Authors:
5  Tomaz Canabrava <tcanabrava@kde.org>
6  Chris Rizzitello <rizzitello@kde.org>
7  Patrick José Pereira <patrickjp@kde.org>
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) version 3, or any
13  later version accepted by the membership of KDE e.V. (or its
14  successor approved by the membership of KDE e.V.), which shall
15  act as a proxy defined in Section 6 of version 3 of the license.
16 
17  This library is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  Lesser General Public License for more details.
21 
22  You should have received a copy of the GNU Lesser General Public
23  License along with this library. If not, see <http://www.gnu.org/licenses/>.
24 */
25 #pragma once
26 
27 #include <QObject>
28 #include <QString>
29 
30 #include "atcore_export.h"
31 
32 class Temperature;
33 class AtCore;
34 
39 class ATCORE_EXPORT IFirmware : public QObject
40 {
41  Q_OBJECT
42  Q_PROPERTY(QString name READ name CONSTANT)
43  Q_PROPERTY(bool sdSupport READ isSdSupported CONSTANT)
44 public:
45  IFirmware();
46  void init(AtCore *parent);
47  ~IFirmware() override = default;
48 
53  virtual bool isSdSupported() const = 0;
54 
61  virtual QString name() const = 0;
62 
67  virtual void validateCommand(const QString &lastMessage);
68 
76  virtual QByteArray translate(const QString &command);
77 
82  AtCore *core() const;
83 
84 private:
86  IFirmwarePrivate *d;
87 public slots:
92  void checkCommand(const QByteArray &lastMessage);
93 signals:
97  void readyForCommand(void);
98 };
99 
100 Q_DECLARE_INTERFACE(IFirmware, "org.kde.atelier.core.firmware")
The Temperature class.
Definition: temperature.h:35
The IFirmware class Base Class for Firmware Plugins.
Definition: ifirmware.h:39
The AtCore class aims to provides a high level interface for serial based gcode devices ...
Definition: atcore.h:60
The IFirmwarePrivate struct.
Definition: ifirmware.cpp:31