mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-03 14:18:45 +00:00
Merge branch 'dev' of https://github.com/barry-ran/QtScrcpy into dev
This commit is contained in:
commit
173fe3968f
8 changed files with 68 additions and 71 deletions
|
@ -101,15 +101,15 @@ void VideoForm::updateStyleSheet(bool vertical)
|
||||||
if (vertical) {
|
if (vertical) {
|
||||||
setStyleSheet(R"(
|
setStyleSheet(R"(
|
||||||
#videoForm {
|
#videoForm {
|
||||||
border-image: url(:/image/videoform/phone-v.png) 150px 142px 85px 142px;
|
border-image: url(:/image/videoform/phone-v.png) 150px 65px 85px 65px;
|
||||||
border-width: 150px 142px 85px 142px;
|
border-width: 150px 65px 85px 65px;
|
||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
} else {
|
} else {
|
||||||
setStyleSheet(R"(
|
setStyleSheet(R"(
|
||||||
#videoForm {
|
#videoForm {
|
||||||
border-image: url(:/image/videoform/phone-h.png) 142px 85px 142px 150px;
|
border-image: url(:/image/videoform/phone-h.png) 65px 85px 65px 150px;
|
||||||
border-width: 142px 85px 142px 150px;
|
border-width: 65px 85px 65px 150px;
|
||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,11 +80,13 @@ void Dialog::initUI()
|
||||||
ui->bitRateBox->addItem("10000000");
|
ui->bitRateBox->addItem("10000000");
|
||||||
ui->bitRateBox->setCurrentIndex(2);
|
ui->bitRateBox->setCurrentIndex(2);
|
||||||
|
|
||||||
ui->videoSizeBox->addItem("480");
|
ui->maxSizeBox->addItem("600");
|
||||||
ui->videoSizeBox->addItem("720");
|
ui->maxSizeBox->addItem("720");
|
||||||
ui->videoSizeBox->addItem("1080");
|
ui->maxSizeBox->addItem("1000");
|
||||||
ui->videoSizeBox->addItem("native");
|
ui->maxSizeBox->addItem("1280");
|
||||||
ui->videoSizeBox->setCurrentIndex(1);
|
ui->maxSizeBox->addItem("1920");
|
||||||
|
ui->maxSizeBox->addItem("native");
|
||||||
|
ui->maxSizeBox->setCurrentIndex(3);
|
||||||
|
|
||||||
ui->formatBox->addItem("mp4");
|
ui->formatBox->addItem("mp4");
|
||||||
ui->formatBox->addItem("mkv");
|
ui->formatBox->addItem("mkv");
|
||||||
|
@ -147,7 +149,7 @@ void Dialog::on_startServerBtn_clicked()
|
||||||
|
|
||||||
quint32 bitRate = ui->bitRateBox->currentText().trimmed().toUInt();
|
quint32 bitRate = ui->bitRateBox->currentText().trimmed().toUInt();
|
||||||
// this is ok that "native" toUshort is 0
|
// this is ok that "native" toUshort is 0
|
||||||
quint16 videoSize = ui->videoSizeBox->currentText().trimmed().toUShort();
|
quint16 videoSize = ui->maxSizeBox->currentText().trimmed().toUShort();
|
||||||
Device::DeviceParams params;
|
Device::DeviceParams params;
|
||||||
params.serial = ui->serialBox->currentText().trimmed();
|
params.serial = ui->serialBox->currentText().trimmed();
|
||||||
params.maxSize = videoSize;
|
params.maxSize = videoSize;
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>513</width>
|
<width>600</width>
|
||||||
<height>637</height>
|
<height>700</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>600</width>
|
<width>600</width>
|
||||||
<height>16777215</height>
|
<height>2160</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>200</height>
|
<height>240</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
<item row="3" column="10" colspan="2">
|
<item row="3" column="10" colspan="2">
|
||||||
<widget class="QCheckBox" name="gameCheck">
|
<widget class="QCheckBox" name="gameCheck">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>custom map</string>
|
<string>auto enable</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -394,7 +394,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="7" colspan="2">
|
<item row="0" column="7" colspan="2">
|
||||||
<widget class="QComboBox" name="videoSizeBox">
|
<widget class="QComboBox" name="maxSizeBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
@ -403,7 +403,7 @@
|
||||||
<item row="0" column="4" colspan="3">
|
<item row="0" column="4" colspan="3">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>video size:</string>
|
<string>max size:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Binary file not shown.
|
@ -75,7 +75,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="362"/>
|
<location filename="../../dialog.ui" line="362"/>
|
||||||
<location filename="../../dialog.cpp" line="280"/>
|
<location filename="../../dialog.cpp" line="287"/>
|
||||||
<source>select path</source>
|
<source>select path</source>
|
||||||
<translation>select path</translation>
|
<translation>select path</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -84,10 +84,6 @@
|
||||||
<source>record format:</source>
|
<source>record format:</source>
|
||||||
<translation>record format:</translation>
|
<translation>record format:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>PUBG mobile</source>
|
|
||||||
<translation type="vanished">PUBG mobile</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="72"/>
|
<location filename="../../dialog.ui" line="72"/>
|
||||||
<source>stop all server</source>
|
<source>stop all server</source>
|
||||||
|
@ -113,30 +109,35 @@
|
||||||
<source>clear</source>
|
<source>clear</source>
|
||||||
<translation>clear</translation>
|
<translation>clear</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../dialog.ui" line="300"/>
|
||||||
|
<source>reverse connection</source>
|
||||||
|
<translation>reverse connection</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../dialog.ui" line="310"/>
|
||||||
|
<source>auto enable</source>
|
||||||
|
<translation>auto enable</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="339"/>
|
<location filename="../../dialog.ui" line="339"/>
|
||||||
<source>background record</source>
|
<source>background record</source>
|
||||||
<translation>background record</translation>
|
<translation>background record</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../dialog.ui" line="355"/>
|
||||||
|
<source>screen-off</source>
|
||||||
|
<translation>screen-off</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="392"/>
|
<location filename="../../dialog.ui" line="392"/>
|
||||||
<source>apply</source>
|
<source>apply</source>
|
||||||
<translation>apply</translation>
|
<translation>apply</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="300"/>
|
<location filename="../../dialog.ui" line="406"/>
|
||||||
<source>reverse connection</source>
|
<source>max size:</source>
|
||||||
<translation>reverse connection</translation>
|
<translation>max size:</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../dialog.ui" line="42"/>
|
|
||||||
<source>get device IP</source>
|
|
||||||
<translation>get device IP</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../dialog.ui" line="355"/>
|
|
||||||
<source>screen-off</source>
|
|
||||||
<translation>turn screen off</translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="323"/>
|
<location filename="../../dialog.ui" line="323"/>
|
||||||
|
@ -149,9 +150,9 @@
|
||||||
<translation>refresh script</translation>
|
<translation>refresh script</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="310"/>
|
<location filename="../../dialog.ui" line="42"/>
|
||||||
<source>custom map</source>
|
<source>get device IP</source>
|
||||||
<translation>custom map</translation>
|
<translation>get device IP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="26"/>
|
<location filename="../../dialog.ui" line="26"/>
|
||||||
|
@ -182,11 +183,6 @@
|
||||||
<source>bit rate:</source>
|
<source>bit rate:</source>
|
||||||
<translation>bit rate:</translation>
|
<translation>bit rate:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../../dialog.ui" line="406"/>
|
|
||||||
<source>video size:</source>
|
|
||||||
<translation>video size:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="89"/>
|
<location filename="../../dialog.ui" line="89"/>
|
||||||
<source>start adbd</source>
|
<source>start adbd</source>
|
||||||
|
@ -284,7 +280,7 @@
|
||||||
<translation type="vanished">file transfer failed</translation>
|
<translation type="vanished">file transfer failed</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../device/ui/videoform.cpp" line="407"/>
|
<location filename="../../device/ui/videoform.cpp" line="408"/>
|
||||||
<source>file does not exist</source>
|
<source>file does not exist</source>
|
||||||
<translation>file does not exist</translation>
|
<translation>file does not exist</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Binary file not shown.
|
@ -75,7 +75,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="362"/>
|
<location filename="../../dialog.ui" line="362"/>
|
||||||
<location filename="../../dialog.cpp" line="280"/>
|
<location filename="../../dialog.cpp" line="287"/>
|
||||||
<source>select path</source>
|
<source>select path</source>
|
||||||
<translation>选择路径</translation>
|
<translation>选择路径</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -84,10 +84,6 @@
|
||||||
<source>record format:</source>
|
<source>record format:</source>
|
||||||
<translation>录制格式:</translation>
|
<translation>录制格式:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>PUBG mobile</source>
|
|
||||||
<translation type="vanished">和平精英</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="72"/>
|
<location filename="../../dialog.ui" line="72"/>
|
||||||
<source>stop all server</source>
|
<source>stop all server</source>
|
||||||
|
@ -113,30 +109,35 @@
|
||||||
<source>clear</source>
|
<source>clear</source>
|
||||||
<translation>清理</translation>
|
<translation>清理</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../dialog.ui" line="300"/>
|
||||||
|
<source>reverse connection</source>
|
||||||
|
<translation>反向连接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../dialog.ui" line="310"/>
|
||||||
|
<source>auto enable</source>
|
||||||
|
<translation>自动启用脚本</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="339"/>
|
<location filename="../../dialog.ui" line="339"/>
|
||||||
<source>background record</source>
|
<source>background record</source>
|
||||||
<translation>后台录制</translation>
|
<translation>后台录制</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../dialog.ui" line="355"/>
|
||||||
|
<source>screen-off</source>
|
||||||
|
<translation>自动息屏</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="392"/>
|
<location filename="../../dialog.ui" line="392"/>
|
||||||
<source>apply</source>
|
<source>apply</source>
|
||||||
<translation>应用脚本</translation>
|
<translation>应用脚本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="300"/>
|
<location filename="../../dialog.ui" line="406"/>
|
||||||
<source>reverse connection</source>
|
<source>max size:</source>
|
||||||
<translation>反向连接</translation>
|
<translation>最大尺寸:</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../dialog.ui" line="42"/>
|
|
||||||
<source>get device IP</source>
|
|
||||||
<translation>获取设备IP</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../dialog.ui" line="355"/>
|
|
||||||
<source>screen-off</source>
|
|
||||||
<translation>自动息屏</translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="323"/>
|
<location filename="../../dialog.ui" line="323"/>
|
||||||
|
@ -149,9 +150,9 @@
|
||||||
<translation>刷新脚本</translation>
|
<translation>刷新脚本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="310"/>
|
<location filename="../../dialog.ui" line="42"/>
|
||||||
<source>custom map</source>
|
<source>get device IP</source>
|
||||||
<translation>自定义映射</translation>
|
<translation>获取设备IP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="26"/>
|
<location filename="../../dialog.ui" line="26"/>
|
||||||
|
@ -182,11 +183,6 @@
|
||||||
<source>bit rate:</source>
|
<source>bit rate:</source>
|
||||||
<translation>比特率:</translation>
|
<translation>比特率:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../../dialog.ui" line="406"/>
|
|
||||||
<source>video size:</source>
|
|
||||||
<translation>视频尺寸:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../dialog.ui" line="89"/>
|
<location filename="../../dialog.ui" line="89"/>
|
||||||
<source>start adbd</source>
|
<source>start adbd</source>
|
||||||
|
@ -284,7 +280,7 @@
|
||||||
<translation type="vanished">文件传输失败</translation>
|
<translation type="vanished">文件传输失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../device/ui/videoform.cpp" line="407"/>
|
<location filename="../../device/ui/videoform.cpp" line="408"/>
|
||||||
<source>file does not exist</source>
|
<source>file does not exist</source>
|
||||||
<translation>文件不存在</translation>
|
<translation>文件不存在</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -32,6 +32,9 @@ void WinMouseTap::enableMouseEventTap(QWidget *widget, bool enabled)
|
||||||
if(enabled) {
|
if(enabled) {
|
||||||
QRect rc(widget->parentWidget()->mapToGlobal(widget->pos())
|
QRect rc(widget->parentWidget()->mapToGlobal(widget->pos())
|
||||||
, widget->size());
|
, widget->size());
|
||||||
|
// high dpi support
|
||||||
|
rc.setTopLeft(rc.topLeft() * widget->devicePixelRatio());
|
||||||
|
rc.setBottomRight(rc.bottomRight() * widget->devicePixelRatio());
|
||||||
RECT mainRect;
|
RECT mainRect;
|
||||||
mainRect.left = (LONG)rc.left();
|
mainRect.left = (LONG)rc.left();
|
||||||
mainRect.right = (LONG)rc.right();
|
mainRect.right = (LONG)rc.right();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue