mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +00:00
feat: 添加一键连接功能,添加参数保存功能,添加历史设备访问,添加设备命名 (#386)
* 添加一键连接功能,添加参数保存功能,添加历史设备访问,添加设备命名 添加一键连接功能,添加参数保存功能,添加历史设备访问,添加设备命名 * 修复mac os注释,命名统一
This commit is contained in:
parent
84278a61d0
commit
c65d7ed14c
13 changed files with 716 additions and 119 deletions
|
@ -179,7 +179,6 @@ macos {
|
|||
APP_CONFIG.files = $$files($$PWD/../config/config.ini)
|
||||
APP_CONFIG.path = Contents/MacOS/config
|
||||
QMAKE_BUNDLE_DATA += APP_CONFIG
|
||||
|
||||
# mac application icon
|
||||
ICON = $$PWD/res/QtScrcpy.icns
|
||||
QMAKE_INFO_PLIST = $$PWD/res/Info_Mac.plist
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <QDebug>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFileDialog>
|
||||
#include <QKeyEvent>
|
||||
|
@ -74,6 +74,20 @@ Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog)
|
|||
outLog(log, newLine);
|
||||
}
|
||||
});
|
||||
|
||||
m_hideIcon = new QSystemTrayIcon();
|
||||
m_hideIcon->setIcon(QIcon(":/image/tray/logo.png"));
|
||||
m_menu = new QMenu();
|
||||
m_quit = new QAction();
|
||||
m_showWindow = new QAction();;
|
||||
m_showWindow->setText(tr("show"));
|
||||
m_quit->setText(tr("quit"));
|
||||
m_menu->addAction(m_showWindow);
|
||||
m_menu->addAction(m_quit);
|
||||
m_hideIcon->setContextMenu(m_menu);
|
||||
connect(m_showWindow, &QAction::triggered, this, &Dialog::slotShow);
|
||||
connect(m_quit, SIGNAL(triggered()), this, SLOT(close()));
|
||||
connect(m_hideIcon, &QSystemTrayIcon::activated,this,&Dialog::slotActivated);
|
||||
}
|
||||
|
||||
Dialog::~Dialog()
|
||||
|
@ -119,14 +133,18 @@ void Dialog::initUI()
|
|||
ui->recordPathEdt->setText(Config::getInstance().getRecordPath());
|
||||
ui->framelessCheck->setChecked(Config::getInstance().getFramelessWindow());
|
||||
|
||||
on_useSingleModeCheck_clicked();
|
||||
|
||||
updateConnectedList();
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
// mac need more width
|
||||
setFixedWidth(520);
|
||||
setFixedWidth(550);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
// linux need more width
|
||||
setFixedWidth(480);
|
||||
setFixedWidth(520);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -140,6 +158,15 @@ void Dialog::execAdbCmd()
|
|||
m_adb.execute(ui->serialBox->currentText().trimmed(), cmd.split(" ", Qt::SkipEmptyParts));
|
||||
}
|
||||
|
||||
void Dialog::delayMs(int ms)
|
||||
{
|
||||
QTime dieTime = QTime::currentTime().addMSecs(ms);
|
||||
|
||||
while (QTime::currentTime() < dieTime) {
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
}
|
||||
}
|
||||
|
||||
QString Dialog::getGameScript(const QString &fileName)
|
||||
{
|
||||
QFile loadFile(KeyMap::getKeyMapPath() + "/" + fileName);
|
||||
|
@ -153,6 +180,77 @@ QString Dialog::getGameScript(const QString &fileName)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void Dialog::slotShow()
|
||||
{
|
||||
this->show();
|
||||
m_hideIcon->hide();
|
||||
}
|
||||
|
||||
void Dialog::slotActivated(QSystemTrayIcon::ActivationReason reason)
|
||||
{
|
||||
switch (reason) {
|
||||
case QSystemTrayIcon::Trigger:
|
||||
this->show();
|
||||
m_hideIcon->hide();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog::updateConnectedList()
|
||||
{
|
||||
ui->connectedPhoneList->clear();
|
||||
QStringList list = Config::getInstance().getConnectedGroups();
|
||||
|
||||
QRegExp regIP("\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\:([0-9]|[1-9]\\d|[1-9]\\d{2}|[1-9]\\d{3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])\\b");
|
||||
|
||||
for (int i = 0; i < list.length(); ++i)
|
||||
{
|
||||
QString phone = QString(list[i]);
|
||||
if(phone != "common" /*&& regIP.exactMatch(phone)*/)
|
||||
{
|
||||
ui->connectedPhoneList->addItem(phone+"-"+Config::getInstance().getUserName(phone));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog::updateUser()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Dialog::loadUser()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Dialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
int res = QMessageBox::question(this,tr("warning"),tr("Quit or set tray?"),tr("Quit"),tr("Set tray"),tr("Cancel"));
|
||||
|
||||
if(res == 0)
|
||||
{
|
||||
event->accept();
|
||||
}
|
||||
else if(res == 1)
|
||||
{
|
||||
this->hide();
|
||||
m_hideIcon->show();
|
||||
m_hideIcon->showMessage(tr("Notice"),
|
||||
tr("Hidden here!"),
|
||||
QSystemTrayIcon::Information,
|
||||
3000);
|
||||
event->ignore();
|
||||
}
|
||||
else
|
||||
{
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Dialog::on_updateDevice_clicked()
|
||||
{
|
||||
if (checkAdbRun()) {
|
||||
|
@ -166,6 +264,21 @@ void Dialog::on_startServerBtn_clicked()
|
|||
{
|
||||
outLog("start server...", false);
|
||||
|
||||
UserBootConfig config;
|
||||
|
||||
config.recordScreen = ui->recordScreenCheck->isChecked();
|
||||
config.recordBackground = ui->notDisplayCheck->isChecked();
|
||||
config.reverseConnect = ui->useReverseCheck->isChecked();
|
||||
config.showFPS = ui->fpsCheck->isChecked();
|
||||
config.windowOnTop = ui->alwaysTopCheck->isChecked();
|
||||
config.autoOffScreen = ui->closeScreenCheck->isChecked();
|
||||
config.windowFrameless = ui->framelessCheck->isChecked();
|
||||
config.keepAlive = ui->stayAwakeCheck->isChecked();
|
||||
|
||||
Config::getInstance().setUserBootConfig(ui->serialBox->currentText(),config);
|
||||
|
||||
updateConnectedList();
|
||||
|
||||
QString absFilePath;
|
||||
if (ui->recordScreenCheck->isChecked()) {
|
||||
QString fileDir(ui->recordPathEdt->text().trimmed());
|
||||
|
@ -422,3 +535,120 @@ void Dialog::on_framelessCheck_stateChanged(int arg1)
|
|||
Q_UNUSED(arg1)
|
||||
Config::getInstance().setFramelessWindow(ui->framelessCheck->isChecked());
|
||||
}
|
||||
|
||||
void Dialog::on_usbConnectBtn_clicked()
|
||||
{
|
||||
on_stopAllServerBtn_clicked();
|
||||
delayMs(200);
|
||||
on_updateDevice_clicked();
|
||||
delayMs(200);
|
||||
if(ui->serialBox->count()==0)
|
||||
{
|
||||
qWarning() << "No device is found!";
|
||||
return;
|
||||
}
|
||||
|
||||
QRegExp regIP("\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\:([0-9]|[1-9]\\d|[1-9]\\d{2}|[1-9]\\d{3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d|6553[0-5])\\b");
|
||||
|
||||
for (int i = 0; i < ui->serialBox->count(); ++i)
|
||||
{
|
||||
if(!regIP.exactMatch(ui->serialBox->itemText(i)))
|
||||
{
|
||||
ui->serialBox->setCurrentIndex(i);
|
||||
on_startServerBtn_clicked();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateConnectedList();
|
||||
}
|
||||
|
||||
void Dialog::on_wifiConnectBtn_clicked()
|
||||
{
|
||||
on_stopAllServerBtn_clicked();
|
||||
delayMs(200);
|
||||
|
||||
on_updateDevice_clicked();
|
||||
delayMs(200);
|
||||
if(ui->serialBox->count()==0)
|
||||
{
|
||||
qWarning() << "No device is found!";
|
||||
return;
|
||||
}
|
||||
|
||||
on_getIPBtn_clicked();
|
||||
delayMs(200);
|
||||
|
||||
on_startAdbdBtn_clicked();
|
||||
delayMs(1000);
|
||||
|
||||
on_wirelessConnectBtn_clicked();
|
||||
delayMs(2000);
|
||||
|
||||
ui->serialBox->clear();
|
||||
|
||||
ui->serialBox->addItem(ui->deviceIpEdt->text()+":5555");
|
||||
|
||||
on_startServerBtn_clicked();
|
||||
delayMs(200);
|
||||
|
||||
updateConnectedList();
|
||||
}
|
||||
|
||||
void Dialog::on_connectedPhoneList_itemDoubleClicked(QListWidgetItem *item)
|
||||
{
|
||||
ui->serialBox->clear();
|
||||
ui->serialBox->addItem(item->text().split("-")[0]);
|
||||
ui->serialBox->setCurrentIndex(0);
|
||||
|
||||
UserBootConfig config = Config::getInstance().getUserBootConfig(ui->serialBox->currentText());
|
||||
|
||||
ui->recordScreenCheck->setChecked(config.recordScreen);
|
||||
ui->notDisplayCheck->setChecked(config.recordBackground);
|
||||
ui->useReverseCheck->setChecked(config.reverseConnect);
|
||||
ui->fpsCheck->setChecked(config.showFPS);
|
||||
ui->alwaysTopCheck->setChecked(config.windowOnTop);
|
||||
ui->closeScreenCheck->setChecked(config.autoOffScreen);
|
||||
ui->framelessCheck->setChecked(config.windowFrameless);
|
||||
ui->stayAwakeCheck->setChecked(config.keepAlive);
|
||||
ui->userNameEdt->setText(Config::getInstance().getUserName(ui->serialBox->currentText()));
|
||||
|
||||
on_startServerBtn_clicked();
|
||||
}
|
||||
|
||||
void Dialog::on_updateNameBtn_clicked()
|
||||
{
|
||||
if(ui->serialBox->count()!=0)
|
||||
{
|
||||
if(ui->userNameEdt->text().isEmpty())
|
||||
Config::getInstance().setUserName(ui->serialBox->currentText(),"PHONE");
|
||||
else
|
||||
Config::getInstance().setUserName(ui->serialBox->currentText(),ui->userNameEdt->text());
|
||||
|
||||
updateConnectedList();
|
||||
|
||||
qDebug()<<"Update OK!";
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning()<<"No device is connected!";
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog::on_useSingleModeCheck_clicked()
|
||||
{
|
||||
if(ui->useSingleModeCheck->isChecked())
|
||||
{
|
||||
ui->configGroupBox->hide();
|
||||
ui->adbGroupBox->hide();
|
||||
ui->wirelessGroupBox->hide();
|
||||
ui->usbGroupBox->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->configGroupBox->show();
|
||||
ui->adbGroupBox->show();
|
||||
ui->wirelessGroupBox->show();
|
||||
ui->usbGroupBox->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#ifndef DIALOG_H
|
||||
#ifndef DIALOG_H
|
||||
#define DIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QPointer>
|
||||
#include <QMessageBox>
|
||||
#include <QMenu>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QListWidget>
|
||||
|
||||
|
||||
#include "adbprocess.h"
|
||||
#include "devicemanage.h"
|
||||
|
@ -66,16 +71,39 @@ private slots:
|
|||
|
||||
void on_framelessCheck_stateChanged(int arg1);
|
||||
|
||||
void on_usbConnectBtn_clicked();
|
||||
|
||||
void on_wifiConnectBtn_clicked();
|
||||
|
||||
void on_connectedPhoneList_itemDoubleClicked(QListWidgetItem *item);
|
||||
|
||||
void on_updateNameBtn_clicked();
|
||||
|
||||
void on_useSingleModeCheck_clicked();
|
||||
|
||||
private:
|
||||
bool checkAdbRun();
|
||||
void initUI();
|
||||
void execAdbCmd();
|
||||
void delayMs(int ms);
|
||||
QString getGameScript(const QString &fileName);
|
||||
void slotShow();
|
||||
void slotActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
void updateConnectedList();
|
||||
void updateUser();
|
||||
void loadUser();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
private:
|
||||
Ui::Dialog *ui;
|
||||
AdbProcess m_adb;
|
||||
DeviceManage m_deviceManage;
|
||||
QSystemTrayIcon *m_hideIcon;
|
||||
QMenu *m_menu;
|
||||
QAction *m_showWindow;
|
||||
QAction *m_quit;
|
||||
};
|
||||
|
||||
#endif // DIALOG_H
|
||||
|
|
|
@ -6,19 +6,19 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>420</width>
|
||||
<height>517</height>
|
||||
<width>500</width>
|
||||
<height>745</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>420</width>
|
||||
<width>500</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>420</width>
|
||||
<width>500</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -26,6 +26,56 @@
|
|||
<string notr="true">QtScrcpy</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useSingleModeCheck">
|
||||
<property name="text">
|
||||
<string>Use Simple Mode</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="simpleGroupBox">
|
||||
<property name="title">
|
||||
<string>Simple Mode</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="wifiConnectBtn">
|
||||
<property name="text">
|
||||
<string>WIFI Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="usbConnectBtn">
|
||||
<property name="text">
|
||||
<string>USB Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="connectedPhoneList">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="configGroupBox">
|
||||
<property name="title">
|
||||
|
@ -350,21 +400,43 @@
|
|||
<string>USB line</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>device name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="userNameEdt">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="updateNameBtn">
|
||||
<property name="text">
|
||||
<string>update name</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="usbWidget1" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
|
@ -382,6 +454,12 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>110</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>device serial:</string>
|
||||
</property>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <QApplication>
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QSurfaceFormat>
|
||||
|
@ -106,7 +106,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
qInfo(
|
||||
"%s",
|
||||
QObject::tr("This software is completely open source and free. Use for illegal purposes is strictly prohibited, or at your own risk. You can download it at the "
|
||||
QObject::tr("This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the "
|
||||
"following address:")
|
||||
.toUtf8()
|
||||
.data());
|
||||
|
|
Binary file not shown.
|
@ -49,93 +49,129 @@
|
|||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="477"/>
|
||||
<location filename="../../dialog.ui" line="555"/>
|
||||
<source>Wireless</source>
|
||||
<translation>Wireless</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="561"/>
|
||||
<location filename="../../dialog.ui" line="639"/>
|
||||
<source>wireless connect</source>
|
||||
<translation>wireless connect</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="577"/>
|
||||
<location filename="../../dialog.ui" line="655"/>
|
||||
<source>wireless disconnect</source>
|
||||
<translation>wireless disconnect</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="32"/>
|
||||
<location filename="../../dialog.ui" line="82"/>
|
||||
<source>Start Config</source>
|
||||
<translation>Start Config</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="168"/>
|
||||
<location filename="../../dialog.ui" line="218"/>
|
||||
<source>record save path:</source>
|
||||
<translation>record save path:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="185"/>
|
||||
<location filename="../../dialog.cpp" line="338"/>
|
||||
<location filename="../../dialog.ui" line="235"/>
|
||||
<location filename="../../dialog.cpp" line="449"/>
|
||||
<source>select path</source>
|
||||
<translation>select path</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="99"/>
|
||||
<location filename="../../dialog.ui" line="149"/>
|
||||
<source>record format:</source>
|
||||
<translation>record format:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="323"/>
|
||||
<location filename="../../dialog.ui" line="373"/>
|
||||
<source>record screen</source>
|
||||
<translation>record screen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="268"/>
|
||||
<location filename="../../dialog.ui" line="318"/>
|
||||
<source>frameless</source>
|
||||
<translation>frameless</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="127"/>
|
||||
<location filename="../../dialog.ui" line="32"/>
|
||||
<source>Use Simple Mode</source>
|
||||
<translatorcomment>Use Simple Mode</translatorcomment>
|
||||
<translation>Use Simple Mode</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="42"/>
|
||||
<source>Simple Mode</source>
|
||||
<translatorcomment>Simple Mode</translatorcomment>
|
||||
<translation>Simple Mode</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="53"/>
|
||||
<source>WIFI Connect</source>
|
||||
<translatorcomment>WIFI Connect</translatorcomment>
|
||||
<translation>WIFI Connect</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="60"/>
|
||||
<source>USB Connect</source>
|
||||
<translatorcomment>USB Connect</translatorcomment>
|
||||
<translation>USB Connect</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="177"/>
|
||||
<source>lock orientation:</source>
|
||||
<translation>lock orientation:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="330"/>
|
||||
<location filename="../../dialog.ui" line="380"/>
|
||||
<source>show fps</source>
|
||||
<translation>show fps</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="337"/>
|
||||
<location filename="../../dialog.ui" line="387"/>
|
||||
<source>stay awake</source>
|
||||
<translation>stay awake</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="434"/>
|
||||
<location filename="../../dialog.ui" line="414"/>
|
||||
<source>device name:</source>
|
||||
<translatorcomment>device name:</translatorcomment>
|
||||
<translation>device name:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="431"/>
|
||||
<source>update name</source>
|
||||
<translatorcomment>update name</translatorcomment>
|
||||
<translation>update name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="512"/>
|
||||
<source>stop all server</source>
|
||||
<translation>stop all server</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="611"/>
|
||||
<location filename="../../dialog.ui" line="689"/>
|
||||
<source>adb command:</source>
|
||||
<translation>adb command:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="647"/>
|
||||
<location filename="../../dialog.ui" line="725"/>
|
||||
<source>terminate</source>
|
||||
<translation>terminate</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="634"/>
|
||||
<location filename="../../dialog.ui" line="712"/>
|
||||
<source>execute</source>
|
||||
<translation>execute</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="660"/>
|
||||
<location filename="../../dialog.ui" line="738"/>
|
||||
<source>clear</source>
|
||||
<translation>clear</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="313"/>
|
||||
<location filename="../../dialog.ui" line="363"/>
|
||||
<source>reverse connection</source>
|
||||
<translation>reverse connection</translation>
|
||||
</message>
|
||||
|
@ -144,57 +180,57 @@
|
|||
<translation type="vanished">auto enable</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="297"/>
|
||||
<location filename="../../dialog.ui" line="347"/>
|
||||
<source>background record</source>
|
||||
<translation>background record</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="261"/>
|
||||
<location filename="../../dialog.ui" line="311"/>
|
||||
<source>screen-off</source>
|
||||
<translation>screen-off</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="230"/>
|
||||
<location filename="../../dialog.ui" line="280"/>
|
||||
<source>apply</source>
|
||||
<translation>apply</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="85"/>
|
||||
<location filename="../../dialog.ui" line="135"/>
|
||||
<source>max size:</source>
|
||||
<translation>max size:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="281"/>
|
||||
<location filename="../../dialog.ui" line="331"/>
|
||||
<source>always on top</source>
|
||||
<translation>always on top</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="223"/>
|
||||
<location filename="../../dialog.ui" line="273"/>
|
||||
<source>refresh script</source>
|
||||
<translation>refresh script</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="451"/>
|
||||
<location filename="../../dialog.ui" line="529"/>
|
||||
<source>get device IP</source>
|
||||
<translation>get device IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="350"/>
|
||||
<location filename="../../dialog.ui" line="400"/>
|
||||
<source>USB line</source>
|
||||
<translation>USB line</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="406"/>
|
||||
<location filename="../../dialog.ui" line="484"/>
|
||||
<source>stop server</source>
|
||||
<translation>stop server</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="396"/>
|
||||
<location filename="../../dialog.ui" line="474"/>
|
||||
<source>start server</source>
|
||||
<translation>start server</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="386"/>
|
||||
<location filename="../../dialog.ui" line="464"/>
|
||||
<source>device serial:</source>
|
||||
<translation>device serial:</translation>
|
||||
</message>
|
||||
|
@ -203,47 +239,101 @@
|
|||
<translation type="vanished">Config</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="68"/>
|
||||
<location filename="../../dialog.ui" line="118"/>
|
||||
<source>bit rate:</source>
|
||||
<translation>bit rate:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="461"/>
|
||||
<location filename="../../dialog.ui" line="539"/>
|
||||
<source>start adbd</source>
|
||||
<translation>start adbd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="441"/>
|
||||
<location filename="../../dialog.ui" line="519"/>
|
||||
<source>refresh devices</source>
|
||||
<translation>refresh devices</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="105"/>
|
||||
<location filename="../../dialog.cpp" line="83"/>
|
||||
<source>show</source>
|
||||
<translatorcomment>show</translatorcomment>
|
||||
<translation>show</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="84"/>
|
||||
<source>quit</source>
|
||||
<translatorcomment>quit</translatorcomment>
|
||||
<translation>quit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="119"/>
|
||||
<source>original</source>
|
||||
<translation>original</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="112"/>
|
||||
<location filename="../../dialog.cpp" line="126"/>
|
||||
<source>no lock</source>
|
||||
<translation>no lock</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>warning</source>
|
||||
<translatorcomment>Warning</translatorcomment>
|
||||
<translation>Warning</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>Quit or set tray?</source>
|
||||
<translatorcomment>Quit or set tray?</translatorcomment>
|
||||
<translation>Quit or set tray?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>Quit</source>
|
||||
<translatorcomment>Quit</translatorcomment>
|
||||
<translation>Quit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>Set tray</source>
|
||||
<translatorcomment>Set tray</translatorcomment>
|
||||
<translation>Set tray</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>Cancel</source>
|
||||
<translatorcomment>Cancel</translatorcomment>
|
||||
<translation>Cancel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="240"/>
|
||||
<source>Notice</source>
|
||||
<translatorcomment>Notice</translatorcomment>
|
||||
<translation>Notice</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="241"/>
|
||||
<source>Hidden here!</source>
|
||||
<translatorcomment>Hidden here!</translatorcomment>
|
||||
<translation>Hidden here!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InputConvertGame</name>
|
||||
<message>
|
||||
<location filename="../../device/controller/inputconvert/inputconvertgame.cpp" line="507"/>
|
||||
<source>current keymap mode: %1</source>
|
||||
<translation>current keymap mode: %1</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../device/controller/inputconvert/inputconvertgame.cpp" line="507"/>
|
||||
<source>custom</source>
|
||||
<translation>custom</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../device/controller/inputconvert/inputconvertgame.cpp" line="507"/>
|
||||
<source>normal</source>
|
||||
<translation>normal</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -251,7 +341,7 @@
|
|||
<message>
|
||||
<location filename="../../device/controller/inputconvert/keymap/keymap.cpp" line="307"/>
|
||||
<source>Script updated, current keymap mode:normal, Press ~ key to switch keymap mode</source>
|
||||
<translation>Script updated, current keymap mode:normal, Press ~ key to switch keymap mode</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -266,14 +356,10 @@ Strictly used for illegal purposes, or at your own risk.
|
|||
You can download it at the following address:</source>
|
||||
<translation type="vanished">This software is completely open source and free.\nStrictly used for illegal purposes, or at your own risk.\nYou can download it at the following address:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</source>
|
||||
<translation type="vanished">This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../main.cpp" line="109"/>
|
||||
<source>This software is completely open source and free. Use for illegal purposes is strictly prohibited, or at your own risk. You can download it at the following address:</source>
|
||||
<translation>This software is completely open source and free. Use for illegal purposes is strictly prohibited, or at your own risk. You can download it at the following address:</translation>
|
||||
<source>This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</source>
|
||||
<translation>This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
Binary file not shown.
|
@ -49,93 +49,129 @@
|
|||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="477"/>
|
||||
<location filename="../../dialog.ui" line="555"/>
|
||||
<source>Wireless</source>
|
||||
<translation>无线</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="561"/>
|
||||
<location filename="../../dialog.ui" line="639"/>
|
||||
<source>wireless connect</source>
|
||||
<translation>无线连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="577"/>
|
||||
<location filename="../../dialog.ui" line="655"/>
|
||||
<source>wireless disconnect</source>
|
||||
<translation>无线断开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="32"/>
|
||||
<location filename="../../dialog.ui" line="82"/>
|
||||
<source>Start Config</source>
|
||||
<translation>启动配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="168"/>
|
||||
<location filename="../../dialog.ui" line="218"/>
|
||||
<source>record save path:</source>
|
||||
<translation>录像保存路径:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="185"/>
|
||||
<location filename="../../dialog.cpp" line="338"/>
|
||||
<location filename="../../dialog.ui" line="235"/>
|
||||
<location filename="../../dialog.cpp" line="449"/>
|
||||
<source>select path</source>
|
||||
<translation>选择路径</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="99"/>
|
||||
<location filename="../../dialog.ui" line="149"/>
|
||||
<source>record format:</source>
|
||||
<translation>录制格式:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="323"/>
|
||||
<location filename="../../dialog.ui" line="373"/>
|
||||
<source>record screen</source>
|
||||
<translation>录制屏幕</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="268"/>
|
||||
<location filename="../../dialog.ui" line="318"/>
|
||||
<source>frameless</source>
|
||||
<translation>无边框</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="127"/>
|
||||
<location filename="../../dialog.ui" line="32"/>
|
||||
<source>Use Simple Mode</source>
|
||||
<translatorcomment>启用一键模式</translatorcomment>
|
||||
<translation>启用一键模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="42"/>
|
||||
<source>Simple Mode</source>
|
||||
<translatorcomment>一键模式</translatorcomment>
|
||||
<translation>一键模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="53"/>
|
||||
<source>WIFI Connect</source>
|
||||
<translatorcomment>一键WIFI连接</translatorcomment>
|
||||
<translation>一键WIFI连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="60"/>
|
||||
<source>USB Connect</source>
|
||||
<translatorcomment>一键USB连接</translatorcomment>
|
||||
<translation>一键USB连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="177"/>
|
||||
<source>lock orientation:</source>
|
||||
<translation>锁定方向:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="330"/>
|
||||
<location filename="../../dialog.ui" line="380"/>
|
||||
<source>show fps</source>
|
||||
<translation>显示fps</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="337"/>
|
||||
<location filename="../../dialog.ui" line="387"/>
|
||||
<source>stay awake</source>
|
||||
<translation>保持唤醒</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="434"/>
|
||||
<location filename="../../dialog.ui" line="414"/>
|
||||
<source>device name:</source>
|
||||
<translatorcomment>设备名称:</translatorcomment>
|
||||
<translation>设备名称:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="431"/>
|
||||
<source>update name</source>
|
||||
<translatorcomment>更新设置名称</translatorcomment>
|
||||
<translation>更新设置名称</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="512"/>
|
||||
<source>stop all server</source>
|
||||
<translation>停止所有服务</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="611"/>
|
||||
<location filename="../../dialog.ui" line="689"/>
|
||||
<source>adb command:</source>
|
||||
<translation>adb命令:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="647"/>
|
||||
<location filename="../../dialog.ui" line="725"/>
|
||||
<source>terminate</source>
|
||||
<translation>终止</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="634"/>
|
||||
<location filename="../../dialog.ui" line="712"/>
|
||||
<source>execute</source>
|
||||
<translation>执行</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="660"/>
|
||||
<location filename="../../dialog.ui" line="738"/>
|
||||
<source>clear</source>
|
||||
<translation>清理</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="313"/>
|
||||
<location filename="../../dialog.ui" line="363"/>
|
||||
<source>reverse connection</source>
|
||||
<translation>反向连接</translation>
|
||||
</message>
|
||||
|
@ -144,57 +180,57 @@
|
|||
<translation type="vanished">自动启用脚本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="297"/>
|
||||
<location filename="../../dialog.ui" line="347"/>
|
||||
<source>background record</source>
|
||||
<translation>后台录制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="261"/>
|
||||
<location filename="../../dialog.ui" line="311"/>
|
||||
<source>screen-off</source>
|
||||
<translation>自动息屏</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="230"/>
|
||||
<location filename="../../dialog.ui" line="280"/>
|
||||
<source>apply</source>
|
||||
<translation>应用脚本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="85"/>
|
||||
<location filename="../../dialog.ui" line="135"/>
|
||||
<source>max size:</source>
|
||||
<translation>最大尺寸:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="281"/>
|
||||
<location filename="../../dialog.ui" line="331"/>
|
||||
<source>always on top</source>
|
||||
<translation>窗口置顶</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="223"/>
|
||||
<location filename="../../dialog.ui" line="273"/>
|
||||
<source>refresh script</source>
|
||||
<translation>刷新脚本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="451"/>
|
||||
<location filename="../../dialog.ui" line="529"/>
|
||||
<source>get device IP</source>
|
||||
<translation>获取设备IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="350"/>
|
||||
<location filename="../../dialog.ui" line="400"/>
|
||||
<source>USB line</source>
|
||||
<translation>USB线</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="406"/>
|
||||
<location filename="../../dialog.ui" line="484"/>
|
||||
<source>stop server</source>
|
||||
<translation>停止服务</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="396"/>
|
||||
<location filename="../../dialog.ui" line="474"/>
|
||||
<source>start server</source>
|
||||
<translation>启动服务</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="386"/>
|
||||
<location filename="../../dialog.ui" line="464"/>
|
||||
<source>device serial:</source>
|
||||
<translation>设备序列号:</translation>
|
||||
</message>
|
||||
|
@ -203,47 +239,101 @@
|
|||
<translation type="vanished">配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="68"/>
|
||||
<location filename="../../dialog.ui" line="118"/>
|
||||
<source>bit rate:</source>
|
||||
<translation>比特率:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="461"/>
|
||||
<location filename="../../dialog.ui" line="539"/>
|
||||
<source>start adbd</source>
|
||||
<translation>启动adbd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="441"/>
|
||||
<location filename="../../dialog.ui" line="519"/>
|
||||
<source>refresh devices</source>
|
||||
<translation>刷新设备列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="105"/>
|
||||
<location filename="../../dialog.cpp" line="83"/>
|
||||
<source>show</source>
|
||||
<translatorcomment>显示</translatorcomment>
|
||||
<translation>显示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="84"/>
|
||||
<source>quit</source>
|
||||
<translatorcomment>退出</translatorcomment>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="119"/>
|
||||
<source>original</source>
|
||||
<translation>原始</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="112"/>
|
||||
<location filename="../../dialog.cpp" line="126"/>
|
||||
<source>no lock</source>
|
||||
<translation>不锁定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>warning</source>
|
||||
<translatorcomment>警告</translatorcomment>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>Quit or set tray?</source>
|
||||
<translatorcomment>退出还是最小化到托盘?</translatorcomment>
|
||||
<translation>退出还是最小化到托盘?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>Quit</source>
|
||||
<translatorcomment>退出</translatorcomment>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>Set tray</source>
|
||||
<translatorcomment>最小化到系统托盘</translatorcomment>
|
||||
<translation>最小化到系统托盘</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="230"/>
|
||||
<source>Cancel</source>
|
||||
<translatorcomment>取消</translatorcomment>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="240"/>
|
||||
<source>Notice</source>
|
||||
<translatorcomment>提示</translatorcomment>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.cpp" line="241"/>
|
||||
<source>Hidden here!</source>
|
||||
<translatorcomment>安卓录屏程序隐藏在这!</translatorcomment>
|
||||
<translation>安卓录屏程序隐藏在这!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InputConvertGame</name>
|
||||
<message>
|
||||
<location filename="../../device/controller/inputconvert/inputconvertgame.cpp" line="507"/>
|
||||
<source>current keymap mode: %1</source>
|
||||
<translation>当前按键映射模式: %1</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../device/controller/inputconvert/inputconvertgame.cpp" line="507"/>
|
||||
<source>custom</source>
|
||||
<translation>自定义</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../device/controller/inputconvert/inputconvertgame.cpp" line="507"/>
|
||||
<source>normal</source>
|
||||
<translation>正常</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -251,7 +341,7 @@
|
|||
<message>
|
||||
<location filename="../../device/controller/inputconvert/keymap/keymap.cpp" line="307"/>
|
||||
<source>Script updated, current keymap mode:normal, Press ~ key to switch keymap mode</source>
|
||||
<translation>脚本已更新,当前按键映射模式:正常,按~键切换按键映射模式</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -266,14 +356,10 @@ Strictly used for illegal purposes, or at your own risk.
|
|||
You can download it at the following address:</source>
|
||||
<translation type="vanished">本软件完全开源免费.\n严禁用于非法用途,否则后果自负.\n你可以在下面地址下载:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</source>
|
||||
<translation type="vanished">本软件完全开源免费,严禁用于非法用途,否则后果自负,你可以在下面地址下载:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../main.cpp" line="109"/>
|
||||
<source>This software is completely open source and free. Use for illegal purposes is strictly prohibited, or at your own risk. You can download it at the following address:</source>
|
||||
<translation>该软件是完全开源和免费的。 严禁将其用于非法目的,否则后果自负。 您可以从以下地址下载它:</translation>
|
||||
<source>This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</source>
|
||||
<translation>本软件完全开源免费,严禁用于非法用途,否则后果自负,你可以在下面地址下载:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
BIN
QtScrcpy/res/image/tray/logo.png
Normal file
BIN
QtScrcpy/res/image/tray/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -2,7 +2,7 @@
|
|||
<qresource prefix="/">
|
||||
<file>font/fontawesome-webfont.ttf</file>
|
||||
<file>image/videoform/phone-h.png</file>
|
||||
<file>image/videoform/phone-v.png</file>
|
||||
<file>image/videoform/phone-v.png</file>
|
||||
<file>qss/psblack.css</file>
|
||||
<file>qss/psblack/add_bottom.png</file>
|
||||
<file>qss/psblack/add_left.png</file>
|
||||
|
@ -24,5 +24,6 @@
|
|||
<file>qss/psblack/radiobutton_unchecked_disable.png</file>
|
||||
<file>i18n/QtScrcpy_en.qm</file>
|
||||
<file>i18n/QtScrcpy_zh.qm</file>
|
||||
<file>image/tray/logo.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QSettings>
|
||||
#include <QDebug>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
@ -62,6 +63,16 @@
|
|||
#define SERIAL_WINDOW_RECT_KEY_H "WindowRectH"
|
||||
#define SERIAL_WINDOW_RECT_KEY_DEF -1
|
||||
|
||||
#define USER_NAME "PHONE"
|
||||
#define USER_RECORD_SCREEN "RecordScreen"
|
||||
#define USER_RECORD_BACKGROUD "RecordBackGround"
|
||||
#define USER_REVERSE_CONNECT "ReverseConnect"
|
||||
#define USER_SHOW_FPS "ShowFPS"
|
||||
#define USER_WINDOW_ON_TOP "WindowOnTop"
|
||||
#define USER_AUTO_OFF_SCREEN "AutoOffScreen"
|
||||
#define USER_WINDOW_FRAMELESS "WindowFrameless"
|
||||
#define USER_KEEP_ALIVE "KeepAlive"
|
||||
|
||||
#define COMMON_FRAMELESS_WINDOW_KEY "FramelessWindow"
|
||||
#define COMMON_FRAMELESS_WINDOW_DEF false
|
||||
|
||||
|
@ -76,6 +87,8 @@ Config::Config(QObject *parent) : QObject(parent)
|
|||
|
||||
m_userData = new QSettings(getConfigPath() + "/userdata.ini", QSettings::IniFormat);
|
||||
m_userData->setIniCodec("UTF-8");
|
||||
|
||||
qDebug()<<m_userData->childGroups();
|
||||
}
|
||||
|
||||
Config &Config::getInstance()
|
||||
|
@ -113,6 +126,37 @@ void Config::setRecordPath(const QString &path)
|
|||
m_userData->endGroup();
|
||||
}
|
||||
|
||||
void Config::setUserBootConfig(const QString &serial, const UserBootConfig &config)
|
||||
{
|
||||
m_userData->beginGroup(serial);
|
||||
m_userData->setValue(USER_RECORD_SCREEN, config.recordScreen);
|
||||
m_userData->setValue(USER_RECORD_BACKGROUD, config.recordBackground);
|
||||
m_userData->setValue(USER_REVERSE_CONNECT, config.reverseConnect);
|
||||
m_userData->setValue(USER_SHOW_FPS, config.showFPS);
|
||||
m_userData->setValue(USER_WINDOW_ON_TOP, config.windowOnTop);
|
||||
m_userData->setValue(USER_AUTO_OFF_SCREEN, config.autoOffScreen);
|
||||
m_userData->setValue(USER_WINDOW_FRAMELESS, config.windowFrameless);
|
||||
m_userData->setValue(USER_KEEP_ALIVE, config.keepAlive);
|
||||
m_userData->endGroup();
|
||||
m_userData->sync();
|
||||
}
|
||||
|
||||
UserBootConfig Config::getUserBootConfig(const QString &serial)
|
||||
{
|
||||
UserBootConfig config;
|
||||
m_userData->beginGroup(serial);
|
||||
config.recordScreen = m_userData->value(USER_RECORD_SCREEN, false).toBool();
|
||||
config.recordBackground = m_userData->value(USER_RECORD_BACKGROUD, false).toBool();
|
||||
config.reverseConnect = m_userData->value(USER_REVERSE_CONNECT, true).toBool();
|
||||
config.showFPS = m_userData->value(USER_SHOW_FPS, false).toBool();
|
||||
config.windowOnTop = m_userData->value(USER_WINDOW_ON_TOP, false).toBool();
|
||||
config.autoOffScreen = m_userData->value(USER_AUTO_OFF_SCREEN, false).toBool();
|
||||
config.windowFrameless = m_userData->value(USER_WINDOW_FRAMELESS, false).toBool();
|
||||
config.keepAlive = m_userData->value(USER_KEEP_ALIVE, false).toBool();
|
||||
m_userData->endGroup();
|
||||
return config;
|
||||
}
|
||||
|
||||
int Config::getBitRateIndex()
|
||||
{
|
||||
int bitRateIndex;
|
||||
|
@ -191,6 +235,23 @@ void Config::setFramelessWindow(bool frameless)
|
|||
m_userData->endGroup();
|
||||
}
|
||||
|
||||
void Config::setUserName(const QString &serial, const QString &name)
|
||||
{
|
||||
m_userData->beginGroup(serial);
|
||||
m_userData->setValue(USER_NAME, name);
|
||||
m_userData->endGroup();
|
||||
m_userData->sync();
|
||||
}
|
||||
|
||||
QString Config::getUserName(const QString &serial)
|
||||
{
|
||||
QString name;
|
||||
m_userData->beginGroup(serial);
|
||||
name = m_userData->value(USER_NAME,"PHONE").toString();
|
||||
m_userData->endGroup();
|
||||
return name;
|
||||
}
|
||||
|
||||
bool Config::getFramelessWindow()
|
||||
{
|
||||
bool framelessWindow = false;
|
||||
|
@ -301,6 +362,16 @@ QString Config::getCodecName()
|
|||
return codecName;
|
||||
}
|
||||
|
||||
QStringList Config::getConnectedGroups()
|
||||
{
|
||||
return m_userData->childGroups();
|
||||
}
|
||||
|
||||
void Config::deleteGroup(const QString &serial)
|
||||
{
|
||||
m_userData->remove(serial);
|
||||
}
|
||||
|
||||
QString Config::getTitle()
|
||||
{
|
||||
QString title;
|
||||
|
|
|
@ -1,15 +1,27 @@
|
|||
#ifndef CONFIG_H
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
#include <QRect>
|
||||
struct UserBootConfig
|
||||
{
|
||||
bool recordScreen = false;
|
||||
bool recordBackground = false;
|
||||
bool reverseConnect = true;
|
||||
bool showFPS = false;
|
||||
bool windowOnTop = false;
|
||||
bool autoOffScreen = false;
|
||||
bool windowFrameless = false;
|
||||
bool keepAlive = false;
|
||||
};
|
||||
|
||||
class QSettings;
|
||||
class Config : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
static Config &getInstance();
|
||||
// config
|
||||
QString getTitle();
|
||||
|
@ -24,6 +36,8 @@ public:
|
|||
QString getLogLevel();
|
||||
QString getCodecOptions();
|
||||
QString getCodecName();
|
||||
QStringList getConnectedGroups();
|
||||
void deleteGroup(const QString &serial);
|
||||
|
||||
// user data
|
||||
QString getRecordPath();
|
||||
|
@ -38,6 +52,10 @@ public:
|
|||
QRect getRect(const QString &serial);
|
||||
bool getFramelessWindow();
|
||||
void setFramelessWindow(bool frameless);
|
||||
void setUserName(const QString &serial, const QString &name);
|
||||
QString getUserName(const QString &serial);
|
||||
void setUserBootConfig(const QString &serial, const UserBootConfig &config);
|
||||
UserBootConfig getUserBootConfig(const QString &serial);
|
||||
|
||||
private:
|
||||
explicit Config(QObject *parent = nullptr);
|
||||
|
|
Loading…
Add table
Reference in a new issue