在时间开销大的页面实现多线程、实现basepage切入动画

This commit is contained in:
Lappland 2022-08-11 01:59:39 +08:00
parent 56526b2341
commit e439b9d467
41 changed files with 1402 additions and 182 deletions

View File

@ -10,6 +10,7 @@ CONFIG += c++11
SOURCES += \
about.cpp \
adbprocess.cpp \
animationwidget.cpp \
basepage.cpp \
indexlistitem.cpp \
main.cpp \
@ -17,6 +18,7 @@ SOURCES += \
pagelistitem.cpp \
pagemaker.cpp \
sonPages/activator/sp_activator.cpp \
sonPages/advanced/sp_customize_cmd.cpp \
sonPages/apps/sp_installer.cpp \
sonPages/devControl/btnemulator.cpp \
sonPages/devControl/sp_devcontrol_power.cpp \
@ -27,18 +29,21 @@ SOURCES += \
sonPages/sonpagemanager.cpp \
sonPages/standardoutputpage.cpp \
textexplainer.cpp \
threads/adbthread.cpp \
threads/thread_createpage.cpp \
welcomepage.cpp
HEADERS += \
about.h \
adbprocess.h \
animationwidget.h \
basepage.h \
indexlistitem.h \
mainwindow.h \
pagelistitem.h \
pagemaker.h \
sonPages/activator/sp_activator.h \
sonPages/advanced/sp_customize_cmd.h \
sonPages/apps/sp_installer.h \
sonPages/devControl/btnemulator.h \
sonPages/devControl/sp_devcontrol_power.h \
@ -49,6 +54,7 @@ HEADERS += \
sonPages/sonpagemanager.h \
sonPages/standardoutputpage.h \
textexplainer.h \
threads/adbthread.h \
threads/thread_createpage.h \
welcomepage.h
@ -59,6 +65,7 @@ FORMS += \
mainwindow.ui \
pagelistitem.ui \
sonPages/activator/sp_activator.ui \
sonPages/advanced/sp_customize_cmd.ui \
sonPages/apps/sp_installer.ui \
sonPages/devControl/btnemulator.ui \
sonPages/devControl/sp_devcontrol_power.ui \

270
QtAdb/QtAdb.pro.user Normal file
View File

@ -0,0 +1,270 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 6.0.2, 2022-08-11T01:56:29. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{2a10cdab-4a79-429f-99fd-00fc9e0d38f7}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="qlonglong">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
<value type="bool" key="AutoTest.Framework.Boost">true</value>
<value type="bool" key="AutoTest.Framework.CTest">false</value>
<value type="bool" key="AutoTest.Framework.Catch">true</value>
<value type="bool" key="AutoTest.Framework.GTest">true</value>
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
</valuemap>
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
<value type="int" key="AutoTest.RunAfterBuild">0</value>
<value type="bool" key="AutoTest.UseGlobal">true</value>
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
<value type="QString">-fno-delayed-template-parsing</value>
</valuelist>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
<value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
<valuemap type="QVariantMap" key="ClangTools">
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
<value type="int" key="ClangTools.ParallelJobs">4</value>
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
</valuemap>
<valuemap type="QVariantMap" key="CppEditor.QuickFix">
<value type="bool" key="UseGlobalSettings">true</value>
</valuemap>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="DeviceType">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.2.3 MSVC2019 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.2.3 MSVC2019 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.623.win64_msvc2019_64_kit</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\QT\QtADB\build-QtAdb-Desktop_Qt_6_2_3_MSVC2019_64bit-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/QT/QtADB/build-QtAdb-Desktop_Qt_6_2_3_MSVC2019_64bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\QT\QtADB\build-QtAdb-Desktop_Qt_6_2_3_MSVC2019_64bit-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/QT/QtADB/build-QtAdb-Desktop_Qt_6_2_3_MSVC2019_64bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="int" key="QtQuickCompiler">0</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\QT\QtADB\build-QtAdb-Desktop_Qt_6_2_3_MSVC2019_64bit-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/QT/QtADB/build-QtAdb-Desktop_Qt_6_2_3_MSVC2019_64bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="int" key="QtQuickCompiler">0</value>
<value type="int" key="SeparateDebugInfo">0</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/QT/QtADB/QtAdb/QtAdb.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/QT/QtADB/QtAdb/QtAdb.pro</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/QT/QtADB/build-QtAdb-Desktop_Qt_6_2_3_MSVC2019_64bit-Debug</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="qlonglong">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

View File

@ -2,10 +2,12 @@
#include "ui_about.h"
about::about(QWidget *parent) :
QWidget(parent),
basePage(parent),
ui(new Ui::about)
{
ui->setupUi(this);
//this->setLayout(ui->verticalLayout);
self_castrate();
QGraphicsDropShadowEffect *shadowEffect_btn_website = new QGraphicsDropShadowEffect();
shadowEffect_btn_website->setOffset(0,0);
@ -50,6 +52,7 @@ about::about(QWidget *parent) :
shadowEffect_btn_version->setOffset(0,0);
shadowEffect_btn_version->setColor(Qt::gray);
shadowEffect_btn_version->setBlurRadius(5);
ui->btn_version->setGraphicsEffect(shadowEffect_btn_version);
ui->btn_money->hide();
@ -67,7 +70,6 @@ void about::on_btn_website_clicked()
QDesktopServices::openUrl(QUrl("https://lapplandsp.github.io/QtAdb-pages/", QUrl::TolerantMode));
}
void about::on_btn_coolapk_clicked()
{
QDesktopServices::openUrl(QUrl("http://www.coolapk.com/u/692559", QUrl::TolerantMode));

View File

@ -4,13 +4,15 @@
#include <QWidget>
#include <QDesktopServices>
#include <QGraphicsDropShadowEffect>
#include "basepage.h"
#include "sonPages/pay.h"
#include "animationwidget.h"
namespace Ui {
class about;
}
class about : public QWidget
class about : public basePage
{
Q_OBJECT

View File

@ -22,10 +22,26 @@
</property>
<item>
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>600</width>
<height>350</height>
</size>
</property>
<property name="font">
<font>
<family>MiSans Medium</family>
</font>
</property>
<property name="styleSheet">
<string notr="true">border-radius: 4px;
background-color: rgba(255, 255, 255, 0);
border:0px solid #BDBDBD;</string>
background-color: rgba(255, 255, 255, 0);</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
@ -94,7 +110,6 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
<pointsize>12</pointsize>
</font>
</property>
@ -157,7 +172,6 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
<pointsize>12</pointsize>
</font>
</property>
@ -220,7 +234,6 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
<pointsize>12</pointsize>
</font>
</property>
@ -283,7 +296,6 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
<pointsize>12</pointsize>
</font>
</property>
@ -451,7 +463,6 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
<pointsize>12</pointsize>
</font>
</property>

View File

@ -4,6 +4,7 @@ adbProcess::adbProcess()
{
explainer = new textExplainer;
connect(this , SIGNAL(readyReadStandardError()) , this , SLOT(on_readerror()));
}
QString adbProcess::run(QString command) //Adb 命令解析 - 单条命令
@ -39,6 +40,7 @@ QString adbProcess::run(QString command) //Adb 命令解析 -
tag = 1;
shell_command.clear();
}
if(args_0[i] == "'" && tag == 0)
{
//qDebug() << "No." << i << ":" << "args_0[" << i << "] is:" << args_0[i] << "\n" << "tag = " << tag << "\n";
@ -56,7 +58,7 @@ QString adbProcess::run(QString command) //Adb 命令解析 -
}
args_1.removeAt(0);
qDebug() << "'run' running with arguments" << args_1 ;
//qDebug() << "'run' running with arguments" << args_1 ;
this->start("adb", args_1);
//qDebug() << readAllStandardOutput();
@ -68,11 +70,13 @@ QString adbProcess::run(QString command) //Adb 命令解析 -
output = readAllStandardOutput();
standardOutput.append(output);
explainer->explainOutput(output);
emit outputGet(output);
return output;
}
QString adbProcess::run(QString command, device dev) //Adb 命令解析 - 对指定设备发送单条命令
{
//Sleep(500);
QStringList args_0;
QStringList args_1;
@ -92,6 +96,7 @@ QString adbProcess::run(QString command, device dev) //Adb 命
args_1.append(args_0[i]);
//qDebug() << "append0" << shell_command;
}
/*
if(tag == 0)
{
@ -100,6 +105,7 @@ QString adbProcess::run(QString command, device dev) //Adb 命
//q.enqueue(args_0[i]);
//qDebug() << shell_command;
}*/
if(args_0[i] == "'" && tag == 0)
{
//qDebug() << "No." << i << ":" << "args_0[" << i << "] is:" << args_0[i] << "\n" << "tag = " << tag << "\n";
@ -108,6 +114,7 @@ QString adbProcess::run(QString command, device dev) //Adb 命
tag = 1;
shell_command.clear();
}
if(args_0[i] == "'" && tag == 0)
{
//qDebug() << "No." << i << ":" << "args_0[" << i << "] is:" << args_0[i] << "\n" << "tag = " << tag << "\n";
@ -126,7 +133,7 @@ QString adbProcess::run(QString command, device dev) //Adb 命
args_1.removeAt(2);
qDebug() << "'run' running with arguments" << args_1 ;
//qDebug() << "'run' running with arguments" << args_1 ;
//qDebug() << "calling this->start('adb', args_1);";
this->start("adb", args_1);
//qDebug() << "this->start('adb', args_1); ended";
@ -138,11 +145,14 @@ QString adbProcess::run(QString command, device dev) //Adb 命
output = readAllStandardOutput();
//qDebug() << "run output:" << output << "\n";
explainer->explainOutput(output);
emit outputGet(output);
return output;
}
QString adbProcess::run_contains_empty(QString command, device dev) //Adb 命令解析 - 对指定设备发送单条命令(可能包含空格)
{
QStringList args_0;
QStringList args_1;
@ -192,7 +202,7 @@ QString adbProcess::run_contains_empty(QString command, device dev)
args_1.removeAt(2);
qDebug() << "'run' running with arguments" << args_1 ;
//qDebug() << "'run' running with arguments" << args_1 ;
this->start("adb", args_1);
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
waitForReadyRead();
@ -202,11 +212,14 @@ QString adbProcess::run_contains_empty(QString command, device dev)
output = readAllStandardOutput();
//qDebug() << "run output:" << output << "\n";
explainer->explainOutput(output);
emit outputGet(output);
return output;
}
QString adbProcess::run(QString command, QString write_command) //Adb 命令解析 - 发送单条命令并向控制台输入内容
{
QStringList args_0;
QStringList args_1;
@ -221,6 +234,7 @@ QString adbProcess::run(QString command, QString write_command)
args_1.append(args_0[i]);
//qDebug() << "append0" << shell_command;
}
/*
if(tag == 0)
{
@ -229,6 +243,7 @@ QString adbProcess::run(QString command, QString write_command)
//q.enqueue(args_0[i]);
//qDebug() << shell_command;
}*/
if(args_0[i] == "'" && tag == 0)
{
//qDebug() << "No." << i << ":" << "args_0[" << i << "] is:" << args_0[i] << "\n" << "tag = " << tag << "\n";
@ -255,30 +270,26 @@ QString adbProcess::run(QString command, QString write_command)
}
args_1.removeAt(0);
qDebug() << "'run' running with arguments" << args_1 ;
//qDebug() << "'run' running with arguments" << args_1 ;
this->start("adb", args_1);
//qDebug() << "write 0";
//qDebug() << "write 1";
this->write(write_command.toLocal8Bit());
//qDebug() << "write 2";
waitForReadyRead();
//qDebug() << "write 3";
waitForFinished();
//qDebug() << "write 4";
QString output;
output = readAllStandardOutput();
standardOutput.append(output);
//qDebug() << "output:" << output;
explainer->explainOutput(output);
emit outputGet(output);
return output;
}
QString adbProcess::run(QString command, device dev, QString write_command) //Adb 命令解析 - 对指定设备发送单条命令并向控制台输入内容
{
QStringList args_0;
QStringList args_1;
@ -334,7 +345,7 @@ QString adbProcess::run(QString command, device dev, QString write_command)
args_1.removeAt(2);
qDebug() << "'run' running with arguments" << args_1 ;
//qDebug() << "'run' running with arguments" << args_1 ;
this->start("adb", args_1);
this->write(write_command.toLocal8Bit());
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -346,6 +357,8 @@ QString adbProcess::run(QString command, device dev, QString write_command)
//qDebug() << "run output:" << output << "\n";
explainer->explainOutput(output);
emit outputGet(output);
return output;
}

View File

@ -12,6 +12,7 @@
#include <QTextEdit>
//#include <windows.h>
class adbProcess : public QProcess
{
@ -29,10 +30,15 @@ public:
QString standardOutput;
textExplainer *explainer;
/*test*/
QWidget *test;
private slots:
//void onReadData();
void on_readerror();
signals:
void outputGet(QString);
};
#endif // ADBPROCESS_H

66
QtAdb/animationwidget.cpp Normal file
View File

@ -0,0 +1,66 @@
#include "animationwidget.h"
animationWidget::animationWidget(QWidget *p)
{
/*
graphicsOpacityEffect = new QGraphicsOpacityEffect(this);
graphicsOpacityEffect->setOpacity(1.0);
this->setGraphicsEffect(graphicsOpacityEffect);*/
animation = new QPropertyAnimation(this,"geometry");
setParent(p);
parent = p;
this->hide();
/*
animation->setDuration(500);
animation->setStartValue(QRect(this->geometry().x() + this->width()/2, this->geometry().y() + this->height()/2, this->width(),this->height()));
animation->setEndValue(this->geometry());*/
//animation->setEndValue(QRect(this->width(), 0, this->width(), this->height()));
/*
QPropertyAnimation *animation1= new QPropertyAnimation(this->centralWidget(),"geometry");
animation1->setDuration(500);
animation1->setStartValue(QRect(-this->centralWidget()->width(), 0, this->centralWidget()->width(), this->centralWidget()->height()));
animation1->setEndValue(this->centralWidget()->geometry());
QParallelAnimationGroup *group = new QParallelAnimationGroup;
group->addAnimation(animation);
group->addAnimation(animation1);
group->start();*/
}
void animationWidget::playLoadAnimation()
{
/*
opacityLoadAnimation = new QPropertyAnimation(graphicsOpacityEffect,"opacity",this);
opacityLoadAnimation->setDuration(500);
opacityLoadAnimation->setStartValue(0);
opacityLoadAnimation->setEndValue(1.0);
opacityLoadAnimation->start();*/
animation->setDuration(500);
animation->setEndValue(QRect(parent->geometry().x(), parent->geometry().y(), this->width(),this->height()));
animation->setStartValue(QRect(parent->geometry().x() + 50, parent->geometry().y(), this->width(),this->height()));
animation->setEasingCurve(QEasingCurve::OutQuart);
this->show();
animation->start();
emit animationEnd();
}
void animationWidget::playExitAnimation()
{
/*
opacityExitAnimation = new QPropertyAnimation(graphicsOpacityEffect,"opacity",this);
opacityExitAnimation->setDuration(500);
opacityExitAnimation->setStartValue(1.0);
opacityExitAnimation->setEndValue(0);
opacityExitAnimation->start();*/
}
animationWidget::~animationWidget()
{
playExitAnimation();
//delete this;
}

