mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-03 14:18:45 +00:00
fix: cant not open screen bug
This commit is contained in:
parent
6b2f8a5030
commit
cd4a472f5c
3 changed files with 21 additions and 0 deletions
|
@ -41,6 +41,7 @@ void ToolForm::initStyle()
|
||||||
IconHelper::Instance()->SetIcon(ui->appSwitchBtn, QChar(0xf24d), 15);
|
IconHelper::Instance()->SetIcon(ui->appSwitchBtn, QChar(0xf24d), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->volumeUpBtn, QChar(0xf028), 15);
|
IconHelper::Instance()->SetIcon(ui->volumeUpBtn, QChar(0xf028), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->volumeDownBtn, QChar(0xf027), 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->closeScreenBtn, QChar(0xf070), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->powerBtn, QChar(0xf011), 15);
|
IconHelper::Instance()->SetIcon(ui->powerBtn, QChar(0xf011), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->expandNotifyBtn, QChar(0xf103), 15);
|
IconHelper::Instance()->SetIcon(ui->expandNotifyBtn, QChar(0xf103), 15);
|
||||||
|
@ -220,3 +221,11 @@ void ToolForm::onControlStateChange(Device *device, Device::GroupControlState ol
|
||||||
Q_UNUSED(newState)
|
Q_UNUSED(newState)
|
||||||
updateGroupControl();
|
updateGroupControl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ToolForm::on_openScreenBtn_clicked()
|
||||||
|
{
|
||||||
|
if (!m_device) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit m_device->setScreenPowerMode(ControlMsg::SPM_NORMAL);
|
||||||
|
}
|
||||||
|
|
|
@ -48,6 +48,8 @@ private slots:
|
||||||
|
|
||||||
void onControlStateChange(Device *device, Device::GroupControlState oldState, Device::GroupControlState newState);
|
void onControlStateChange(Device *device, Device::GroupControlState oldState, Device::GroupControlState newState);
|
||||||
|
|
||||||
|
void on_openScreenBtn_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initStyle();
|
void initStyle();
|
||||||
void updateGroupControl();
|
void updateGroupControl();
|
||||||
|
|
|
@ -70,6 +70,16 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="openScreenBtn">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>open screen</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="closeScreenBtn">
|
<widget class="QPushButton" name="closeScreenBtn">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue