2020-05-25 14:11:11 +08:00
|
|
|
#ifndef CONTROLLERCOMMANDS_H
|
|
|
|
#define CONTROLLERCOMMANDS_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include "ozwcore.h"
|
|
|
|
|
|
|
|
class OZWCore;
|
|
|
|
|
|
|
|
class ControllerCommands : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit ControllerCommands(QMainWindow *parent = nullptr);
|
2020-05-26 19:08:05 +08:00
|
|
|
enum Command {Command_addNode, Command_delNode, Command_healNetwork, Command_cancel, Command_none};
|
|
|
|
Q_ENUM(Command);
|
2020-05-25 14:11:11 +08:00
|
|
|
public slots:
|
|
|
|
void addNode();
|
|
|
|
void delNode();
|
|
|
|
void healNetwork();
|
|
|
|
void cancelCommand();
|
2020-05-26 19:08:05 +08:00
|
|
|
|
|
|
|
void controllerCommandNotification(quint8 node, NotificationTypes::QTOZW_Notification_Controller_Cmd command, NotificationTypes::QTOZW_Notification_Controller_State state, NotificationTypes::QTOZW_Notification_Controller_Error error);
|
2020-05-25 14:11:11 +08:00
|
|
|
private:
|
2020-05-26 19:08:05 +08:00
|
|
|
QMessageBox m_msgBox;
|
|
|
|
Command m_command;
|
2020-05-25 14:11:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLLERCOMMANDS_H
|