42
QtAdb/animationwidget.h Normal file
View File

@ -0,0 +1,42 @@
#ifndef ANIMATIONWIDGET_H
#define ANIMATIONWIDGET_H
#include <QObject>
#include <QWidget>
#include <QGraphicsEffect>
#include <QGraphicsOpacityEffect>
#include <QPropertyAnimation>
namespace Ui {
class animationWidget;
}
class animationWidget : public QWidget
{
Q_OBJECT
public:
explicit animationWidget(QWidget *parent = nullptr);
~animationWidget();
void playLoadAnimation();
void playExitAnimation();
bool isBasePage;
QWidget *parent;
QPropertyAnimation *animation;
/*
QGraphicsOpacityEffect * graphicsOpacityEffect;
QPropertyAnimation * opacityLoadAnimation;
QPropertyAnimation * opacityExitAnimation;*/
signals:
void animationEnd();
};
#endif // ANIMATIONWIDGET_H

View File

@ -2,7 +2,7 @@
#include "ui_basepage.h"
basePage::basePage(QWidget *parent) :
QWidget(parent),
animationWidget(parent),
ui(new Ui::basePage)
{
ui->setupUi(this);
@ -11,11 +11,11 @@ basePage::basePage(QWidget *parent) :
lastPage = NULL;
sonPage = NULL;
/*
QGraphicsDropShadowEffect *shadowEffect = new QGraphicsDropShadowEffect();
shadowEffect->setOffset(0,0);
shadowEffect->setColor(Qt::gray);
shadowEffect->setBlurRadius(10);
shadowEffect->setBlurRadius(10);*/
//ui->listWidget->setGraphicsEffect(shadowEffect);
/*******原来的
@ -65,6 +65,8 @@ basePage::basePage(QWidget *parent) :
basePage::~basePage()
{
//sleep(1000);
//qDebug() << "~basePage" << "\n";
/*
if(sonPage != NULL)
@ -73,22 +75,16 @@ basePage::~basePage()
//qDebug() << "~basePage deleted" << "\n";
delete ui;
}
/*
void basePage::playExitAnimation()
{/*
QPropertyAnimation* pWidgetProcessOpacity = new QPropertyAnimation(exitOpacity, "opacity", this);
pWidgetProcessOpacity->setDuration(300);
pWidgetProcessOpacity->setStartValue(1);
pWidgetProcessOpacity->setEndValue(0);
pWidgetProcessOpacity->setEasingCurve(QEasingCurve::Linear);
pWidgetProcessOpacity->start(QAbstractAnimation::DeleteWhenStopped);//执行动画,结束后删除对象。*/
{
QPropertyAnimation *animation = new QPropertyAnimation(this,"windowOpacity");
animation->setDuration(1000);
animation->setStartValue(0);
animation->setEndValue(1);
animation->start();
}
*/
void basePage::addItemsToList(pageListItem *itemWidget)
{
QListWidgetItem *tmpItem = new QListWidgetItem();
@ -104,10 +100,10 @@ void basePage::setFather(QWidget *parent)
void basePage::slot_createSonPage(int key)
{
emit creatingSonPage();
if(isEnable(key))
if(isEnable(key) && key >= 0)
{
ui->listWidget->setCurrentRow(-1);
qDebug() << "dev of basePage = " << dev.addr;
//qDebug() << "dev of basePage = " << dev.addr;
sonPage = SPManager->selector(this,whoAmI(),key,dev);
if(sonPage != NULL)
{
@ -115,7 +111,7 @@ void basePage::slot_createSonPage(int key)
ui->mainLayout->addWidget(sonPage);
}
}
//qDebug() << "is not";
//ui->listWidget->setCurrentRow(-1);
}
void basePage::slot_destroySonPage()
@ -161,3 +157,8 @@ void basePage::setDev(device device)
{
dev = device;
}
void basePage::self_castrate()
{
ui->listWidget->hide();
}

View File

@ -7,12 +7,13 @@
#include <QPropertyAnimation>
#include "pagelistitem.h"
#include "sonPages/sonpagemanager.h"
#include "animationwidget.h"
namespace Ui {
class basePage;
}
class basePage : public QWidget
class basePage : public animationWidget
{
Q_OBJECT
signals:
@ -41,6 +42,10 @@ public:
void setEnableValue(int val[20]);
void setDev(device dev);
void self_castrate();
private:
Ui::basePage *ui;
@ -49,7 +54,9 @@ private:
//QGraphicsOpacityEffect* exitOpacity;
public slots:
void playExitAnimation();
//void playExitAnimation();
//void refresh_listItem_effect();
private slots:
void slot_createSonPage(int key);

View File

@ -13,6 +13,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>

View File

@ -70,6 +70,7 @@
<file>image/ico/about/alipay.svg</file>
<file>image/ico/about/wechat.svg</file>
<file>image/ico/logo.svg</file>
<file>image/ico/code-s-slash-line.svg</file>
</qresource>
<qresource prefix="/test">
<file>image/test/back.png</file>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="none" d="M0 0h24v24H0z"/><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"/></svg>

After

Width:  |  Height:  |  Size: 319 B

View File

@ -9,6 +9,7 @@
#include <QFont>
#include <QSplashScreen>
#include <QThread>
#include <Windows.h>
int main(int argc, char *argv[])
{
@ -43,13 +44,14 @@ int main(int argc, char *argv[])
splash.setBaseSize(100,100);
splash.setMaximumSize(100,100);
splash.show();
//Sleep(5000);
a.processEvents();
MainWindow w;
w.show();
splash.finish(&w);
return a.exec();
}

View File

@ -53,9 +53,9 @@ MainWindow::MainWindow(QWidget *parent)
/*用户未选择设备前,锁定界面*/
lock();
qDebug() << "1";
//qDebug() << "1";
displayWelcomePage();
qDebug() << "2";
//qDebug() << "2";
}
MainWindow::~MainWindow()
@ -101,10 +101,12 @@ void MainWindow::on_refreshButton_clicked() //槽:按下刷新按钮
lock();
if(currentPage != NULL)
{
currentPage->~QWidget();
currentPage->~basePage();
currentPage = NULL;
}
displayWelcomePage();
ui->indexList->setCurrentRow(-1);
qDebug() <<"8";
}
void MainWindow::setCurrentDevice(int index) //槽:改变所选设备
@ -115,8 +117,12 @@ void MainWindow::setCurrentDevice(int index) //槽:改变所选设备
void MainWindow::initBasePage(int key) //槽生成basePages
{
while(key != -1)
{
this->setEnabled(false);
if(WCMPage != NULL) //销毁欢迎页面
{
//currentPage->playExitAnimation();
//currentPage->setDisabled(true);
//delete currentPage;
WCMPage->~welcomePage();
@ -125,16 +131,27 @@ void MainWindow::initBasePage(int key) //槽生成basePages
if(currentPage != NULL) //销毁上一个basePage
{
//currentPage->playExitAnimation();
//currentPage->setDisabled(true);
//delete currentPage;
currentPage->~QWidget();
currentPage->setDisabled(true);
currentPage->~basePage();
currentPage = NULL;
}
currentPage = new QWidget(this);
currentPage = maker->createPageWithKey(key,ui->page,devList[current_device]); //究极开销
qDebug() << "currentPage = maker->createPageWithKey(key,ui->page,devList[current_device]); ended";
currentPage = new basePage(this);
currentPage = maker->createPageWithKey(key,ui->page,devList[current_device]); //*去nmd*究极开销
//qDebug() << "currentPage = maker->createPageWithKey(key,ui->page,devList[current_device]); ended";
ui->verticalLayout_2->addWidget(currentPage);
currentPage->playLoadAnimation();
//connect(currentPage,SIGNAL(animationEnd()), currentPage,SLOT(refresh_listItem_effect()));
//currentPage->repaint();
this->setEnabled(true);
break;
}
}
void MainWindow::addItemToIndex(indexListItem *itemWidget) //方法向indexist中添加单个item
@ -179,6 +196,12 @@ void MainWindow::addIndexItems() //方法初始化向index
recovery->setPic("image:url(:/ico/image/ico/registered-line.svg);background-color:rgba(255,255,255,0);");
addItemToIndex(recovery);
//:/ico/image/ico/code-s-slash-line.svg //05
indexListItem *advanced = new indexListItem(this->ui->indexList);
advanced->setText("高级");
advanced->setPic("image:url(:/ico/image/ico/code-s-slash-line.svg);background-color:rgba(255,255,255,0);");
addItemToIndex(advanced);
indexListItem *about = new indexListItem(this->ui->indexList);
about->setText("关于");
about->setPic("image:url(:/ico/image/ico/about/information-line.svg);background-color:rgba(255,255,255,0);");
@ -189,6 +212,7 @@ void MainWindow::addIndexItems() //方法初始化向index
void MainWindow::lock() //方法锁定mainwindow中控件
{
//this->setEnabled(false);
ui->indexList->setEnabled(false);
//currentPage->setEnabled(false);
ui->page->setEnabled(false);
@ -196,6 +220,7 @@ void MainWindow::lock() //方法锁定mainwindow
void MainWindow::unlock() //方法解锁mainwindow中的控件
{
//this->setEnabled(false);
ui->indexList->setEnabled(true);
//currentPage->setEnabled(true);
ui->page->setEnabled(true);
@ -298,7 +323,7 @@ void MainWindow::stopLoadingGif() //槽:隐藏加载动画 +
ui->loadingLabel->setVisible(false);
}
void MainWindow::on_WIFIBtn_clicked() //槽:获取无线调试参数
void MainWindow::on_WIFIBtn_clicked() //槽:弹出无线调试连接窗口,获取无线调试参数
{
getInfo = new QWidget();
getInfo->setWindowTitle("无线调试");

View File

@ -22,6 +22,8 @@
#include <QFont>
#include <QMovie>
#include <windows.h>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
@ -87,8 +89,8 @@ private:
void setStyles();
void displayWelcomePage();
QWidget * currentPage;
QWidget * tmpPage;
basePage * currentPage;
animationWidget * tmpPage;
welcomePage * WCMPage;
};
#endif // MAINWINDOW_H

View File

@ -24,9 +24,12 @@
</property>
<item>
<widget class="QWidget" name="widget" native="true">
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="bottomMargin">
<number>0</number>
<number>11</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout" stretch="2,0,10">
@ -45,9 +48,7 @@
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:36pt; color:#41cd52;&quot;&gt;Qt&lt;/span&gt;&lt;span style=&quot; font-size:36pt;&quot;&gt;ADB&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -269,9 +270,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
@ -327,6 +326,25 @@ WSA</string>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="page" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color:rgb(85, 255, 127)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -340,19 +358,6 @@ WSA</string>
</property>
</spacer>
</item>
<item>
<widget class="QWidget" name="page" native="true">
<property name="maximumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color:rgb(85, 255, 127)</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>

View File

@ -8,20 +8,27 @@ pageListItem::pageListItem(QWidget *parent) :
ui->setupUi(this);
ui->enableLight->setVisible(false);
ui->widget->setStyleSheet("background-color:transparent; border-radius:4px; border-color:gray;border:0px;");
ui->widget->setStyleSheet("QWidget{background-color:transparent; border-radius:4px; border-color:gray;border:0px;}");
ui->pic->setStyleSheet("QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}");
/*
QGraphicsDropShadowEffect *shadowEffect = new QGraphicsDropShadowEffect();
shadowEffect->setOffset(0,0);
shadowEffect->setColor(Qt::gray);
shadowEffect->setBlurRadius(5);
ui->enableLight->setGraphicsEffect(shadowEffect);
QGraphicsOpacityEffect *graphicsOpacityEffect = new QGraphicsOpacityEffect(this);
graphicsOpacityEffect->setOpacity(1.0);
ui->pic->setGraphicsEffect(graphicsOpacityEffect);
QGraphicsDropShadowEffect *shadowEffect_icon = new QGraphicsDropShadowEffect();
shadowEffect_icon->setOffset(0,0);
shadowEffect_icon->setColor(Qt::gray);
shadowEffect_icon->setBlurRadius(5);
ui->pic->setGraphicsEffect(shadowEffect_icon);
ui->pic->setGraphicsEffect(shadowEffect_icon);*/
//this->setGraphicsEffect(shadowEffect);
setStyles();
}
pageListItem::~pageListItem()
@ -35,6 +42,16 @@ void pageListItem::setText(QString title, QString profile)
ui->profile->setText(profile);
}
void pageListItem::setText_title(QString title)
{
ui->title->setText(title);
}
void pageListItem::setText_profile(QString profile)
{
ui->profile->setText(profile);
}
void pageListItem::setPic(QString ico)
{
ui->pic->setIcon(QIcon(ico));
@ -58,3 +75,42 @@ void pageListItem::setSelectable()
{
ui->enableLight->setVisible(true);
}
void pageListItem::slot_setText(QString t, QString p)
{
setText(t,p);
}
void pageListItem::slot_setText_title(QString t)
{
setText_title(t);
}
void pageListItem::slot_setText_profile(QString p)
{
setText_profile(p);
}
void pageListItem::setStyles()
{
QGraphicsDropShadowEffect *shadowEffect = new QGraphicsDropShadowEffect();
shadowEffect->setOffset(0,0);
shadowEffect->setColor(Qt::gray);
shadowEffect->setBlurRadius(5);
ui->enableLight->setGraphicsEffect(shadowEffect);
QGraphicsOpacityEffect *graphicsOpacityEffect = new QGraphicsOpacityEffect(this);
graphicsOpacityEffect->setOpacity(1.0);
ui->pic->setGraphicsEffect(graphicsOpacityEffect);
QGraphicsDropShadowEffect *shadowEffect_icon = new QGraphicsDropShadowEffect();
shadowEffect_icon->setOffset(0,0);
shadowEffect_icon->setColor(Qt::gray);
shadowEffect_icon->setBlurRadius(5);
ui->pic->setGraphicsEffect(shadowEffect_icon);
}
void pageListItem::slot_setStyles()
{
setStyles();
}

View File

@ -24,14 +24,29 @@ public:
~pageListItem();
void setText(QString title, QString profile);
void setText_title(QString title);
void setText_profile(QString profile);
void setPic(QString qss);
void setSelectable();
void setStyles();
//void emitSignal();
private slots:
void on_copyButton_clicked();
private:
Ui::pageListItem *ui;
public slots:
void slot_setText(QString t, QString p);
void slot_setText_title(QString t);
void slot_setText_profile(QString p);
void slot_setStyles();
signals:
//void
};
#endif // PAGELISTITEM_H

View File

@ -81,9 +81,9 @@ border-width:1px;</string>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}/*
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}*/</string>
</property>
<property name="text">
<string/>
@ -116,9 +116,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
@ -186,9 +184,7 @@ QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 11
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);

