diff --git a/src/core/ifirmware.h b/src/core/ifirmware.h index b7822e4..6523aec 100644 --- a/src/core/ifirmware.h +++ b/src/core/ifirmware.h @@ -1,99 +1,99 @@ /* AtCore Copyright (C) <2016> Authors: Tomaz Canabrava Chris Rizzitello Patrick José Pereira This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ #pragma once #include #include #include "atcore_export.h" class Temperature; class AtCore; /** * @brief The IFirmware class * Base Class for Firmware Plugins */ class ATCORE_EXPORT IFirmware : public QObject { Q_OBJECT - Q_PROPERTY(QString name READ name) - Q_PROPERTY(bool sdSupport READ isSdSupported) + Q_PROPERTY(QString name READ name CONSTANT) + Q_PROPERTY(bool sdSupport READ isSdSupported CONSTANT) public: IFirmware(); void init(AtCore *parent); ~IFirmware() override = default; /** * @brief Check for plugin support of sd cards. * @return True if firmware plugin supports sd cards. */ virtual bool isSdSupported() const = 0; /** * @brief Virtual name to be reimplemented by Firmware plugin * * Return the name the firmware the plugin is for * @return Firmware Name */ virtual QString name() const = 0; /** * @brief Virtual validateCommand to filter commands from messages * @param lastMessage: last Message from printer */ virtual void validateCommand(const QString &lastMessage); /** * @brief Virtual translate to be reimplemented by Firmwareplugin * * Translate common commands to firmware specific command. * @param command: Command command to translate * @return firmware specific translated command */ virtual QByteArray translate(const QString &command); /** * @brief AtCore Parent of the firmware plugin * @return */ AtCore *core() const; private: struct IFirmwarePrivate; IFirmwarePrivate *d; public slots: /** * @brief call Validate Command * @param lastMessage: last message from printer */ void checkCommand(const QByteArray &lastMessage); signals: /** * @brief emit when firmware is ready for a command */ void readyForCommand(void); }; Q_DECLARE_INTERFACE(IFirmware, "org.kde.atelier.core.firmware")