增加大量功能
|
@ -16,21 +16,28 @@ SOURCES += \
|
|||
indexlistitem.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
monitor.cpp \
|
||||
pagelistitem.cpp \
|
||||
pagemaker.cpp \
|
||||
sonPages/activator/sp_activator.cpp \
|
||||
sonPages/advanced/sp_accounts.cpp \
|
||||
sonPages/advanced/sp_captive_portal.cpp \
|
||||
sonPages/advanced/sp_customize_cmd.cpp \
|
||||
sonPages/advanced/sp_scales.cpp \
|
||||
sonPages/advanced/sp_status_bar.cpp \
|
||||
sonPages/apps/sp_features.cpp \
|
||||
sonPages/apps/sp_installer.cpp \
|
||||
sonPages/apps/sp_libraries.cpp \
|
||||
sonPages/apps/sp_packages.cpp \
|
||||
sonPages/apps/sp_permissiongroups.cpp \
|
||||
sonPages/apps/sp_permissions.cpp \
|
||||
sonPages/apps/sp_users.cpp \
|
||||
sonPages/apps/tp_packageprofile.cpp \
|
||||
sonPages/devControl/btnemulator.cpp \
|
||||
sonPages/devControl/sp_devcontrol_power.cpp \
|
||||
sonPages/devInfo/sp_dpichanger.cpp \
|
||||
sonPages/devInfo/sp_wmsize.cpp \
|
||||
sonPages/links.cpp \
|
||||
sonPages/pay.cpp \
|
||||
sonPages/recovery/sp_recovery.cpp \
|
||||
sonPages/sonpagebase.cpp \
|
||||
|
@ -39,6 +46,7 @@ SOURCES += \
|
|||
textexplainer.cpp \
|
||||
threads/adbthread.cpp \
|
||||
threads/thread_createpage.cpp \
|
||||
threads/thread_monitor.cpp \
|
||||
usb_listener.cpp \
|
||||
welcomepage.cpp
|
||||
|
||||
|
@ -49,21 +57,28 @@ HEADERS += \
|
|||
basepage.h \
|
||||
indexlistitem.h \
|
||||
mainwindow.h \
|
||||
monitor.h \
|
||||
pagelistitem.h \
|
||||
pagemaker.h \
|
||||
sonPages/activator/sp_activator.h \
|
||||
sonPages/advanced/sp_accounts.h \
|
||||
sonPages/advanced/sp_captive_portal.h \
|
||||
sonPages/advanced/sp_customize_cmd.h \
|
||||
sonPages/advanced/sp_scales.h \
|
||||
sonPages/advanced/sp_status_bar.h \
|
||||
sonPages/apps/sp_features.h \
|
||||
sonPages/apps/sp_installer.h \
|
||||
sonPages/apps/sp_libraries.h \
|
||||
sonPages/apps/sp_packages.h \
|
||||
sonPages/apps/sp_permissiongroups.h \
|
||||
sonPages/apps/sp_permissions.h \
|
||||
sonPages/apps/sp_users.h \
|
||||
sonPages/apps/tp_packageprofile.h \
|
||||
sonPages/devControl/btnemulator.h \
|
||||
sonPages/devControl/sp_devcontrol_power.h \
|
||||
sonPages/devInfo/sp_dpichanger.h \
|
||||
sonPages/devInfo/sp_wmsize.h \
|
||||
sonPages/links.h \
|
||||
sonPages/pay.h \
|
||||
sonPages/recovery/sp_recovery.h \
|
||||
sonPages/sonpagebase.h \
|
||||
|
@ -72,6 +87,7 @@ HEADERS += \
|
|||
textexplainer.h \
|
||||
threads/adbthread.h \
|
||||
threads/thread_createpage.h \
|
||||
threads/thread_monitor.h \
|
||||
usb_listener.h \
|
||||
welcomepage.h
|
||||
|
||||
|
@ -80,20 +96,27 @@ FORMS += \
|
|||
basepage.ui \
|
||||
indexlistitem.ui \
|
||||
mainwindow.ui \
|
||||
monitor.ui \
|
||||
pagelistitem.ui \
|
||||
sonPages/activator/sp_activator.ui \
|
||||
sonPages/advanced/sp_accounts.ui \
|
||||
sonPages/advanced/sp_captive_portal.ui \
|
||||
sonPages/advanced/sp_customize_cmd.ui \
|
||||
sonPages/advanced/sp_scales.ui \
|
||||
sonPages/advanced/sp_status_bar.ui \
|
||||
sonPages/apps/sp_features.ui \
|
||||
sonPages/apps/sp_installer.ui \
|
||||
sonPages/apps/sp_libraries.ui \
|
||||
sonPages/apps/sp_packages.ui \
|
||||
sonPages/apps/sp_permissiongroups.ui \
|
||||
sonPages/apps/sp_permissions.ui \
|
||||
sonPages/apps/sp_users.ui \
|
||||
sonPages/apps/tp_packageprofile.ui \
|
||||
sonPages/devControl/btnemulator.ui \
|
||||
sonPages/devControl/sp_devcontrol_power.ui \
|
||||
sonPages/devInfo/sp_dpichanger.ui \
|
||||
sonPages/devInfo/sp_wmsize.ui \
|
||||
sonPages/links.ui \
|
||||
sonPages/pay.ui \
|
||||
sonPages/recovery/sp_recovery.ui \
|
||||
sonPages/sonpagebase.ui \
|
||||
|
|
|
@ -51,9 +51,15 @@ about::about(QWidget *parent) :
|
|||
shadowEffect_btn_version->setOffset(0,0);
|
||||
shadowEffect_btn_version->setColor(Qt::gray);
|
||||
shadowEffect_btn_version->setBlurRadius(5);
|
||||
|
||||
ui->btn_version->setGraphicsEffect(shadowEffect_btn_version);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_btn_links = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_btn_links->setOffset(0,0);
|
||||
shadowEffect_btn_links->setColor(Qt::gray);
|
||||
shadowEffect_btn_links->setBlurRadius(5);
|
||||
ui->btn_links->setGraphicsEffect(shadowEffect_btn_links);
|
||||
|
||||
|
||||
ui->btn_money->hide();
|
||||
ui->btn_money_3->hide();
|
||||
ui->btn_money_4->hide();
|
||||
|
@ -92,3 +98,10 @@ void about::on_btn_money_2_clicked()
|
|||
payPage->show();
|
||||
}
|
||||
|
||||
|
||||
void about::on_btn_links_clicked()
|
||||
{
|
||||
links *linksPage = new links();
|
||||
linksPage->show();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "basepage.h"
|
||||
#include "sonPages/pay.h"
|
||||
#include "animationwidget.h"
|
||||
#include "sonPages/links.h"
|
||||
|
||||
namespace Ui {
|
||||
class about;
|
||||
|
@ -29,6 +30,8 @@ private slots:
|
|||
|
||||
void on_btn_money_2_clicked();
|
||||
|
||||
void on_btn_links_clicked();
|
||||
|
||||
private:
|
||||
Ui::about *ui;
|
||||
};
|
||||
|
|
|
@ -6,20 +6,14 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>644</width>
|
||||
<height>496</height>
|
||||
<width>634</width>
|
||||
<height>465</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
|
@ -45,6 +39,9 @@ background-color: rgba(255, 255, 255, 0);</string>
|
|||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
|
@ -54,7 +51,7 @@ background-color: rgba(255, 255, 255, 0);</string>
|
|||
<number>14</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>11</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
|
@ -108,11 +105,12 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>测试版本:beta-v0.6</string>
|
||||
<string>测试版本:beta-v1.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -170,11 +168,12 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>网站:https://lapplandsp.github.io/QtAdb-pages/</string>
|
||||
<string>官方网站:https://lapplandsp.github.io/QtAdb-pages/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -232,6 +231,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
|
@ -294,6 +294,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
|
@ -304,6 +305,57 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_links">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<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="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/link.svg</normaloff>:/ico/image/ico/link.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>相关链接</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
|
@ -461,6 +513,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
|||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
|
|
|
@ -15,14 +15,14 @@ void animationWidget::playLoadAnimation()
|
|||
qDebug() << "wgtHeight = " << wgtHeight;
|
||||
if(parent->width() <= 600)
|
||||
{
|
||||
animation->setEndValue(QRect(301, 117 - 6, 600,wgtHeight));
|
||||
animation->setEndValue(QRect(301 - 30, 117 - 6 - 11, 600,wgtHeight));
|
||||
}
|
||||
else
|
||||
{
|
||||
animation->setEndValue(QRect(301, 117 - 6, parent->width(),wgtHeight));
|
||||
animation->setEndValue(QRect(301 - 30, 117 - 6 - 11, parent->width(),wgtHeight));
|
||||
}
|
||||
//animation->setStartValue(QPoint(301 + 50,117));
|
||||
animation->setStartValue(QRect(301 + 50, 117 - 6, parent->width()-50,wgtHeight));
|
||||
animation->setStartValue(QRect(301 + 50 - 30, 117 - 6 - 11, parent->width()-50,wgtHeight));
|
||||
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
|
||||
|
@ -38,14 +38,14 @@ void animationWidget::playLoadAnimation(int h)
|
|||
//qDebug() << "wgtHeight = " << wgtHeight;
|
||||
if(parent->width() <= 600)
|
||||
{
|
||||
animation->setEndValue(QRect(301, 117 - 6, 600,h));
|
||||
animation->setEndValue(QRect(301 - 30, 117 - 6 -11, 600,h));
|
||||
}
|
||||
else
|
||||
{
|
||||
animation->setEndValue(QRect(301, 117 - 6, parent->width(),h));
|
||||
animation->setEndValue(QRect(301 - 30, 117 - 6 - 11, parent->width(),h));
|
||||
}
|
||||
//animation->setStartValue(QPoint(301 + 50,117));
|
||||
animation->setStartValue(QRect(301 + 50, 117 - 6, parent->width()-50,h));
|
||||
animation->setStartValue(QRect(301 + 50 - 30, 117 - 6 - 11, parent->width()-50,h));
|
||||
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
|
||||
|
|
|
@ -72,6 +72,12 @@
|
|||
<file>image/ico/logo.svg</file>
|
||||
<file>image/ico/code-s-slash-line.svg</file>
|
||||
<file>image/ico/share-box-line.svg</file>
|
||||
<file>image/ico/user-line.svg</file>
|
||||
<file>image/ico/user-settings-line.svg</file>
|
||||
<file>image/ico/signal-wifi-error-line.svg</file>
|
||||
<file>image/ico/donut-chart-line.svg</file>
|
||||
<file>image/ico/layout-top-2-line.svg</file>
|
||||
<file>image/ico/stack-line.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/test">
|
||||
<file>image/test/back.png</file>
|
||||
|
@ -88,5 +94,37 @@
|
|||
<file>image/activatorApps/island.png</file>
|
||||
<file>image/activatorApps/shizuku.png</file>
|
||||
<file>image/activatorApps/taichi.png</file>
|
||||
<file>image/activatorApps/scene5.png</file>
|
||||
<file>image/activatorApps/watchfps.png</file>
|
||||
<file>image/activatorApps/permissiondog.png</file>
|
||||
<file>image/activatorApps/hail.png</file>
|
||||
<file>image/activatorApps/bg.png</file>
|
||||
<file>image/activatorApps/apkinstaller.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/linkIcons">
|
||||
<file>image/webicons/android.png</file>
|
||||
<file>image/webicons/cheri.png</file>
|
||||
<file>image/webicons/crd.png</file>
|
||||
<file>image/webicons/dot.png</file>
|
||||
<file>image/webicons/evoX.png</file>
|
||||
<file>image/webicons/havoc.png</file>
|
||||
<file>image/webicons/nus.png</file>
|
||||
<file>image/webicons/OF.png</file>
|
||||
<file>image/webicons/OFlogo.svg</file>
|
||||
<file>image/webicons/paranoid.png</file>
|
||||
<file>image/webicons/pp.png</file>
|
||||
<file>image/webicons/projectarcana.png</file>
|
||||
<file>image/webicons/rr.png</file>
|
||||
<file>image/webicons/spark.svg</file>
|
||||
<file>image/webicons/syb.png</file>
|
||||
<file>image/webicons/twrp.png</file>
|
||||
<file>image/webicons/atmb.png</file>
|
||||
<file>image/webicons/jamcz.png</file>
|
||||
<file>image/webicons/los.png</file>
|
||||
<file>image/webicons/lsposed.png</file>
|
||||
<file>image/webicons/magisk.png</file>
|
||||
<file>image/webicons/pe.png</file>
|
||||
<file>image/webicons/scrcpy.svg</file>
|
||||
<file>image/webicons/MIUI.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
QtAdb/image/activatorApps/apkinstaller.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
QtAdb/image/activatorApps/bg.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
QtAdb/image/activatorApps/hail.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
QtAdb/image/activatorApps/permissiondog.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
QtAdb/image/activatorApps/scene5.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
QtAdb/image/activatorApps/watchfps.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
1
QtAdb/image/ico/donut-chart-line.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M11 2.05v2.012C7.054 4.554 4 7.92 4 12c0 4.418 3.582 8 8 8 1.849 0 3.55-.627 4.906-1.68l1.423 1.423C16.605 21.153 14.4 22 12 22 6.477 22 2 17.523 2 12c0-5.185 3.947-9.449 9-9.95zM21.95 13c-.2 2.011-.994 3.847-2.207 5.328l-1.423-1.422c.86-1.107 1.436-2.445 1.618-3.906h2.013zM13.002 2.05c4.724.469 8.48 4.226 8.95 8.95h-2.013c-.451-3.618-3.319-6.486-6.937-6.938V2.049z"/></svg>
|
After Width: | Height: | Size: 505 B |
1
QtAdb/image/ico/layout-top-2-line.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M21 3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm-1 2H4v14h16V5zm-2 2v2H6V7h12z"/></svg>
|
After Width: | Height: | Size: 241 B |
1
QtAdb/image/ico/signal-wifi-error-line.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M12 3c4.284 0 8.22 1.497 11.31 3.996l-1.257 1.556C19.306 6.331 15.808 5 12 5c-3.089 0-5.973.875-8.419 2.392L12 17.817l6-7.429v3.183L12 21 .69 6.997C3.78 4.497 7.714 3 12 3zm10 16v2h-2v-2h2zm0-9v7h-2v-7h2z"/></svg>
|
After Width: | Height: | Size: 342 B |
1
QtAdb/image/ico/stack-line.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M20.083 15.2l1.202.721a.5.5 0 0 1 0 .858l-8.77 5.262a1 1 0 0 1-1.03 0l-8.77-5.262a.5.5 0 0 1 0-.858l1.202-.721L12 20.05l8.083-4.85zm0-4.7l1.202.721a.5.5 0 0 1 0 .858L12 17.65l-9.285-5.571a.5.5 0 0 1 0-.858l1.202-.721L12 15.35l8.083-4.85zm-7.569-9.191l8.771 5.262a.5.5 0 0 1 0 .858L12 13 2.715 7.429a.5.5 0 0 1 0-.858l8.77-5.262a1 1 0 0 1 1.03 0zM12 3.332L5.887 7 12 10.668 18.113 7 12 3.332z"/></svg>
|
After Width: | Height: | Size: 529 B |
1
QtAdb/image/ico/user-line.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M4 22a8 8 0 1 1 16 0h-2a6 6 0 1 0-12 0H4zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4z"/></svg>
|
After Width: | Height: | Size: 298 B |
1
QtAdb/image/ico/user-settings-line.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 14v2a6 6 0 0 0-6 6H4a8 8 0 0 1 8-8zm0-1c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm2.595 7.812a3.51 3.51 0 0 1 0-1.623l-.992-.573 1-1.732.992.573A3.496 3.496 0 0 1 17 14.645V13.5h2v1.145c.532.158 1.012.44 1.405.812l.992-.573 1 1.732-.992.573a3.51 3.51 0 0 1 0 1.622l.992.573-1 1.732-.992-.573a3.496 3.496 0 0 1-1.405.812V22.5h-2v-1.145a3.496 3.496 0 0 1-1.405-.812l-.992.573-1-1.732.992-.572zM18 19.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"/></svg>
|
After Width: | Height: | Size: 651 B |
BIN
QtAdb/image/webicons/MIUI.png
Normal file
After Width: | Height: | Size: 561 B |
BIN
QtAdb/image/webicons/OF.png
Normal file
After Width: | Height: | Size: 645 B |
17
QtAdb/image/webicons/OFlogo.svg
Normal file
|
@ -0,0 +1,17 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Copyright © fordownloads, 2020 · OrangeFox Recovery -->
|
||||
<linearGradient id="lg_a" x1="24" x2="30" y1="32" y2="36" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#e90600"/>
|
||||
<stop offset="1" stop-color="#ff931e"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="lg_b" x1="20" x2="28" y1="20" y2="28" xlink:href="#lg_a"/>
|
||||
<linearGradient id="lg_c" x1="16" x2="36" y1="16" y2="36" xlink:href="#lg_a"/>
|
||||
<linearGradient id="lg_d" x1="12" x2="24" y1="20" y2="20" xlink:href="#lg_a"/>
|
||||
<linearGradient id="lg_e" x1="8" x2="54" y1="32" y2="32" xlink:href="#lg_a" gradientTransform="rotate(45 24 15)" />
|
||||
<path fill="url(#lg_a)" d="M28.12 38.33c-.08 0-.16 0-.24-.02-.76-.08-1.39-.6-1.63-1.33l-.05-.16c-.1-.28-.22-.6-.5-1.83a15.2 15.2 0 01-.31-2.05c-.04-.43-.11-1.31.6-1.87.39-.3.87-.4 1.43-.28.99.18 1.66.85 1.9 1.13 1.27 1.49 1.04 3.33.92 4.33-.06.49-.26.85-.44 1.14-.35.59-1 .94-1.68.94zm.33-2.08z"/>
|
||||
<path fill="url(#lg_b)" d="M27.38 27.5a8.78 8.78 0 01-3.2-.63c-1.37-.54-2.6-1.3-3.8-2.02-.3-.18-.52-.31-.76-.42-.62-.28-.86-.12-1.08.1-.19.18-.4.34-.68.5a1.16 1.16 0 01-1.17-2l.24-.16c.99-.96 2.28-1.16 3.63-.55.3.13.6.3.96.51 1.23.75 2.32 1.42 3.5 1.88 1 .39 1.94.53 2.87.45.13-.01.26-.04.4-.07-.1-.27-.2-.49-.31-.66a1.16 1.16 0 111.93-1.27c.27.41.5.9.68 1.5a1.95 1.95 0 01-1.25 2.52 4.9 4.9 0 01-1.96.32zm1-2.15h.01-.01z"/>
|
||||
<path fill="url(#lg_c)" d="M21.6 39.54a1.87 1.87 0 01-1.73-1.14 7.36 7.36 0 01-.66-2.45l-.02.42c-.02.53-.16 1.01-.27 1.4-.27.98-1.4 1.41-2.27 1.2a2.25 2.25 0 01-1.56-1.35 6.18 6.18 0 01-.45-1.46 19.22 19.22 0 01-.23-3.23 12 12 0 00-.43-3.46c-.12-.46-.27-.92-.41-1.38-.16-.5-.31-.99-.44-1.5a1.16 1.16 0 112.24-.58c.12.47.27.93.41 1.4l.44 1.48a14.12 14.12 0 01.5 4.01l.04 1.06c.03.65.08 1.18.14 1.65l.05-1.87.02-1c0-.13 0-.24.03-.34l.02-.13c.06-.42.15-.99.59-1.5.64-.78 1.35-.8 1.82-.68.7.17 1.2.68 1.37 1.38l.08.35c.11.44.22.88.3 1.33l.18 1.43c.06.46.12.93.2 1.4v-.05c.05-.65.08-1.3.1-1.95l.07-1.15c.05-.94.49-1.71 1.23-2.18 1-.62 2.15-.87 3.35-.73.5.06.95.2 1.41.33a5.85 5.85 0 013.39 2.58c.32.53.62 1.08.91 1.63l.48.88.05.1.24.43c-.44-1.28-.9-2.55-1.36-3.82l-.4-1.08-.91-2.5a2.5 2.5 0 01.86-2.87c.18-.13.35-.26.51-.4l.22-.2c.23-.19.45-.37.61-.56.34-.38.52-.8.58-1.33.08-.81.06-1.42-.06-1.96a5.7 5.7 0 00-.94-2.03 19.8 19.8 0 00-2.25-2.57 11.13 11.13 0 01-1.72-2.27 4.68 4.68 0 01-.62-3.33l.25-1.13.05-.23c-.33.2-.67.44-1.03.74a4.91 4.91 0 00-1.8 3.89c-.02.95.25 1.85.8 2.7.57.86 1.16 1.7 1.75 2.55l.65.92.64.9c.44.62.88 1.24 1.3 1.87a1.16 1.16 0 11-1.94 1.27c-.4-.6-.82-1.2-1.24-1.8l-.66-.91-.64-.92c-.6-.86-1.22-1.73-1.8-2.61a7.04 7.04 0 01-1.18-4 7.2 7.2 0 012.63-5.63 7.74 7.74 0 013.45-1.77c.72-.11 1.13.2 1.33.39.19.2.49.62.37 1.32-.06.33-.14.66-.22 1l-.2.85c-.09.35-.17.7-.24 1.06-.11.56 0 1.1.35 1.72a8.8 8.8 0 001.37 1.8c.94.95 1.78 1.83 2.5 2.87a7.93 7.93 0 011.3 2.85c.18.8.2 1.62.1 2.7-.1 1-.48 1.88-1.15 2.63-.27.3-.58.57-.84.8l-.2.16c-.22.2-.46.38-.7.55a.24.24 0 00-.02.18l.92 2.5.4 1.09c.48 1.34.97 2.68 1.43 4.03.2.55.25 1.12.28 1.66.05.74-.27 1.43-.86 1.84-.58.4-1.33.47-2 .17a2.5 2.5 0 01-1.03-.88c-.33-.49-.62-1-.9-1.51l-.05-.1-.5-.92c-.27-.5-.54-1.02-.84-1.5a3.55 3.55 0 00-2.1-1.58c-.35-.11-.7-.21-1-.25a2.76 2.76 0 00-1.85.4c-.04.03-.14.08-.15.34l-.06 1.12c-.03.68-.06 1.36-.12 2.04l-.01.28c-.04.55-.08 1.23-.43 1.9-.12.25-.27.5-.52.73-.36.33-.83.51-1.3.51zm-3.05-7.53zm9.4-23.9z"/>
|
||||
<path fill="url(#lg_d)" d="M14.25 27.46c-.5 0-.96-.32-1.1-.82a10.85 10.85 0 01-.38-4.59c.23-1.66.9-3.34 1.87-4.74 1.37-1.95 3.59-3.67 4.95-3.84.62-.08 1.01.14 1.24.33.65.57.46 1.36.37 1.74-.08.33-.16.66-.05 1.1.03.15.14.58.5.93.13.12.61.54 1.15.55l.2-.01c.33-.02.95-.06 1.46.46.3.32.63.9.37 1.91a3.68 3.68 0 01-2.16 2.42 3.78 3.78 0 01-2.73-.04c-.43-.13-.64-.18-.78-.12-.1.05-.49.3-.75 1.54a1.16 1.16 0 01-2.27-.5c.36-1.66 1.08-2.73 2.12-3.17.93-.4 1.76-.14 2.36.04.55.17.82.24 1.18.1.2-.08.38-.21.5-.36a4.26 4.26 0 01-3.52-4.02 9.8 9.8 0 00-2.24 2.26 8.52 8.52 0 00-1.18 7.33 1.16 1.16 0 01-1.11 1.5z"/>
|
||||
<path fill="url(#lg_e)" d="M24 47.16a23 23 0 01-16.38-6.79A23 23 0 01.84 24 23 23 0 017.63 7.62a1.16 1.16 0 011.63 1.64A20.7 20.7 0 003.16 24a20.7 20.7 0 006.1 14.74A20.7 20.7 0 0024 44.84a20.7 20.7 0 0014.74-6.1 1.16 1.16 0 111.63 1.64A23 23 0 0124 47.16z"/>
|
||||
<path fill="#e90600" d="M39.56 40.71c-.3 0-.6-.1-.82-.34a1.16 1.16 0 010-1.63A20.7 20.7 0 0044.84 24a20.7 20.7 0 00-6.1-14.74A20.7 20.7 0 0024 3.16a20.7 20.7 0 00-14.74 6.1 1.16 1.16 0 01-1.63-1.64A23 23 0 0124 .84a23 23 0 0116.38 6.79A23 23 0 0147.16 24a23 23 0 01-6.79 16.38c-.22.22-.52.33-.81.33z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
BIN
QtAdb/image/webicons/android.png
Normal file
After Width: | Height: | Size: 202 B |
BIN
QtAdb/image/webicons/atmb.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
QtAdb/image/webicons/cheri.png
Normal file
After Width: | Height: | Size: 434 B |
BIN
QtAdb/image/webicons/crd.png
Normal file
After Width: | Height: | Size: 491 B |
BIN
QtAdb/image/webicons/dot.png
Normal file
After Width: | Height: | Size: 563 B |
BIN
QtAdb/image/webicons/evoX.png
Normal file
After Width: | Height: | Size: 240 B |
BIN
QtAdb/image/webicons/havoc.png
Normal file
After Width: | Height: | Size: 297 B |
BIN
QtAdb/image/webicons/jamcz.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
QtAdb/image/webicons/los.png
Normal file
After Width: | Height: | Size: 207 B |
BIN
QtAdb/image/webicons/lsposed.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
QtAdb/image/webicons/magisk.png
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
QtAdb/image/webicons/nus.png
Normal file
After Width: | Height: | Size: 271 B |
BIN
QtAdb/image/webicons/paranoid.png
Normal file
After Width: | Height: | Size: 241 KiB |
BIN
QtAdb/image/webicons/pe.png
Normal file
After Width: | Height: | Size: 372 B |
BIN
QtAdb/image/webicons/pp.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
QtAdb/image/webicons/projectarcana.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
QtAdb/image/webicons/rr.png
Normal file
After Width: | Height: | Size: 281 B |
16
QtAdb/image/webicons/scrcpy.svg
Normal file
|
@ -0,0 +1,16 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" version="1.1">
|
||||
<path style="opacity:0.2" d="m 16.846877,12 c -1.116351,0 -2.227419,0.912229 -2.015075,2 l 3.122973,16 -5.596557,11.109375 C 11.959876,41.871734 11.885244,42.336988 12.177176,43 c 0.278672,0.632897 0.998812,1 1.747448,1 H 24 34.075375 c 0.748637,0 1.468777,-0.367103 1.747448,-1 0.291932,-0.663012 0.217302,-1.128266 -0.181041,-1.890625 L 30.045225,30 33.168198,14 c 0.212344,-1.087771 -0.898724,-2 -2.015075,-2 H 24 Z"/>
|
||||
<path style="fill:#cccccc" d="m 16.846877,11 c -1.116351,0 -2.227419,0.912229 -2.015075,2 l 3.122973,16 -5.596557,11.109375 C 11.959876,40.871734 11.885244,41.336988 12.177176,42 c 0.278672,0.632897 0.998812,1 1.747448,1 H 24 34.075375 c 0.748637,0 1.468777,-0.367103 1.747448,-1 0.291932,-0.663012 0.217302,-1.128266 -0.181041,-1.890625 L 30.045225,29 33.168198,13 c 0.212344,-1.087771 -0.898724,-2 -2.015075,-2 H 24 Z"/>
|
||||
<rect style="opacity:0.2" width="40" height="32" x="4" y="6" rx="2" ry="2"/>
|
||||
<path style="fill:#e4e4e4" d="m 4,33 v 2 c 0,1.108 0.892,2 2,2 h 36 c 1.108,0 2,-0.892 2,-2 v -2 z"/>
|
||||
<path style="opacity:0.1" d="m 11.494141,15 a 1.5,1.5 0 0 0 -0.832032,0.255859 1.5,1.5 0 0 0 -0.40625,2.082032 l 3.13086,4.654297 C 10.404945,24.606192 8.4012371,28.299159 8.0019531,32.460938 7.9284599,34.000879 9.5546875,34 9.5546875,34 H 38.40625 c 0,0 1.672856,-3.38e-4 1.591797,-1.617188 -0.416529,-4.131451 -2.415618,-7.796833 -5.380859,-10.394531 l 3.126953,-4.65039 a 1.5,1.5 0 0 0 -0.40625,-2.082032 1.5,1.5 0 0 0 -1.125,-0.228515 1.5,1.5 0 0 0 -0.957032,0.634765 l -3.072265,4.566407 C 29.78649,18.814887 26.990024,18 24.001953,18 c -2.989385,0 -5.786177,0.815488 -8.183594,2.230469 l -3.074218,-4.56836 A 1.5,1.5 0 0 0 11.787109,15.027344 1.5,1.5 0 0 0 11.494141,15 Z"/>
|
||||
<path style="fill:#077063" d="M 6,5 C 4.892,5 4,5.892 4,7 V 33 H 44 V 7 C 44,5.892 43.108,5 42,5 Z"/>
|
||||
<path style="opacity:0.1;fill:#ffffff" d="M 6,5 C 4.892,5 4,5.892 4,7 V 8 C 4,6.892 4.892,6 6,6 h 36 c 1.108,0 2,0.892 2,2 V 7 C 44,5.892 43.108,5 42,5 Z"/>
|
||||
<path style="fill:none;stroke:#30dd81;stroke-width:3;stroke-linecap:round" d="M 15.1998,21.000026 11.5,15.5"/>
|
||||
<path style="fill:none;stroke:#30dd81;stroke-width:3;stroke-linecap:round" d="M 32.799764,21.000026 36.5,15.5"/>
|
||||
<path style="fill:#30dd81" d="m 24.002386,17.000034 c -8.355868,0 -15.2214979,6.346843 -15.9999669,14.460906 C 7.9289259,33.000882 9.5544999,33 9.5544999,33 H 38.406003 c 0,0 1.672201,-3.35e-4 1.591142,-1.617185 C 39.182807,23.305596 32.331836,17.000034 24.002386,17.000034 Z"/>
|
||||
<path style="opacity:0.2" d="m 16,25 a 1.9999959,1.9999959 0 0 0 -2,2 1.9999959,1.9999959 0 0 0 2,2 1.9999959,1.9999959 0 0 0 2,-2 1.9999959,1.9999959 0 0 0 -2,-2 z m 16,0 a 1.9999959,1.9999959 0 0 0 -2,2 1.9999959,1.9999959 0 0 0 2,2 1.9999959,1.9999959 0 0 0 2,-2 1.9999959,1.9999959 0 0 0 -2,-2 z"/>
|
||||
<path style="fill:#ffffff" d="M 15.999996,24.000008 A 1.9999959,1.9999959 0 0 1 17.999992,26.000004 1.9999959,1.9999959 0 0 1 15.999996,28 1.9999959,1.9999959 0 0 1 14,26.000004 1.9999959,1.9999959 0 0 1 15.999996,24.000008 Z"/>
|
||||
<path style="fill:#ffffff" d="M 31.999996,24.000008 A 1.9999959,1.9999959 0 0 1 33.999991,26.000004 1.9999959,1.9999959 0 0 1 31.999996,28 1.9999959,1.9999959 0 0 1 30,26.000004 1.9999959,1.9999959 0 0 1 31.999996,24.000008 Z"/>
|
||||
<path style="fill:#ffffff;opacity:0.2" d="M 11.494141 14 A 1.5 1.5 0 0 0 10.662109 14.255859 A 1.5 1.5 0 0 0 10.115234 16.001953 A 1.5 1.5 0 0 1 10.662109 15.255859 A 1.5 1.5 0 0 1 11.494141 15 A 1.5 1.5 0 0 1 11.787109 15.027344 A 1.5 1.5 0 0 1 12.744141 15.662109 L 15.818359 20.230469 C 18.215776 18.815488 21.012568 18 24.001953 18 C 26.990024 18 29.78649 18.814887 32.183594 20.228516 L 35.255859 15.662109 A 1.5 1.5 0 0 1 36.212891 15.027344 A 1.5 1.5 0 0 1 37.337891 15.255859 A 1.5 1.5 0 0 1 37.910156 16.001953 A 1.5 1.5 0 0 0 37.337891 14.255859 A 1.5 1.5 0 0 0 36.212891 14.027344 A 1.5 1.5 0 0 0 35.255859 14.662109 L 32.183594 19.228516 C 29.78649 17.814887 26.990024 17 24.001953 17 C 21.012568 17 18.215776 17.815488 15.818359 19.230469 L 12.744141 14.662109 A 1.5 1.5 0 0 0 11.787109 14.027344 A 1.5 1.5 0 0 0 11.494141 14 z M 35.033203 21.369141 L 34.617188 21.988281 C 37.477056 24.493668 39.433905 27.993356 39.943359 31.945312 C 39.986866 31.783283 40.008864 31.598575 39.998047 31.382812 C 39.601372 27.448291 37.768055 23.938648 35.033203 21.369141 z M 12.970703 21.373047 C 10.220358 23.959215 8.3822757 27.496796 8.0019531 31.460938 C 7.9920657 31.668114 8.0150508 31.844846 8.0585938 32 C 8.5570234 28.027243 10.515755 24.509049 13.386719 21.992188 L 12.970703 21.373047 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
3
QtAdb/image/webicons/spark.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg width="235" height="235" viewBox="0 0 235 235" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M108.396 1.68253C104.296 2.98253 98.2956 8.18252 92.8956 15.3825C84.2956 26.7825 76.0956 30.6825 64.3956 28.6825C46.0956 25.6825 35.1956 29.4825 29.3956 40.9825C26.5956 46.6825 26.0956 54.8825 27.9956 65.0825C29.8956 75.5825 25.7956 85.5825 16.8956 91.9825C3.39564 101.583 -0.704361 108.483 0.0956394 119.583C0.695639 128.083 3.39564 132.183 13.1956 140.183C26.7956 151.183 29.8956 157.283 27.9956 169.683C24.8956 189.483 28.6956 199.583 41.6956 205.683C45.9956 207.783 47.1956 207.883 55.8956 207.083C79.6956 205.083 81.1956 205.683 96.0956 223.583C102.296 231.183 107.196 233.883 114.996 234.483C125.296 235.283 131.596 231.883 139.496 221.383C150.596 206.583 154.296 205.183 177.096 207.183C188.696 208.183 193.396 206.783 199.396 200.883C206.596 193.783 208.496 184.683 205.796 170.283C203.696 158.783 207.796 149.783 218.996 141.683C230.096 133.583 234.296 126.983 234.196 117.683C234.096 108.083 229.596 100.883 219.596 93.7825C207.496 85.2825 203.996 77.3825 205.996 63.5825C208.396 46.7825 205.296 37.2825 195.496 31.1825C191.496 28.7825 189.296 28.1825 183.496 27.8825C179.596 27.6825 173.896 27.8825 170.896 28.3825C157.296 30.4825 149.296 26.8825 140.396 14.7825C137.696 10.9825 133.296 6.48253 130.696 4.68253C126.596 1.78253 124.8 0.319882 118.5 0.0198822C114.5 -0.180118 109.996 1.18253 108.396 1.68253ZM134.696 56.3825C134.996 58.6825 129.896 75.8825 123.296 94.9825C121.396 100.483 119.896 105.083 119.896 105.283C119.896 105.483 126.996 105.683 135.796 105.683C153.596 105.683 155.296 106.283 152.996 111.483C150.296 117.183 113.096 175.583 109.596 179.383C107.096 182.183 105.296 182.283 103.996 179.883C102.996 177.883 104.696 170.283 112.996 140.783C115.196 132.983 116.896 126.283 116.596 126.083C116.396 125.883 107.996 125.383 97.7956 124.983C80.2956 124.183 79.3956 124.083 79.0956 122.183C78.7956 119.983 95.4956 97.2825 116.696 70.9825C123.096 62.9825 128.896 55.7825 129.396 55.0825C130.896 52.8825 134.296 53.7825 134.696 56.3825Z" fill="#252525"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
BIN
QtAdb/image/webicons/syb.png
Normal file
After Width: | Height: | Size: 241 B |
BIN
QtAdb/image/webicons/twrp.png
Normal file
After Width: | Height: | Size: 554 B |
|
@ -1,4 +1,5 @@
|
|||
#include "mainwindow.h"
|
||||
#include "qobjectdefs.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
/*
|
||||
|
@ -46,6 +47,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
//connect(listener, SIGNAL(DevicePlugOut()),this,SLOT(DevicePlugOut()));
|
||||
connect(listener, SIGNAL(DeviceChanged()),this,SLOT(refreshDevListLater()));
|
||||
connect(this, SIGNAL(adbDeviceChanged()),this,SLOT(DeviceChanged()));
|
||||
|
||||
qApp->installNativeEventFilter(listener);
|
||||
|
||||
//listener->EmitMySignal();
|
||||
|
@ -63,6 +65,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
initBasePage(6);
|
||||
currentPage->playLoadAnimation(427);
|
||||
lock();
|
||||
|
||||
reset_monitorBars();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -89,17 +93,17 @@ void MainWindow::refreshDevList() //方法:刷新设备列
|
|||
//ui->comboBox->clear();
|
||||
/*DEBUG*/
|
||||
bool changed = false;
|
||||
qDebug() << "******************一次调用*********************";
|
||||
qDebug() << "refreshDevList devList is empty? " << devList.isEmpty() << QTime::currentTime();
|
||||
qDebug() << "devList.size()" << devList.size();
|
||||
//qDebug() << "******************一次调用*********************";
|
||||
//qDebug() << "refreshDevList devList is empty? " << devList.isEmpty() << QTime::currentTime();
|
||||
//qDebug() << "devList.size()" << devList.size();
|
||||
|
||||
for(int i = 0; i < devList.size();i++)
|
||||
{
|
||||
qDebug() << "devList[" << i << "] is :" << devList[i].addr;
|
||||
//qDebug() << "devList[" << i << "] is :" << devList[i].addr;
|
||||
}
|
||||
|
||||
/*DEBUG_END*/
|
||||
qDebug() << "shit 0";
|
||||
//qDebug() << "shit 0";
|
||||
bool devList_is_empty = devList.isEmpty();
|
||||
|
||||
QList<device> tmpList;
|
||||
|
@ -109,7 +113,7 @@ void MainWindow::refreshDevList() //方法:刷新设备列
|
|||
{
|
||||
for(int i = 0; i < devList.size();i++)
|
||||
{
|
||||
qDebug() << "shit 3.1";
|
||||
//qDebug() << "shit 3.1";
|
||||
device dev;
|
||||
dev.device_debug = devList[i].device_debug;
|
||||
dev.device_product = devList[i].device_product;
|
||||
|
@ -120,12 +124,12 @@ void MainWindow::refreshDevList() //方法:刷新设备列
|
|||
tmpList.append(dev);
|
||||
}
|
||||
}
|
||||
qDebug() << "tmpList.size()" << tmpList.size();
|
||||
//qDebug() << "tmpList.size()" << tmpList.size();
|
||||
|
||||
//ui->comboBox->clear();
|
||||
devList.clear(); //清空设备列表
|
||||
devList = explainer->getDevList_windows(process->run("adb devices -l")); //重新赋值
|
||||
qDebug() << "devList after explain:" << devList.isEmpty();
|
||||
//qDebug() << "devList after explain:" << devList.isEmpty();
|
||||
|
||||
/*
|
||||
qDebug() << "shit 1";
|
||||
|
@ -175,7 +179,7 @@ void MainWindow::refreshDevList() //方法:刷新设备列
|
|||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "else:" << devList.isEmpty() << tmpList.isEmpty() << devList_is_empty;
|
||||
//qDebug() << "else:" << devList.isEmpty() << tmpList.isEmpty() << devList_is_empty;
|
||||
}
|
||||
|
||||
QList<int> off; //未响应设备索引
|
||||
|
@ -188,7 +192,7 @@ void MainWindow::refreshDevList() //方法:刷新设备列
|
|||
{
|
||||
QString devItem = devList[i].state + " " + explainer->get_words_after(devList[i].model, ":") + " " + devList[i].addr;
|
||||
l.append(devItem);
|
||||
qDebug() << "l[" << i << "] = " << l[i];
|
||||
//qDebug() << "l[" << i << "] = " << l[i];
|
||||
if(devList[i].state == "[未响应]")
|
||||
{
|
||||
off.append(i);
|
||||
|
@ -201,14 +205,14 @@ void MainWindow::refreshDevList() //方法:刷新设备列
|
|||
|
||||
if(changed)
|
||||
{
|
||||
qDebug() <<"changed so clear";
|
||||
//qDebug() <<"changed so clear";
|
||||
ui->comboBox->clear();
|
||||
ui->comboBox->addItems(l);
|
||||
}
|
||||
|
||||
if(!liangYi)
|
||||
{
|
||||
qDebug() <<"liangYi so clear";
|
||||
//qDebug() <<"liangYi so clear";
|
||||
ui->comboBox->clear();
|
||||
ui->comboBox->addItems(l);
|
||||
}
|
||||
|
@ -232,11 +236,25 @@ void MainWindow::refreshDevList() //方法:刷新设备列
|
|||
|
||||
liangYi = false;
|
||||
|
||||
qDebug() << "******************一次调用结束*********************";
|
||||
//qDebug() << "******************一次调用结束*********************";
|
||||
}
|
||||
|
||||
void MainWindow::on_refreshButton_clicked() //槽:按下刷新按钮
|
||||
{
|
||||
if(thread_mon != NULL)
|
||||
{
|
||||
//siXiangTimer->stop();
|
||||
siXiangTimer->deleteLater();
|
||||
siXiangTimer = NULL;
|
||||
qDebug() <<"thread_mon != NULL";
|
||||
qDebug() <<"disconnect";
|
||||
thread_mon->disconnect();
|
||||
qDebug() <<"exit()";
|
||||
thread_mon->quit();
|
||||
qDebug() <<"deleteLater()";
|
||||
//thread_mon->deleteLater();
|
||||
}
|
||||
|
||||
refreshDevList();
|
||||
|
||||
lock();
|
||||
|
@ -248,12 +266,45 @@ void MainWindow::on_refreshButton_clicked() //槽:按下刷新按钮
|
|||
}*/
|
||||
|
||||
initBasePage(6);
|
||||
reset_monitorBars();
|
||||
}
|
||||
|
||||
void MainWindow::setCurrentDevice(int index) //槽:改变所选设备
|
||||
{
|
||||
qDebug() <<"MainWindow:if";
|
||||
|
||||
if(thread_mon != NULL && siXiangTimer != NULL)
|
||||
{
|
||||
qDebug() <<"stop";
|
||||
//siXiangTimer->stop();
|
||||
qDebug() <<"delete";
|
||||
siXiangTimer->deleteLater();
|
||||
qDebug() <<"=NULL";
|
||||
siXiangTimer = NULL;
|
||||
qDebug() <<"thread_mon != NULL";
|
||||
qDebug() <<"disconnect";
|
||||
thread_mon->disconnect();
|
||||
qDebug() <<"exit()";
|
||||
thread_mon->quit();
|
||||
qDebug() <<"deleteLater()";
|
||||
thread_mon->deleteLater();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(index >= 0)
|
||||
{
|
||||
qDebug() <<"NEW";
|
||||
siXiangTimer = new QTimer();
|
||||
thread_mon = new thread_monitor(devList[current_device]);
|
||||
qDebug() <<"CONNECT";
|
||||
connect(siXiangTimer,SIGNAL(timeout()),thread_mon,SLOT(getInfo()));
|
||||
connect(thread_mon,SIGNAL(signal_monitor(float,float)),this,SLOT(slot_update_monitor(float,float)));
|
||||
qDebug() <<"START";
|
||||
thread_mon->start();
|
||||
siXiangTimer->start(2000);
|
||||
ui->progressBar_CPU->setRange(0,100);
|
||||
ui->progressBar_RAM->setRange(0,100);
|
||||
|
||||
if(currentPage != NULL)
|
||||
{
|
||||
|
@ -371,7 +422,7 @@ void MainWindow::addIndexItems() //方法:初始化向index
|
|||
|
||||
//:/ico/image/ico/code-s-slash-line.svg //05
|
||||
indexListItem *advanced = new indexListItem(this->ui->indexList);
|
||||
advanced->setText("高级");
|
||||
advanced->setText("其它");
|
||||
advanced->setPic("image:url(:/ico/image/ico/code-s-slash-line.svg);background-color:rgba(255,255,255,0);");
|
||||
addItemToIndex(advanced);
|
||||
|
||||
|
@ -430,7 +481,7 @@ void MainWindow::setStyles() //方法:设置样式
|
|||
ui->refreshButton->setStyleSheet("QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;}"
|
||||
"QPushButton:hover{background-color:rgba(255,255,255,0.7);}"
|
||||
"QPushButton:pressed{background-color:rgba(255,255,255,0.6);}");
|
||||
ui->iconLabel->setStyleSheet("background-color:transparent;");
|
||||
//ui->iconLabel->setStyleSheet("background-color:transparent;");
|
||||
ui->fakeSpacer->setStyleSheet("background-color:transparent;");
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshButton = new QGraphicsDropShadowEffect(this);
|
||||
|
@ -458,11 +509,17 @@ void MainWindow::setStyles() //方法:设置样式
|
|||
shadowEffect_cmdBtn->setColor(Qt::gray);
|
||||
shadowEffect_cmdBtn->setBlurRadius(5);
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_monitor = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect_monitor->setOffset(0,0);
|
||||
shadowEffect_monitor->setColor(Qt::gray);
|
||||
shadowEffect_monitor->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);
|
||||
ui->widget_monitor->setGraphicsEffect(shadowEffect_monitor);
|
||||
}
|
||||
|
||||
void MainWindow::initSonPage(int key) //槽:生成子页面
|
||||
|
@ -588,7 +645,7 @@ void MainWindow::on_WIFIBtn_clicked() //槽:弹出无线调试
|
|||
|
||||
connect(getInfoBtn,SIGNAL(clicked()),this,SLOT(connectWIFIDev()));
|
||||
getInfo->show();
|
||||
qDebug() << "size is " << getInfo->geometry();
|
||||
//qDebug() << "size is " << getInfo->geometry();
|
||||
}
|
||||
|
||||
void MainWindow::connectWIFIDev() //槽:连接无线调试设备
|
||||
|
@ -714,3 +771,24 @@ void MainWindow::refreshDevListLater()
|
|||
timer->start(1000);
|
||||
//timer->deleteLater();
|
||||
}
|
||||
|
||||
void MainWindow::slot_update_monitor(float cpu_useage, float mem_useage)
|
||||
{
|
||||
//qDebug() << "cpu_useage is " <<cpu_useage ;
|
||||
//qDebug() << "mem_useage" << mem_useage;
|
||||
|
||||
int cpu_credit = (int)(cpu_useage*100);
|
||||
//qDebug() << "cpu_credit" << cpu_credit;
|
||||
ui->progressBar_CPU->setValue(cpu_credit);
|
||||
|
||||
int mem_credit = (int)(mem_useage*100);
|
||||
//qDebug() << "mem_credit" << mem_credit;
|
||||
ui->progressBar_RAM->setValue(mem_credit);
|
||||
}
|
||||
|
||||
void MainWindow::reset_monitorBars()
|
||||
{
|
||||
//qDebug() << "reset";
|
||||
ui->progressBar_CPU->setValue(0);
|
||||
ui->progressBar_RAM->setValue(0);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "pagemaker.h"
|
||||
#include "about.h"
|
||||
#include "usb_listener.h"
|
||||
#include "threads/thread_monitor.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QStringList>
|
||||
|
@ -95,18 +96,24 @@ private:
|
|||
bool firstBoot = true;
|
||||
QTimer *taiChiTimer;
|
||||
QTimer *baguaTimer;
|
||||
QTimer *siXiangTimer = NULL;
|
||||
|
||||
basePage * currentPage;
|
||||
animationWidget * tmpPage;
|
||||
about * WCMPage2;
|
||||
usb_listener *listener;
|
||||
|
||||
thread_monitor *thread_mon = NULL;
|
||||
|
||||
|
||||
public slots:
|
||||
void DevicePlugIn();
|
||||
void DevicePlugOut();
|
||||
void DeviceChanged();
|
||||
void slot_refreshDevList();
|
||||
void refreshDevListLater();
|
||||
void slot_update_monitor(float,float);
|
||||
void reset_monitorBars();
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
@ -18,8 +18,11 @@
|
|||
/*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="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
|
@ -29,9 +32,12 @@
|
|||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="2,0,10">
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,10">
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="iconLabel">
|
||||
<widget class="QWidget" name="widget_monitor" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
|
@ -44,74 +50,236 @@
|
|||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="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>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}\nQPushButton:hover{background-color:rgba(255,255,255,0.7);</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_CPU">
|
||||
<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 Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_RAM">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RAM</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar_CPU">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar{
|
||||
font:9pt;
|
||||
border-radius:10px;
|
||||
text-align:center;
|
||||
/*border:1px solid #E8EDF2;*/
|
||||
border:0px solid #E8EDF2;
|
||||
background-color: rgba(255,255,255,0);
|
||||
}
|
||||
QProgressBar:chunk{
|
||||
border-radius:10px;
|
||||
background-color:qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar_RAM">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar{
|
||||
font:9pt;
|
||||
border-radius:10px;
|
||||
text-align:center;
|
||||
/*border:1px solid #E8EDF2;*/
|
||||
border:0px solid #E8EDF2;
|
||||
background-color: rgba(255,255,255,0);
|
||||
}
|
||||
QProgressBar:chunk{
|
||||
border-radius:10px;
|
||||
background-color:qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>210</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>210</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="refreshButton">
|
||||
<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="toolTip">
|
||||
<string><html><head/><body><p>刷新设备列表</p></body></html></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/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>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>210</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>210</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="refreshButton">
|
||||
<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="toolTip">
|
||||
<string><html><head/><body><p>刷新设备列表</p></body></html></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/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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="indexList">
|
||||
<property name="minimumSize">
|
||||
|
@ -140,13 +308,13 @@
|
|||
<widget class="QLabel" name="fakeSpacer">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<width>0</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -163,7 +331,7 @@
|
|||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>16</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>16</number>
|
||||
|
|
14
QtAdb/monitor.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include "monitor.h"
|
||||
#include "ui_monitor.h"
|
||||
|
||||
monitor::monitor(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::monitor)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
monitor::~monitor()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
QtAdb/monitor.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef MONITOR_H
|
||||
#define MONITOR_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class monitor;
|
||||
}
|
||||
|
||||
class monitor : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit monitor(QWidget *parent = nullptr);
|
||||
~monitor();
|
||||
|
||||
private:
|
||||
Ui::monitor *ui;
|
||||
};
|
||||
|
||||
#endif // MONITOR_H
|
137
QtAdb/monitor.ui
Normal file
|
@ -0,0 +1,137 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>monitor</class>
|
||||
<widget class="QWidget" name="monitor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>574</width>
|
||||
<height>85</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_CPU">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_RAM">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RAM</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar_CPU">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar{
|
||||
font:9pt;
|
||||
border-radius:0px;
|
||||
text-align:center;
|
||||
/*border:1px solid #E8EDF2;*/
|
||||
border:0px solid #E8EDF2;
|
||||
background-color: rgba(255,255,255,0.8);
|
||||
}
|
||||
QProgressBar:chunk{
|
||||
border-radius:0px;
|
||||
background-color:qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar_RAM">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>9</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar{
|
||||
font:9pt;
|
||||
border-radius:0px;
|
||||
text-align:center;
|
||||
/*border:1px solid #E8EDF2;*/
|
||||
border:0px solid #E8EDF2;
|
||||
background-color: rgba(255,255,255,0.8);
|
||||
}
|
||||
QProgressBar:chunk{
|
||||
border-radius:0px;
|
||||
background-color:qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -265,7 +265,7 @@ basePage* pageMaker::createPage_acvitator(QWidget *parent, device dev)
|
|||
activator->isBasePage = true;
|
||||
//activatorPage *activator = new activatorPage(parent);
|
||||
activator->whoYouAre("activator");
|
||||
int val[20] = {1,2,3,4,5,6,7,8,9};
|
||||
int val[20] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
|
||||
activator->setEnableValue(val);
|
||||
activator->setDev(dev);
|
||||
|
||||
|
@ -323,6 +323,55 @@ basePage* pageMaker::createPage_acvitator(QWidget *parent, device dev)
|
|||
Island->setSelectable();
|
||||
activator->addItemsToList(Island);
|
||||
|
||||
pageListItem *scene = new pageListItem(activator);
|
||||
scene->setText("Scene","adb shell sh /data/user/0/com.omarea.vtools/files/up.sh");
|
||||
scene->setPic(":/activatorApps/image/activatorApps/scene5.png");
|
||||
scene->setSelectable();
|
||||
activator->addItemsToList(scene);
|
||||
|
||||
pageListItem *watchfps = new pageListItem(activator);
|
||||
watchfps->setText("看帧数+","adb shell sh /sdcard/Download/watchfps/watchfps.sh");
|
||||
watchfps->setPic(":/activatorApps/image/activatorApps/watchfps.png");
|
||||
watchfps->setSelectable();
|
||||
activator->addItemsToList(watchfps);
|
||||
|
||||
pageListItem *permissiondog = new pageListItem(activator);
|
||||
permissiondog->setText("权限狗","adb shell sh /storage/emulated/0/Android/data/com.web1n.permissiondog/files/starter.sh");
|
||||
permissiondog->setPic(":/activatorApps/image/activatorApps/permissiondog.png");
|
||||
permissiondog->setSelectable();
|
||||
activator->addItemsToList(permissiondog);
|
||||
|
||||
pageListItem *hail = new pageListItem(activator);
|
||||
hail->setText("雹","adb shell dpm set-device-owner com.aistra.hail/.receiver.DeviceAdminReceiver");
|
||||
hail->setPic(":/activatorApps/image/activatorApps/hail.png");
|
||||
hail->setSelectable();
|
||||
activator->addItemsToList(hail);
|
||||
|
||||
pageListItem *bg_useage = new pageListItem(activator);
|
||||
bg_useage->setText("BatteryGuru - 使用情况访问权限","adb shell pm grant com.paget96.batteryguru android.permission.PACKAGE_USAGE_STATS");
|
||||
bg_useage->setPic(":/activatorApps/image/activatorApps/bg.png");
|
||||
bg_useage->setSelectable();
|
||||
activator->addItemsToList(bg_useage);
|
||||
|
||||
pageListItem *bg_secure = new pageListItem(activator); //15
|
||||
bg_secure->setText("BatteryGuru - 修改安全系统设置","adb shell pm grant com.paget96.batteryguru android.permission.WRITE_SECURE_SETTINGS");
|
||||
bg_secure->setPic(":/activatorApps/image/activatorApps/bg.png");
|
||||
bg_secure->setSelectable();
|
||||
activator->addItemsToList(bg_secure);
|
||||
|
||||
pageListItem *bg_dump = new pageListItem(activator);
|
||||
bg_dump->setText("BatteryGuru - 读取 DUMP","adb shell pm grant com.paget96.batteryguru android.permission.DUMP");
|
||||
bg_dump->setPic(":/activatorApps/image/activatorApps/bg.png");
|
||||
bg_dump->setSelectable();
|
||||
activator->addItemsToList(bg_dump);
|
||||
|
||||
pageListItem *apkInstaller = new pageListItem(activator);
|
||||
apkInstaller->setText("安装狮","adb shell dpm set-device-owner com.modosa.apkinstaller/.receiver.AdminReceiver");
|
||||
apkInstaller->setPic(":/activatorApps/image/activatorApps/apkinstaller.png");
|
||||
apkInstaller->setSelectable();
|
||||
activator->addItemsToList(apkInstaller);
|
||||
|
||||
|
||||
return activator;
|
||||
}
|
||||
|
||||
|
@ -332,7 +381,7 @@ basePage* pageMaker::createPage_apps(QWidget *parent, device dev)
|
|||
apps->isBasePage = true;
|
||||
//activatorPage *activator = new activatorPage(parent);
|
||||
apps->whoYouAre("apps");
|
||||
int val[20] = {1,2,3,4,5,6};
|
||||
int val[20] = {1,2,3,4,5,6,7};
|
||||
apps->setEnableValue(val);
|
||||
apps->setDev(dev);
|
||||
|
||||
|
@ -368,10 +417,16 @@ basePage* pageMaker::createPage_apps(QWidget *parent, device dev)
|
|||
|
||||
pageListItem *libraries = new pageListItem(apps);
|
||||
libraries->setText("库","adb shell pm list libraries");
|
||||
libraries->setPic(":/ico/image/ico/btnEmulator/menu-line.svg");
|
||||
libraries->setPic(":/ico/image/ico/stack-line.svg");
|
||||
libraries->setSelectable();
|
||||
apps->addItemsToList(libraries);
|
||||
|
||||
pageListItem *users = new pageListItem(apps);
|
||||
users->setText("用户","adb shell pm list users");
|
||||
users->setPic(":/ico/image/ico/user-line.svg");
|
||||
users->setSelectable();
|
||||
apps->addItemsToList(users);
|
||||
|
||||
return apps;
|
||||
}
|
||||
|
||||
|
@ -447,7 +502,7 @@ basePage* pageMaker::createPage_advanced(QWidget *parent, device dev)
|
|||
advanced->isBasePage = true;
|
||||
//activatorPage *activator = new activatorPage(parent);
|
||||
advanced->whoYouAre("advanced");
|
||||
int val[20] = {1};
|
||||
int val[20] = {1,2,3,4,5};
|
||||
advanced->setEnableValue(val);
|
||||
advanced->setDev(dev);
|
||||
|
||||
|
@ -457,6 +512,31 @@ basePage* pageMaker::createPage_advanced(QWidget *parent, device dev)
|
|||
customize_command->setSelectable();
|
||||
advanced->addItemsToList(customize_command);
|
||||
|
||||
pageListItem *accounts = new pageListItem(advanced);
|
||||
accounts->setText("账户","adb shell dumpsys account");
|
||||
accounts->setPic(":/ico/image/ico/user-settings-line.svg");
|
||||
accounts->setSelectable();
|
||||
advanced->addItemsToList(accounts);
|
||||
|
||||
pageListItem *captive_portal = new pageListItem(advanced);
|
||||
captive_portal->setText("去除叹号","adb shell settings put global captive_portal_http_url <server avilable>");
|
||||
captive_portal->setPic(":/ico/image/ico/signal-wifi-error-line.svg");
|
||||
captive_portal->setSelectable();
|
||||
advanced->addItemsToList(captive_portal);
|
||||
|
||||
pageListItem *scales = new pageListItem(advanced);
|
||||
scales->setText("过渡动画","adb shell settings put global <animation type>");
|
||||
scales->setPic(":/ico/image/ico/donut-chart-line.svg");
|
||||
scales->setSelectable();
|
||||
advanced->addItemsToList(scales);
|
||||
|
||||
pageListItem *status_bar = new pageListItem(advanced);
|
||||
status_bar->setText("状态栏与导航栏","adb shell settings put secure icon_blacklist <icon name>");
|
||||
status_bar->setPic(":/ico/image/ico/layout-top-2-line.svg");
|
||||
status_bar->setSelectable();
|
||||
advanced->addItemsToList(status_bar);
|
||||
|
||||
//:/ico/image/ico/layout-top-2-line.svg
|
||||
/*
|
||||
pageListItem *btnEmulate = new pageListItem(recovery);
|
||||
btnEmulate->setText("按键模拟","adb shell input keyevent <key>");
|
||||
|
|
|
@ -46,6 +46,7 @@ sp_activator::sp_activator(QWidget *parent) :
|
|||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->textBrowser->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
ui->textBrowser->setTextInteractionFlags(Qt::NoTextInteraction);
|
||||
}
|
||||
|
||||
sp_activator::~sp_activator()
|
||||
|
|
109
QtAdb/sonPages/advanced/sp_accounts.cpp
Normal file
|
@ -0,0 +1,109 @@
|
|||
#include "sp_accounts.h"
|
||||
#include "ui_sp_accounts.h"
|
||||
|
||||
sp_accounts::sp_accounts(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::sp_accounts)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setParent(parent);
|
||||
|
||||
ui->progressBar->hide();
|
||||
ui->listView->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
|
||||
thread = new adbThread();
|
||||
process = new adbProcess();
|
||||
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
|
||||
|
||||
connect(thread,SIGNAL(signal_output(QString)),this,SLOT(refresh_tableView(QString)));
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_deleteBtn = new QGraphicsDropShadowEffect(this);
|
||||
|
||||
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_deleteBtn->setOffset(0,0);
|
||||
shadowEffect_deleteBtn->setColor(Qt::gray);
|
||||
shadowEffect_deleteBtn->setBlurRadius(5);
|
||||
|
||||
ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
|
||||
ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
|
||||
ui->pushButton->setGraphicsEffect(shadowEffect_deleteBtn);
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->listView->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
on_refreshBtn_clicked();
|
||||
}
|
||||
|
||||
sp_accounts::~sp_accounts()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void sp_accounts::on_refreshBtn_clicked()
|
||||
{
|
||||
thread->initThread("adb shell dumpsys account",dev,"#PERMISSIONGROUPS#");
|
||||
ui->progressBar->setVisible(true);
|
||||
thread->start();
|
||||
}
|
||||
|
||||
void sp_accounts::refresh_tableView(QString s)
|
||||
{
|
||||
QStandardItemModel* emptyModel = new QStandardItemModel(this);
|
||||
ui->listView->setModel(emptyModel);
|
||||
//thread->exit();
|
||||
//qDebug() << "before";
|
||||
QStringList accountsList = explainer->explainAccounts(s);
|
||||
//qDebug() << "after";
|
||||
QStandardItemModel* model = new QStandardItemModel(this);
|
||||
if(!accountsList.isEmpty())
|
||||
{
|
||||
for(int i = 0; i < accountsList.count(); i++)
|
||||
{
|
||||
//qDebug() << "permissionList.count() = " << permissionList.count() <<"\nbefore index out of range: \n i = " << i << "\n permissionList[i] = "<< permissionList[i];
|
||||
if(accountsList[i] != "")
|
||||
{
|
||||
model->setItem(i,0,new QStandardItem(accountsList[i].simplified()));
|
||||
}
|
||||
}
|
||||
ui->listView->setModel(model);
|
||||
this->update();
|
||||
}
|
||||
ui->progressBar->setVisible(false);
|
||||
delete emptyModel;
|
||||
}
|
||||
|
||||
void sp_accounts::setDev(device device)
|
||||
{
|
||||
dev = device;
|
||||
on_refreshBtn_clicked();
|
||||
}
|
||||
|
||||
void sp_accounts::on_pushButton_clicked()
|
||||
{
|
||||
/*
|
||||
QString user_id = explainer->get_words_before(explainer->get_words_after(ui->listView->model()->data(ui->listView->currentIndex()).toString(), "{"), ":");
|
||||
QMessageBox::StandardButton result=QMessageBox::question(NULL, "删除用户","您确定要删除用户吗?");
|
||||
qDebug() << "result =" << result;
|
||||
if(result == QMessageBox::Yes)
|
||||
{
|
||||
if(user_id == "Users")
|
||||
{
|
||||
QMessageBox::information(NULL, "选择错误","请选择一个用户,而不是标题");
|
||||
}
|
||||
else
|
||||
{
|
||||
process->run("adb shell pm remove-user " + user_id ,dev);
|
||||
qDebug() << "user_id:" << user_id;
|
||||
}
|
||||
}*/
|
||||
//qDebug() << "clicked";
|
||||
}
|
45
QtAdb/sonPages/advanced/sp_accounts.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#ifndef SP_ACCOUNTS_H
|
||||
#define SP_ACCOUNTS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
//#include <QAbstractItemView>
|
||||
#include "../../threads/adbthread.h"
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
|
||||
namespace Ui {
|
||||
class sp_accounts;
|
||||
}
|
||||
|
||||
class sp_accounts : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit sp_accounts(QWidget *parent = nullptr);
|
||||
~sp_accounts();
|
||||
|
||||
device dev;
|
||||
void setDev(device dev);
|
||||
|
||||
private slots:
|
||||
void on_refreshBtn_clicked();
|
||||
|
||||
void on_pushButton_clicked();
|
||||
|
||||
public slots:
|
||||
void refresh_tableView(QString);
|
||||
|
||||
|
||||
private:
|
||||
Ui::sp_accounts *ui;
|
||||
|
||||
adbProcess *process;
|
||||
adbThread *thread;
|
||||
textExplainer *explainer;
|
||||
};
|
||||
|
||||
|
||||
#endif // SP_ACCOUNTS_H
|
263
QtAdb/sonPages/advanced/sp_accounts.ui
Normal file
|
@ -0,0 +1,263 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>sp_accounts</class>
|
||||
<widget class="QWidget" name="sp_accounts">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>686</width>
|
||||
<height>542</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<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>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
image: url(:/ico/image/ico/user-settings-line.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="title">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>所有账户</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<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>-1</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListView" name="listView">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>根据信息卸载或停用相应应用,即可移除账户</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="back_to_basePage">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<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="refreshBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</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>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
157
QtAdb/sonPages/advanced/sp_captive_portal.cpp
Normal file
|
@ -0,0 +1,157 @@
|
|||
#include "sp_captive_portal.h"
|
||||
#include "ui_sp_captive_portal.h"
|
||||
|
||||
sp_captive_portal::sp_captive_portal(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::sp_captive_portal)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setParent(parent);
|
||||
|
||||
process = new adbProcess();
|
||||
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
|
||||
|
||||
setShadow(ui->label);
|
||||
setShadow(ui->label_3);
|
||||
setShadow(ui->label_5);
|
||||
setShadow(ui->android_version);
|
||||
setShadow(ui->back_to_basePage);
|
||||
setShadow(ui->current_server);
|
||||
//setShadow(ui->delete_directly);
|
||||
setShadow(ui->restore);
|
||||
setShadow(ui->modify);
|
||||
//setShadow(ui->comboBox);
|
||||
setShadow(ui->pushButton);
|
||||
|
||||
QStringList serverLists;
|
||||
serverLists.append("connect.rom.miui.com/generate_204");
|
||||
serverLists.append("connectivitycheck.platform.hicloud.com/generate_204");
|
||||
serverLists.append("wifi.vivo.com.cn/generate_204");
|
||||
serverLists.append("www.qualcomm.cn/generate_204");
|
||||
serverLists.append("edge.microsoft.com/captiveportal/generate_204");
|
||||
serverLists.append("cp.cloudflare.com/generate_204");
|
||||
serverLists.append("g.cn/generate_204");
|
||||
serverLists.append("google.cn/generate_204");
|
||||
serverLists.append("dl.google.com/generate_204");
|
||||
serverLists.append("google.com");
|
||||
ui->comboBox->addItems(serverLists);
|
||||
|
||||
|
||||
refresh();
|
||||
//process->run("adb shell settings get secure android_id", dev).simplified();
|
||||
}
|
||||
|
||||
sp_captive_portal::~sp_captive_portal()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void sp_captive_portal::setDev(device device)
|
||||
{
|
||||
dev = device;
|
||||
}
|
||||
|
||||
void sp_captive_portal::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);
|
||||
}
|
||||
|
||||
void sp_captive_portal::refresh()
|
||||
{
|
||||
ui->android_version->setText(process->run("adb shell getprop ro.build.version.release", dev).simplified());
|
||||
QString ver = ui->android_version->text().simplified().simplified()[0];
|
||||
if(ver.toInt() < 7 && ver.toInt() >= 5)
|
||||
{
|
||||
ui->current_server->setVisible(true);
|
||||
ui->label->setVisible(true);
|
||||
//adb shell settings get global captive_portal_server
|
||||
ui->current_server->setText(process->run("adb shell settings get global captive_portal_server", dev).simplified());
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->current_server->setVisible(false);
|
||||
ui->label->setVisible(false);
|
||||
}
|
||||
|
||||
|
||||
ui->comboBox->setPlaceholderText("服务器未选择");
|
||||
ui->comboBox->setCurrentIndex(-1);
|
||||
}
|
||||
|
||||
void sp_captive_portal::on_modify_clicked()
|
||||
{
|
||||
if(ui->comboBox->currentIndex() >= 0)
|
||||
{
|
||||
QMessageBox::StandardButton result=QMessageBox::question(NULL, "修改","您确定要将验证服务器修改为" + ui->comboBox->currentText() + "吗?");
|
||||
if(result)
|
||||
{
|
||||
QString ver = ui->android_version->text().simplified().simplified()[0];
|
||||
if(ver.toInt() < 7 && ver.toInt() >= 5)
|
||||
{
|
||||
//adb shell settings put global captive_portal_server
|
||||
QString cmd = "adb shell settings put global captive_portal_server ";
|
||||
cmd.append("http://");
|
||||
cmd.append(ui->comboBox->currentText());
|
||||
qDebug() << "cmd = " << cmd;
|
||||
process->run(cmd, dev);
|
||||
}
|
||||
else
|
||||
{
|
||||
QString cmd_http = "adb shell settings put global captive_portal_http_url ";
|
||||
cmd_http.append("http://");
|
||||
cmd_http.append(ui->comboBox->currentText());
|
||||
|
||||
QString cmd_https = "adb shell settings put global captive_portal_https_url ";
|
||||
cmd_https.append("https://");
|
||||
cmd_https.append(ui->comboBox->currentText());
|
||||
process->run(cmd_http, dev);
|
||||
process->run(cmd_https,dev);
|
||||
}
|
||||
QMessageBox::information(NULL, "修改","已修改");
|
||||
|
||||
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->comboBox->setPlaceholderText("服务器未选择");
|
||||
}
|
||||
}
|
||||
|
||||
void sp_captive_portal::on_restore_clicked()
|
||||
{
|
||||
QMessageBox::StandardButton result=QMessageBox::question(NULL, "重置","您确定要重置吗?");
|
||||
|
||||
if(result)
|
||||
{
|
||||
QString ver = ui->android_version->text().simplified().simplified()[0];
|
||||
if(ver.toInt() < 7 && ver.toInt() >= 5)
|
||||
{
|
||||
//adb shell settings put global captive_portal_server
|
||||
QString cmd = "adb shell settings delete global captive_portal_server";
|
||||
process->run(cmd, dev);
|
||||
}
|
||||
else
|
||||
{
|
||||
QString cmd_http = "adb shell settings delete global captive_portal_https_url";
|
||||
QString cmd_https = "adb shell settings delete global captive_portal_http_url";
|
||||
process->run(cmd_http, dev);
|
||||
process->run(cmd_https,dev);
|
||||
}
|
||||
QMessageBox::information(NULL, "重置","已重置");
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//屎山
|
||||
void sp_captive_portal::on_delete_directly_clicked()
|
||||
{
|
||||
|
||||
}
|
44
QtAdb/sonPages/advanced/sp_captive_portal.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
#ifndef SP_CAPTIVE_PORTAL_H
|
||||
#define SP_CAPTIVE_PORTAL_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
//#include <QAbstractItemView>
|
||||
#include "../../threads/adbthread.h"
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
|
||||
namespace Ui {
|
||||
class sp_captive_portal;
|
||||
}
|
||||
|
||||
class sp_captive_portal : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit sp_captive_portal(QWidget *parent = nullptr);
|
||||
~sp_captive_portal();
|
||||
|
||||
device dev;
|
||||
void setDev(device dev);
|
||||
|
||||
void refresh();
|
||||
|
||||
private slots:
|
||||
void on_modify_clicked();
|
||||
|
||||
void on_delete_directly_clicked();
|
||||
|
||||
void on_restore_clicked();
|
||||
|
||||
private:
|
||||
Ui::sp_captive_portal *ui;
|
||||
|
||||
adbProcess *process;
|
||||
textExplainer *explainer;
|
||||
void setShadow(QWidget* wgt);
|
||||
};
|
||||
|
||||
#endif // SP_CAPTIVE_PORTAL_H
|
494
QtAdb/sonPages/advanced/sp_captive_portal.ui
Normal file
|
@ -0,0 +1,494 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>sp_captive_portal</class>
|
||||
<widget class="QWidget" name="sp_captive_portal">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>641</width>
|
||||
<height>519</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<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>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
image: url(:/ico/image/ico/signal-wifi-error-line.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="title">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>去除叹号</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>35</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>Android版本</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="android_version">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>114514</width>
|
||||
<height>35</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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>35</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>当前验证服务器</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="current_server">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>35</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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>35</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>选择验证服务器</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QComboBox{color:black;border-bottom:1px solid #BDBDBD;border-radius:0px;background-color:white;}
|
||||
QComboBox::drop-down{border: 0px solid rgba(255,255,255,255);background-color:rgba(255,255,255,255);border-bottom-right-radius: 0px;}
|
||||
QComboBox QAbstractItemView{border:1px solid #BDBDBD;border-radius:0px 0px 0px 0px;outline: 0px;}
|
||||
QComboBox QAbstractItemView::item{height:30px;border:0px solid #BDBDBD;border-radius:0px 0px 0px 0px;}
|
||||
QComboBox QAbstractItemView::item:hover{height:30px;border:0px solid #BDBDBD;border-radius:0px 0px 0px 0px;color:black}
|
||||
QComboBox QAbstractItemView::item:selected{height:30px;border:1px solid #BDBDBD;border-radius:0px 0px 0px 0px;color:black}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="modify">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>35</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>35</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>修改</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="delete_directly">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>直接关闭(不建议)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="restore">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>114514</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>恢复默认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="back_to_basePage">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../ico.qrc">
|
||||
<normaloff>:/ico/image/ico/arrow-left-line.svg</normaloff>:/ico/image/ico/arrow-left-line.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>18</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.6);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.6);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>切换验证服务器后,开启再关闭飞行模式即可去除叹号</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../ico.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -48,6 +48,7 @@ sp_customize_cmd::~sp_customize_cmd()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void sp_customize_cmd::on_runBtn_clicked()
|
||||
{
|
||||
process->run(ui->lineEdit->text());
|
||||
|
|
83
QtAdb/sonPages/advanced/sp_scales.cpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
#include "sp_scales.h"
|
||||
#include "ui_sp_scales.h"
|
||||
|
||||
sp_scales::sp_scales(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::sp_scales)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
process = new adbProcess();
|
||||
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
|
||||
|
||||
setShadow(ui->back_to_basePage);
|
||||
setShadow(ui->pushButton);
|
||||
setShadow(ui->pushButton_animation);
|
||||
setShadow(ui->pushButton_transition);
|
||||
setShadow(ui->pushButton_window);
|
||||
setShadow(ui->current_window);
|
||||
setShadow(ui->current_animator);
|
||||
setShadow(ui->current_transition);
|
||||
setShadow(ui->label_animator);
|
||||
setShadow(ui->label_window);
|
||||
setShadow(ui->label_transition);
|
||||
|
||||
ui->lineEdit_window->setPlaceholderText("修改为");
|
||||
ui->lineEdit_animator->setPlaceholderText("修改为");
|
||||
ui->lineEdit_transition->setPlaceholderText("修改为");
|
||||
|
||||
ui->lineEdit_transition->setValidator(new QRegularExpressionValidator(QRegularExpression("^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$")));
|
||||
ui->lineEdit_animator->setValidator(new QRegularExpressionValidator(QRegularExpression("^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$")));
|
||||
ui->lineEdit_window->setValidator(new QRegularExpressionValidator(QRegularExpression("^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$")));
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
sp_scales::~sp_scales()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void sp_scales::setDev(device device)
|
||||
{
|
||||
dev = device;
|
||||
}
|
||||
|
||||
|
||||
void sp_scales::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);
|
||||
}
|
||||
|
||||
void sp_scales::refresh()
|
||||
{
|
||||
ui->current_animator->setText("当前:" + process->run("adb shell settings get global animator_duration_scale",dev).simplified());
|
||||
ui->current_transition->setText("当前:" + process->run("adb shell settings get global transition_animation_scale",dev).simplified());
|
||||
ui->current_window->setText("当前:" + process->run("adb shell settings get global window_animation_scale",dev).simplified());
|
||||
ui->lineEdit_transition->clear();
|
||||
ui->lineEdit_window->clear();
|
||||
ui->lineEdit_animator->clear();
|
||||
}
|
||||
|
||||
void sp_scales::on_pushButton_animation_clicked()
|
||||
{
|
||||
//QMessageBox::StandardButton result=QMessageBox::warning(NULL, "动画时长缩放","确定修改");
|
||||
process->run("adb shell settings put global animator_duration_scale " + ui->lineEdit_animator->text().simplified(), dev);
|
||||
refresh();
|
||||
}
|
||||
|
||||
void sp_scales::on_pushButton_transition_clicked()
|
||||
{
|
||||
process->run("adb shell settings put global transition_animation_scale " + ui->lineEdit_transition->text().simplified(), dev);
|
||||
refresh();
|
||||
}
|
||||
|
||||
void sp_scales::on_pushButton_window_clicked()
|
||||
{
|
||||
process->run("adb shell settings put global window_animation_scale " + ui->lineEdit_window->text().simplified(), dev);
|
||||
refresh();
|
||||
}
|
42
QtAdb/sonPages/advanced/sp_scales.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#ifndef SP_SCALES_H
|
||||
#define SP_SCALES_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include <QRegularExpressionValidator>
|
||||
//#include <QRegularExpressionValidator>
|
||||
#include "../../adbprocess.h"
|
||||
|
||||
namespace Ui {
|
||||
class sp_scales;
|
||||
}
|
||||
|
||||
class sp_scales : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit sp_scales(QWidget *parent = nullptr);
|
||||
~sp_scales();
|
||||
|
||||
device dev;
|
||||
void setDev(device dev);
|
||||
|
||||
private slots:
|
||||
void on_pushButton_animation_clicked();
|
||||
|
||||
void on_pushButton_transition_clicked();
|
||||
|
||||
void on_pushButton_window_clicked();
|
||||
|
||||
private:
|
||||
Ui::sp_scales *ui;
|
||||
|
||||
adbProcess *process;
|
||||
textExplainer *explainer;
|
||||
|
||||
void setShadow(QWidget* wgt);
|
||||
void refresh();
|
||||
};
|
||||
|
||||
#endif // SP_SCALES_H
|
601
QtAdb/sonPages/advanced/sp_scales.ui
Normal file
|
@ -0,0 +1,601 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>sp_scales</class>
|
||||
<widget class="QWidget" name="sp_scales">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>477</width>
|
||||
<height>403</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<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>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
image: url(:/ico/image/ico/donut-chart-line.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="title">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>过渡动画</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_animator">
|
||||
<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>
|
||||
<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>动画时长</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_transition">
|
||||
<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>
|
||||
<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>过渡动画</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_window">
|
||||
<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>
|
||||
<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>窗口动画</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="current_animator">
|
||||
<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>
|
||||
<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>NULL</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="current_transition">
|
||||
<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>
|
||||
<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>NULL</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="current_window">
|
||||
<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>
|
||||
<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>NULL</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_animator">
|
||||
<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>
|
||||
<family>MiSans Medium</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>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_transition">
|
||||
<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>
|
||||
<family>MiSans Medium</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>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_window">
|
||||
<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>
|
||||
<family>MiSans Medium</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>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_animation">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../ico.qrc">
|
||||
<normaloff>:/ico/image/ico/play-line.svg</normaloff>:/ico/image/ico/play-line.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_transition">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../ico.qrc">
|
||||
<normaloff>:/ico/image/ico/play-line.svg</normaloff>:/ico/image/ico/play-line.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_window">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../ico.qrc">
|
||||
<normaloff>:/ico/image/ico/play-line.svg</normaloff>:/ico/image/ico/play-line.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../ico.qrc">
|
||||
<normaloff>:/ico/image/ico/arrow-left-line.svg</normaloff>:/ico/image/ico/arrow-left-line.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>18</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>若要修改为极大或极小的值,请谨慎</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../ico.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
149
QtAdb/sonPages/advanced/sp_status_bar.cpp
Normal file
|
@ -0,0 +1,149 @@
|
|||
#include "sp_status_bar.h"
|
||||
#include "ui_sp_status_bar.h"
|
||||
|
||||
sp_status_bar::sp_status_bar(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::sp_status_bar)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
process = new adbProcess();
|
||||
explainer = new textExplainer();
|
||||
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
|
||||
|
||||
setShadow(ui->pushButton_hide);
|
||||
setShadow(ui->pushButton);
|
||||
setShadow(ui->pushButton_restore);
|
||||
setShadow(ui->hide_restore);
|
||||
setShadow(ui->hide_navigation);
|
||||
setShadow(ui->hide_status);
|
||||
setShadow(ui->back_to_basePage);
|
||||
setShadow(ui->pushButton_2);
|
||||
}
|
||||
|
||||
sp_status_bar::~sp_status_bar()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void sp_status_bar::setDev(device device)
|
||||
{
|
||||
dev = device;
|
||||
}
|
||||
|
||||
void sp_status_bar::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);
|
||||
}
|
||||
|
||||
void sp_status_bar::on_pushButton_hide_clicked()
|
||||
{
|
||||
QString cmd = "adb shell settings put secure icon_blacklist ";
|
||||
if(ui->volume->isChecked())
|
||||
{
|
||||
cmd.append(",volume");
|
||||
qDebug() << "ui->volume->isChecked() cmd = " <<cmd;
|
||||
}
|
||||
if(ui->location->isChecked())
|
||||
{
|
||||
cmd.append(",location");
|
||||
qDebug() << "location isChecked() cmd = " <<cmd;
|
||||
}
|
||||
if(ui->speakerphone->isChecked())
|
||||
{
|
||||
cmd.append(",speakerphone");
|
||||
}
|
||||
if(ui->wifi->isChecked())
|
||||
{
|
||||
cmd.append(",wifi");
|
||||
qDebug() << "wifi isChecked() cmd = " <<cmd;
|
||||
}
|
||||
if(ui->hotspot->isChecked())
|
||||
{
|
||||
cmd.append(",hotspot");
|
||||
}
|
||||
if(ui->alarm_clock->isChecked())
|
||||
{
|
||||
cmd.append(",alarm_clock");
|
||||
}
|
||||
if(ui->bluetooth->isChecked())
|
||||
{
|
||||
cmd.append(",bluetooth");
|
||||
}
|
||||
if(ui->airplane->isChecked())
|
||||
{
|
||||
cmd.append(",airplane");
|
||||
}
|
||||
if(ui->headphone->isChecked())
|
||||
{
|
||||
cmd.append(",headphone");
|
||||
}
|
||||
if(ui->cast->isChecked())
|
||||
{
|
||||
cmd.append(",cast");
|
||||
}
|
||||
if(ui->nfc->isChecked())
|
||||
{
|
||||
cmd.append(",nfc");
|
||||
}
|
||||
|
||||
process->run(cmd,dev);
|
||||
refreshBtns();
|
||||
|
||||
QMessageBox::information(NULL, "隐藏图标","已隐藏选中图标");
|
||||
}
|
||||
|
||||
|
||||
void sp_status_bar::on_pushButton_restore_clicked()
|
||||
{
|
||||
process->run("adb shell settings put secure icon_blacklist null",dev);
|
||||
QMessageBox::information(NULL, "取消隐藏图标","状态栏图标已全部取消隐藏");
|
||||
}
|
||||
|
||||
void sp_status_bar::on_hide_status_clicked()
|
||||
{
|
||||
process->run("adb shell settings put global policy_control immersive.status=*",dev);
|
||||
QMessageBox::information(NULL, "隐藏状态栏","已隐藏状态栏");
|
||||
}
|
||||
|
||||
|
||||
void sp_status_bar::on_hide_navigation_clicked()
|
||||
{
|
||||
process->run("adb shell settings put global policy_control immersive.navigation=*",dev);
|
||||
QMessageBox::information(NULL, "隐藏导航栏","已隐藏导航栏");
|
||||
}
|
||||
|
||||
void sp_status_bar::on_hide_restore_clicked()
|
||||
{
|
||||
//adb shell settings put global policy_control null
|
||||
process->run("adb shell settings put global policy_control null",dev);
|
||||
QMessageBox::information(NULL, "重置","已将状态栏与导航栏取消隐藏");
|
||||
}
|
||||
|
||||
void sp_status_bar::on_pushButton_2_clicked()
|
||||
{
|
||||
process->run("adb shell settings put global policy_control immersive.full=*",dev);
|
||||
QMessageBox::information(NULL, "同时隐藏","已将导航栏与状态栏同时全局隐藏");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void sp_status_bar::refreshBtns()
|
||||
{
|
||||
ui->airplane->setChecked(false);
|
||||
ui->alarm_clock->setChecked(false);
|
||||
ui->bluetooth->setChecked(false);
|
||||
ui->cast->setChecked(false);
|
||||
ui->bluetooth->setChecked(false);
|
||||
ui->headphone->setChecked(false);
|
||||
ui->hotspot->setChecked(false);
|
||||
ui->location->setChecked(false);
|
||||
ui->nfc->setChecked(false);
|
||||
ui->wifi->setChecked(false);
|
||||
ui->volume->setChecked(false);
|
||||
}
|
||||
|
47
QtAdb/sonPages/advanced/sp_status_bar.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
#ifndef SP_STATUS_BAR_H
|
||||
#define SP_STATUS_BAR_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include "../../adbprocess.h"
|
||||
|
||||
namespace Ui {
|
||||
class sp_status_bar;
|
||||
}
|
||||
|
||||
class sp_status_bar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit sp_status_bar(QWidget *parent = nullptr);
|
||||
~sp_status_bar();
|
||||
|
||||
device dev;
|
||||
void setDev(device dev);
|
||||
|
||||
|
||||
private slots:
|
||||
void on_pushButton_hide_clicked();
|
||||
|
||||
void on_pushButton_restore_clicked();
|
||||
|
||||
void on_hide_status_clicked();
|
||||
|
||||
void on_hide_navigation_clicked();
|
||||
|
||||
void on_hide_restore_clicked();
|
||||
|
||||
void on_pushButton_2_clicked();
|
||||
|
||||
private:
|
||||
Ui::sp_status_bar *ui;
|
||||
|
||||
adbProcess *process;
|
||||
textExplainer *explainer;
|
||||
|
||||
void setShadow(QWidget* wgt);
|
||||
void refreshBtns();
|
||||
};
|
||||
|
||||
#endif // SP_STATUS_BAR_H
|
611
QtAdb/sonPages/advanced/sp_status_bar.ui
Normal file
|
@ -0,0 +1,611 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>sp_status_bar</class>
|
||||
<widget class="QWidget" name="sp_status_bar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>544</width>
|
||||
<height>437</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<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>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
image: url(:/ico/image/ico/layout-top-2-line.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="title">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>状态栏与导航栏</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.8);border-radius:4px;border:1px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<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.8);border-radius:0px;border:0px;border-bottom:1px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>隐藏状态栏图标</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="volume">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>静音 /震动</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="airplane">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>飞行模式</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QCheckBox" name="speakerphone">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>麦克风</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="bluetooth">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>蓝牙</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="hotspot">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>热点</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QCheckBox" name="nfc">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>NFC</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="wifi">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>WIFI</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="pushButton_hide">
|
||||
<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 Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>隐藏</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="pushButton_restore">
|
||||
<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 Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>重置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="location">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>定位</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="alarm_clock">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>闹钟</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QCheckBox" name="cast">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>录屏状态</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="headphone">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0);border-radius:4px;border:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>耳机</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:rgba(255,255,255,0.8);border-radius:4px;border:1px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<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.8);border-radius:0px;border:0px;border-bottom:1px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>全局隐藏</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="hide_status">
|
||||
<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 Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>全局隐藏状态栏</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="hide_navigation">
|
||||
<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 Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>全局隐藏导航栏</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<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 Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>同时隐藏</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="hide_restore">
|
||||
<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 Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>重置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="back_to_basePage">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../ico.qrc">
|
||||
<normaloff>:/ico/image/ico/arrow-left-line.svg</normaloff>:/ico/image/ico/arrow-left-line.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>18</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../ico.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -61,7 +61,7 @@ border:0px solid #BDBDBD;</string>
|
|||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
image: url(:/ico/image/ico/btnEmulator/menu-line.svg);</string>
|
||||
image: url(:/ico/image/ico/stack-line.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
|
|
@ -87,12 +87,14 @@ void sp_packages::refresh_tableView(QString s)
|
|||
}
|
||||
}
|
||||
ui->listView->setStyleSheet("QListView::item{height:24px;}");
|
||||
model->sort(Qt::AscendingOrder);
|
||||
ui->listView->setModel(model);
|
||||
this->update();
|
||||
}
|
||||
|
||||
ui->progressBar->setVisible(false);
|
||||
delete emptyModel;
|
||||
|
||||
}
|
||||
|
||||
void sp_packages::on_listView_clicked(const QModelIndex &index)
|
||||
|
|
107
QtAdb/sonPages/apps/sp_users.cpp
Normal file
|
@ -0,0 +1,107 @@
|
|||
#include "sp_users.h"
|
||||
#include "ui_sp_users.h"
|
||||
|
||||
sp_users::sp_users(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::sp_users)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setParent(parent);
|
||||
|
||||
ui->progressBar->hide();
|
||||
ui->listView->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
|
||||
thread = new adbThread();
|
||||
process = new adbProcess();
|
||||
connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
|
||||
|
||||
connect(thread,SIGNAL(signal_output(QString)),this,SLOT(refresh_tableView(QString)));
|
||||
|
||||
QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
|
||||
QGraphicsDropShadowEffect *shadowEffect_deleteBtn = new QGraphicsDropShadowEffect(this);
|
||||
|
||||
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_deleteBtn->setOffset(0,0);
|
||||
shadowEffect_deleteBtn->setColor(Qt::gray);
|
||||
shadowEffect_deleteBtn->setBlurRadius(5);
|
||||
|
||||
ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
|
||||
ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
|
||||
ui->pushButton->setGraphicsEffect(shadowEffect_deleteBtn);
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->listView->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
}
|
||||
|
||||
sp_users::~sp_users()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void sp_users::on_refreshBtn_clicked()
|
||||
{
|
||||
thread->initThread("adb shell pm list users",dev,"#PERMISSIONGROUPS#");
|
||||
ui->progressBar->setVisible(true);
|
||||
thread->start();
|
||||
}
|
||||
|
||||
void sp_users::refresh_tableView(QString s)
|
||||
{
|
||||
QStandardItemModel* emptyModel = new QStandardItemModel(this);
|
||||
ui->listView->setModel(emptyModel);
|
||||
//thread->exit();
|
||||
//qDebug() << "before";
|
||||
QStringList permissionList = explainer->explainPermissionGroups(s);
|
||||
//qDebug() << "after";
|
||||
QStandardItemModel* model = new QStandardItemModel(this);
|
||||
if(!permissionList.isEmpty())
|
||||
{
|
||||
for(int i = 0; i < permissionList.count(); i++)
|
||||
{
|
||||
//qDebug() << "permissionList.count() = " << permissionList.count() <<"\nbefore index out of range: \n i = " << i << "\n permissionList[i] = "<< permissionList[i];
|
||||
if(permissionList[i] != "")
|
||||
{
|
||||
model->setItem(i,0,new QStandardItem(permissionList[i].simplified()));
|
||||
}
|
||||
}
|
||||
ui->listView->setModel(model);
|
||||
this->update();
|
||||
}
|
||||
ui->progressBar->setVisible(false);
|
||||
delete emptyModel;
|
||||
}
|
||||
|
||||
void sp_users::setDev(device device)
|
||||
{
|
||||
dev = device;
|
||||
on_refreshBtn_clicked();
|
||||
}
|
||||
|
||||
void sp_users::on_pushButton_clicked()
|
||||
{
|
||||
QString user_id = explainer->get_words_before(explainer->get_words_after(ui->listView->model()->data(ui->listView->currentIndex()).toString(), "{"), ":");
|
||||
QMessageBox::StandardButton result=QMessageBox::question(NULL, "删除用户","您确定要删除用户吗?");
|
||||
qDebug() << "result =" << result;
|
||||
if(result == QMessageBox::Yes)
|
||||
{
|
||||
if(user_id == "Users")
|
||||
{
|
||||
QMessageBox::information(NULL, "选择错误","请选择一个用户,而不是标题");
|
||||
}
|
||||
else
|
||||
{
|
||||
process->run("adb shell pm remove-user " + user_id ,dev);
|
||||
//qDebug() << "user_id:" << user_id;
|
||||
on_refreshBtn_clicked();
|
||||
}
|
||||
}
|
||||
}
|
43
QtAdb/sonPages/apps/sp_users.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef SP_USERS_H
|
||||
#define SP_USERS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
//#include <QAbstractItemView>
|
||||
#include "../../threads/adbthread.h"
|
||||
#include <QScrollBar>
|
||||
#include <QFile>
|
||||
|
||||
namespace Ui {
|
||||
class sp_users;
|
||||
}
|
||||
|
||||
class sp_users : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit sp_users(QWidget *parent = nullptr);
|
||||
~sp_users();
|
||||
|
||||
device dev;
|
||||
void setDev(device dev);
|
||||
|
||||
private slots:
|
||||
void on_refreshBtn_clicked();
|
||||
|
||||
void on_pushButton_clicked();
|
||||
|
||||
public slots:
|
||||
void refresh_tableView(QString);
|
||||
|
||||
private:
|
||||
Ui::sp_users *ui;
|
||||
|
||||
adbProcess *process;
|
||||
adbThread *thread;
|
||||
textExplainer *explainer;
|
||||
};
|
||||
|
||||
#endif // SP_USERS_H
|
262
QtAdb/sonPages/apps/sp_users.ui
Normal file
|
@ -0,0 +1,262 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>sp_users</class>
|
||||
<widget class="QWidget" name="sp_users">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>665</width>
|
||||
<height>543</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>14</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="icon">
|
||||
<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>
|
||||
<family>MiSans Medium</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;
|
||||
image: url(:/ico/image/ico/user-line.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="title">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MiSans Medium</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border:0px solid #BDBDBD;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>所有用户</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<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>-1</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListView" name="listView">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<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 Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>删除选中用户</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="back_to_basePage">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
|
||||
QPushButton:hover{background-color:rgba(255,255,255,0.7);}
|
||||
QPushButton:pressed{background-color:rgba(255,255,255,0.6);}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../ico.qrc">
|
||||
<normaloff>:/ico/image/ico/arrow-left-line.svg</normaloff>:/ico/image/ico/arrow-left-line.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>18</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="refreshBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</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>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../ico.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
25
QtAdb/sonPages/links.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "links.h"
|
||||
#include "qicon.h"
|
||||
#include "qscrollbar.h"
|
||||
#include "ui_links.h"
|
||||
|
||||
links::links(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::links)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
||||
this->setWindowTitle("相关链接");
|
||||
this->setWindowIcon(QIcon(":/ico/image/ico/link.svg"));
|
||||
|
||||
QFile file("://qss/scrollbar.qss");
|
||||
file.open(QFile::ReadOnly);
|
||||
ui->scrollArea->verticalScrollBar()->setStyleSheet(file.readAll());
|
||||
ui->scrollArea->horizontalScrollBar()->setStyleSheet(file.readAll());
|
||||
}
|
||||
|
||||
links::~links()
|
||||
{
|
||||
delete ui;
|
||||
}
|
23
QtAdb/sonPages/links.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef LINKS_H
|
||||
#define LINKS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QFile>
|
||||
|
||||
namespace Ui {
|
||||
class links;
|
||||
}
|
||||
|
||||
class links : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit links(QWidget *parent = nullptr);
|
||||
~links();
|
||||
|
||||
private:
|
||||
Ui::links *ui;
|
||||
};
|
||||
|
||||
#endif // LINKS_H
|
1716
QtAdb/sonPages/links.ui
Normal file
|
@ -202,9 +202,120 @@ sp_activator* sonPageManager::createSonPageFor_activator(QWidget *parent, int ke
|
|||
return page;
|
||||
break;
|
||||
}
|
||||
case 10 :
|
||||
{
|
||||
sp_activator *page = new sp_activator(parent);
|
||||
page->setDev(dev);
|
||||
page->setUp("border:0px;image:url(:/activatorApps/image/activatorApps/scene5.png);", "激活 Scene5",
|
||||
"激活 Scene5 的 ADB 模式 \n"
|
||||
"可以使用大部分查看功能和部分修改功能 \n",
|
||||
"adb shell sh /data/user/0/com.omarea.vtools/files/up.sh");
|
||||
return page;
|
||||
break;
|
||||
}
|
||||
|
||||
case 11 :
|
||||
{
|
||||
sp_activator *page = new sp_activator(parent);
|
||||
page->setDev(dev);
|
||||
page->setUp("border:0px;image:url(:/activatorApps/image/activatorApps/watchfps.png);", "激活 看帧数+",
|
||||
"激活 看帧数+ 的 ADB 模式 \n"
|
||||
"在屏幕上直观的显示当前帧数。 \n"
|
||||
"方便、简单、美观。 \n"
|
||||
"不用复杂的操作,没有任何风险 \n",
|
||||
"adb shell sh /sdcard/Download/watchfps/watchfps.sh");
|
||||
return page;
|
||||
break;
|
||||
}
|
||||
|
||||
case 12 :
|
||||
{
|
||||
sp_activator *page = new sp_activator(parent);
|
||||
page->setDev(dev);
|
||||
page->setUp("border:0px;image:url(:/activatorApps/image/activatorApps/permissiondog.png);", "激活 权限狗",
|
||||
"激活 权限狗 的 ADB 模式 \n"
|
||||
"**什么是 AppOps?** \n"
|
||||
"AppOps 是 Android 系统内存在的一个权限管理功能.与大家熟知的 运行时权限 不同,它至今没有开放管理入口,因此这项功能鲜为人知. \n"
|
||||
"正因为包括许多开发者的人们不了解 AppOps,应用通常不会检测 AppOps 设置,我们得以借助它在不会被应用发现的条件下拒绝应用申请的权限.(例如某应用不授权定位权限就无法使用,我们可以设置此应用的 AppOps 定位权限为忽略.这样我们就可以在拒绝定位权限后正常使用此应用了.) \n"
|
||||
"**权限狗又是什么?** \n"
|
||||
"我们知道,Android 尚未开放 AppOps 管理功能.而权限狗就是一个能够管理 AppOps 设置的第三方工具. \n",
|
||||
"adb shell sh /storage/emulated/0/Android/data/com.web1n.permissiondog/files/starter.sh");
|
||||
return page;
|
||||
break;
|
||||
}
|
||||
|
||||
case 13 :
|
||||
{
|
||||
sp_activator *page = new sp_activator(parent);
|
||||
page->setDev(dev);
|
||||
page->setUp("border:0px;image:url(:/activatorApps/image/activatorApps/hail.png);", "激活 雹",
|
||||
"激活 雹 的 「设备所有者 - 隐藏」 模式 \n"
|
||||
"此模式通过将雹设置为设备所有者 (Device Owner),调用```DevicePolicyManager.setApplicationHidden```方法隐藏应用。 \n",
|
||||
"adb shell dpm set-device-owner com.aistra.hail/.receiver.DeviceAdminReceiver");
|
||||
return page;
|
||||
break;
|
||||
}
|
||||
|
||||
case 14 :
|
||||
{
|
||||
sp_activator *page = new sp_activator(parent);
|
||||
page->setDev(dev);
|
||||
page->setUp("border:0px;image:url(:/activatorApps/image/activatorApps/bg.png);", "为 BatteryGuru 授予 使用情况访问 权限",
|
||||
"授予 BatteryGuru 使用情况访问权限 \n"
|
||||
"在某些定制 ROM 上可能不会生效 \n"
|
||||
"授予应用程序权限,否则 BatteryGuru 的一些功能将无法工作。 \n",
|
||||
"adb shell pm grant com.paget96.batteryguru android.permission.PACKAGE_USAGE_STATS");
|
||||
return page;
|
||||
break;
|
||||
}
|
||||
|
||||
case 15 :
|
||||
{
|
||||
sp_activator *page = new sp_activator(parent);
|
||||
page->setDev(dev);
|
||||
page->setUp("border:0px;image:url(:/activatorApps/image/activatorApps/bg.png);", "为 BatteryGuru 授予 修改安全系统设置 权限",
|
||||
"授予 BatteryGuru 修改安全系统设置权限 \n"
|
||||
"在某些定制 ROM 上可能不会生效 \n"
|
||||
"用于更改一些系统设置,例如 Android Doze 参数或系统节电状态 \n"
|
||||
"也可以使用 Root \n",
|
||||
"adb shell pm grant com.paget96.batteryguru android.permission.WRITE_SECURE_SETTINGS");
|
||||
return page;
|
||||
break;
|
||||
}
|
||||
|
||||
case 16 :
|
||||
{
|
||||
sp_activator *page = new sp_activator(parent);
|
||||
page->setDev(dev);
|
||||
page->setUp("border:0px;image:url(:/activatorApps/image/activatorApps/bg.png);", "为 BatteryGuru 授予 DUMP 权限",
|
||||
"授予 BatteryGuru 读取 DUMP 权限 \n"
|
||||
"在某些定制 ROM 上可能不会生效 \n"
|
||||
"允许应用检查系统内部状态的权限,用来检测设置状态(例如空闲和 Doze 模式)。 \n"
|
||||
"也可以使用 Root \n",
|
||||
"adb shell pm grant com.paget96.batteryguru android.permission.DUMP");
|
||||
return page;
|
||||
break;
|
||||
}
|
||||
|
||||
case 17 :
|
||||
{
|
||||
sp_activator *page = new sp_activator(parent);
|
||||
page->setDev(dev);
|
||||
page->setUp("border:0px;image:url(:/activatorApps/image/activatorApps/apkinstaller.png);", "激活 安装狮",
|
||||
"激活 安装狮 - DPM \n"
|
||||
"安装狮的主要功能是安装APK和卸载应用 \n"
|
||||
"除了原生 Android 外的绝大部分定制系统由于系统的限制,无法将本应用设置为默认安装与卸载应用,而且发起安装时这些系统会直接让系统默认的软件包安装程序来处理,也没有很好的解决办法 \n"
|
||||
"这种情况推荐用本应用内的 选择文件安装 功能或用一些支持选择打开方式的文件管理器等来发起安装 \n"
|
||||
"安装前请关闭Google Play的安全扫描,请在开发者选项打开USB安装、关闭监控ADB安装应用等等以防止安装失败。 \n",
|
||||
"adb shell dpm set-device-owner com.modosa.apkinstaller/.receiver.AdminReceiver");
|
||||
return page;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -238,7 +349,7 @@ QWidget* sonPageManager::createSonPageFor_apps(QWidget *parent, int key, device
|
|||
}
|
||||
case 5:
|
||||
{
|
||||
qDebug() << "SPM.DEV = " << dev.model;
|
||||
//qDebug() << "SPM.DEV = " << dev.model;
|
||||
sp_features *page = new sp_features(parent);
|
||||
page->setDev(dev);
|
||||
return page;
|
||||
|
@ -248,6 +359,12 @@ QWidget* sonPageManager::createSonPageFor_apps(QWidget *parent, int key, device
|
|||
sp_libraries *page = new sp_libraries(parent);
|
||||
page->setDev(dev);
|
||||
return page;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
sp_users *page = new sp_users(parent);
|
||||
page->setDev(dev);
|
||||
return page;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -300,6 +417,31 @@ QWidget* sonPageManager::createSonPageFor_advanced(QWidget *parent, int key, dev
|
|||
//page->setDev(dev);
|
||||
return page;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
sp_accounts *page = new sp_accounts(parent);
|
||||
page->setDev(dev);
|
||||
return page;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
sp_captive_portal *page = new sp_captive_portal(parent);
|
||||
page->setDev(dev);
|
||||
return page;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
sp_scales *page = new sp_scales(parent);
|
||||
page->setDev(dev);
|
||||
return page;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
sp_status_bar *page = new sp_status_bar(parent);
|
||||
page->setDev(dev);
|
||||
return page;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -13,10 +13,15 @@
|
|||
#include "apps/sp_packages.h"
|
||||
#include "apps/sp_features.h"
|
||||
#include "apps/sp_libraries.h"
|
||||
#include "apps/sp_users.h"
|
||||
#include "devControl/sp_devcontrol_power.h"
|
||||
#include "devControl/btnemulator.h"
|
||||
#include "recovery/sp_recovery.h"
|
||||
#include "advanced/sp_customize_cmd.h"
|
||||
#include "advanced/sp_accounts.h"
|
||||
#include "advanced/sp_captive_portal.h"
|
||||
#include "advanced/sp_scales.h"
|
||||
#include "advanced/sp_status_bar.h"
|
||||
|
||||
|
||||
class sonPageManager
|
||||
|
|
|
@ -118,6 +118,18 @@ QString textExplainer::get_words_after(QString str , QString key)
|
|||
return text;
|
||||
}
|
||||
|
||||
QString textExplainer::get_words_before(QString str , QString key)
|
||||
{
|
||||
QString text = str;
|
||||
//qDebug() << "text is:" << text << "\n";
|
||||
int index = str.indexOf(key);
|
||||
//qDebug() << "index =" << index << "\n";
|
||||
text = text.left(index);
|
||||
//qDebug() << "key.size =" << key.size() << "\n";
|
||||
text = text.simplified();
|
||||
return text;
|
||||
}
|
||||
|
||||
QString textExplainer::explain_cpu_output(QString str)
|
||||
{
|
||||
QString text = str;
|
||||
|
@ -148,7 +160,8 @@ bool textExplainer::explainError(QString err)
|
|||
/*启动*/
|
||||
else if(err.contains("daemon not running")){}
|
||||
else if(err.contains("daemon started successfully")){}
|
||||
/*应用安装*/
|
||||
else if(err.contains("doesn't match this client")){}
|
||||
/*软件包*/
|
||||
else if(err.contains("install requires an argument"))
|
||||
{
|
||||
showMsgBox("提示"," · 请先选择安装包");
|
||||
|
@ -157,10 +170,23 @@ bool textExplainer::explainError(QString err)
|
|||
{
|
||||
showMsgBox("错误"," · 当前设备状态无法安装应用");
|
||||
}
|
||||
else if(err.contains("Shell cannot change component state for") && err.contains("cmd: not found"))
|
||||
{
|
||||
showMsgBox("错误"," · 无法执行该指令");
|
||||
}
|
||||
/*用户*/
|
||||
else if(err.contains("couldn't remove user id 0"))
|
||||
{
|
||||
showMsgBox("无法操作"," · 无法删除默认用户");
|
||||
}
|
||||
else if(err.contains("no user id specified"))
|
||||
{
|
||||
showMsgBox("未选择"," · 请先选择一个用户");
|
||||
}
|
||||
/* 设备管理员 */
|
||||
else if(err.contains("Not allowed to set the device owner because there are already several users on the device"))
|
||||
{
|
||||
showMsgBox("失败"," · 请先清除所有用户并关闭多用户模式");
|
||||
showMsgBox("失败"," · 请先清除所有用户并关闭多用户模式 \n · 可在「软件包管理器」-「用户」中查看并删除用户 \n");
|
||||
}
|
||||
else if(err.contains("Unknown admin"))
|
||||
{
|
||||
|
@ -168,7 +194,7 @@ bool textExplainer::explainError(QString err)
|
|||
}
|
||||
else if(err.contains("Not allowed to set the device owner because there are already some accounts on the device"))
|
||||
{
|
||||
showMsgBox("失败"," · 请先退出所有账户");
|
||||
showMsgBox("失败"," · 请先退出所有账户 \n · 可在「其它」-「账户」中查看设备中的账户 \n · 或在设备设置中查看并退出账户 \n");
|
||||
}
|
||||
else if(err.contains("Trying to set the device owner, but device owner is already set."))
|
||||
{
|
||||
|
@ -206,10 +232,15 @@ bool textExplainer::explainError(QString err)
|
|||
{
|
||||
showMsgBox("完成"," · 成功\n · 你之所以会看到这条提示,是因为ADB本身将成功的消息以错误输出方式输出\n · 您无需关注此错误");
|
||||
}
|
||||
else if(err.contains("Bad arguments"))
|
||||
{
|
||||
showMsgBox("错误"," · 参数有误");
|
||||
}
|
||||
else
|
||||
{
|
||||
showMsgBox("错误"," · 未知错误!\n" + err +"\n · 若此处出现并不完整的报错或一大串包含 '.android.os'、'java' 等字样的错误,您可以视情况忽忽视它,并查阅另一条报错\n");
|
||||
}
|
||||
|
||||
qDebug() << "<<<<<<<<<<<<<<<<ERROR>>>>>>>>>>>>>>>>" << "\n" << err;
|
||||
return true;
|
||||
}
|
||||
|
@ -280,12 +311,30 @@ QStringList textExplainer::explainPermissionGroups(QString s)
|
|||
{
|
||||
QStringList list;
|
||||
list = s.split("\n");
|
||||
/*
|
||||
for(int i = 0; i<=list.count(); i--)
|
||||
{
|
||||
qDebug() << "/+*********\nlist.count() = " << list.count() <<"\nbefore index out of range: \n i = " << i << "\n list[i] = "<< list[i] << "\n ***************+/";
|
||||
QString tmpStr = get_words_after(list[i],"permission group:");
|
||||
list[i] = tmpStr;
|
||||
}*/
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QStringList textExplainer::explainAccounts(QString s)
|
||||
{
|
||||
QStringList final;
|
||||
QStringList classific_as_users;
|
||||
classific_as_users = s.split("}:");
|
||||
|
||||
for(int i = 1; i<classific_as_users.count(); i++)
|
||||
{
|
||||
qDebug() << "/+*********\n classific_as_users.count() = " << classific_as_users.count() <<"\n before index out of range: \n i = " << i << "\n list[i] = "<< classific_as_users[i] << "\n ***************+/";
|
||||
QStringList tmpList;
|
||||
tmpList = get_words_before(classific_as_users[i],"AccountId,").split("Account ");
|
||||
if(!tmpList.isEmpty())
|
||||
{
|
||||
QString num = QString::number(i-1);
|
||||
tmpList[0] = tmpList[0].replace("Accounts:", "属于用户" + num + "的账户数量为:");
|
||||
}
|
||||
|
||||
qDebug() << "tmpList =" << tmpList;
|
||||
final.append(tmpList);
|
||||
//classific_as_users[i] = tmpStr;
|
||||
}
|
||||
return final;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
QList<device> getDevList(QString tmpStr);
|
||||
QList<device> getDevList_windows(QString tmpStr);
|
||||
QString get_words_after(QString str , QString key);
|
||||
QString get_words_before(QString s, QString k);
|
||||
QString explain_cpu_output(QString str);
|
||||
|
||||
void showMsgBox(QString title,QString msg);
|
||||
|
@ -36,6 +37,7 @@ public:
|
|||
bool thread = false;
|
||||
|
||||
QStringList explainPermissionGroups(QString s);
|
||||
QStringList explainAccounts(QString s);
|
||||
|
||||
private:
|
||||
QString setState(QString state);
|
||||
|
|
|
@ -68,6 +68,7 @@ void adbThread::run()
|
|||
{
|
||||
//qDebug() << "dev = " << &dev;
|
||||
QString output = process->run(command, dev);
|
||||
//qDebug() << "output = " << output;
|
||||
emit signal_output(output);
|
||||
exit();
|
||||
}
|
||||
|
|
79
QtAdb/threads/thread_monitor.cpp
Normal file
|
@ -0,0 +1,79 @@
|
|||
#include "thread_monitor.h"
|
||||
|
||||
thread_monitor::thread_monitor(device dev)
|
||||
{
|
||||
process = new adbProcess();
|
||||
explainer = new textExplainer();
|
||||
//timer = new QTimer(this);
|
||||
//connect(timer,SIGNAL(timeout()),this,SLOT(getInfo()));
|
||||
//adb shell cat /proc/meminfo
|
||||
//adb shell cat proc/stat
|
||||
}
|
||||
|
||||
void thread_monitor::run()
|
||||
{
|
||||
process->thread = true;
|
||||
//timer->start(1000);
|
||||
/*
|
||||
while(true)
|
||||
{
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
void thread_monitor::getInfo()
|
||||
{
|
||||
//qDebug() << ">> getInfo()";
|
||||
cpu_t2 = process->run("adb shell cat proc/stat", dev);
|
||||
mem = process->run("adb shell cat /proc/meminfo",dev);
|
||||
|
||||
//qDebug() << "cpu_t2 =" << cpu_t2;
|
||||
//qDebug() << mem;
|
||||
|
||||
if(cpu_t1 != "#FIRSTBOOT#" && !cpu_t2.isEmpty() && !mem.isEmpty())
|
||||
{
|
||||
//qDebug() << "before, cpu_t1 = " <<cpu_t1;
|
||||
QStringList list_t2 = cpu_t2.split("\n")[0].split(" ");
|
||||
list_t2.removeAll("");
|
||||
QStringList list_t1 = cpu_t1.split("\n")[0].split(" ");
|
||||
list_t1.removeAll("");
|
||||
//qDebug() << "list_t2[1].toInt() = " << list_t2[1].toInt();
|
||||
//qDebug() << "list_t1[1].toInt() = " << list_t1[1].toInt();
|
||||
int timeTotal_t2 = list_t2[1].toInt() + list_t2[2].toInt() + list_t2[3].toInt() + list_t2[4].toInt() + list_t2[5].toInt() + list_t2[6].toInt() + list_t2[7].toInt();
|
||||
//qDebug() << "timeTotal_t2 = " <<timeTotal_t2;
|
||||
int timeTotal_t1 = list_t1[1].toInt() + list_t1[2].toInt() + list_t1[3].toInt() + list_t1[4].toInt() + list_t1[5].toInt() + list_t1[6].toInt() + list_t1[7].toInt();
|
||||
//qDebug() << "timeTotal_t1 = " <<timeTotal_t1;
|
||||
//qDebug() << "total complete";
|
||||
int timeIdle_t2 = list_t2[4].toInt();
|
||||
//qDebug() << "timeIdle_t2 = " <<timeIdle_t2;
|
||||
int timeIdle_t1 = list_t1[4].toInt();
|
||||
//qDebug() << "timeIdle_t1 = " <<timeIdle_t1;
|
||||
//qDebug() << "idle complete";
|
||||
|
||||
float cpu_use = 1 - ((float)(timeIdle_t2 - timeIdle_t1) / (float)(timeTotal_t2 - timeTotal_t1));
|
||||
//qDebug() << "cpu_use = " << cpu_use;
|
||||
cpu_t1 = cpu_t2;
|
||||
cpu_t2 = "";
|
||||
|
||||
int MemTotal = explainer->get_words_before(explainer->get_words_after(mem.split("\n")[0] , "MemTotal:") , "kB").simplified().simplified().toInt();
|
||||
//int MemFree = explainer->get_words_before(explainer->get_words_after(mem.split("\n")[1] , "MemFree:") , "kB").simplified().simplified().toInt();
|
||||
int MemAvailable = explainer->get_words_before(explainer->get_words_after(mem.split("\n")[2] , "MemAvailable:") , "kB").simplified().simplified().toInt();
|
||||
qDebug() << "Mem = " << mem;
|
||||
qDebug() << "MemTotal = " << MemTotal;
|
||||
//qDebug() << "MemFree = " << MemFree;
|
||||
//float mem_use = (float)(MemTotal - MemFree) / (float)MemTotal;
|
||||
float mem_use = (float)(MemTotal - MemAvailable) / (float)MemTotal;
|
||||
|
||||
qDebug() << "mem_use = " << mem_use;
|
||||
|
||||
mem = "";
|
||||
emit signal_monitor(cpu_use, mem_use);
|
||||
}
|
||||
else
|
||||
{
|
||||
//qDebug() << "cpu_t2.isEmpty?" << cpu_t2.isEmpty();
|
||||
//qDebug() << "mem.isEmpty?" << mem.isEmpty();
|
||||
cpu_t1 = process->run("adb shell cat proc/stat", dev);
|
||||
}
|
||||
//cpu_t1 = "";
|
||||
}
|
37
QtAdb/threads/thread_monitor.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#ifndef THREAD_MONITOR_H
|
||||
#define THREAD_MONITOR_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
#include "../adbprocess.h"
|
||||
|
||||
|
||||
class thread_monitor : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
thread_monitor(device dev);
|
||||
adbProcess *process;
|
||||
textExplainer *explainer;
|
||||
//QTimer *timer;
|
||||
|
||||
device dev;
|
||||
|
||||
QString cpu_t1 = "#FIRSTBOOT#";
|
||||
QString cpu_t2;
|
||||
QString mem;
|
||||
|
||||
signals:
|
||||
void signal_output(QString);
|
||||
void signal_monitor(float,float);
|
||||
|
||||
protected:
|
||||
void run() override;
|
||||
|
||||
public slots:
|
||||
void getInfo();
|
||||
};
|
||||
|
||||
#endif // THREAD_MONITOR_H
|
|
@ -16,11 +16,11 @@ bool usb_listener::nativeEventFilter(const QByteArray &eventType, void *message,
|
|||
|
||||
//qDebug() << "msgType = " << msgType;
|
||||
//qDebug() << "WM_DEVICECHANGE = " << WM_DEVICECHANGE;
|
||||
qDebug() << "wParam = " << msg->wParam;
|
||||
//qDebug() << "wParam = " << msg->wParam;
|
||||
//qDebug() << "lParam = " << msg->lParam;
|
||||
//qDebug() << "WM_DEVICECHANGE = " << WM_DEVICECHANGE;
|
||||
qDebug() << "DBT_DEVICEARRIVAL = " << DBT_DEVICEARRIVAL;
|
||||
qDebug() << "DBT_DEVICEREMOVECOMPLETE = " << DBT_DEVICEREMOVECOMPLETE;
|
||||
//qDebug() << "DBT_DEVICEARRIVAL = " << DBT_DEVICEARRIVAL;
|
||||
//qDebug() << "DBT_DEVICEREMOVECOMPLETE = " << DBT_DEVICEREMOVECOMPLETE;
|
||||
/*
|
||||
PDEV_BROADCAST_HDR lpdb = PDEV_BROADCAST_HDR(msg->lParam);
|
||||
qDebug() << "lpdb = " << msg->lParam;
|
||||
|
|
76
README.md
|
@ -10,7 +10,7 @@ QtAdb 是一个基于 [Qt](https://www.qt.io/) 的 Android 工具集合。
|
|||
|
||||
[Android 调试桥 (adb)](https://developer.android.google.cn/studio/command-line/adb?hl=zh-cn) 是一种功能多样的命令行工具,可让开发者与设备之间进行通信。adb 命令可用于执行各种设备操作(例如安装和调试应用),并提供对 Unix shell(可用来在设备上运行各种命令)的访问权限。
|
||||
|
||||
Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌现出众多的命令用法。非开发者的Android 爱好者经常根据需求运行 adb 命令以提升使用体验。
|
||||
Android 系统的可玩性在 adb 的加成下变得更加丰富,由此涌现出众多的命令用法。非开发者的Android 爱好者经常根据需求运行 adb 命令以提升使用体验。
|
||||
|
||||
但由于 adb 涉及到环境配置、终端执行等操作,对于不会使用的人可能造成困扰;一些命令行参数的记忆对于并不熟悉的人来说同样令人头疼。所以可供一键式操作,并且已内置环境的图形窗口有一定需求。
|
||||
|
||||
|
@ -28,16 +28,20 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
- 提供命令模板,使用者可直接复制命令并自行执行。
|
||||
- 支持多种状态显示及使用:开机、Recovery、~~Fastboot~~及 adb sideload.
|
||||
|
||||
*注意:QtAdb 暂不支持比 Windows10 更早的 Windows 系统,具体原因正在排查*
|
||||
|
||||
## 🛠️功能
|
||||
|
||||
### ℹ️设备信息
|
||||
|
||||
- 获取设备型号、屏幕分辨率、屏幕密度(DPI)、Android Id、安卓版本以及处理器型号的信息
|
||||
- 修改 DPI、修改屏幕分辨率
|
||||
- 实时监控CPU使用率、内存使用率。
|
||||
|
||||
### ✔️激活
|
||||
|
||||
- 提供主流工具应用的激活:[黑阈](https://brevent.jianyv.com/)、[冰箱](https://iceboxdoc.catchingnow.com/)、[小黑屋](https://stopapp.https.gs/)、[Shizuku](https://shizuku.rikka.app/zh-hans/)、*黑洞*、[太极](https://taichi.cool/)、[Island](https://island.oasisfeng.com/)
|
||||
- 提供主流工具应用的激活:[黑阈](https://brevent.jianyv.com/)、[冰箱](https://iceboxdoc.catchingnow.com/)、[小黑屋](https://stopapp.https.gs/)、[Shizuku](https://shizuku.rikka.app/zh-hans/)、*黑洞*、[太极](https://taichi.cool/)、[Island](https://island.oasisfeng.com/)、Scene、[看帧数+](https://www.coolapk.com/apk/com.watchfps)、[权限狗](https://www.coolapk.com/apk/com.web1n.permissiondog)、[雹](https://github.com/aistra0528/Hail)、[安装狮](https://www.coolapk.com/apk/com.modosa.apkinstaller)
|
||||
- 为应用授予其所需的权限:BatteryGuru(使用情况访问、修改安全系统设置、读取DUMP)
|
||||
- 更多应用正在添加中。
|
||||
|
||||
### 🎮设备控制
|
||||
|
@ -62,13 +66,25 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
### 📦软件包管理器:
|
||||
|
||||
- 安装应用
|
||||
- 列出已知的权限、权限组
|
||||
- 列出已知的权限
|
||||
- 可单独打开大窗口查看列表
|
||||
- 可按以下要求输出:
|
||||
- 按权限组进行整理
|
||||
- 输出所有信息
|
||||
- 输出简短摘要
|
||||
- 仅列出危险权限
|
||||
- 仅列出用户将看到的权限
|
||||
|
||||
- 列出已知的权限组
|
||||
- 列出软件包
|
||||
- 卸载、停用、启用、清除数据
|
||||
- 获取软件包包名、安装者、关联文件等信息
|
||||
|
||||
- 列出系统的所有功能
|
||||
- 列出当前设备支持的所有库
|
||||
- 用户
|
||||
- 列出当前设备中的所有用户
|
||||
- 删除选中用户
|
||||
|
||||
|
||||
### 🔧Recovery 功能:
|
||||
|
||||
|
@ -77,6 +93,28 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
- **这是危险功能,即使正确地使用也可能导致设备故障,请确保您有足够的排障能力后使用**
|
||||
- **使用侧载功能时请不要关闭程序**
|
||||
|
||||
### 🔮其它功能
|
||||
|
||||
- 账户
|
||||
|
||||
- 查看设备中各个用户已登录的账户
|
||||
|
||||
- 去除叹号
|
||||
|
||||
- 修改验证服务器,提供了多个预设选项(MIUI、EMUI等国内验证服务器)
|
||||
|
||||
- 修改过渡动画
|
||||
|
||||
- 修改动画时长
|
||||
- 修改过渡动画
|
||||
- 修改窗口动画
|
||||
|
||||
- 状态栏与导航栏
|
||||
|
||||
- 隐藏状态栏图标:静音/震动、定位、麦克风、录屏状态、WIFI、热点、飞行模式、耳机、闹钟、蓝牙、NFC
|
||||
- 重置状态栏图标
|
||||
- 全局隐藏状态栏、导航栏
|
||||
|
||||
### 💣不稳定功能
|
||||
|
||||
- ~~*安装应用*~~ *暂未实现错误提示细节*
|
||||
|
@ -85,7 +123,7 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
|
||||
### *🍘饼*
|
||||
|
||||
> *由于个人学业紧迫(**确实**考不上研了),饼中的内容添加将十分缓慢,可能在过年后,甚至再多一年后才能开始全力开发,请见谅!*
|
||||
> *由于个人学业紧迫(**已经**考不上研了),饼中的内容添加将十分缓慢,可能在过年后,甚至再多一年后才能开始全力开发,请见谅!*
|
||||
|
||||
- ~~完整的软件包管理器~~
|
||||
- 跨平台
|
||||
|
@ -100,7 +138,7 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
- ~~安装应用进度条~~
|
||||
- ~~侧载进度条~~
|
||||
- 命令
|
||||
- 获取 Google 服务框架 Android ID
|
||||
- ~~获取 Google 服务框架 Android ID~~ (需要 Root,暂时不涉及 Root 操作)
|
||||
- ~~更改屏幕分辨率~~
|
||||
- 更改屏幕边距
|
||||
- 控制台
|
||||
|
@ -121,23 +159,27 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
|
||||
- **Q:不是有环境吗?怎么还是跑不了🥺**
|
||||
|
||||
A:您下载的是压缩包,请全部解压后再使用。
|
||||
A:您下载的是压缩包,请全部解压后再使用;请确保您的设备已打开USB调试并正确连接。
|
||||
|
||||
- **Q:我已经解压,仍然无法使用**
|
||||
|
||||
A:部分 ADB 工具,如秋之盒、搞机工具箱等在退出后不会杀死其拉起的 ADB 服务端;QtADB异常退出后也可能来不及杀死 adb 进程,请进入任务管理器中结束 “adb.exe” 进程后重试,若仍无法使用请尝试重新启动。
|
||||
|
||||
- **Q:怎么这么多类似乱码的报错😱**
|
||||
|
||||
A:我已经尽可能让它减少报错了,若弹出的“未知错误”对话框中的报错无法构成一个完整的句子,那么您可以根据它的内容视情况忽略它,并查看另一条报错。
|
||||
|
||||
Tips:使用 Qt 所封装的进程类在获取 adb 输出的错误时,容易将一条错误随机分成多段错误处理,而每一段错误将被报告为一条单独的错误。所以程序用于识别报错类型所需的关键字信息可能只在其中一条错误中,甚至可能被拦腰斩断,分散在两条报错中,此时 QtAdb 将无法分辨这些不包含关键字的信息,从而弹出“未知错误”对话框,并显示这些错误。这个问题目前没有找到彻底的解决办法,仍在努力研究中。
|
||||
> Tips:使用 Qt 所封装的进程类在获取 adb 输出的错误时,容易将一条错误随机分成多段错误处理,而每一段错误将被报告为一条单独的错误。所以程序用于识别报错类型所需的关键字信息可能只在其中一条错误中,甚至可能被拦腰斩断,分散在两条报错中,此时 QtAdb 将无法分辨这些不包含关键字的信息,从而弹出“未知错误”对话框,并显示这些错误。这个问题目前没有找到彻底的解决办法,仍在努力研究中。
|
||||
|
||||
- **Q:应用无法安装🙁**
|
||||
|
||||
A:~~应用安装功能暂未完全实现,为不稳定功能。应用安装完成后没有视觉反馈,请查看您的启动器先确认它确实没有安装上,其次注意安装包大小,过大的安装包可能导致 QtAdb 主界面未响应,此时不要进行任何操作,更不要杀死 adb 进程,等待手机上出现应用图标即可。若有报错可进行反馈。~~请排查您是否为:降级安装、在不兼容的安卓版本上安装等等,错误提示暂时没有完全实现,请自行判断。
|
||||
A:~~应用安装功能暂未完全实现,为不稳定功能。应用安装完成后没有视觉反馈,请查看您的启动器先确认它确实没有安装上,其次注意安装包大小,过大的安装包可能导致 QtAdb 主界面未响应,此时不要进行任何操作,更不要杀死 adb 进程,等待手机上出现应用图标即可。若有报错可进行反馈。~~请排查您是否为:降级安装、在不兼容的安卓版本上安装等等,错误提示暂时没有完全实现,请自行判断。降级安装等功能请期待后续版本。
|
||||
|
||||
~~Tips:发出命令后QtAdb并没有监视命令的运行情况,若安装仍在进行且时间较长,可能主窗口会恢复到可以操作的状态,看上去就像什么都没有发生,侧载未响应原理与此相同。监视运行情况的功能正在开发中,请尽量不要使用此功能。(QtAdb 提供了命令模板,您可自行运行此命令)~~
|
||||
|
||||
- **Q:侧载未响应**
|
||||
- ~~**Q:侧载未响应**~~
|
||||
|
||||
A:侧载与应用安装类似,功能暂未完全实现,为不稳定功能。若侧载压缩包过大将会导致主界面阻塞时间过长,请不要进行操作,具体以 recovery 输出为准。**请具备一定查错能力后再使用。**(~~会用的话直接自己开命令行罢~~)
|
||||
~~A:侧载与应用安装类似,功能暂未完全实现,为不稳定功能。若侧载压缩包过大将会导致主界面阻塞时间过长,请不要进行操作,具体以 recovery 输出为准。~~**请具备一定查错能力后再使用。**
|
||||
|
||||
- **Q:按键模拟不生效🤨**
|
||||
|
||||
|
@ -147,21 +189,23 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
|
|||
|
||||
A:需要分情况讨论:若更换另一部手机可以连接,则可能是手机端 ROM 出现问题,请重启并尝试再次连接;若设备没有问题则可能是路由器出现问题,请更换其它WI-FI网络再尝试。
|
||||
|
||||
- **Q:连续报了一大堆错并闪退**
|
||||
- ~~**Q:连续报了一大堆错并闪退**~~
|
||||
|
||||
A:可能是您在拔出设备后执行了命令,重新打开并连接即可。QtAdb 仍处于开发中,这是不稳定因素之一。
|
||||
~~A:可能是您在拔出设备后执行了命令,重新打开并连接即可。QtAdb 仍处于开发中,这是不稳定因素之一。~~
|
||||
|
||||
- **Q:无法连接WSA**
|
||||
|
||||
A:请确保 WSA 已安装并正在运行:仅仅安装完成是不够的,还需要在开始菜单中打开 “适用于 Android^TM^ 的 Windows 子系统设置” 应用,选择 “开发人员” ,并打开 “开发人员模式”。在此之后,你可能还需要选择“系统” ,打开 “文件” 以确保 WSA 正在运行中。
|
||||
A:请确保 **WSA 已安装并正在运行**:仅仅安装完成是不够的,还需要在开始菜单中打开 “适用于 Android^TM^ 的 Windows 子系统设置” 应用,选择 “开发人员” ,并打开 “开发人员模式”。在此之后,你可能还需要选择“系统” ,打开 “文件” 以确保 WSA 正在运行中。
|
||||
|
||||
- **Q:闪退**
|
||||
|
||||
A:您可能连续点击了两次杀死 ”adb进程“ 按钮,请不要这样做;也可能是您在拔出设备后执行了命令,重新打开并连接即可。其余情况请提交反馈,并描述发生闪退之前您进行的操作,谢谢!
|
||||
~~A:您可能连续点击了两次杀死 ”adb进程“ 按钮,请不要这样做;也可能是您在拔出设备后执行了命令,重新打开并连接即可。~~
|
||||
|
||||
A:请提交反馈,并描述发生闪退之前您进行的操作,谢谢!
|
||||
|
||||
- **Q:我可以催更吗**🥺
|
||||
|
||||
A:~~你可以请我喝可乐吗🥺~~当然可以催更,它现在仍处于开发中,并没有正式release,仍需要长时间的调试。
|
||||
A:~~你可以请我喝可乐吗🥺~~当然可以催更,它现在仍处于开发中,并没有正式发布,仍需要长时间的调试。
|
||||
|
||||
## 🙋反馈
|
||||
|
||||
|
|