fix: cant not open screen bug

This commit is contained in:
Barry 2022-04-09 17:19:41 +08:00
parent 7e781f46ae
commit 3f15d1292d
3 changed files with 21 additions and 0 deletions

View file

@ -41,6 +41,7 @@ void ToolForm::initStyle()
IconHelper::Instance()->SetIcon(ui->appSwitchBtn, QChar(0xf24d), 15);
IconHelper::Instance()->SetIcon(ui->volumeUpBtn, QChar(0xf028), 15);
IconHelper::Instance()->SetIcon(ui->volumeDownBtn, QChar(0xf027), 15);
IconHelper::Instance()->SetIcon(ui->openScreenBtn, QChar(0xf06e), 15);
IconHelper::Instance()->SetIcon(ui->closeScreenBtn, QChar(0xf070), 15);
IconHelper::Instance()->SetIcon(ui->powerBtn, QChar(0xf011), 15);
IconHelper::Instance()->SetIcon(ui->expandNotifyBtn, QChar(0xf103), 15);
@ -220,3 +221,11 @@ void ToolForm::onControlStateChange(Device *device, Device::GroupControlState ol
Q_UNUSED(newState)
updateGroupControl();
}
void ToolForm::on_openScreenBtn_clicked()
{
if (!m_device) {
return;
}
emit m_device->setScreenPowerMode(ControlMsg::SPM_NORMAL);
}

View file

@ -48,6 +48,8 @@ private slots:
void onControlStateChange(Device *device, Device::GroupControlState oldState, Device::GroupControlState newState);
void on_openScreenBtn_clicked();
private:
void initStyle();
void updateGroupControl();

View file

@ -70,6 +70,16 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="openScreenBtn">
<property name="toolTip">
<string>open screen</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="closeScreenBtn">
<property name="toolTip">