added timer for volume changes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QTimer>
|
||||
#include "QtNetwork/QNetworkAccessManager"
|
||||
|
||||
namespace Ui {
|
||||
@@ -18,9 +19,6 @@ public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
protected:
|
||||
void func();
|
||||
|
||||
private slots:
|
||||
void on_btn_onoff_clicked();
|
||||
void replyFinished(QNetworkReply *reply);
|
||||
@@ -32,12 +30,15 @@ private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
QString mAddress;
|
||||
|
||||
QTimer mTimer;
|
||||
bool mPowered = false;
|
||||
int mVolume = 0;
|
||||
const int WAITTIME = 300;
|
||||
|
||||
|
||||
void sendCommand(QString cmd);
|
||||
void updateUi();
|
||||
void sendVolume();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user