You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.4 KiB

#ifndef SET_H
#define SET_H
#include <QMainWindow>
#include "switchbutton.h"
#include <QPushButton>
#include <QString>
#include <QLabel>
#include "mydevice.h"
#include "ui_mydevice.h"
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include "wireless/wirelessmodel.h"
#include <QDir>
#include<QProcess>
QT_BEGIN_NAMESPACE
namespace Ui { class set; }
QT_END_NAMESPACE
class SwitchButton;
class mydevice;
class set : public QMainWindow
{
Q_OBJECT
public:
int i;
set(QWidget *parent = nullptr);
~set();
private slots:
void on_pushButton_2_clicked();
void on_pushButton_3_clicked();
private:
Ui::set *ui;
/*监控按键 */
SwitchButton *switchButton;
/* 我的设备对象 */
mydevice *device;
/* 声明 QPushButton 对象 */
QPushButton *pushButton[5];
/* 声明 label 对象 */
QLabel *label[6];
/* 声明 PushButton添加图案 */
void setButtonImage(QPushButton *button, QString image);
/* 布局初始化 */
void layout_init();
/* 布局初始化qml */
QQmlApplicationEngine *m_engine;
bool m_windowShow;
bool m_realLoad;
QProcess *cmd;
QProcess *cmd_stop;
private slots:
/* 开关按钮点击 */
void switchButtonClicked(bool);
void readoutput();
void readerror();
};
#endif // SET_H