mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +00:00
commit
af6cde6619
8 changed files with 25 additions and 6 deletions
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
qt-ver: [5.15.0]
|
||||
qt-ver: [5.15.1]
|
||||
qt-arch-install: [clang_64]
|
||||
clang-arch: [x64]
|
||||
env:
|
||||
|
|
2
.github/workflows/ubuntu.yml
vendored
2
.github/workflows/ubuntu.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-16.04,ubuntu-18.04]
|
||||
qt-ver: [5.15.0]
|
||||
qt-ver: [5.15.1]
|
||||
qt-arch-install: [gcc_64]
|
||||
gcc-arch: [x64]
|
||||
env:
|
||||
|
|
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
|||
# 矩阵配置 https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
|
||||
strategy:
|
||||
matrix:
|
||||
qt-ver: [5.15.0]
|
||||
qt-ver: [5.15.1]
|
||||
qt-arch: [win64_msvc2019_64, win32_msvc2019]
|
||||
# 配置qt-arch的额外设置msvc-arch,qt-arch-install
|
||||
include:
|
||||
|
|
|
@ -48,6 +48,10 @@ HEADERS += \
|
|||
FORMS += \
|
||||
dialog.ui
|
||||
|
||||
# 试用检查
|
||||
# DEFINES += TRIAL_EXPIRE_CHECK
|
||||
DEFINES += TRIAL_TIMES=10
|
||||
|
||||
# 子工程
|
||||
include ($$PWD/common/common.pri)
|
||||
include ($$PWD/adb/adb.pri)
|
||||
|
|
|
@ -343,6 +343,16 @@ QRect VideoForm::getScreenRect()
|
|||
return screenRect;
|
||||
}
|
||||
|
||||
bool VideoForm::checkTrialExpire()
|
||||
{
|
||||
static int trialTimes = 0;
|
||||
if (++trialTimes > TRIAL_TIMES) {
|
||||
QMessageBox::warning(this, "QtScrcpy", QStringLiteral("试用已结束,购买正式版本请联系作者"), QMessageBox::Ok);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void VideoForm::updateStyleSheet(bool vertical)
|
||||
{
|
||||
if (vertical) {
|
||||
|
@ -500,6 +510,12 @@ void VideoForm::setDevice(Device *device)
|
|||
|
||||
void VideoForm::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
#ifdef TRIAL_EXPIRE_CHECK
|
||||
if (checkTrialExpire()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (event->button() == Qt::MiddleButton) {
|
||||
if (m_device && !m_device->isCurrentCustomKeymap()) {
|
||||
emit m_device->postGoHome();
|
||||
|
|
|
@ -45,6 +45,7 @@ private:
|
|||
void moveCenter();
|
||||
void installShortcut();
|
||||
QRect getScreenRect();
|
||||
bool checkTrialExpire();
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "server.h"
|
||||
#include "videoform.h"
|
||||
|
||||
#define DM_MAX_DEVICES_NUM 16
|
||||
#define DM_MAX_DEVICES_NUM 1000
|
||||
|
||||
DeviceManage::DeviceManage(QObject *parent) : QObject(parent) {}
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||

|
||||

|
||||
|
||||
<a href="https://tracking.gitads.io/?repo=QtScrcpy"><img src="https://images.gitads.io/QtScrcpy" alt="GitAds"/></a>
|
||||
|
||||
[中文介绍](README_zh.md)
|
||||
|
||||
QtScrcpy connects to Android devices via USB (or via TCP/IP) for display and control. It does NOT require the root privileges.
|
||||
|
|
Loading…
Add table
Reference in a new issue