View File

@ -11,7 +11,7 @@ pageMaker::pageMaker()
explainer = new textExplainer();
}
QWidget* pageMaker::createPageWithKey(int key, QWidget *parent, device dev)
basePage* pageMaker::createPageWithKey(int key, QWidget *parent, device dev)
{
int k = key;
switch(k)
@ -40,6 +40,9 @@ QWidget* pageMaker::createPageWithKey(int key, QWidget *parent, device dev)
return createPage_recovery(parent, dev);
break;
case 5:
return createPage_advanced(parent,dev);
break;
case 6:
return createPage_about(parent);
break;
}
@ -56,19 +59,77 @@ basePage* pageMaker::createPage_devInfo(QWidget *parent, device dev)
ui->listWidget->setItemWidget(pItem, pItemWidget);*/
basePage *devInfo = new basePage(parent);
devInfo->isBasePage = true;
devInfo->whoYouAre("devInfo");
int val[20] = {3};
//qDebug() << "!!!!!!!!!!!!!!!!!!!" << *val;
devInfo->setEnableValue(val);
devInfo->setDev(dev);
/**/
/***********************************/
pageListItemStruct *productModel = initStruct(devInfo);
productModel->item->setText_title("设备型号 | DeviceModel");
productModel->item->setPic(":/ico/image/ico/profile-line.svg");
productModel->thread->initThread("adb shell getprop ro.product.model", dev);
QEventLoop::connect(productModel->thread,SIGNAL(signal_output(QString)),productModel->item,SLOT(slot_setText_profile(QString)));
//QEventLoop::connect(devInfo,SIGNAL(animationEnd()),productModel->item,SLOT(slot_setStyles()));
productModel->thread->start();
devInfo->addItemsToList(productModel->item);
//qDebug() << "item is in thread" << productModel->item->thread();
pageListItemStruct *screen_resolution = initStruct(devInfo);
screen_resolution->item->setText_title("屏幕分辨率");
screen_resolution->item->setPic(":/ico/image/ico/fullscreen-line.svg");
screen_resolution->thread->initThread("adb shell wm size", dev, ": ");
QEventLoop::connect(screen_resolution->thread,SIGNAL(signal_output(QString)),screen_resolution->item,SLOT(slot_setText_profile(QString)));
screen_resolution->thread->start();
devInfo->addItemsToList(screen_resolution->item);
//adb shell wm density
pageListItemStruct *dpi = initStruct(devInfo);
dpi->item->setText_title("屏幕密度 | DPI");
dpi->item->setPic(":/ico/image/ico/grid-line.svg");
dpi->thread->initThread("adb shell wm density", dev);
QEventLoop::connect(dpi->thread,SIGNAL(signal_output(QString)),dpi->item,SLOT(slot_setText_profile(QString)));
dpi->thread->start();
dpi->item->setSelectable();
devInfo->addItemsToList(dpi->item);
//adb shell settings get secure android_id
pageListItemStruct *android_id = initStruct(devInfo);
android_id->item->setText_title("Android Id");
android_id->item->setPic(":/ico/image/ico/barcode-line.svg");
android_id->thread->initThread("adb shell settings get secure android_id", dev);
QEventLoop::connect(android_id->thread,SIGNAL(signal_output(QString)),android_id->item,SLOT(slot_setText_profile(QString)));
android_id->thread->start();
devInfo->addItemsToList(android_id->item);
//adb shell getprop ro.build.version.release
pageListItemStruct *android_version = initStruct(devInfo);
android_version->item->setText_title("安卓版本");
android_version->item->setPic(":/ico/image/ico/android-line.svg");
android_version->thread->initThread("adb shell getprop ro.build.version.release", dev);
QEventLoop::connect(android_version->thread,SIGNAL(signal_output(QString)),android_version->item,SLOT(slot_setText_profile(QString)));
android_version->thread->start();
devInfo->addItemsToList(android_version->item);
pageListItemStruct *cpu = initStruct(devInfo);
cpu->item->setText_title("处理器 | CPU");
cpu->item->setPic(":/ico/image/ico/cpu-line.svg");
cpu->thread->initThread("adb shell cat /proc/cpuinfo", dev, "#CPU#");
QEventLoop::connect(cpu->thread,SIGNAL(signal_output(QString)),cpu->item,SLOT(slot_setText_profile(QString)));
cpu->thread->start();
devInfo->addItemsToList(cpu->item);
/**************别删**********************/
/*
pageListItem *productModel = new pageListItem(devInfo);
//qDebug() << "dev of pageMaker" << dev.addr;
productModel->setText("设备型号 | DeviceModel",process->run("adb shell getprop ro.product.model", dev).simplified());
productModel->setPic(":/ico/image/ico/profile-line.svg");
devInfo->addItemsToList(productModel);
pageListItem *screen_resolution = new pageListItem(devInfo);
screen_resolution->setText("屏幕分辨率",explainer->get_words_after(process->run("adb shell wm size", dev), ": "));
screen_resolution->setPic(":/ico/image/ico/fullscreen-line.svg");
@ -96,8 +157,8 @@ basePage* pageMaker::createPage_devInfo(QWidget *parent, device dev)
pageListItem *cpu = new pageListItem(devInfo);
cpu->setText("处理器 | CPU",explainer->explain_cpu_output(process->run("adb shell cat /proc/cpuinfo", dev)));
cpu->setPic(":/ico/image/ico/cpu-line.svg");
devInfo->addItemsToList(cpu);
/**/
devInfo->addItemsToList(cpu);*/
/****************别删***************/
return devInfo;
}
@ -111,6 +172,7 @@ basePage* pageMaker::createPage_devInfo_powerdown(QWidget *parent, device dev)
ui->listWidget->setItemWidget(pItem, pItemWidget);*/
basePage *devInfo = new basePage(parent);
devInfo->isBasePage = true;
devInfo->whoYouAre("devInfo");
int val[20] = {};
//qDebug() << "!!!!!!!!!!!!!!!!!!!" << *val;
@ -162,6 +224,7 @@ basePage* pageMaker::createPage_devInfo_powerdown(QWidget *parent, device dev)
basePage* pageMaker::createPage_acvitator(QWidget *parent, device dev)
{
basePage *activator = new basePage(parent);
activator->isBasePage = true;
//activatorPage *activator = new activatorPage(parent);
activator->whoYouAre("activator");
int val[20] = {1,2,3,4,5,6,7,8,9};
@ -228,6 +291,7 @@ basePage* pageMaker::createPage_acvitator(QWidget *parent, device dev)
basePage* pageMaker::createPage_apps(QWidget *parent, device dev)
{
basePage *apps = new basePage(parent);
apps->isBasePage = true;
//activatorPage *activator = new activatorPage(parent);
apps->whoYouAre("apps");
int val[20] = {1};
@ -246,6 +310,7 @@ basePage* pageMaker::createPage_apps(QWidget *parent, device dev)
basePage* pageMaker::createPage_devControl(QWidget *parent, device dev)
{
basePage *devControl = new basePage(parent);
devControl->isBasePage = true;
//activatorPage *activator = new activatorPage(parent);
devControl->whoYouAre("devControl");
int val[20] = {1,2};
@ -270,6 +335,7 @@ basePage* pageMaker::createPage_devControl(QWidget *parent, device dev)
basePage* pageMaker::createPage_recovery(QWidget *parent, device dev)
{
basePage *recovery = new basePage(parent);
recovery->isBasePage = true;
//activatorPage *activator = new activatorPage(parent);
recovery->whoYouAre("recovery");
int val[20] = {1};
@ -292,8 +358,51 @@ basePage* pageMaker::createPage_recovery(QWidget *parent, device dev)
return recovery;
}
QWidget* pageMaker::createPage_about(QWidget *parent)
basePage* pageMaker::createPage_advanced(QWidget *parent, device dev)
{
basePage *advanced = new basePage(parent);
advanced->isBasePage = true;
//activatorPage *activator = new activatorPage(parent);
advanced->whoYouAre("advanced");
int val[20] = {1,2};
advanced->setEnableValue(val);
advanced->setDev(dev);
pageListItem *customize_command = new pageListItem(advanced);
customize_command->setText("运行自定义命令","<customize command>");
customize_command->setPic(":/ico/image/ico/code-s-slash-line.svg");
customize_command->setSelectable();
advanced->addItemsToList(customize_command);
pageListItem *open_cmd = new pageListItem(advanced);
open_cmd->setText("命令行","cmd");
open_cmd->setPic(":/ico/image/ico/terminal-box-line.svg");
open_cmd->setSelectable();
advanced->addItemsToList(open_cmd);
/*
pageListItem *btnEmulate = new pageListItem(recovery);
btnEmulate->setText("按键模拟","adb shell input keyevent <key>");
btnEmulate->setPic(":/ico/image/ico/refund-line.svg");
btnEmulate->setSelectable();
recovery->addItemsToList(btnEmulate);*/
return advanced;
}
basePage* pageMaker::createPage_about(QWidget *parent)
{
about* abt = new about(parent);
return abt;
}
pageMaker::pageListItemStruct* pageMaker::initStruct(QWidget* parent)
{
pageListItemStruct *itemStruct = new pageListItemStruct();
itemStruct->explainer = new textExplainer();
itemStruct->item = new pageListItem();
itemStruct->item->setParent(parent);
itemStruct->process = new adbProcess();
itemStruct->thread = new adbThread();
return itemStruct;
}

View File

@ -1,11 +1,15 @@
#ifndef PAGEMAKER_H
#define PAGEMAKER_H
#include <QThread>
#include "basepage.h"
#include "pagelistitem.h"
#include "adbprocess.h"
#include "textexplainer.h"
#include "about.h"
#include "threads/adbthread.h"
#include "animationwidget.h"
class pageMaker
{
@ -16,7 +20,7 @@ public:
adbProcess *process;
textExplainer *explainer;
QWidget *createPageWithKey(int key, QWidget *parent, device dev);
basePage *createPageWithKey(int key, QWidget *parent, device dev);
basePage *createPage_devInfo(QWidget *parent, device dev);
@ -29,13 +33,22 @@ public:
basePage *createPage_recovery(QWidget *parent, device dev);
QWidget *createPage_about(QWidget *parent);
basePage *createPage_advanced(QWidget *parent, device dev);
basePage *createPage_about(QWidget *parent);
//activatorPage *createSonPage_activator(QWidget *parent, device dev);
typedef struct{
QWidget* parent;
pageListItem* item;
adbProcess *process;
textExplainer *explainer;
adbThread *thread;
}pageListItemStruct;
private:
/*youtPhone*/
pageListItemStruct *initStruct(QWidget* parent);

View File

@ -0,0 +1,60 @@
#include "sp_customize_cmd.h"
#include "ui_sp_customize_cmd.h"
sp_customize_cmd::sp_customize_cmd(QWidget *parent) :
QWidget(parent),
ui(new Ui::sp_customize_cmd)
{
ui->setupUi(this);
process = new adbProcess();
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
QGraphicsDropShadowEffect *shadowEffect_runBtn = new QGraphicsDropShadowEffect();
QGraphicsDropShadowEffect *shadowEffect_showOutputBtn = new QGraphicsDropShadowEffect();
QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect();
QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect();
shadowEffect_runBtn->setOffset(0,0);
shadowEffect_runBtn->setColor(Qt::gray);
shadowEffect_runBtn->setBlurRadius(5);
shadowEffect_showOutputBtn->setOffset(0,0);
shadowEffect_showOutputBtn->setColor(Qt::gray);
shadowEffect_showOutputBtn->setBlurRadius(5);
shadowEffect_back_to_basePage->setOffset(0,0);
shadowEffect_back_to_basePage->setColor(Qt::gray);
shadowEffect_back_to_basePage->setBlurRadius(5);
shadowEffect_refreshBtn->setOffset(0,0);
shadowEffect_refreshBtn->setColor(Qt::gray);
shadowEffect_refreshBtn->setBlurRadius(5);
ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
ui->runBtn->setGraphicsEffect(shadowEffect_runBtn);
ui->showOutputBtn->setGraphicsEffect(shadowEffect_showOutputBtn);
ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
QGraphicsDropShadowEffect *shadowEffect_textBrowser = new QGraphicsDropShadowEffect();
shadowEffect_textBrowser->setOffset(0,0);
shadowEffect_textBrowser->setColor(Qt::gray);
shadowEffect_textBrowser->setBlurRadius(5);
ui->textBrowser->setGraphicsEffect(shadowEffect_textBrowser);
QGraphicsDropShadowEffect *shadowEffect_label = new QGraphicsDropShadowEffect();
shadowEffect_label->setOffset(0,0);
shadowEffect_label->setColor(Qt::gray);
shadowEffect_label->setBlurRadius(5);
ui->label->setGraphicsEffect(shadowEffect_label);
}
sp_customize_cmd::~sp_customize_cmd()
{
delete ui;
}
void sp_customize_cmd::on_runBtn_clicked()
{
process->run(ui->lineEdit->text());
}

View File

@ -0,0 +1,28 @@
#ifndef SP_CUSTOMIZE_CMD_H
#define SP_CUSTOMIZE_CMD_H
#include <QWidget>
#include <QGraphicsDropShadowEffect>
#include "../../adbprocess.h"
namespace Ui {
class sp_customize_cmd;
}
class sp_customize_cmd : public QWidget
{
Q_OBJECT
public:
explicit sp_customize_cmd(QWidget *parent = nullptr);
~sp_customize_cmd();
private slots:
void on_runBtn_clicked();
private:
Ui::sp_customize_cmd *ui;
adbProcess *process;
};
#endif // SP_CUSTOMIZE_CMD_H

View File

@ -0,0 +1,322 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>sp_customize_cmd</class>
<widget class="QWidget" name="sp_customize_cmd">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>725</width>
<height>571</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="widget" native="true">
<property name="styleSheet">
<string notr="true">border-radius: 4px;
background-color: rgba(255, 255, 255, 0);
border:0px solid #BDBDBD;</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>14</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>14</number>
</property>
<item>
<widget class="QLabel" name="icon">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="font">
<font/>
</property>
<property name="styleSheet">
<string notr="true">border-radius: 4px;
border:0px solid #BDBDBD;
image: url(:/ico/image/ico/code-s-slash-line.svg);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="title">
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
<pointsize>18</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">border-radius: 4px;
border:0px solid #BDBDBD;</string>
</property>
<property name="text">
<string>运行自定义命令</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLineEdit" name="lineEdit">
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
</property>
<property name="styleSheet">
<string notr="true">border:1px solid #BDBDBD;
background-color: rgba(255, 255, 255, 0);</string>
</property>
<property name="inputMask">
<string/>
</property>
<property name="text">
<string/>
</property>
<property name="placeholderText">
<string>请输入命令</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;暂时仅支持 ADB 命令&lt;/p&gt;&lt;p&gt;不支持管道符“ | ”&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="back_to_basePage">
<property name="minimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../ico.qrc">
<normaloff>:/ico/image/ico/arrow-left-line.svg</normaloff>:/ico/image/ico/arrow-left-line.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="runBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="font">
<font/>
</property>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../ico.qrc">
<normaloff>:/ico/image/ico/play-line.svg</normaloff>:/ico/image/ico/play-line.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="refreshBtn">
<property name="minimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../ico.qrc">
<normaloff>:/ico/image/ico/refresh-line.svg</normaloff>:/ico/image/ico/refresh-line.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="showOutputBtn">
<property name="minimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../ico.qrc">
<normaloff>:/ico/image/ico/terminal-box-line.svg</normaloff>:/ico/image/ico/terminal-box-line.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../../ico.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -62,7 +62,7 @@ void sp_installer::setDev(device device)
}
void sp_installer::on_runBtn_clicked()
{
qDebug() << "enter runBtn slot";
//qDebug() << "enter runBtn slot";
QString command;
if(apkPath != "")
{
@ -72,11 +72,11 @@ void sp_installer::on_runBtn_clicked()
{
command = "adb install";
}
qDebug() << "enter runBtn slot 1";
qDebug() << "enter runBtn slot 2";
qDebug() << "enter runBtn slot 4";
qDebug() << "command: " << command;
qDebug() << "running";
//qDebug() << "enter runBtn slot 1";
//qDebug() << "enter runBtn slot 2";
//qDebug() << "enter runBtn slot 4";
//qDebug() << "command: " << command;
//qDebug() << "running";
process->run_contains_empty(command, dev);
apkPath.clear();
labelDisplay.clear();
@ -85,11 +85,11 @@ void sp_installer::on_runBtn_clicked()
void sp_installer::on_selectBtn_clicked()
{
qDebug() << "enter pushbutton slot";
//qDebug() << "enter pushbutton slot";
apkPath.clear();
apkPath = QFileDialog::getOpenFileName(this, QStringLiteral("选择安装包"), "F:",QStringLiteral("安装包(*.apk)"));
ui->filePaths->setText(apkPath);
qDebug() << "apkPathis:" << apkPath;
//qDebug() << "apkPathis:" << apkPath;
}

View File

@ -9,6 +9,7 @@ btnEmulator::btnEmulator(QWidget *parent) :
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
process = new adbProcess();
explainer = new textExplainer();
this->setStyleSheet("QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}");
setStyles();
}

View File

@ -23,14 +23,13 @@
<item>
<widget class="QWidget" name="widget" native="true">
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="styleSheet">
<string notr="true">border-radius: 4px;
background-color: rgba(255, 255, 255, 0);
border:0px solid #BDBDBD;</string>
border:0px solid #BDBDBD;
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
@ -61,9 +60,7 @@ border:0px solid #BDBDBD;</string>
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="text">
<string>系统
@ -94,7 +91,8 @@ border:0px solid #BDBDBD;</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -125,7 +123,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -156,7 +155,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -187,7 +187,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -230,9 +231,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="text">
<string>实体
@ -263,7 +262,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -294,7 +294,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -325,7 +326,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -356,7 +358,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -387,7 +390,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -418,7 +422,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -461,9 +466,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="text">
<string>媒体
@ -494,7 +497,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -525,7 +529,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -556,7 +561,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -587,7 +593,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -618,7 +625,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -649,7 +657,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -692,9 +701,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="text">
<string>其它
@ -725,7 +732,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -756,7 +764,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -787,7 +796,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -818,7 +828,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -849,7 +860,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -880,7 +892,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -936,9 +949,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
</size>
</property>
<property name="font">
<font>
<family>MiSans Normal</family>
</font>
<font/>
</property>
<property name="text">
<string>系统
@ -969,7 +980,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -1000,7 +1012,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -1031,7 +1044,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -1062,7 +1076,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -1093,7 +1108,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -1124,7 +1140,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>
@ -1155,7 +1172,8 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
<property name="styleSheet">
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 117, 117, 0.9);font-family: MiSans Medium; font-size:12px;border-radius:4px;}</string>
</property>
<property name="text">
<string/>

View File

@ -65,9 +65,9 @@ void sp_devControl_power::setDev(device device)
void sp_devControl_power::on_btn_rebootToSystem_clicked()
{
qDebug() << "calling process->run('adb reboot', dev);";
//qDebug() << "calling process->run('adb reboot', dev);";
process->run("adb reboot", dev);
qDebug() << "calling process->run('adb reboot', dev);";
//qDebug() << "calling process->run('adb reboot', dev);";
}
void sp_devControl_power::on_btn_rebootToRecovery_clicked()

View File

@ -67,9 +67,9 @@ sp_dpiChanger::~sp_dpiChanger()
void sp_dpiChanger::setDpiInfo()
{
qDebug() << "dve of sonPage = " << dev.addr;
//qDebug() << "dve of sonPage = " << dev.addr;
QString profile = process->run("adb shell wm density", dev).replace("Physical density", "默认").replace("Override density","当前").simplified();
qDebug() << profile;
//qDebug() << profile;
ui->dpiInfo->setText(profile);
}
@ -81,7 +81,7 @@ void sp_dpiChanger::on_runBtn_clicked()
output = process->run("adb shell wm density " + ui->lineEdit->text().simplified() , dev);
this->setDisabled(false);
qDebug() << output;
//qDebug() << output;
refresh();
ui->lineEdit->setPlaceholderText("已修改");

View File

@ -54,7 +54,7 @@ void sp_recovery::setDev(device device)
}
void sp_recovery::on_runBtn_clicked()
{
qDebug() << "enter runBtn slot";
//qDebug() << "enter runBtn slot";
QString command;
if(zipPath != "")
@ -66,8 +66,8 @@ void sp_recovery::on_runBtn_clicked()
command = "adb sideload";
}
qDebug() << "command: " << command;
qDebug() << "running";
//qDebug() << "command: " << command;
//qDebug() << "running";
process->run_contains_empty(command, dev);
zipPath.clear();
labelDisplay.clear();
@ -76,11 +76,11 @@ void sp_recovery::on_runBtn_clicked()
void sp_recovery::on_selectBtn_clicked()
{
qDebug() << "enter pushbutton slot";
//qDebug() << "enter pushbutton slot";
zipPath.clear();
zipPath = QFileDialog::getOpenFileName(this, QStringLiteral("选择zip包"), "F:",QStringLiteral("压缩包(*.zip)"));
ui->filePaths->setText(zipPath);
qDebug() << "zipPathis:" << zipPath;
//qDebug() << "zipPathis:" << zipPath;
}

View File

@ -10,7 +10,7 @@ QWidget* sonPageManager::selector(QWidget *parent , QString parentName, int key,
{
if(parentName == "devInfo")
{
qDebug() << "dev.addr=" << dev.addr;
//qDebug() << "dev.addr=" << dev.addr;
return createSonPageFor_devInfo(parent, key , dev);
//return createSonPageFor_activator(parent);
}
@ -30,6 +30,10 @@ QWidget* sonPageManager::selector(QWidget *parent , QString parentName, int key,
{
return createSonPageFor_recovery(parent, key , dev);
}
else if(parentName == "advanced")
{
return createSonPageFor_advanced(parent, key , dev);
}
throw "failed to create sonPage!";
return NULL;
@ -241,3 +245,29 @@ QWidget* sonPageManager::createSonPageFor_recovery(QWidget *parent, int key, dev
}
return NULL;
}
QWidget* sonPageManager::createSonPageFor_advanced(QWidget *parent, int key, device dev)
{
switch(key +1)
{
case 1:
{
sp_customize_cmd *page = new sp_customize_cmd(parent);
//page->setDev(dev);
return page;
}
case 2:
{
//QString envPath = qgetenv("PATH"); //获取当前环境变量
QString appDirPath = QApplication::applicationDirPath(); //获取程序所在位置
QString batPath = appDirPath + "/platform-tools/open-cmd-here.bat";
//qDebug()<<"batPath = " << batPath;
QProcess batProcess;
batProcess.start(batPath);
batProcess.waitForFinished();
return NULL;
}
break;
}
return NULL;
}

View File

@ -1,6 +1,7 @@
#ifndef SONPAGEMANAGER_H
#define SONPAGEMANAGER_H
#include <QApplication>
#include "adbprocess.h"
#include "textexplainer.h"
#include "devInfo/sp_dpichanger.h"
@ -9,6 +10,7 @@
#include "devControl/sp_devcontrol_power.h"
#include "devControl/btnemulator.h"
#include "recovery/sp_recovery.h"
#include "advanced/sp_customize_cmd.h"
class sonPageManager
@ -29,6 +31,7 @@ private:
sp_installer* createSonPageFor_apps(QWidget *parent, int key, device dev);
QWidget* createSonPageFor_devControl(QWidget *parent, int key, device dev);
QWidget* createSonPageFor_recovery(QWidget *parent, int key, device dev);
QWidget* createSonPageFor_advanced(QWidget *parent, int key, device dev);
};
#endif // SONPAGEMANAGER_H

View File

@ -113,7 +113,6 @@ QString textExplainer::explain_cpu_output(QString str)
tmpInfo = tmpInfo.simplified();
//qDebug() << "tmpInfo =" << tmpInfo << "\n";
return get_words_after(tmpInfo, ":");
}
@ -203,7 +202,7 @@ bool textExplainer::explainError(QString err)
bool textExplainer::explainOutput(QString op)
{
qDebug() << "output = " << op;
//qDebug() << "output = " << op;
op = op.simplified();
/*普通*/
@ -211,7 +210,7 @@ bool textExplainer::explainOutput(QString op)
{
showMsgBox("失败"," · 应用未安装 \n · 应用安装后未首次运行");
}
qDebug() << "+++++++++++++++++Output+++++++++++++++++" << "\n" << op;
//qDebug() << "+++++++++++++++++Output+++++++++++++++++" << "\n" << op;
return true;
}
@ -244,6 +243,18 @@ QString textExplainer::setState(QString state)
{
return "[侧载]";
}
return "出错";
return "[未知]";
}
/*
void textExplainer::slot_get_words_after(QString s, QString k)
{
QString str = get_words_after(s, k);
emit textExplained(str);
}
void textExplainer::slot_explain_cpu_output(QString s)
{
QString str = explain_cpu_output(s);
emit textExplained(str);
}
*/

