mirror of
https://github.com/LapplandSP/QtAdb.git
synced 2025-07-07 14:26:06 +08:00
大量的ui优化、实现稳定的侧载功能、实现修改屏幕分辨率;修复在非开机状态下闪退的bug,提升安全性
This commit is contained in:
parent
d48772206b
commit
33fd2a69e9
|
@ -29,6 +29,7 @@ SOURCES += \
|
|||
sonPages/devControl/btnemulator.cpp \
|
||||
sonPages/devControl/sp_devcontrol_power.cpp \
|
||||
sonPages/devInfo/sp_dpichanger.cpp \
|
||||
sonPages/devInfo/sp_wmsize.cpp \
|
||||
sonPages/pay.cpp \
|
||||
sonPages/recovery/sp_recovery.cpp \
|
||||
sonPages/sonpagebase.cpp \
|
||||
|
@ -60,6 +61,7 @@ HEADERS += \
|
|||
sonPages/devControl/btnemulator.h \
|
||||
sonPages/devControl/sp_devcontrol_power.h \
|
||||
sonPages/devInfo/sp_dpichanger.h \
|
||||
sonPages/devInfo/sp_wmsize.h \
|
||||
sonPages/pay.h \
|
||||
sonPages/recovery/sp_recovery.h \
|
||||
sonPages/sonpagebase.h \
|
||||
|
@ -88,6 +90,7 @@ FORMS += \
|
|||
sonPages/devControl/btnemulator.ui \
|
||||
sonPages/devControl/sp_devcontrol_power.ui \
|
||||
sonPages/devInfo/sp_dpichanger.ui \
|
||||
sonPages/devInfo/sp_wmsize.ui \
|
||||
sonPages/pay.ui \
|
||||
sonPages/recovery/sp_recovery.ui \
|
||||
sonPages/sonpagebase.ui \
|
||||
|
@ -105,6 +108,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
|
|||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
RESOURCES += \
|
||||
ico.qrc
|
||||
ico.qrc \
|
||||
styles.qrc
|
||||
|
||||
RC_FILE += logo.rc
|
||||
|
|
|
@ -75,13 +75,11 @@ void about::on_btn_coolapk_clicked()
|
|||
QDesktopServices::openUrl(QUrl("http://www.coolapk.com/u/692559", QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
|
||||
void about::on_btn_github_clicked()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/LapplandSP", QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
|
||||
void about::on_btn_money_2_clicked()
|
||||
{
|
||||
pay * payPage = new pay();
|
||||
|
|
|
@ -112,7 +112,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>测试版本:beta-v0.4</string>
|
||||
<string>测试版本:beta-v0.5</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -156,6 +156,7 @@ QString adbProcess::run(QString command, device dev) //Adb 命
|
|||
explainer->explainOutput(output , thread);
|
||||
|
||||
emit outputGet(output);
|
||||
//qDebug() << "run output:" << output << "\n";
|
||||
return output;
|
||||
}
|
||||
|
||||
|
@ -398,6 +399,9 @@ void adbProcess::on_readerror()
|
|||
{
|
||||
QString text = this->readAllStandardError().data();
|
||||
explainer->explainError(text);
|
||||
|
||||
emit outputGet(text);
|
||||
qDebug() << "error on adb process:" << text << "\n";
|
||||
//if(text.contains(""))
|
||||
//QMessageBox::information(0, "Error", this->readAllStandardError().data());
|
||||
}
|
||||
|
|
|
@ -11,8 +11,41 @@ animationWidget::animationWidget(QWidget *p)
|
|||
void animationWidget::playLoadAnimation()
|
||||
{
|
||||
animation->setDuration(750);
|
||||
animation->setEndValue(QRect(301, 117, this->width(),this->height()));
|
||||
animation->setStartValue(QRect(301 + 50, 117, this->width(),this->height()));
|
||||
//animation->setEndValue(QPoint(301,117));
|
||||
qDebug() << "wgtHeight = " << wgtHeight;
|
||||
if(parent->width() <= 600)
|
||||
{
|
||||
animation->setEndValue(QRect(301, 117, 600,wgtHeight));
|
||||
}
|
||||
else
|
||||
{
|
||||
animation->setEndValue(QRect(301, 117, parent->width(),wgtHeight));
|
||||
}
|
||||
//animation->setStartValue(QPoint(301 + 50,117));
|
||||
animation->setStartValue(QRect(301 + 50, 117, parent->width()-50,wgtHeight));
|
||||
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
|
||||
this->show();
|
||||
animation->start();
|
||||
emit animationEnd();
|
||||
}
|
||||
|
||||
void animationWidget::playLoadAnimation(int h)
|
||||
{
|
||||
animation->setDuration(750);
|
||||
//animation->setEndValue(QPoint(301,117));
|
||||
//qDebug() << "wgtHeight = " << wgtHeight;
|
||||
if(parent->width() <= 600)
|
||||
{
|
||||
animation->setEndValue(QRect(301, 117, 600,h));
|
||||
}
|
||||
else
|
||||
{
|
||||
animation->setEndValue(QRect(301, 117, parent->width(),h));
|
||||
}
|
||||
//animation->setStartValue(QPoint(301 + 50,117));
|
||||
animation->setStartValue(QRect(301 + 50, 117, parent->width()-50,h));
|
||||
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
|
||||
|
@ -23,6 +56,7 @@ void animationWidget::playLoadAnimation()
|
|||
|
||||
void animationWidget::playExitAnimation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
animationWidget::~animationWidget()
|
||||
|
|
|
@ -20,8 +20,10 @@ public:
|
|||
explicit animationWidget(QWidget *parent = nullptr);
|
||||
~animationWidget();
|
||||
|
||||
int wgtHeight = 427;
|
||||
|
||||
void playLoadAnimation();
|
||||
void playLoadAnimation(int h);
|
||||
void playExitAnimation();
|
||||
|
||||
bool isBasePage;
|
||||
|
|
|
@ -53,8 +53,25 @@ basePage::basePage(QWidget *parent) :
|
|||
"QListWidget::item:hover{background-color:rgba(255,255,255,0.7);}"
|
||||
"QListWidget::item::selected{background-color:rgba(255,255,255,0.5);color:black;}"
|
||||
* */
|
||||
ui->listWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
ui->listWidget->setViewMode(QListView::ListMode);
|
||||
ui->listWidget->setFlow(QListView::TopToBottom);
|
||||
ui->listWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
//ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
ui->listWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->listWidget->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
//QScroller::grabGesture(ui->listWidget,QScroller::LeftMouseButtonGesture);
|
||||
|
||||
/*
|
||||
view->setViewMode(QListView::ListMode);
|
||||
view->setFlow(QListView::TopToBottom);
|
||||
view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
view->setHorizontalScrollMode(QListWidget::ScrollPerPixel);
|
||||
QScroller::grabGesture(view,QScroller::LeftMouseButtonGesture);
|
||||
*/
|
||||
|
||||
connect(ui->listWidget,SIGNAL(currentRowChanged(int)),this,SLOT(slot_createSonPage(int)));
|
||||
/*透明度动画
|
||||
|
@ -100,6 +117,13 @@ void basePage::setFather(QWidget *parent)
|
|||
|
||||
void basePage::slot_createSonPage(int key)
|
||||
{
|
||||
this->setDisabled(true);
|
||||
|
||||
listTimer = new QTimer(this);
|
||||
connect(listTimer, SIGNAL(timeout()), this, SLOT(unlock()));
|
||||
listTimer->setSingleShot(true);
|
||||
listTimer->start(500);
|
||||
|
||||
emit creatingSonPage();
|
||||
if(isEnable(key) && key >= 0)
|
||||
{
|
||||
|
@ -112,15 +136,16 @@ void basePage::slot_createSonPage(int key)
|
|||
ui->mainLayout->addWidget(sonPage);
|
||||
}
|
||||
}
|
||||
//ui->listWidget->setCurrentRow(-1);
|
||||
ui->listWidget->setCurrentRow(-1);
|
||||
}
|
||||
|
||||
void basePage::slot_destroySonPage()
|
||||
{
|
||||
|
||||
if(sonPage == NULL)
|
||||
throw "trying to destroy sonPage, but sonPage == NULL;";
|
||||
|
||||
sonPage->~QWidget();
|
||||
delete sonPage;
|
||||
sonPage = NULL;
|
||||
ui->listWidget->setVisible(true);
|
||||
}
|
||||
|
@ -165,3 +190,8 @@ void basePage::self_castrate()
|
|||
delete ui->mainLayout;
|
||||
delete ui->verticalLayout;
|
||||
}
|
||||
|
||||
void basePage::unlock()
|
||||
{
|
||||
this->setDisabled(false);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#include <QGraphicsEffect>
|
||||
#include <QGraphicsOpacityEffect>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QScroller>
|
||||
#include <QScrollBar>
|
||||
|
||||
#include "pagelistitem.h"
|
||||
#include "sonPages/sonpagemanager.h"
|
||||
#include "animationwidget.h"
|
||||
|
@ -51,6 +54,8 @@ private:
|
|||
|
||||
bool isEnable(int k);
|
||||
|
||||
QTimer *listTimer;
|
||||
|
||||
//QGraphicsOpacityEffect* exitOpacity;
|
||||
|
||||
public slots:
|
||||
|
@ -61,6 +66,7 @@ public slots:
|
|||
private slots:
|
||||
void slot_createSonPage(int key);
|
||||
void slot_destroySonPage();
|
||||
void unlock();
|
||||
};
|
||||
|
||||
#endif // BASEPAGE_H
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>11</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
|
@ -31,11 +31,43 @@
|
|||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="mainLayout">
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="cursor" stdset="0">
|
||||
<cursorShape>ArrowCursor</cursorShape>
|
||||
</property>
|
||||
<property name="mouseTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAsNeeded</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
<property name="autoScroll">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*
|
||||
* 待实现:
|
||||
* ******************************adbProcess 的read std output不应与主页面位于同一个线程
|
||||
*
|
||||
* 显示输出
|
||||
* 代码规范化,提升封装程度
|
||||
* 写注释
|
||||
|
@ -36,6 +36,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
addIndexItems(); //设置左侧目录
|
||||
setStyles(); //设置样式
|
||||
|
||||
|
||||
/*初始化对象*/
|
||||
process = new adbProcess();
|
||||
explainer = new textExplainer();
|
||||
|
@ -47,7 +48,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
/*用户未选择设备前,锁定界面*/
|
||||
this->update();
|
||||
on_refreshButton_clicked();
|
||||
|
||||
initBasePage(6);
|
||||
currentPage->playLoadAnimation(427);
|
||||
lock();
|
||||
}
|
||||
|
||||
|
@ -146,6 +149,12 @@ void MainWindow::setCurrentDevice(int index) //槽:改变所选设备
|
|||
|
||||
current_device = index;
|
||||
//initBasePage(0);
|
||||
/*
|
||||
if(devList[current_device].state == "[侧载]")
|
||||
{
|
||||
initBasePage(5);
|
||||
}*/
|
||||
|
||||
if(ui->indexList->currentRow() == 0)
|
||||
{
|
||||
//qDebug() << "initBasePage";
|
||||
|
@ -155,7 +164,6 @@ void MainWindow::setCurrentDevice(int index) //槽:改变所选设备
|
|||
{
|
||||
//qDebug() << "setCurrentRow";
|
||||
ui->indexList->setCurrentRow(0);
|
||||
|
||||
}
|
||||
}
|
||||
unlock();
|
||||
|
@ -177,6 +185,9 @@ void MainWindow::initBasePage(int key) //槽:生成basePages
|
|||
}
|
||||
|
||||
currentPage = new basePage(this);
|
||||
//qDebug() << "height in initBasePage()" << ui->widget_height->height();
|
||||
currentPage->wgtHeight = ui->widget_height->height();
|
||||
//qDebug() << "height2 in initBasePage()" << currentPage->wgtHeight;
|
||||
connect(currentPage,SIGNAL(animationEnd()),this,SLOT(slot_taiChi()));
|
||||
|
||||
if(devList.isEmpty())
|
||||
|
@ -192,8 +203,8 @@ void MainWindow::initBasePage(int key) //槽:生成basePages
|
|||
|
||||
ui->verticalLayout_2->addWidget(currentPage);
|
||||
|
||||
currentPage->playLoadAnimation();
|
||||
//currentPage->repaint();
|
||||
currentPage->playLoadAnimation(ui->widget_height->height());
|
||||
//currentPage->setVisible(true);
|
||||
taiChiTimer = new QTimer(this);
|
||||
connect(taiChiTimer, SIGNAL(timeout()), this, SLOT(slot_taiChi()));
|
||||
taiChiTimer->setSingleShot(true);
|
||||
|
@ -325,10 +336,16 @@ void MainWindow::setStyles() //方法:设置样式
|
|||
shadowEffect_WSABtn->setColor(Qt::gray);
|
||||
shadowEffect_WSABtn->setBlurRadius(5);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_cmdBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_cmdBtn->setOffset(0,0);
|
||||
shadowEffect_cmdBtn->setColor(Qt::gray);
|
||||
shadowEffect_cmdBtn->setBlurRadius(5);
|
||||
|
||||
ui->refreshButton->setGraphicsEffect(shadowEffect_refreshButton);
|
||||
ui->adbKillerBtn->setGraphicsEffect(shadowEffect_killAdbBtn);
|
||||
ui->WIFIBtn->setGraphicsEffect(shadowEffect_testBtn);
|
||||
ui->WSABtn->setGraphicsEffect(shadowEffect_WSABtn);
|
||||
ui->cmdBtn->setGraphicsEffect(shadowEffect_cmdBtn);
|
||||
}
|
||||
|
||||
void MainWindow::initSonPage(int key) //槽:生成子页面
|
||||
|
@ -503,7 +520,7 @@ void MainWindow::slot_taiChi()
|
|||
this->resize(this->geometry().width() - 5,this->geometry().height());
|
||||
}*/
|
||||
taiChi = !taiChi;
|
||||
currentPage->repaint();
|
||||
//currentPage->resize(1,1);
|
||||
delete taiChiTimer;
|
||||
taiChiTimer = NULL;
|
||||
|
||||
|
@ -513,3 +530,13 @@ void MainWindow::slot_taiChi()
|
|||
}
|
||||
//this->setEnabled(true);
|
||||
}
|
||||
|
||||
void MainWindow::on_cmdBtn_clicked()
|
||||
{
|
||||
QString appDirPath = QApplication::applicationDirPath();
|
||||
QString batPath = appDirPath + "/platform-tools/open-cmd-here.bat";
|
||||
//qDebug()<<"batPath = " << batPath;
|
||||
QProcess batProcess;
|
||||
batProcess.start(batPath);
|
||||
batProcess.waitForFinished();
|
||||
}
|
||||
|
|
|
@ -72,6 +72,8 @@ private slots:
|
|||
void on_WSABtn_clicked();
|
||||
void slot_taiChi();
|
||||
|
||||
void on_cmdBtn_clicked();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
|
|
|
@ -18,18 +18,15 @@
|
|||
/*background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(238, 154, 229, 255), stop:1 rgba(89, 97, 249, 255));*/</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<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">
|
||||
|
@ -48,7 +45,9 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
<font>
|
||||
<family>MiSans Demibold</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-size:36pt; color:#41cd52;">Qt</span><span style=" font-size:36pt;">ADB</span></p></body></html></string>
|
||||
|
@ -118,7 +117,7 @@
|
|||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>0</height>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
|
@ -157,7 +156,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="leftMargin">
|
||||
|
@ -290,20 +289,13 @@ WSA</string>
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<widget class="QPushButton" name="cmdBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>64</horstretch>
|
||||
<verstretch>64</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="loadingLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
|
@ -316,47 +308,144 @@ WSA</string>
|
|||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
<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>25</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="page" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgb(85, 255, 127)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="page" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>114514</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>-16558</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">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_height" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>391</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
|
|
@ -9,7 +9,7 @@ pageListItem::pageListItem(QWidget *parent) :
|
|||
ui->enableLight->setVisible(false);
|
||||
|
||||
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.7);border-radius:4px;border:0px;}");
|
||||
ui->pic->setStyleSheet("QPushButton{background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;}");
|
||||
|
||||
setStyles();
|
||||
}
|
||||
|
|
|
@ -80,6 +80,9 @@ border-width:1px;</string>
|
|||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>OpenHandCursor</cursorShape>
|
||||
</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);}
|
||||
|
@ -191,7 +194,7 @@ QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 11
|
|||
color: rgba(117, 117, 117, 0.9);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
<string>未知</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
|
|
|
@ -21,25 +21,55 @@ basePage* pageMaker::createPageWithKey(int key, QWidget *parent, device dev)
|
|||
k = 6;
|
||||
}
|
||||
|
||||
/*
|
||||
if(dev.state == "[未响应]" || dev.state == "[REC]" || dev.state == "[侧载]" || dev.state == "[未知]")
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
switch(k)
|
||||
{
|
||||
case 0:
|
||||
if(dev.state == "[开机]")
|
||||
{
|
||||
return createPage_devInfo(parent , dev);
|
||||
break;
|
||||
//break;
|
||||
}
|
||||
else if(dev.state == "[REC]")
|
||||
{
|
||||
return createPage_devInfo_rec(parent, dev);
|
||||
//break;
|
||||
}
|
||||
else
|
||||
{
|
||||
return createPage_devInfo_powerdown(parent, dev);
|
||||
return createPage_disabled(parent);
|
||||
//break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
return createPage_acvitator(parent, dev);
|
||||
if(dev.state == "[未响应]" || dev.state == "[REC]" || dev.state == "[侧载]" || dev.state == "[未知]")
|
||||
{
|
||||
return createPage_disabled(parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
return createPage_acvitator(parent, dev);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
return createPage_apps(parent, dev);
|
||||
if(dev.state == "[未响应]" || dev.state == "[REC]" || dev.state == "[侧载]" || dev.state == "[未知]")
|
||||
{
|
||||
return createPage_disabled(parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
return createPage_apps(parent, dev);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
return createPage_devControl(parent, dev);
|
||||
break;
|
||||
|
@ -68,7 +98,7 @@ basePage* pageMaker::createPage_devInfo(QWidget *parent, device dev)
|
|||
basePage *devInfo = new basePage(parent);
|
||||
devInfo->isBasePage = true;
|
||||
devInfo->whoYouAre("devInfo");
|
||||
int val[20] = {3};
|
||||
int val[20] = {2,3};
|
||||
//qDebug() << "!!!!!!!!!!!!!!!!!!!" << *val;
|
||||
devInfo->setEnableValue(val);
|
||||
devInfo->setDev(dev);
|
||||
|
@ -90,6 +120,7 @@ basePage* pageMaker::createPage_devInfo(QWidget *parent, device dev)
|
|||
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();
|
||||
screen_resolution->item->setSelectable();
|
||||
devInfo->addItemsToList(screen_resolution->item);
|
||||
|
||||
//adb shell wm density
|
||||
|
@ -169,7 +200,7 @@ basePage* pageMaker::createPage_devInfo(QWidget *parent, device dev)
|
|||
return devInfo;
|
||||
}
|
||||
|
||||
basePage* pageMaker::createPage_devInfo_powerdown(QWidget *parent, device dev)
|
||||
basePage* pageMaker::createPage_devInfo_rec(QWidget *parent, device dev)
|
||||
{
|
||||
/*
|
||||
CItemWidget* pItemWidget = new CItemWidget(this);
|
||||
|
@ -193,7 +224,7 @@ basePage* pageMaker::createPage_devInfo_powerdown(QWidget *parent, device dev)
|
|||
productModel->setPic(":/ico/image/ico/profile-line.svg");
|
||||
devInfo->addItemsToList(productModel);
|
||||
|
||||
|
||||
/*
|
||||
pageListItem *screen_resolution = new pageListItem(devInfo);
|
||||
screen_resolution->setText("屏幕分辨率","当前状态无法获取");
|
||||
screen_resolution->setPic(":/ico/image/ico/fullscreen-line.svg");
|
||||
|
@ -212,7 +243,7 @@ basePage* pageMaker::createPage_devInfo_powerdown(QWidget *parent, device dev)
|
|||
pageListItem *android_id = new pageListItem(devInfo);
|
||||
android_id->setText("Android Id","当前状态无法获取");
|
||||
android_id->setPic(":/ico/image/ico/barcode-line.svg");
|
||||
devInfo->addItemsToList(android_id);
|
||||
devInfo->addItemsToList(android_id);*/
|
||||
|
||||
//adb shell getprop ro.build.version.release
|
||||
pageListItem *android_version = new pageListItem(devInfo);
|
||||
|
@ -346,29 +377,51 @@ 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};
|
||||
devControl->setEnableValue(val);
|
||||
devControl->setDev(dev);
|
||||
if(dev.state == "[未响应]" || dev.state == "[REC]" || dev.state == "[侧载]" || dev.state == "[未知]")
|
||||
{
|
||||
basePage *devControl = new basePage(parent);
|
||||
devControl->isBasePage = true;
|
||||
//activatorPage *activator = new activatorPage(parent);
|
||||
devControl->whoYouAre("devControl");
|
||||
int val[20] = {1};
|
||||
devControl->setEnableValue(val);
|
||||
devControl->setDev(dev);
|
||||
|
||||
pageListItem *power = new pageListItem(devControl);
|
||||
power->setText("电源","adb reboot <n>");
|
||||
power->setPic(":/ico/image/ico/shut-down-line.svg");
|
||||
power->setSelectable();
|
||||
devControl->addItemsToList(power);
|
||||
pageListItem *power = new pageListItem(devControl);
|
||||
power->setText("电源","adb reboot <n>");
|
||||
power->setPic(":/ico/image/ico/shut-down-line.svg");
|
||||
power->setSelectable();
|
||||
devControl->addItemsToList(power);
|
||||
|
||||
pageListItem *btnEmulate = new pageListItem(devControl);
|
||||
btnEmulate->setText("按键模拟","adb shell input keyevent <key>");
|
||||
btnEmulate->setPic(":/ico/image/ico/drag-move-line.svg");
|
||||
btnEmulate->setSelectable();
|
||||
devControl->addItemsToList(btnEmulate);
|
||||
return devControl;
|
||||
}
|
||||
else
|
||||
{
|
||||
basePage *devControl = new basePage(parent);
|
||||
devControl->isBasePage = true;
|
||||
//activatorPage *activator = new activatorPage(parent);
|
||||
devControl->whoYouAre("devControl");
|
||||
int val[20] = {1,2};
|
||||
devControl->setEnableValue(val);
|
||||
devControl->setDev(dev);
|
||||
|
||||
return devControl;
|
||||
pageListItem *power = new pageListItem(devControl);
|
||||
power->setText("电源","adb reboot <n>");
|
||||
power->setPic(":/ico/image/ico/shut-down-line.svg");
|
||||
power->setSelectable();
|
||||
devControl->addItemsToList(power);
|
||||
|
||||
pageListItem *btnEmulate = new pageListItem(devControl);
|
||||
btnEmulate->setText("按键模拟","adb shell input keyevent <key>");
|
||||
btnEmulate->setPic(":/ico/image/ico/drag-move-line.svg");
|
||||
btnEmulate->setSelectable();
|
||||
devControl->addItemsToList(btnEmulate);
|
||||
|
||||
return devControl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
basePage* pageMaker::createPage_recovery(QWidget *parent, device dev)
|
||||
{
|
||||
basePage *recovery = new basePage(parent);
|
||||
|
@ -385,13 +438,6 @@ basePage* pageMaker::createPage_recovery(QWidget *parent, device dev)
|
|||
power->setSelectable();
|
||||
recovery->addItemsToList(power);
|
||||
|
||||
/*
|
||||
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 recovery;
|
||||
}
|
||||
|
||||
|
@ -401,7 +447,7 @@ basePage* pageMaker::createPage_advanced(QWidget *parent, device dev)
|
|||
advanced->isBasePage = true;
|
||||
//activatorPage *activator = new activatorPage(parent);
|
||||
advanced->whoYouAre("advanced");
|
||||
int val[20] = {1,2};
|
||||
int val[20] = {1};
|
||||
advanced->setEnableValue(val);
|
||||
advanced->setDev(dev);
|
||||
|
||||
|
@ -411,12 +457,6 @@ basePage* pageMaker::createPage_advanced(QWidget *parent, device dev)
|
|||
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>");
|
||||
|
@ -433,6 +473,25 @@ basePage* pageMaker::createPage_about(QWidget *parent)
|
|||
return abt;
|
||||
}
|
||||
|
||||
basePage* pageMaker::createPage_disabled(QWidget *parent)
|
||||
{
|
||||
basePage *disabled = new basePage(parent);
|
||||
disabled->isBasePage = true;
|
||||
disabled->whoYouAre("disabled");
|
||||
int val[20] = {};
|
||||
//qDebug() << "!!!!!!!!!!!!!!!!!!!" << *val;
|
||||
disabled->setEnableValue(val);
|
||||
/**/
|
||||
|
||||
pageListItem *productModel = new pageListItem(disabled);
|
||||
//qDebug() << "dev of pageMaker" << dev.addr;
|
||||
productModel->setText("设备未开机","功能暂不可用");
|
||||
productModel->setPic(":/ico/image/ico/close-circle-line.svg");
|
||||
disabled->addItemsToList(productModel);
|
||||
|
||||
return disabled;
|
||||
}
|
||||
|
||||
pageMaker::pageListItemStruct* pageMaker::initStruct(QWidget* parent)
|
||||
{
|
||||
pageListItemStruct *itemStruct = new pageListItemStruct();
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
|
||||
|
||||
basePage *createPage_devInfo(QWidget *parent, device dev);
|
||||
basePage *createPage_devInfo_powerdown(QWidget *parent, device dev);
|
||||
basePage *createPage_devInfo_rec(QWidget *parent, device dev);
|
||||
|
||||
basePage *createPage_acvitator(QWidget *parent, device dev);
|
||||
basePage *createPage_apps(QWidget *parent,device dev);
|
||||
|
@ -38,6 +38,8 @@ public:
|
|||
|
||||
basePage *createPage_about(QWidget *parent);
|
||||
|
||||
basePage *createPage_disabled(QWidget *parent);
|
||||
|
||||
|
||||
//activatorPage *createSonPage_activator(QWidget *parent, device dev);
|
||||
typedef struct{
|
||||
|
|
51
QtAdb/qss/scrollbar.qss
Normal file
51
QtAdb/qss/scrollbar.qss
Normal file
|
@ -0,0 +1,51 @@
|
|||
QScrollBar:vertical
|
||||
{
|
||||
width:8px;
|
||||
background:rgba(0,0,0,0%);
|
||||
margin:0px,0px,0px,0px;
|
||||
padding-top:0px;
|
||||
padding-bottom:0px;
|
||||
}
|
||||
QScrollBar::handle:vertical
|
||||
{
|
||||
width:8px;
|
||||
background:rgba(0,0,0,25%);
|
||||
border-radius:4px;
|
||||
min-height:20;
|
||||
}
|
||||
QScrollBar::handle:vertical:hover
|
||||
{
|
||||
width:8px;
|
||||
background:rgba(0,0,0,50%);
|
||||
border-radius:4px;
|
||||
min-height:20;
|
||||
}
|
||||
QScrollBar::add-line:vertical
|
||||
{
|
||||
height:0px;width:0px;
|
||||
border:0px;
|
||||
subcontrol-position:bottom;
|
||||
}
|
||||
QScrollBar::sub-line:vertical
|
||||
{
|
||||
height:0px;width:0px;
|
||||
border:0px;
|
||||
subcontrol-position:top;
|
||||
}
|
||||
QScrollBar::add-line:vertical:hover
|
||||
{
|
||||
height:0px;width:0px;
|
||||
border:0px;
|
||||
subcontrol-position:bottom;
|
||||
}
|
||||
QScrollBar::sub-line:vertical:hover
|
||||
{
|
||||
height:0px;width:0px;
|
||||
border:0px;
|
||||
subcontrol-position:top;
|
||||
}
|
||||
QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical
|
||||
{
|
||||
background:rgba(0,0,0,10%);
|
||||
border-radius:4px;
|
||||
}
|
|
@ -42,11 +42,20 @@ sp_activator::sp_activator(QWidget *parent) :
|
|||
shadowEffect_textBrowser->setColor(Qt::gray);
|
||||
shadowEffect_textBrowser->setBlurRadius(5);
|
||||
ui->textBrowser->setGraphicsEffect(shadowEffect_textBrowser);
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->textBrowser->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
}
|
||||
|
||||
sp_activator::~sp_activator()
|
||||
{
|
||||
//delete process;
|
||||
if(page != NULL)
|
||||
{
|
||||
delete page;
|
||||
}
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -73,6 +82,7 @@ void sp_activator::on_showOutputBtn_clicked(bool checked)
|
|||
if(checked)
|
||||
{
|
||||
page = new standardOutputPage(NULL,process);
|
||||
connect(process,SIGNAL(outputGet(QString)),page,SLOT(update(QString)));
|
||||
/*
|
||||
parents->mapToGlobal(parents->pos());
|
||||
page->move(parents->pos().x() + parents->width() + this->width()/2 + 22,0);*/
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <QWidget>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
#include "adbprocess.h"
|
||||
#include "../sonpagebase.h"
|
||||
#include "../standardoutputpage.h"
|
||||
|
@ -22,7 +24,7 @@ public:
|
|||
void setUp(QString qss, QString title, QString profile, QString command);
|
||||
QString command;
|
||||
device dev;
|
||||
standardOutputPage *page;
|
||||
standardOutputPage *page = NULL;
|
||||
QWidget *parents;
|
||||
|
||||
void setDev(device device);
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
<height>458</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
|
@ -18,7 +23,7 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>11</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
|
@ -37,6 +42,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -89,7 +97,6 @@ border:0px solid #BDBDBD;</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
|
@ -109,7 +116,6 @@ border:0px solid #BDBDBD;</string>
|
|||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<pointsize>12</pointsize>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
</font>
|
||||
|
|
|
@ -13,7 +13,6 @@ sp_customize_cmd::sp_customize_cmd(QWidget *parent) :
|
|||
QGraphicsDropShadowEffect *shadowEffect_runBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_showOutputBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
|
||||
|
||||
shadowEffect_runBtn->setOffset(0,0);
|
||||
shadowEffect_runBtn->setColor(Qt::gray);
|
||||
|
@ -27,14 +26,9 @@ sp_customize_cmd::sp_customize_cmd(QWidget *parent) :
|
|||
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(this);
|
||||
shadowEffect_textBrowser->setOffset(0,0);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>725</width>
|
||||
<height>571</height>
|
||||
<width>621</width>
|
||||
<height>389</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -17,6 +17,9 @@
|
|||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -31,6 +34,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -42,20 +48,20 @@ border:0px solid #BDBDBD;</string>
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
|
@ -87,7 +93,6 @@ image: url(:/ico/image/ico/code-s-slash-line.svg);</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
|
@ -105,9 +110,21 @@ border:0px solid #BDBDBD;</string>
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
|
@ -129,20 +146,25 @@ background-color: rgba(255, 255, 255, 0);</string>
|
|||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>暂时仅支持 ADB 命令</p><p>不支持管道符“ | ”</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
</font>
|
||||
<font/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -238,40 +260,6 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</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">
|
||||
|
|
|
@ -30,7 +30,9 @@ sp_features::sp_features(QWidget *parent) :
|
|||
|
||||
ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
|
||||
ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->listView->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
}
|
||||
|
||||
sp_features::~sp_features()
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
//#include <QAbstractItemView>
|
||||
#include "../../threads/adbthread.h"
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
|
@ -25,6 +28,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -36,22 +42,25 @@ border:0px solid #BDBDBD;</string>
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include "adbprocess.h"
|
||||
#include <QFileDialog>
|
||||
#include "../../threads/adbthread.h"
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
|
||||
namespace Ui {
|
||||
class sp_installer;
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
|
@ -25,6 +28,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -36,22 +42,27 @@ border:0px solid #BDBDBD;</string>
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
|
@ -78,6 +89,7 @@ image: url(:/ico/image/ico/install-line.svg);</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
|
@ -116,7 +128,9 @@ border:0px solid #BDBDBD;</string>
|
|||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
|
@ -133,6 +147,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
<widget class="QLabel" name="filePaths">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
|
|
|
@ -30,6 +30,10 @@ sp_libraries::sp_libraries(QWidget *parent) :
|
|||
ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
|
||||
ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->listView->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
|
||||
}
|
||||
|
||||
sp_libraries::~sp_libraries()
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include <QGraphicsDropShadowEffect>
|
||||
//#include <QAbstractItemView>
|
||||
#include "../../threads/adbthread.h"
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
|
||||
namespace Ui {
|
||||
class sp_libraries;
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
|
@ -25,6 +28,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -36,20 +42,20 @@ border:0px solid #BDBDBD;</string>
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
|
@ -87,7 +93,7 @@ image: url(:/ico/image/ico/btnEmulator/menu-line.svg);</string>
|
|||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>库</string>
|
||||
<string>当前设备支持的所有库</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -36,6 +36,10 @@ sp_packages::sp_packages(QWidget *parent) :
|
|||
ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
|
||||
ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->listView->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
|
||||
}
|
||||
|
||||
sp_packages::~sp_packages()
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include <QFileDialog>
|
||||
#include "../../threads/adbthread.h"
|
||||
#include "tp_packageprofile.h"
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
/*
|
||||
struct package
|
||||
{
|
||||
|
|
|
@ -6,14 +6,17 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>592</width>
|
||||
<height>557</height>
|
||||
<width>580</width>
|
||||
<height>413</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
|
@ -25,6 +28,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -36,20 +42,20 @@ border:0px solid #BDBDBD;</string>
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
|
@ -78,6 +84,7 @@ image: url(:/ico/image/ico/android-line.svg);</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
|
@ -124,9 +131,7 @@ QProgressBar:chunk{
|
|||
<item>
|
||||
<widget class="QListView" name="listView">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
<font/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -134,6 +139,11 @@ QProgressBar:chunk{
|
|||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_d">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>仅显示已停用</string>
|
||||
</property>
|
||||
|
@ -141,6 +151,11 @@ QProgressBar:chunk{
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_e">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>仅显示已启用</string>
|
||||
</property>
|
||||
|
@ -148,6 +163,11 @@ QProgressBar:chunk{
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>第三方</string>
|
||||
</property>
|
||||
|
@ -155,6 +175,11 @@ QProgressBar:chunk{
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_s">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>系统</string>
|
||||
</property>
|
||||
|
|
|
@ -29,6 +29,10 @@ sp_permissionGroups::sp_permissionGroups(QWidget *parent) :
|
|||
|
||||
ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
|
||||
ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->listView->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
}
|
||||
|
||||
sp_permissionGroups::~sp_permissionGroups()
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include <QGraphicsDropShadowEffect>
|
||||
//#include <QAbstractItemView>
|
||||
#include "../../threads/adbthread.h"
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
|
||||
namespace Ui {
|
||||
class sp_permissionGroups;
|
||||
|
|
|
@ -7,13 +7,16 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>635</width>
|
||||
<height>534</height>
|
||||
<height>451</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
|
@ -25,6 +28,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -36,22 +42,27 @@ border:0px solid #BDBDBD;</string>
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
|
@ -78,6 +89,7 @@ image: url(:/ico/image/ico/about/information-line.svg);</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
|
@ -127,9 +139,7 @@ QProgressBar:chunk{
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
<font/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -111,6 +111,10 @@ void sp_permissions::on_back_to_basePage_2_clicked()
|
|||
settings->setWindowTitle("选项");
|
||||
settings->move(ui->back_to_basePage_2->geometry().x(),ui->back_to_basePage_2->geometry().y());
|
||||
settings->exec();
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->tableView->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
}
|
||||
|
||||
void sp_permissions::setArg()
|
||||
|
@ -338,9 +342,12 @@ void sp_permissions::refresh_tableView(QString s)
|
|||
void sp_permissions::on_open_another_window_clicked()
|
||||
{
|
||||
QWidget *wgt = new QWidget();
|
||||
wgt->setWindowTitle("查看");
|
||||
wgt->setStyleSheet("background-color:white;border:0px solid white;");
|
||||
QVBoxLayout *layout = new QVBoxLayout();
|
||||
QTableView *view = new QTableView();
|
||||
view->setModel(current_model);
|
||||
view->setStyleSheet("background-color:white;border:0px;");
|
||||
wgt->setLayout(layout);
|
||||
layout->addWidget(view);
|
||||
wgt ->showMaximized();
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include <QStandardItemModel>
|
||||
#include "../../textexplainer.h"
|
||||
#include "../../threads/adbthread.h"
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
|
||||
namespace Ui {
|
||||
class sp_permissions;
|
||||
|
|
|
@ -6,14 +6,17 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>648</width>
|
||||
<height>534</height>
|
||||
<width>509</width>
|
||||
<height>391</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
|
@ -25,6 +28,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -36,20 +42,20 @@ border:0px solid #BDBDBD;</string>
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
|
@ -78,7 +84,6 @@ image: url(:/ico/image/ico/about/information-line.svg);</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
|
@ -96,14 +101,14 @@ border:0px solid #BDBDBD;</string>
|
|||
<widget class="QPushButton" name="open_another_window">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
|
@ -159,9 +164,7 @@ QProgressBar:chunk{
|
|||
<item>
|
||||
<widget class="QTableView" name="tableView">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
<font/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -14,6 +14,8 @@ tp_packageProfile::tp_packageProfile(QWidget *parent ,QString packageName) :
|
|||
|
||||
thread_file = new adbThread();
|
||||
|
||||
//this->setStyleSheet("background-color:white;");
|
||||
|
||||
|
||||
thread_installer = new adbThread();
|
||||
|
||||
|
@ -21,6 +23,17 @@ tp_packageProfile::tp_packageProfile(QWidget *parent ,QString packageName) :
|
|||
ui->lineEdit_name->isReadOnly();
|
||||
ui->lineEdit_installer->isReadOnly();
|
||||
ui->lineEdit_path->isReadOnly();
|
||||
|
||||
setShadow(ui->label);
|
||||
setShadow(ui->label_2);
|
||||
setShadow(ui->label_3);
|
||||
setShadow(ui->tips);
|
||||
setShadow(ui->uninstall);
|
||||
setShadow(ui->clear);
|
||||
setShadow(ui->enable);
|
||||
setShadow(ui->disable);
|
||||
|
||||
//this->setStyleSheet("background-color:white;");
|
||||
}
|
||||
|
||||
tp_packageProfile::~tp_packageProfile()
|
||||
|
@ -40,40 +53,89 @@ void tp_packageProfile::set_installer(QString s)
|
|||
|
||||
void tp_packageProfile::on_uninstall_clicked()
|
||||
{
|
||||
QString cmd = "adb shell pm uninstall ";
|
||||
cmd.append(name);
|
||||
process->run(cmd,dev);
|
||||
if(uninstall_clicked)
|
||||
{
|
||||
ui->tips->setText("已执行「卸载」命令,本窗口将关闭");
|
||||
|
||||
emit packageChanged();
|
||||
this->close();
|
||||
QString cmd = "adb shell pm uninstall ";
|
||||
cmd.append(name);
|
||||
process->run(cmd,dev);
|
||||
|
||||
emit packageChanged();
|
||||
this->close();
|
||||
|
||||
uninstall_clicked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->tips->setText("再次点击以卸载,卸载后本窗口将关闭");
|
||||
uninstall_clicked = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void tp_packageProfile::on_clear_clicked()
|
||||
{
|
||||
QString cmd = "adb shell pm clear ";
|
||||
cmd.append(name);
|
||||
process->run(cmd,dev);
|
||||
if(clear_clicked)
|
||||
{
|
||||
ui->tips->setText("已执行「清除应用数据」命令");
|
||||
|
||||
QString cmd = "adb shell pm clear ";
|
||||
cmd.append(name);
|
||||
process->run(cmd,dev);
|
||||
|
||||
clear_clicked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->tips->setText("再次点击以清除");
|
||||
clear_clicked = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void tp_packageProfile::on_enable_clicked()
|
||||
{
|
||||
QString cmd = "adb shell pm enable ";
|
||||
cmd.append(name);
|
||||
process->run(cmd,dev);
|
||||
if(enable_clicked)
|
||||
{
|
||||
ui->tips->setText("已执行「启用」命令");
|
||||
|
||||
emit packageChanged();
|
||||
QString cmd = "adb shell pm enable ";
|
||||
cmd.append(name);
|
||||
process->run(cmd,dev);
|
||||
|
||||
emit packageChanged();
|
||||
|
||||
enable_clicked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->tips->setText("再次点击以启用");
|
||||
enable_clicked = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void tp_packageProfile::on_disable_clicked()
|
||||
{
|
||||
QString cmd = "adb shell pm disable ";
|
||||
cmd.append(name);
|
||||
process->run(cmd,dev);
|
||||
if(disable_clicked)
|
||||
{
|
||||
ui->tips->setText("已执行「停用」命令");
|
||||
|
||||
QString cmd = "adb shell pm disable ";
|
||||
cmd.append(name);
|
||||
process->run(cmd,dev);
|
||||
|
||||
emit packageChanged();
|
||||
|
||||
disable_clicked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->tips->setText("再次点击以停用");
|
||||
disable_clicked = true;
|
||||
}
|
||||
|
||||
emit packageChanged();
|
||||
}
|
||||
|
||||
void tp_packageProfile::setDevice(device d)
|
||||
|
@ -92,3 +154,12 @@ void tp_packageProfile::setDevice(device d)
|
|||
connect(thread_installer,SIGNAL(signal_output(QString)),this,SLOT(set_installer(QString)));
|
||||
thread_installer->start();
|
||||
}
|
||||
|
||||
void tp_packageProfile::setShadow(QWidget* wgt)
|
||||
{
|
||||
QGraphicsDropShadowEffect *shadowEffect_widget = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_widget->setOffset(0,0);
|
||||
shadowEffect_widget->setColor(Qt::gray);
|
||||
shadowEffect_widget->setBlurRadius(5);
|
||||
wgt->setGraphicsEffect(shadowEffect_widget);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
#define TP_PACKAGEPROFILE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include <QTimer>
|
||||
#include <Windows.h>
|
||||
#include "../../textexplainer.h"
|
||||
#include "../../adbprocess.h"
|
||||
#include "../../threads/adbthread.h"
|
||||
|
@ -30,6 +33,14 @@ private:
|
|||
adbThread * thread_btn;
|
||||
adbProcess * process;
|
||||
textExplainer *explainer;
|
||||
|
||||
void setShadow(QWidget* wgt);
|
||||
|
||||
bool uninstall_clicked = false;
|
||||
bool clear_clicked = false;
|
||||
bool enable_clicked = false;
|
||||
bool disable_clicked = false;
|
||||
|
||||
signals:
|
||||
void packageChanged();
|
||||
/*
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>767</width>
|
||||
<height>206</height>
|
||||
<width>407</width>
|
||||
<height>207</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -21,63 +21,127 @@
|
|||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>包名</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>关联文件</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>安装者</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_name">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:2px solid #BDBDBD;
|
||||
border-radius:4px;</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -85,14 +149,24 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_path">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:2px solid #BDBDBD;
|
||||
border-radius:4px;</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -100,14 +174,24 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_installer">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:2px solid #BDBDBD;
|
||||
border-radius:4px;</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -118,42 +202,69 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="uninstall">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>卸载</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clear">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>清除所有数据</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<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>
|
||||
<widget class="QLabel" name="tips">
|
||||
<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>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>双击以确认操作</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="enable">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>启用</string>
|
||||
</property>
|
||||
|
@ -161,16 +272,67 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="disable">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>停用</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="uninstall">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>卸载</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clear">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>清除所有数据</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -11,6 +11,7 @@ btnEmulator::btnEmulator(QWidget *parent) :
|
|||
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();
|
||||
}
|
||||
|
||||
|
@ -217,6 +218,7 @@ void btnEmulator::setStyles()
|
|||
setShadow(ui->btn_calender);
|
||||
setShadow(ui->btn_calc);
|
||||
setShadow(ui->back_to_basePage);
|
||||
setShadow(ui->tips);
|
||||
|
||||
setShadow(ui->label);
|
||||
setShadow(ui->label_2);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>615</width>
|
||||
<height>450</height>
|
||||
<width>744</width>
|
||||
<height>505</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -35,6 +35,9 @@ QToolTip{border:1px solid #BDBDBD; background-color: #ffffff; color:rgba(117, 11
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -1249,17 +1252,28 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<widget class="QLabel" name="tips">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-style:italic;">鼠标悬浮可查看具体功能</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -31,6 +34,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -88,7 +94,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>
|
||||
|
@ -148,7 +153,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>
|
||||
|
@ -208,7 +212,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>
|
||||
|
@ -268,7 +271,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>
|
||||
|
|
|
@ -29,6 +29,10 @@ sp_dpiChanger::sp_dpiChanger(QWidget *parent) :
|
|||
QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_dpiInfo = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_currentDpi = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_label3 = new QGraphicsDropShadowEffect(this);
|
||||
|
||||
shadowEffect_runBtn->setOffset(0,0);
|
||||
shadowEffect_runBtn->setColor(Qt::gray);
|
||||
shadowEffect_runBtn->setBlurRadius(5);
|
||||
|
@ -45,10 +49,25 @@ sp_dpiChanger::sp_dpiChanger(QWidget *parent) :
|
|||
shadowEffect_refreshBtn->setColor(Qt::gray);
|
||||
shadowEffect_refreshBtn->setBlurRadius(5);
|
||||
|
||||
shadowEffect_dpiInfo->setOffset(0,0);
|
||||
shadowEffect_dpiInfo->setColor(Qt::gray);
|
||||
shadowEffect_dpiInfo->setBlurRadius(5);
|
||||
|
||||
shadowEffect_currentDpi->setOffset(0,0);
|
||||
shadowEffect_currentDpi->setColor(Qt::gray);
|
||||
shadowEffect_currentDpi->setBlurRadius(5);
|
||||
|
||||
shadowEffect_label3->setOffset(0,0);
|
||||
shadowEffect_label3->setColor(Qt::gray);
|
||||
shadowEffect_label3->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);
|
||||
ui->dpiInfo->setGraphicsEffect(shadowEffect_dpiInfo);
|
||||
ui->currentDpi->setGraphicsEffect(shadowEffect_currentDpi);
|
||||
ui->label_3->setGraphicsEffect(shadowEffect_label3);
|
||||
}
|
||||
|
||||
sp_dpiChanger::~sp_dpiChanger()
|
||||
|
|
|
@ -16,20 +16,8 @@
|
|||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="font">
|
||||
<font/>
|
||||
|
@ -42,22 +30,31 @@ background-color: rgba(255, 255, 255, 0);
|
|||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,1,1,1,0,0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
|
@ -84,7 +81,6 @@ border:0px solid #BDBDBD;</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
|
@ -100,129 +96,148 @@ background-color: rgba(255, 255, 255, 0);</string>
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="currentDpi">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:0px;
|
||||
background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DPI 信息:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="QLabel" name="currentDpi">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>DPI信息</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="dpiInfo">
|
||||
<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>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>未知</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="dpiInfo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:0px;
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>修改为</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:1px solid #BDBDBD;
|
||||
background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>未知</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<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>
|
||||
<family>MiSans Normal</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:0px;
|
||||
background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>修改为:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:1px solid #BDBDBD;
|
||||
background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
|
|
146
QtAdb/sonPages/devInfo/sp_wmsize.cpp
Normal file
146
QtAdb/sonPages/devInfo/sp_wmsize.cpp
Normal file
|
@ -0,0 +1,146 @@
|
|||
#include "sp_wmsize.h"
|
||||
#include "ui_sp_wmsize.h"
|
||||
|
||||
sp_wmsize::sp_wmsize(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::sp_wmsize)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
process = new adbProcess;
|
||||
explainer = new textExplainer;
|
||||
|
||||
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
|
||||
|
||||
ui->verticalLayout->setAlignment(Qt::AlignVCenter);
|
||||
|
||||
ui->back_to_basePage->setStyleSheet("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);}");
|
||||
ui->runBtn->setStyleSheet("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);}");
|
||||
ui->showOutputBtn->setStyleSheet("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);}");
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_runBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_showOutputBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_dpiInfo = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_currentDpi = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_label3 = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_label4 = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_label5 = new QGraphicsDropShadowEffect(this);
|
||||
|
||||
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);
|
||||
|
||||
shadowEffect_dpiInfo->setOffset(0,0);
|
||||
shadowEffect_dpiInfo->setColor(Qt::gray);
|
||||
shadowEffect_dpiInfo->setBlurRadius(5);
|
||||
|
||||
shadowEffect_currentDpi->setOffset(0,0);
|
||||
shadowEffect_currentDpi->setColor(Qt::gray);
|
||||
shadowEffect_currentDpi->setBlurRadius(5);
|
||||
|
||||
shadowEffect_label3->setOffset(0,0);
|
||||
shadowEffect_label3->setColor(Qt::gray);
|
||||
shadowEffect_label3->setBlurRadius(5);
|
||||
|
||||
shadowEffect_label4->setOffset(0,0);
|
||||
shadowEffect_label4->setColor(Qt::gray);
|
||||
shadowEffect_label4->setBlurRadius(5);
|
||||
|
||||
shadowEffect_label5->setOffset(0,0);
|
||||
shadowEffect_label5->setColor(Qt::gray);
|
||||
shadowEffect_label5->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);
|
||||
ui->dpiInfo->setGraphicsEffect(shadowEffect_dpiInfo);
|
||||
ui->currentDpi->setGraphicsEffect(shadowEffect_currentDpi);
|
||||
ui->label_3->setGraphicsEffect(shadowEffect_label3);
|
||||
ui->label_4->setGraphicsEffect(shadowEffect_label4);
|
||||
ui->label_5->setGraphicsEffect(shadowEffect_label5);
|
||||
}
|
||||
|
||||
sp_wmsize::~sp_wmsize()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void sp_wmsize::setWmInfo()
|
||||
{
|
||||
//qDebug() << "dve of sonPage = " << dev.addr;
|
||||
QString profile = process->run("adb shell wm size", dev).replace("Physical size", "默认").replace("Override size","当前").simplified();
|
||||
//qDebug() << "02" << profile;
|
||||
ui->dpiInfo->setText(profile);
|
||||
}
|
||||
|
||||
void sp_wmsize::on_runBtn_clicked()
|
||||
{
|
||||
if(ui->lineEdit->text().toInt() && ui->lineEdit_2->text().toInt()){
|
||||
QString output;
|
||||
this->setDisabled(true);
|
||||
output = process->run("adb shell wm size " + ui->lineEdit->text().simplified() + "x" + ui->lineEdit_2->text().simplified(), dev);
|
||||
|
||||
this->setDisabled(false);
|
||||
//qDebug() << output;
|
||||
|
||||
refresh();
|
||||
ui->lineEdit->setPlaceholderText("已修改");
|
||||
ui->lineEdit_2->setPlaceholderText("已修改");
|
||||
}
|
||||
else if(!ui->lineEdit->text().toInt() || !ui->lineEdit_2->text().toInt())
|
||||
{
|
||||
ui->lineEdit->clear();
|
||||
ui->lineEdit_2->clear();
|
||||
ui->lineEdit->setPlaceholderText("输入无效");
|
||||
ui->lineEdit_2->setPlaceholderText("输入无效");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lineEdit->clear();
|
||||
ui->lineEdit_2->clear();
|
||||
ui->lineEdit->setPlaceholderText("error");
|
||||
ui->lineEdit_2->setPlaceholderText("error");
|
||||
}
|
||||
}
|
||||
|
||||
void sp_wmsize::refresh()
|
||||
{
|
||||
//qDebug() << "refresh";
|
||||
setWmInfo();
|
||||
ui->lineEdit->clear();
|
||||
ui->lineEdit_2->clear();
|
||||
}
|
||||
|
||||
void sp_wmsize::on_refreshBtn_clicked()
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
|
||||
void sp_wmsize::setDev(device device)
|
||||
{
|
||||
//qDebug() << "setDev";
|
||||
dev = device;
|
||||
setWmInfo();
|
||||
}
|
39
QtAdb/sonPages/devInfo/sp_wmsize.h
Normal file
39
QtAdb/sonPages/devInfo/sp_wmsize.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#ifndef SP_WMSIZE_H
|
||||
#define SP_WMSIZE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
|
||||
#include "adbprocess.h"
|
||||
#include "textexplainer.h"
|
||||
|
||||
namespace Ui {
|
||||
class sp_wmsize;
|
||||
}
|
||||
|
||||
class sp_wmsize : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit sp_wmsize(QWidget *parent = nullptr);
|
||||
~sp_wmsize();
|
||||
|
||||
adbProcess *process;
|
||||
textExplainer *explainer;
|
||||
device dev;
|
||||
|
||||
void setDev(device device);
|
||||
|
||||
private slots:
|
||||
void on_runBtn_clicked();
|
||||
void on_refreshBtn_clicked();
|
||||
|
||||
private:
|
||||
Ui::sp_wmsize *ui;
|
||||
void setWmInfo();
|
||||
void refresh();
|
||||
|
||||
};
|
||||
|
||||
#endif // SP_WMSIZE_H
|
515
QtAdb/sonPages/devInfo/sp_wmsize.ui
Normal file
515
QtAdb/sonPages/devInfo/sp_wmsize.ui
Normal file
|
@ -0,0 +1,515 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>sp_wmsize</class>
|
||||
<widget class="QWidget" name="sp_wmsize">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>659</width>
|
||||
<height>486</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">/*background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(238, 154, 229, 255), stop:1 rgba(89, 97, 249, 255));*/
|
||||
/*border-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(238, 154, 229, 255), stop:1 rgba(89, 97, 249, 255));*/
|
||||
border-radius: 4px;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<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">image:url(:/ico/image/ico/fullscreen-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>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:0px;
|
||||
background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-size:18pt;">更改分辨率</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="currentDpi">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>分辨率</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="dpiInfo">
|
||||
<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>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>未知</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>修改为</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>宽</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:1px solid #BDBDBD;
|
||||
background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>高</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:1px solid #BDBDBD;
|
||||
background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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="font">
|
||||
<font/>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>返回</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</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="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:0px;</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="font">
|
||||
<font/>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</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>
|
|
@ -8,13 +8,16 @@ sp_recovery::sp_recovery(QWidget *parent) :
|
|||
ui->setupUi(this);
|
||||
|
||||
process = new adbProcess();
|
||||
thread = new adbThread();
|
||||
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_runBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_showOutputBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_selectBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_runBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_showOutputBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_selectBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_output = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_tips = new QGraphicsDropShadowEffect(this);
|
||||
|
||||
shadowEffect_runBtn->setOffset(0,0);
|
||||
shadowEffect_runBtn->setColor(Qt::gray);
|
||||
|
@ -36,25 +39,58 @@ sp_recovery::sp_recovery(QWidget *parent) :
|
|||
shadowEffect_selectBtn->setColor(Qt::gray);
|
||||
shadowEffect_selectBtn->setBlurRadius(5);
|
||||
|
||||
shadowEffect_output->setOffset(0,0);
|
||||
shadowEffect_output->setColor(Qt::gray);
|
||||
shadowEffect_output->setBlurRadius(5);
|
||||
|
||||
shadowEffect_tips->setOffset(0,0);
|
||||
shadowEffect_tips->setColor(Qt::red);
|
||||
shadowEffect_tips->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);
|
||||
ui->selectBtn->setGraphicsEffect(shadowEffect_selectBtn);
|
||||
ui->output->setGraphicsEffect(shadowEffect_output);
|
||||
ui->tips->setGraphicsEffect(shadowEffect_tips);
|
||||
|
||||
ui->progressBar->setVisible(false);
|
||||
ui->output->setText("暂时仅支持 .zip 格式\n进度将显示在设备端");
|
||||
}
|
||||
|
||||
sp_recovery::~sp_recovery()
|
||||
{
|
||||
if(page != NULL)
|
||||
{
|
||||
delete page;
|
||||
}
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void sp_recovery::setDev(device device)
|
||||
{
|
||||
dev = device;
|
||||
|
||||
if(dev.state != "[侧载]")
|
||||
{
|
||||
ui->runBtn->setDisabled(true);
|
||||
shadowEffect_tips->setColor(Qt::green);
|
||||
ui->tips->setText("请先打开设备的「Sideload」模式");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->tips->setText("「Sideload」为实验功能,请谨慎使用");
|
||||
}
|
||||
}
|
||||
|
||||
void sp_recovery::on_runBtn_clicked()
|
||||
{
|
||||
//qDebug() << "enter runBtn slot";
|
||||
ui->progressBar->setVisible(true);
|
||||
ui->output->setText("正在刷入,请在设备端查看进度");
|
||||
|
||||
QString command;
|
||||
|
||||
if(zipPath != "")
|
||||
|
@ -66,12 +102,32 @@ void sp_recovery::on_runBtn_clicked()
|
|||
command = "adb sideload";
|
||||
}
|
||||
|
||||
thread->initThread(command, dev, "#SIDELOAD#");
|
||||
qDebug() << "command =" << command;
|
||||
connect(thread,SIGNAL(signal_output(QString)),this,SLOT(updateProgress(QString)));
|
||||
thread->start();
|
||||
|
||||
|
||||
this->setDisabled(true);
|
||||
|
||||
/*
|
||||
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();*/
|
||||
|
||||
//qDebug() << "command: " << command;
|
||||
//qDebug() << "running";
|
||||
process->run_contains_empty(command, dev);
|
||||
//process->run_contains_empty(command, dev);
|
||||
|
||||
zipPath.clear();
|
||||
labelDisplay.clear();
|
||||
ui->filePaths->clear();
|
||||
|
||||
}
|
||||
|
||||
void sp_recovery::on_selectBtn_clicked()
|
||||
|
@ -84,3 +140,36 @@ void sp_recovery::on_selectBtn_clicked()
|
|||
|
||||
//qDebug() << "zipPathis:" << zipPath;
|
||||
}
|
||||
|
||||
void sp_recovery::on_showOutputBtn_clicked(bool checked)
|
||||
{
|
||||
qDebug() << "2";
|
||||
if(checked)
|
||||
{
|
||||
page = new standardOutputPage(NULL,process);
|
||||
qDebug() << "1";
|
||||
connect(process,SIGNAL(outputGet(QString)),page,SLOT(update(QString)));
|
||||
/*
|
||||
parents->mapToGlobal(parents->pos());
|
||||
page->move(parents->pos().x() + parents->width() + this->width()/2 + 22,0);*/
|
||||
//page->setWindowFlags(Qt::FramelessWindowHint);parents->pos().x() + parents->width() +this->width() + 22
|
||||
page->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "1?";
|
||||
page->~standardOutputPage();
|
||||
}
|
||||
}
|
||||
|
||||
void sp_recovery::updateProgress(QString s)
|
||||
{
|
||||
ui->progressBar->hide();
|
||||
ui->filePaths->clear();
|
||||
|
||||
qDebug() << "侧载已结束,请在设备上查看结果" << s;
|
||||
ui->output->setText("侧载已结束,请在设备上查看结果");
|
||||
ui->tips->setText("设备将退出侧载模式,请刷新设备列表以返回");
|
||||
ui->back_to_basePage->hide();
|
||||
this->setEnabled(true);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <QWidget>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include "adbprocess.h"
|
||||
#include "../standardoutputpage.h"
|
||||
#include "../../threads/adbthread.h"
|
||||
#include <QFileDialog>
|
||||
|
||||
namespace Ui {
|
||||
|
@ -23,6 +25,7 @@ public:
|
|||
void setDev(device dev);
|
||||
|
||||
adbProcess *process;
|
||||
adbThread * thread;
|
||||
|
||||
QString labelDisplay;
|
||||
|
||||
|
@ -31,10 +34,24 @@ private slots:
|
|||
|
||||
void on_selectBtn_clicked();
|
||||
|
||||
void on_showOutputBtn_clicked(bool checked);
|
||||
|
||||
void updateProgress(QString);
|
||||
|
||||
private:
|
||||
Ui::sp_recovery *ui;
|
||||
|
||||
QString zipPath;
|
||||
QString zipPath;
|
||||
|
||||
standardOutputPage *page = NULL;
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_runBtn;
|
||||
QGraphicsDropShadowEffect *shadowEffect_showOutputBtn;
|
||||
QGraphicsDropShadowEffect *shadowEffect_back_to_basePage;
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshBtn;
|
||||
QGraphicsDropShadowEffect *shadowEffect_selectBtn;
|
||||
QGraphicsDropShadowEffect *shadowEffect_output;
|
||||
QGraphicsDropShadowEffect *shadowEffect_tips;
|
||||
};
|
||||
|
||||
#endif // SP_RECOVERY_H
|
||||
|
|
|
@ -14,6 +14,15 @@
|
|||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
|
@ -25,6 +34,9 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -36,20 +48,20 @@ border:0px solid #BDBDBD;</string>
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
|
@ -81,6 +93,7 @@ image: url(:/ico/image/ico/refund-line.svg);</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
|
@ -120,7 +133,7 @@ border:0px solid #BDBDBD;</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Normal</family>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
|
@ -137,7 +150,13 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
<item>
|
||||
<widget class="QLabel" name="filePaths">
|
||||
<property name="font">
|
||||
<font/>
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:2px solid #BDBDBD;
|
||||
border-radius:4px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
@ -146,6 +165,66 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar{
|
||||
font:9pt;
|
||||
border-radius:4px;
|
||||
text-align:center;
|
||||
/*border:1px solid #E8EDF2;*/
|
||||
border:0px solid #E8EDF2;
|
||||
background-color: qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
|
||||
}
|
||||
QProgressBar:chunk{
|
||||
border-radius:4px;
|
||||
background-color:rgba(255,255,255,0.2);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="output">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -159,6 +238,31 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="tips">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
|
@ -304,6 +408,9 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -45,10 +45,17 @@ QWidget* sonPageManager::selector(QWidget *parent , QString parentName, int key,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
sp_dpiChanger* sonPageManager::createSonPageFor_devInfo(QWidget *parent, int key, device dev)
|
||||
QWidget* sonPageManager::createSonPageFor_devInfo(QWidget *parent, int key, device dev)
|
||||
{
|
||||
switch(key +1)
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
sp_wmsize *page = new sp_wmsize(parent);
|
||||
page->setDev(dev);
|
||||
return page;
|
||||
}
|
||||
|
||||
case 3:
|
||||
{
|
||||
sp_dpiChanger *page = new sp_dpiChanger(parent);
|
||||
|
@ -292,17 +299,6 @@ QWidget* sonPageManager::createSonPageFor_advanced(QWidget *parent, int key, dev
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "adbprocess.h"
|
||||
#include "textexplainer.h"
|
||||
#include "devInfo/sp_dpichanger.h"
|
||||
#include "devInfo/sp_wmsize.h"
|
||||
#include "activator/sp_activator.h"
|
||||
#include "apps/sp_installer.h"
|
||||
#include "apps/sp_permissiongroups.h"
|
||||
|
@ -32,7 +33,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
sp_dpiChanger* createSonPageFor_devInfo(QWidget *parent, int key, device dev);
|
||||
QWidget* createSonPageFor_devInfo(QWidget *parent, int key, device dev);
|
||||
sp_activator* createSonPageFor_activator(QWidget *parent, int key, device dev);
|
||||
QWidget* createSonPageFor_apps(QWidget *parent, int key, device dev);
|
||||
QWidget* createSonPageFor_devControl(QWidget *parent, int key, device dev);
|
||||
|
|
|
@ -11,7 +11,31 @@ standardOutputPage::standardOutputPage(QWidget *parent, adbProcess *cess) :
|
|||
QTimer *timer = new QTimer(this); //初始化一个定时器。
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(update())); //设置信号与槽 ,槽函数update()需要再类中声明一下。
|
||||
timer->start(1000 / 30); //设置定时器刷新频率,即变量刷新频率。
|
||||
ui->textBrowser->setText("该功能暂未实现,敬请期待!");
|
||||
ui->textBrowser->setText(text);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_textBrowser = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_textBrowser->setOffset(0,0);
|
||||
shadowEffect_textBrowser->setColor(Qt::gray);
|
||||
shadowEffect_textBrowser->setBlurRadius(5);
|
||||
ui->textBrowser->setGraphicsEffect(shadowEffect_textBrowser);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_refreshBtn->setOffset(0,0);
|
||||
shadowEffect_refreshBtn->setColor(Qt::gray);
|
||||
shadowEffect_refreshBtn->setBlurRadius(5);
|
||||
ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_copyBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_copyBtn->setOffset(0,0);
|
||||
shadowEffect_copyBtn->setColor(Qt::gray);
|
||||
shadowEffect_copyBtn->setBlurRadius(5);
|
||||
ui->copyBtn->setGraphicsEffect(shadowEffect_copyBtn);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_clearBtn = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_clearBtn->setOffset(0,0);
|
||||
shadowEffect_clearBtn->setColor(Qt::gray);
|
||||
shadowEffect_clearBtn->setBlurRadius(5);
|
||||
ui->clearBtn->setGraphicsEffect(shadowEffect_clearBtn);
|
||||
}
|
||||
|
||||
standardOutputPage::~standardOutputPage()
|
||||
|
@ -19,20 +43,22 @@ standardOutputPage::~standardOutputPage()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void standardOutputPage::update()
|
||||
void standardOutputPage::update(QString s)
|
||||
{
|
||||
ui->textBrowser->setText(process->standardOutput);
|
||||
qDebug() << "update:" << s;
|
||||
text.append(s);
|
||||
on_refreshBtn_clicked();
|
||||
}
|
||||
|
||||
void standardOutputPage::on_refreshBtn_clicked()
|
||||
{
|
||||
update();
|
||||
ui->textBrowser->setText(text);
|
||||
}
|
||||
|
||||
|
||||
void standardOutputPage::on_clearBtn_clicked()
|
||||
{
|
||||
ui->textBrowser->clear();
|
||||
text.clear();
|
||||
}
|
||||
|
||||
void standardOutputPage::on_copyBtn_clicked()
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QWidget>
|
||||
#include <QTimer>
|
||||
#include <QClipboard>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include "adbprocess.h"
|
||||
|
||||
namespace Ui {
|
||||
|
@ -18,12 +19,13 @@ public:
|
|||
explicit standardOutputPage(QWidget *parent = nullptr , adbProcess *cess = NULL);
|
||||
~standardOutputPage();
|
||||
adbProcess *process;
|
||||
QString text;
|
||||
|
||||
private:
|
||||
Ui::standardOutputPage *ui;
|
||||
|
||||
public slots:
|
||||
void update();
|
||||
void update(QString);
|
||||
private slots:
|
||||
void on_refreshBtn_clicked();
|
||||
void on_clearBtn_clicked();
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,255);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
|
@ -21,21 +24,14 @@
|
|||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="refreshBtn">
|
||||
<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);}
|
||||
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>refresh</string>
|
||||
</property>
|
||||
|
@ -43,6 +39,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearBtn">
|
||||
<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);}
|
||||
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>clear</string>
|
||||
</property>
|
||||
|
@ -50,6 +52,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="copyBtn">
|
||||
<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);}
|
||||
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>copy</string>
|
||||
</property>
|
||||
|
@ -58,7 +66,11 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser"/>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
|
5
QtAdb/styles.qrc
Normal file
5
QtAdb/styles.qrc
Normal file
|
@ -0,0 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>qss/scrollbar.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
|
@ -12,12 +12,22 @@ void adbThread::initThread(QString cmd, device d)
|
|||
explain = false;
|
||||
}
|
||||
|
||||
void adbThread::initThread(QString cmd, device d, QString key)
|
||||
void adbThread::initThread_timer(QString cmd, device d)
|
||||
{
|
||||
qDebug() << "d = " << d.model <<cmd << key;
|
||||
//refreshTimer = new QTimer(this);
|
||||
//connect(process,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(updateResult(int,QProcess::ExitStatus)));
|
||||
command = cmd;
|
||||
dev = d;
|
||||
qDebug() << "dev = " << dev.model;
|
||||
explain = false;
|
||||
//timer = true;
|
||||
}
|
||||
|
||||
void adbThread::initThread(QString cmd, device d, QString key)
|
||||
{
|
||||
//qDebug() << "d = " << d.model <<cmd << key;
|
||||
command = cmd;
|
||||
dev = d;
|
||||
//qDebug() << "dev = " << dev.model;
|
||||
explain = true;
|
||||
explainKey = key;
|
||||
}
|
||||
|
@ -28,46 +38,76 @@ void adbThread::run()
|
|||
process->thread = true;
|
||||
//qDebug() << "explainKey is " << explainKey;
|
||||
//sleep(3);
|
||||
if(explain == false)
|
||||
/*
|
||||
if(timer == true)
|
||||
{
|
||||
QString output = process->run(command,dev).simplified();
|
||||
emit signal_output(output);
|
||||
exit();
|
||||
//exec();
|
||||
qDebug() << "oid adbThread::run()-timer == true";
|
||||
connect(refreshTimer,SIGNAL(animationEnd()),this,SLOT(sendResult()));
|
||||
connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(updateResult()));
|
||||
process->run_contains_empty(command,dev);
|
||||
refreshTimer->start(200);
|
||||
}
|
||||
else
|
||||
{*/
|
||||
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(explainKey == "#CPU#")
|
||||
{
|
||||
QString output = explainer->explain_cpu_output(process->run(command, dev));
|
||||
emit signal_output(output);
|
||||
exit();
|
||||
}
|
||||
|
||||
else if(explainKey == "#PERMISSIONGROUPS#")
|
||||
{
|
||||
//qDebug() << "dev = " << &dev;
|
||||
QString output = process->run(command, dev);
|
||||
emit signal_output(output);
|
||||
exit();
|
||||
}
|
||||
else if(explainKey == "#PERMISSIONGROUPS#")
|
||||
{
|
||||
//qDebug() << "dev = " << &dev;
|
||||
QString output = process->run(command, dev);
|
||||
emit signal_output(output);
|
||||
exit();
|
||||
}
|
||||
|
||||
else if(explainKey == "#INSTALL#")
|
||||
{
|
||||
connect(process,SIGNAL(outputGet(QString)),this,SLOT(result(QString)));
|
||||
/*QString output = */process->run_contains_empty(command, dev);
|
||||
//emit signal_output(output);
|
||||
exit();
|
||||
}
|
||||
else if(explainKey == "#INSTALL#")
|
||||
{
|
||||
connect(process,SIGNAL(outputGet(QString)),this,SLOT(result(QString)));
|
||||
/*QString output = */process->run_contains_empty(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();
|
||||
}
|
||||
else if(explainKey == "#SIDELOAD#")
|
||||
{
|
||||
connect(process,SIGNAL(outputGet(QString)),this,SLOT(result(QString)));
|
||||
/*QString output = */process->run_contains_empty(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();
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
void adbThread::result(QString str)
|
||||
{
|
||||
emit signal_output(str);
|
||||
}
|
||||
|
||||
void adbThread::updateResult(int,QProcess::ExitStatus)
|
||||
{
|
||||
str_result = "#STD_OUT_PUT#:\n" + process->readAllStandardOutput() + "#STD_ERR#:\n" + process->readAllStandardError();
|
||||
}
|
||||
|
||||
void adbThread::sendResult()
|
||||
{
|
||||
emit regularResult(str_result);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef ADBTHREAD_H
|
||||
#define ADBTHREAD_H
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
#include "../textexplainer.h"
|
||||
#include "../adbprocess.h"
|
||||
#include <Windows.h>
|
||||
|
@ -13,21 +14,28 @@ public:
|
|||
|
||||
void initThread(QString cmd, device dev);
|
||||
void initThread(QString cmd, device dev, QString explainKey);
|
||||
void initThread_for_cpu(QString cmd, device dev);
|
||||
void initThread_timer(QString cmd, device dev);
|
||||
//void initThread(QString cmd, device dev);
|
||||
bool explain = false;
|
||||
bool timer = false;
|
||||
QString command;
|
||||
QString explainKey;
|
||||
device dev;
|
||||
QTimer *refreshTimer;
|
||||
|
||||
adbProcess *process;
|
||||
textExplainer *explainer;
|
||||
|
||||
QString str_result = "#NORESULTS#";
|
||||
signals:
|
||||
void signal_output(QString);
|
||||
void regularResult(QString);
|
||||
|
||||
public slots:
|
||||
void result(QString);
|
||||
void updateResult(int,QProcess::ExitStatus);
|
||||
void sendResult();
|
||||
//void timerEnd();
|
||||
|
||||
protected:
|
||||
void run() override;
|
||||
|
|
17
README.md
17
README.md
|
@ -31,7 +31,7 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
### ℹ️设备信息
|
||||
|
||||
- 获取设备型号、屏幕分辨率、屏幕密度(DPI)、Android Id、安卓版本以及处理器型号的信息
|
||||
- 修改 DPI
|
||||
- 修改 DPI、修改屏幕分辨率
|
||||
|
||||
### ✔️激活
|
||||
|
||||
|
@ -68,11 +68,18 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
- 列出系统的所有功能
|
||||
- 列出当前设备支持的所有库
|
||||
|
||||
### 🔧Recovery 功能:
|
||||
|
||||
- 侧载
|
||||
- 当设备处于 adb sideload 模式时,可使用侧载刷入zip刷机包
|
||||
- **这是危险功能,即使正确地使用也可能导致设备故障,请确保您有足够的排障能力后使用**
|
||||
- **使用侧载功能时请不要关闭程序**
|
||||
|
||||
### 💣不稳定功能
|
||||
|
||||
- ~~*安装应用*~~ *暂未实现错误提示细节*
|
||||
|
||||
- *侧载:未实现进度条且侧载不稳定,**不建议使用该功能**,可能导致刷入失败,无法开机*~~(我经历过)~~
|
||||
- ~~*侧载:未实现进度条且侧载不稳定,**不建议使用该功能**,可能导致刷入失败,无法开机*~~ 已实现稳定运行
|
||||
|
||||
### *🍘饼*
|
||||
|
||||
|
@ -88,14 +95,14 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
- ~~页面切换加载进度条~~
|
||||
- ~~页面切换动画效果~~
|
||||
- ~~安装应用进度条~~
|
||||
- 侧载进度条
|
||||
- ~~侧载进度条~~
|
||||
- 命令
|
||||
- 获取 Google 服务框架 Android ID
|
||||
- 更改屏幕分辨率
|
||||
- ~~更改屏幕分辨率~~
|
||||
- 更改屏幕边距
|
||||
- 控制台
|
||||
- ~~唤起 adb shell 窗口~~
|
||||
- 显示输出
|
||||
- ~~显示输出~~
|
||||
- 优化 err 处理
|
||||
- Fastboot
|
||||
- 可实现完整的刷机流程
|
||||
|
|
Loading…
Reference in New Issue
Block a user