added cyclic update
This commit is contained in:
11
mainwindow.h
11
mainwindow.h
@@ -16,11 +16,13 @@ class MainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
void setPowerState();
|
||||
|
||||
void updateAVState();
|
||||
|
||||
private slots:
|
||||
void on_btn_onoff_clicked();
|
||||
void replyFinished(QNetworkReply *reply);
|
||||
@@ -38,11 +40,14 @@ private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
QString mAddress;
|
||||
QTimer mTimer;
|
||||
QTimer mTimerValCollect;
|
||||
QTimer mTimerUpdate;
|
||||
|
||||
bool mPowered = false;
|
||||
int mVolume = 0;
|
||||
QString mInput;
|
||||
const int WAITTIME = 400;
|
||||
const int COLLECTTIME = 400;
|
||||
const int UPDATETIME = 20000;
|
||||
|
||||
void sendCommand(QString cmd);
|
||||
void updateUi();
|
||||
|
||||
Reference in New Issue
Block a user