View File

@ -35,6 +35,13 @@ public:
private:
QString setState(QString state);
signals:
void textExplained(QString);
public slots:
void slot_get_words_after(QString s, QString k);
void slot_explain_cpu_output(QString s);
};
#endif // TEXTEXPLAINER_H

View File

@ -0,0 +1,49 @@
#include "adbthread.h"
adbThread::adbThread(QObject* parent)
{
}
void adbThread::initThread(QString cmd, device d)
{
command = cmd;
dev = d;
explain = false;
}
void adbThread::initThread(QString cmd, device d, QString key)
{
command = cmd;
dev = d;
explain = true;
explainKey = key;
}
void adbThread::run()
{
process = new adbProcess();
//qDebug() << "explainKey is " << explainKey;
//sleep(3);
if(explain == false)
{
QString output = process->run(command,dev).simplified();
emit signal_output(output);
exit();
//exec();
}
else if(explainKey == "#CPU#")
{
QString output = explainer->explain_cpu_output(process->run(command, dev));
emit signal_output(output);
exit();
}
else if(explain == true && explainKey != "#CPU#")
{
QString output = explainer->get_words_after(process->run(command, dev), explainKey);
emit signal_output(output);
exit();
}
}

35
QtAdb/threads/adbthread.h Normal file
View File

@ -0,0 +1,35 @@
#ifndef ADBTHREAD_H
#define ADBTHREAD_H
#include <QThread>
#include "../textexplainer.h"
#include "../adbprocess.h"
#include <Windows.h>
class adbThread : public QThread
{
Q_OBJECT
public:
explicit adbThread(QObject* parent = nullptr);
void initThread(QString cmd, device dev);
void initThread(QString cmd, device dev, QString explainKey);
void initThread_for_cpu(QString cmd, device dev);
bool explain = false;
QString command;
QString explainKey;
device dev;
adbProcess *process;
textExplainer *explainer;
signals:
void signal_output(QString);
public slots:
//static void myThreadSlot(int);
protected:
void run() override;
};
#endif // ADBTHREAD_H

View File

@ -9,11 +9,11 @@ thread_createPage::thread_createPage(QObject *parent)
QWidget* thread_createPage::createBasePage(int key, QWidget *parent, device dev, QWidget *page)
{
//bPage = new basePage();
qDebug() << "thread_createPage : creating BasePage";
//qDebug() << "thread_createPage : creating BasePage";
page = maker->createPageWithKey(key,parent,dev);
qDebug() << "thread_createPage : BasePage created";
//qDebug() << "thread_createPage : BasePage created";
emit basePageCreated();
qDebug() << "thread_createPage : emit SIGNAL 'basePageCreated'";
//qDebug() << "thread_createPage : emit SIGNAL 'basePageCreated'";
return NULL;
}

View File

@ -2,7 +2,7 @@
#include "ui_welcomepage.h"
welcomePage::welcomePage(QWidget *parent) :
QWidget(parent),
animationWidget(parent),
ui(new Ui::welcomePage)
{
ui->setupUi(this);

View File

@ -2,12 +2,13 @@
#define WELCOMEPAGE_H
#include <QWidget>
#include "animationwidget.h"
namespace Ui {
class welcomePage;
}
class welcomePage : public QWidget
class welcomePage : public animationWidget
{
Q_OBJECT