├── .gitattributes ├── 360Safe.pro ├── 360Safe.pro.user ├── README.md ├── customviews ├── checkwidget.cpp ├── checkwidget.h ├── focuswidget.cpp ├── focuswidget.h ├── hoverpushbutton.cpp ├── hoverpushbutton.h ├── hovertoolbutton.cpp ├── hovertoolbutton.h ├── progressbarwidget.cpp ├── progressbarwidget.h ├── scanwidget.cpp ├── scanwidget.h ├── scanwidget.ui ├── statewidget.cpp ├── statewidget.h ├── statewidget.ui ├── upgradewidget.cpp ├── upgradewidget.h ├── waveballwidget.cpp └── waveballwidget.h ├── dialog ├── aboutdialog.cpp ├── aboutdialog.h ├── aboutdialog.ui ├── market360dialog.cpp ├── market360dialog.h ├── market360dialog.ui ├── optiondialog.cpp ├── optiondialog.h ├── optiondialog.ui ├── questiondialog.cpp ├── questiondialog.h ├── questiondialog.ui ├── upgradedialog.cpp ├── upgradedialog.h └── upgradedialog.ui ├── images ├── horse │ ├── icon_anweizhi.png │ ├── icon_clear.png │ ├── icon_fix.png │ ├── icon_horse.png │ ├── icon_huifuqu.png │ ├── icon_icon_1.png │ ├── icon_icon_2.png │ ├── icon_icon_3.png │ ├── icon_optimize.png │ ├── icon_pb_bg_1.png │ ├── icon_pb_bg_2.png │ ├── icon_pb_bg_3.png │ ├── icon_pb_bg_4.png │ ├── icon_pb_bg_5.png │ ├── icon_quanpansaomiao.png │ ├── icon_shangbaoqu.png │ └── icon_xinrenqu.png ├── market │ ├── market_icon_1_b.png │ ├── market_icon_1_g.png │ ├── market_icon_2_b.png │ ├── market_icon_2_g.png │ ├── market_icon_3_b.png │ ├── market_icon_3_g.png │ ├── market_icon_4_b.png │ ├── market_icon_4_g.png │ ├── market_icon_5_b.png │ └── market_icon_5_g.png ├── menu │ ├── menu_about.png │ ├── menu_change.png │ ├── menu_help.png │ ├── menu_mian.png │ ├── menu_option.png │ ├── menu_question.png │ ├── menu_upgrade.png │ ├── menu_web.png │ └── menu_yinsi.png ├── option │ ├── option_cell_1.png │ ├── option_top_1.png │ ├── option_top_2.png │ ├── option_top_3.png │ ├── option_top_4.png │ ├── option_top_5.png │ └── option_top_6.png ├── other │ ├── icon.png │ ├── icon_360.png │ ├── icon_app.png │ ├── icon_check_1.png │ ├── icon_fanghuzhongxin.png │ ├── icon_fanlesuo.png │ ├── icon_fix.png │ ├── icon_handler.png │ ├── icon_help.png │ ├── icon_liulanqi.png │ ├── icon_more.png │ ├── icon_right.png │ ├── icon_scan_g.png │ ├── icon_search_hover.png │ ├── icon_search_normal.png │ ├── icon_search_press.png │ ├── icon_w.png │ ├── icon_wanggou.png │ └── icon_waring.png ├── question │ ├── next_icon2.png │ ├── next_tb_1.png │ ├── next_tb_2.png │ ├── next_tb_3.png │ ├── question.png │ ├── question_icon1.png │ ├── question_icon2.png │ └── question_icon3.png ├── tab │ ├── tab_actions.png │ ├── tab_app.png │ ├── tab_clear.png │ ├── tab_fix.png │ ├── tab_home.png │ ├── tab_horse.png │ ├── tab_market.png │ └── tab_optimize.png └── top │ ├── top_close.png │ ├── top_close_b.png │ ├── top_menu.png │ ├── top_min.png │ ├── top_min_b.png │ └── top_theme.png ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui ├── popupwidgets ├── dataconnectsetup.cpp ├── dataconnectsetup.h ├── dataconnectsetup.ui ├── loginpopupwidget.ui ├── popupwidget.cpp └── popupwidget.h ├── resource.qrc ├── styles.qss └── widget ├── actionswidget.cpp ├── actionswidget.h ├── actionswidget.ui ├── clear2widget.cpp ├── clear2widget.h ├── clear2widget.ui ├── clearmenuwidget.cpp ├── clearmenuwidget.h ├── clearmenuwidget.ui ├── clearwidget.cpp ├── clearwidget.h ├── clearwidget.ui ├── fix2widget.cpp ├── fix2widget.h ├── fix2widget.ui ├── fixwidget.cpp ├── fixwidget.h ├── fixwidget.ui ├── fuctionswidget.cpp ├── fuctionswidget.h ├── fuctionswidget.ui ├── home2widget.cpp ├── home2widget.h ├── home2widget.ui ├── homewidget.cpp ├── homewidget.h ├── homewidget.ui ├── horse2widget.cpp ├── horse2widget.h ├── horse2widget.ui ├── horsewidget.cpp ├── horsewidget.h ├── horsewidget.ui ├── loginwidget.cpp ├── loginwidget.h ├── loginwidget.ui ├── optimize2widget.cpp ├── optimize2widget.h ├── optimize2widget.ui ├── optimizewidget.cpp ├── optimizewidget.h └── optimizewidget.ui /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /360Safe.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2017-03-16T16:06:44 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui webenginewidgets network 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = 360Safe 12 | TEMPLATE = app 13 | 14 | # The following define makes your compiler emit warnings if you use 15 | # any feature of Qt which as been marked as deprecated (the exact warnings 16 | # depend on your compiler). Please consult the documentation of the 17 | # deprecated API in order to know how to port your code away from it. 18 | DEFINES += QT_DEPRECATED_WARNINGS 19 | 20 | # You can also make your code fail to compile if you use deprecated APIs. 21 | # In order to do so, uncomment the following line. 22 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 23 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 24 | 25 | 26 | SOURCES += main.cpp\ 27 | mainwindow.cpp \ 28 | customviews/waveballwidget.cpp \ 29 | customviews/hoverpushbutton.cpp\ 30 | dialog/questiondialog.cpp\ 31 | dialog/aboutdialog.cpp \ 32 | customviews/scanwidget.cpp \ 33 | widget/homewidget.cpp \ 34 | widget/home2widget.cpp \ 35 | customviews/statewidget.cpp \ 36 | widget/horsewidget.cpp \ 37 | widget/horse2widget.cpp \ 38 | widget/clearwidget.cpp \ 39 | widget/clear2widget.cpp \ 40 | widget/fixwidget.cpp \ 41 | widget/fix2widget.cpp \ 42 | widget/optimizewidget.cpp \ 43 | widget/optimize2widget.cpp \ 44 | widget/fuctionswidget.cpp \ 45 | dialog/market360dialog.cpp \ 46 | customviews/progressbarwidget.cpp \ 47 | dialog/upgradedialog.cpp \ 48 | customviews/upgradewidget.cpp \ 49 | dialog/optiondialog.cpp \ 50 | customviews/checkwidget.cpp \ 51 | popupwidgets/dataconnectsetup.cpp \ 52 | popupwidgets/popupwidget.cpp \ 53 | customviews/hovertoolbutton.cpp \ 54 | widget/loginwidget.cpp \ 55 | widget/clearmenuwidget.cpp \ 56 | customviews/focuswidget.cpp \ 57 | widget/actionswidget.cpp 58 | 59 | HEADERS += mainwindow.h \ 60 | customviews/waveballwidget.h \ 61 | customviews/hoverpushbutton.h\ 62 | dialog/questiondialog.h\ 63 | dialog/aboutdialog.h \ 64 | customviews/scanwidget.h \ 65 | widget/homewidget.h \ 66 | widget/home2widget.h \ 67 | customviews/statewidget.h \ 68 | widget/horsewidget.h \ 69 | widget/horse2widget.h \ 70 | widget/clearwidget.h \ 71 | widget/clear2widget.h \ 72 | widget/fixwidget.h \ 73 | widget/fix2widget.h \ 74 | widget/optimizewidget.h \ 75 | widget/optimize2widget.h \ 76 | widget/fuctionswidget.h \ 77 | dialog/market360dialog.h \ 78 | customviews/progressbarwidget.h \ 79 | dialog/upgradedialog.h \ 80 | customviews/upgradewidget.h \ 81 | dialog/optiondialog.h \ 82 | customviews/checkwidget.h \ 83 | popupwidgets/dataconnectsetup.h \ 84 | popupwidgets/popupwidget.h \ 85 | customviews/hovertoolbutton.h \ 86 | widget/loginwidget.h \ 87 | widget/clearmenuwidget.h \ 88 | customviews/focuswidget.h \ 89 | widget/actionswidget.h 90 | 91 | FORMS += mainwindow.ui \ 92 | dialog/questiondialog.ui\ 93 | dialog/aboutdialog.ui \ 94 | widget/home2widget.ui \ 95 | widget/homewidget.ui \ 96 | customviews/statewidget.ui \ 97 | widget/horsewidget.ui \ 98 | widget/horse2widget.ui \ 99 | widget/clearwidget.ui \ 100 | widget/clear2widget.ui \ 101 | widget/fixwidget.ui \ 102 | widget/fix2widget.ui \ 103 | widget/optimizewidget.ui \ 104 | widget/optimize2widget.ui \ 105 | widget/fuctionswidget.ui \ 106 | dialog/market360dialog.ui \ 107 | dialog/upgradedialog.ui \ 108 | dialog/optiondialog.ui \ 109 | customviews/scanwidget.ui \ 110 | popupwidgets/dataconnectsetup.ui \ 111 | popupwidgets/loginpopupwidget.ui \ 112 | widget/loginwidget.ui \ 113 | widget/clearmenuwidget.ui \ 114 | widget/actionswidget.ui 115 | 116 | RESOURCES += \ 117 | resource.qrc 118 | 119 | DISTFILES += \ 120 | styles.qss 121 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # qt_360_safe 2 | qt高仿360安全卫士 3 | 4 | 效果图地址: 5 | https://blog.csdn.net/dkaily1314/article/details/65442765 6 | 7 | 说明: 8 | 1. 该代码写于2017年3月,所以现在的qt编译器可能有部分代码已经不相同了。 9 | 2. 仅供新手学习qt使用,因为我也是开始学习时,练手的小程序,里面有很多不合理的代码。 10 | 11 | 12 | 编译时,可能会出现 Project ERROR: Unknown module(s) in QT: webenginewidgets 错误。 13 | 解决办法: 14 | 1. 替换源代码中web函数为您使用的qt web函数。 15 | 2. 直接注销掉web相关代码(qt_360_safe/dialog/market360dialog.h和/qt_360_safe/dialog/market360dialog.cpp中的代码) 16 | -------------------------------------------------------------------------------- /customviews/checkwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "checkwidget.h" 2 | #include 3 | 4 | CheckWidget::CheckWidget(QWidget *parent) : QWidget(parent) 5 | { 6 | mCurrentAln = 90; 7 | mImageSpread = 0; 8 | bCheckFinisehd = false; 9 | mImagePath = ""; 10 | timer = new QTimer (); 11 | connect (timer, SIGNAL(timeout()), this, SLOT(onTimerOut())); 12 | } 13 | 14 | void CheckWidget::start () { 15 | timer->start (20); 16 | } 17 | 18 | void CheckWidget::stop () { 19 | if (timer->isActive ()) { 20 | timer->stop (); 21 | } 22 | bCheckFinisehd = true; 23 | mImageSpread = 1.0; 24 | update (); 25 | } 26 | 27 | void CheckWidget::setImageSpraed (float s) { 28 | mImageSpread = s; 29 | update (); 30 | } 31 | 32 | void CheckWidget::onTimerOut() { 33 | if (mImageSpread < 1) { 34 | mImageSpread += 0.01; 35 | } else { 36 | mImageSpread = 1; 37 | } 38 | if (mCurrentAln - 10 > 0) { 39 | mCurrentAln -= 10; 40 | } else { 41 | mCurrentAln = 360; 42 | } 43 | 44 | update (); 45 | } 46 | 47 | void CheckWidget::paintEvent (QPaintEvent *event) { 48 | QWidget::paintEvent (event); 49 | QPainter painter(this); 50 | // 反走样 51 | painter.setRenderHint(QPainter::Antialiasing, true); 52 | 53 | if (!bCheckFinisehd) { 54 | QConicalGradient conicalGradient(width()/2, height()/2, mCurrentAln); 55 | conicalGradient.setColorAt(0, QColor(0x21, 0xc6, 0x50, 0xFF)); 56 | conicalGradient.setColorAt(0.3, QColor(0x21, 0xc6, 0x50, 0x3F)); 57 | conicalGradient.setColorAt(0.5, QColor(0x21, 0xc6, 0x50, 0x0F)); 58 | conicalGradient.setColorAt(1.0, QColor(0, 0, 0, 0)); 59 | 60 | painter.save (); 61 | painter.setPen (QPen(QBrush(conicalGradient), 2)); 62 | painter.drawEllipse (2, 2, width ()-4, height ()-4); 63 | painter.restore (); 64 | 65 | QConicalGradient conicalGradient2(width()/2, height()/2, mCurrentAln+180); 66 | conicalGradient2.setColorAt(0, QColor(0x21, 0xc6, 0x50, 0xFF)); 67 | conicalGradient2.setColorAt(0.3, QColor(0x21, 0xc6, 0x50, 0x3F)); 68 | conicalGradient2.setColorAt(0.5, QColor(0x21, 0xc6, 0x50, 0x0F)); 69 | conicalGradient2.setColorAt(1.0, QColor(0, 0, 0, 0)); 70 | 71 | painter.save (); 72 | painter.setPen (QPen(QBrush(conicalGradient2), 2)); 73 | painter.drawEllipse (2, 2, width ()-4, height ()-4); 74 | painter.restore (); 75 | } 76 | 77 | // 78 | if (mImagePath.length () > 0) { 79 | QImage image(mImagePath); 80 | QSize size (image.width ()*mImageSpread, image.height ()*mImageSpread); 81 | painter.drawImage (QRect((width ()-4-size.width ())/2, 82 | (height ()-4-size.height ())/2, 83 | size.width (), size.height ()), 84 | QImage(mImagePath)); 85 | } 86 | } 87 | 88 | void CheckWidget::setIcon (QString icon) { 89 | mImagePath = icon; 90 | update (); 91 | } 92 | -------------------------------------------------------------------------------- /customviews/checkwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef CHECKWIDGET_H 2 | #define CHECKWIDGET_H 3 | 4 | #include 5 | #include 6 | 7 | class CheckWidget : public QWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit CheckWidget(QWidget *parent = 0); 12 | 13 | protected: 14 | void paintEvent (QPaintEvent *event); 15 | 16 | signals: 17 | 18 | public slots: 19 | void onTimerOut(); 20 | 21 | private: 22 | QString mImagePath; 23 | QTimer *timer; 24 | float mImageSpread; 25 | int mCurrentAln; 26 | bool bCheckFinisehd; 27 | 28 | public: 29 | void setIcon (QString icon); 30 | void start (); 31 | void stop (); 32 | void setImageSpraed (float s) ; 33 | }; 34 | 35 | #endif // CHECKWIDGET_H 36 | -------------------------------------------------------------------------------- /customviews/focuswidget.cpp: -------------------------------------------------------------------------------- 1 | #include "focuswidget.h" 2 | #include 3 | 4 | FocusWidget::FocusWidget(QWidget *parent) : QPushButton(parent) 5 | { 6 | } 7 | 8 | void FocusWidget::focusOutEvent ( QFocusEvent * event ) 9 | { 10 | qDebug () << "focusOutEvent"; 11 | } 12 | 13 | void FocusWidget::focusInEvent ( QFocusEvent * event ) { 14 | qDebug () << "focusInEvent"; 15 | } 16 | -------------------------------------------------------------------------------- /customviews/focuswidget.h: -------------------------------------------------------------------------------- 1 | #ifndef FOCUSWIDGET_H 2 | #define FOCUSWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class FocusWidget : public QPushButton 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit FocusWidget(QWidget *parent = 0); 13 | 14 | signals: 15 | 16 | public slots: 17 | 18 | protected: 19 | void focusOutEvent ( QFocusEvent * event ); 20 | void focusInEvent ( QFocusEvent * event ) ; 21 | }; 22 | 23 | #endif // FOCUSWIDGET_H 24 | -------------------------------------------------------------------------------- /customviews/hoverpushbutton.cpp: -------------------------------------------------------------------------------- 1 | #include "hoverpushbutton.h" 2 | 3 | HoverPushButton::HoverPushButton(QWidget *parent) : QPushButton(parent) 4 | { 5 | 6 | } 7 | 8 | void HoverPushButton::enterEvent(QEvent *event) { 9 | emit onHoverPushButtonHoverSinal (this); 10 | } 11 | 12 | void HoverPushButton::leaveEvent(QEvent * event) { 13 | emit onHoverPushButtonNoHoverSinal (this); 14 | } 15 | -------------------------------------------------------------------------------- /customviews/hoverpushbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef HOVERPUSHBUTTON_H 2 | #define HOVERPUSHBUTTON_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class HoverPushButton : public QPushButton 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit HoverPushButton(QWidget *parent = 0); 14 | 15 | signals: 16 | public slots: 17 | protected: 18 | void enterEvent(QEvent *event); 19 | void leaveEvent(QEvent * event) ; 20 | 21 | signals: 22 | void onHoverPushButtonHoverSinal(HoverPushButton * w ); 23 | void onHoverPushButtonNoHoverSinal (HoverPushButton * w ); 24 | 25 | }; 26 | 27 | #endif // HOVERPUSHBUTTON_H 28 | -------------------------------------------------------------------------------- /customviews/hovertoolbutton.cpp: -------------------------------------------------------------------------------- 1 | #include "hovertoolbutton.h" 2 | 3 | HoverToolButton::HoverToolButton(QWidget *parent) : QToolButton(parent) 4 | { 5 | } 6 | 7 | void HoverToolButton::enterEvent(QEvent *event) { 8 | emit onHoverToolButtonHoverSinal (this); 9 | } 10 | 11 | void HoverToolButton::leaveEvent(QEvent * event) { 12 | emit onHoverToolButtonNoHoverSinal (this); 13 | } 14 | -------------------------------------------------------------------------------- /customviews/hovertoolbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef HOVERTOOLBUTTON_H 2 | #define HOVERTOOLBUTTON_H 3 | 4 | #include 5 | #include 6 | 7 | class HoverToolButton : public QToolButton 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit HoverToolButton(QWidget *parent = 0); 12 | 13 | signals: 14 | 15 | public slots: 16 | 17 | protected: 18 | void enterEvent(QEvent *event); 19 | void leaveEvent(QEvent * event) ; 20 | 21 | signals: 22 | void onHoverToolButtonHoverSinal(HoverToolButton * w); 23 | void onHoverToolButtonNoHoverSinal (HoverToolButton * w); 24 | 25 | }; 26 | 27 | #endif // HOVERTOOLBUTTON_H 28 | -------------------------------------------------------------------------------- /customviews/progressbarwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "progressbarwidget.h" 2 | #include 3 | 4 | ProgressBarWidget::ProgressBarWidget(QWidget *parent) : QWidget(parent) 5 | { 6 | mColor = QColor(0x29, 0xeb, 0x42); 7 | mProgress = 0; 8 | } 9 | 10 | void ProgressBarWidget::setColor (QColor color) { 11 | mColor = color; 12 | update (); 13 | } 14 | void ProgressBarWidget::setProgress (float progress){ 15 | mProgress = progress; 16 | update (); 17 | } 18 | 19 | void ProgressBarWidget::paintEvent (QPaintEvent *event) { 20 | QWidget::paintEvent (event); 21 | 22 | // 23 | QPainter painter(this); 24 | painter.setPen (QPen(Qt::transparent, 0)); 25 | painter.setBrush (mColor); 26 | 27 | painter.drawRect (0, 0, width ()*mProgress, height ()); 28 | } 29 | -------------------------------------------------------------------------------- /customviews/progressbarwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef PROGRESSBARWIDGET_H 2 | #define PROGRESSBARWIDGET_H 3 | 4 | #include 5 | 6 | class ProgressBarWidget : public QWidget 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit ProgressBarWidget(QWidget *parent = 0); 11 | 12 | signals: 13 | 14 | public slots: 15 | 16 | private: 17 | QColor mColor; 18 | float mProgress; 19 | 20 | public: 21 | void setColor (QColor color); 22 | void setProgress (float progress); 23 | 24 | private: 25 | void paintEvent (QPaintEvent *event); 26 | }; 27 | 28 | #endif // PROGRESSBARWIDGET_H 29 | -------------------------------------------------------------------------------- /customviews/scanwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "scanwidget.h" 2 | #include "ui_scanwidget.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | ScanCT::ScanCT(QWidget *parent) : 9 | QWidget(parent) 10 | { 11 | mSleepTimes = 0; 12 | bToLeft = false; 13 | mRex = -15; 14 | timer = new QTimer; 15 | connect (timer, SIGNAL(timeout()), this, SLOT(onTimerOver())); 16 | } 17 | 18 | void ScanCT::onTimerOver() { 19 | if (mSleepTimes > 0) { 20 | mSleepTimes--; 21 | return ; 22 | } 23 | if (bToLeft) { 24 | if (mRex - 1 > -15) { 25 | mRex-=1; 26 | } else { 27 | bToLeft = false; 28 | mSleepTimes = 20; 29 | } 30 | } else { 31 | if (mRex + 1 < width ()) { 32 | mRex += 1; 33 | } else { 34 | bToLeft = true; 35 | } 36 | } 37 | 38 | update (); 39 | } 40 | 41 | void ScanCT::paintEvent (QPaintEvent *event) { 42 | QWidget::paintEvent (event); 43 | if (mSleepTimes > 0) { 44 | return ; 45 | } 46 | 47 | QRect rect(mRex, 0, 15, height ()); 48 | QLinearGradient linear(QPointF(rect.x (), rect.height ()/2), 49 | QPointF(rect.right (), rect.height ()/2)); 50 | 51 | if (bToLeft) { 52 | linear.setColorAt(0, QColor(0x43, 0xaf, 0xff, 0xFF)); 53 | linear.setColorAt (0.3, QColor(0x43, 0xaf, 0xff, 0x9F)); 54 | linear.setColorAt(1, QColor(0, 0, 0, 0)); 55 | } else { 56 | linear.setColorAt(1, QColor(0x43, 0xaf, 0xff, 0xFF)); 57 | linear.setColorAt (0.3, QColor(0x43, 0xaf, 0xff, 0x9F)); 58 | linear.setColorAt(0, QColor(0, 0, 0, 0)); 59 | } 60 | 61 | // 62 | QPainter painter(this); 63 | painter.setPen (Qt::transparent); 64 | painter.setBrush (linear); 65 | painter.drawRect (rect); 66 | } 67 | 68 | void ScanCT::start () { 69 | mSleepTimes = 0; 70 | timer->start (20); 71 | } 72 | 73 | void ScanCT::stop () { 74 | timer->stop (); 75 | mSleepTimes = 20; 76 | update (); 77 | } 78 | 79 | ScanWidget::ScanWidget(QWidget *parent) : 80 | QWidget(parent), 81 | ui(new Ui::ScanWidget) 82 | { 83 | ui->setupUi(this); 84 | 85 | // 86 | mState = ScanState::waitScan; 87 | ui->subtitle->setText ("等待扫描"); 88 | ui->subtitle->setAlignment (Qt::AlignCenter); 89 | ui->title->setAlignment (Qt::AlignCenter); 90 | ui->subtitle->setStyleSheet ("color: #ababab; font-size: 12px"); 91 | ui->title->setStyleSheet ("color: #ababab; font-size: 14px"); 92 | } 93 | 94 | ScanWidget::~ScanWidget() 95 | { 96 | delete ui; 97 | } 98 | 99 | void ScanWidget::setScanState (ScanState state) { 100 | mState = state; 101 | 102 | update (); 103 | } 104 | 105 | void ScanWidget::setTitle (QString title) { 106 | ui->title->setText (title); 107 | } 108 | 109 | void ScanWidget::setIcon (QString icon){ 110 | if (icon.length () == 0) { 111 | return ; 112 | } 113 | 114 | mIcon = icon; 115 | ui->icon->setStyleSheet ("background-color: #ababab"); 116 | QPixmap pixmap(icon); 117 | QBitmap bitmap = pixmap.mask (); 118 | ui->icon->setMask(bitmap); 119 | } 120 | 121 | //灰ababab 蓝43afff 绿07c354 122 | void ScanWidget::update () { 123 | QWidget::update (); 124 | 125 | // 126 | switch (mState) { 127 | case ScanState::waitScan: 128 | ui->icon->setStyleSheet ("background-color: #ababab"); 129 | ui->subtitle->setStyleSheet ("color: #ababab"); 130 | ui->subtitle->setText ("等待扫描"); 131 | break; 132 | case ScanState::scan: 133 | ui->icon->setStyleSheet ("background-color: #43afff"); 134 | ui->subtitle->setStyleSheet ("color: #43afff"); 135 | ui->subtitle->setText ("正在扫描..."); 136 | ui->scan->start (); 137 | break; 138 | case ScanState::finished: 139 | ui->scan->stop (); 140 | ui->icon->setStyleSheet ("background-color: #07c354"); 141 | ui->subtitle->setStyleSheet ("color: #FFFFFF;background-color: #07c354;border-radius: 10px;"); 142 | ui->subtitle->setText ("安全"); 143 | break; 144 | } 145 | } 146 | 147 | -------------------------------------------------------------------------------- /customviews/scanwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef SCANWIDGET_H 2 | #define SCANWIDGET_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class ScanWidget; 9 | } 10 | 11 | enum ScanState { 12 | waitScan = 0, 13 | scan = 1, 14 | finished = 2, 15 | }; 16 | 17 | class ScanCT: public QWidget { 18 | Q_OBJECT 19 | public: 20 | explicit ScanCT(QWidget *parent = 0); 21 | 22 | private: 23 | QTimer * timer; 24 | bool bToLeft; 25 | int mRex ; 26 | int mSleepTimes; 27 | 28 | protected: 29 | void paintEvent (QPaintEvent *event); 30 | 31 | private slots: 32 | void onTimerOver(); 33 | 34 | public: 35 | void start (); 36 | void stop (); 37 | }; 38 | 39 | class ScanWidget : public QWidget 40 | { 41 | Q_OBJECT 42 | 43 | public: 44 | //explicit ScanWidget(QWidget *parent = 0, QString icon = "", QString sicon = "", QString ficon = "", QString title = ""); 45 | explicit ScanWidget(QWidget *parent = 0); 46 | ~ScanWidget(); 47 | 48 | private: 49 | Ui::ScanWidget *ui; 50 | ScanState mState; 51 | QString mIcon; 52 | 53 | public: 54 | void setScanState (ScanState state) ; 55 | void setIcon (QString icon); 56 | void setTitle (QString title); 57 | 58 | protected: 59 | void update (); 60 | }; 61 | 62 | #endif // SCANWIDGET_H 63 | -------------------------------------------------------------------------------- /customviews/scanwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ScanWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 120 10 | 130 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 40 20 | 30 21 | 30 22 | 30 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 70 31 | 121 32 | 16 33 | 34 | 35 | 36 | 37 | 38 | 39 | TextLabel 40 | 41 | 42 | 43 | 44 | 45 | 30 46 | 100 47 | 60 48 | 20 49 | 50 | 51 | 52 | TextLabel 53 | 54 | 55 | 56 | 57 | 58 | 40 59 | 30 60 | 30 61 | 30 62 | 63 | 64 | 65 | 66 | 67 | 68 | ScanCT 69 | QWidget 70 |
customviews/scanwidget.h
71 | 1 72 |
73 |
74 | 75 | 76 |
77 | -------------------------------------------------------------------------------- /customviews/statewidget.cpp: -------------------------------------------------------------------------------- 1 | #include "statewidget.h" 2 | #include "ui_statewidget.h" 3 | 4 | StateWidget::StateWidget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::StateWidget) 7 | { 8 | ui->setupUi(this); 9 | 10 | ui->title->setStyleSheet ("color: #676767"); 11 | ui->title->setAlignment (Qt::AlignCenter); 12 | } 13 | 14 | StateWidget::~StateWidget() 15 | { 16 | delete ui; 17 | } 18 | 19 | int StateWidget::getState () { 20 | return mState; 21 | } 22 | 23 | void StateWidget::show (QString icon, QString txt, int state) { 24 | ui->title->setText (txt); 25 | ui->icon->setStyleSheet (QString("border-image: url(%1)").arg (icon)); 26 | setState (state); 27 | } 28 | 29 | void StateWidget::setState (int state) { 30 | mState = state; 31 | if (0==state) { 32 | ui->state->setStyleSheet (QString("border-image: url(:/other/images/other/icon_waring.png)")); 33 | } else { 34 | ui->state->setStyleSheet (QString("border-image: url(:/other/images/other/icon_right.png)")); 35 | } 36 | } 37 | 38 | void StateWidget::enterEvent(QEvent *event) { 39 | emit onStateWidgetHoverSinal(this); 40 | } 41 | 42 | void StateWidget::leaveEvent(QEvent * event) { 43 | emit onStateWidgetNoHoverSinal (this); 44 | } 45 | -------------------------------------------------------------------------------- /customviews/statewidget.h: -------------------------------------------------------------------------------- 1 | #ifndef STATEWIDGET_H 2 | #define STATEWIDGET_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class StateWidget; 8 | } 9 | 10 | class StateWidget : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit StateWidget(QWidget *parent = 0); 16 | ~StateWidget(); 17 | 18 | private: 19 | Ui::StateWidget *ui; 20 | int mState; 21 | 22 | signals: 23 | void onStateWidgetHoverSinal(StateWidget * w); 24 | void onStateWidgetNoHoverSinal (StateWidget * w); 25 | 26 | public: 27 | void show (QString icon, QString txt, int state); 28 | void setState (int state) ; 29 | int getState (); 30 | 31 | protected: 32 | void enterEvent(QEvent *event); 33 | void leaveEvent(QEvent * event) ; 34 | }; 35 | 36 | #endif // STATEWIDGET_H 37 | -------------------------------------------------------------------------------- /customviews/statewidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | StateWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 70 10 | 70 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 15 20 | 5 21 | 40 22 | 40 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 45 31 | 70 32 | 20 33 | 34 | 35 | 36 | TextLabel 37 | 38 | 39 | 40 | 41 | 42 | 38 43 | 22 44 | 20 45 | 20 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /customviews/upgradewidget.cpp: -------------------------------------------------------------------------------- 1 | #include "upgradewidget.h" 2 | #include 3 | #include 4 | #include 5 | 6 | UpgradeWidget::UpgradeWidget(QWidget *parent) : QWidget(parent) 7 | { 8 | // 9 | mRadian = 90; 10 | mMode = UpgradeMode::scan; 11 | 12 | timer = new QTimer; 13 | connect (timer, SIGNAL(timeout()), this, SLOT(on_timer_out())); 14 | start (); 15 | } 16 | 17 | void UpgradeWidget::start () { 18 | timer->start (20); 19 | } 20 | 21 | void UpgradeWidget::stop () { 22 | 23 | } 24 | 25 | void UpgradeWidget::on_timer_out() { 26 | if (mRadian - 5 > 0) { 27 | mRadian -= 5; 28 | } else { 29 | mRadian = 360; 30 | } 31 | update (); 32 | } 33 | 34 | void UpgradeWidget::paintEvent (QPaintEvent *event) { 35 | QWidget::paintEvent (event); 36 | 37 | QPainter painter(this); 38 | painter.setRenderHint(QPainter::Antialiasing); 39 | painter.setRenderHint(QPainter::SmoothPixmapTransform); 40 | 41 | 42 | painter.save (); 43 | 44 | //9389d7 45 | painter.setPen(QPen(Qt::transparent, 0)); 46 | painter.setBrush (QColor(0x93, 0x89, 0xd7)); 47 | painter.drawEllipse (2, 2, width ()-4, height ()-4); 48 | painter.restore (); 49 | 50 | painter.setPen(QPen(Qt::white, 4)); 51 | // 外圈 52 | painter.drawEllipse (2, 2, width ()-4, height ()-4); 53 | 54 | painter.setPen(QPen(QColor(0xFF, 0xFF, 0xFF, 0x8F), 1)); 55 | // 内圈3 56 | painter.drawEllipse (6, 6, width ()-12, height ()-12); 57 | 58 | int w = (width ())/5; 59 | // 内圈2 60 | painter.drawEllipse (w, w, width ()-w*2, height ()-w*2); 61 | // 内圈1 62 | painter.drawEllipse (w*2, w*2, width ()-w*4, height ()-w*4); 63 | // 显示十子线 64 | painter.drawLine (QPoint(0, height ()/2), QPoint(width (), height ()/2)); 65 | painter.drawLine (QPoint(width ()/2, 0), QPoint(width ()/2, height ())); 66 | 67 | if (mMode == UpgradeMode::scan) { 68 | // 显示模式1 69 | drawScanMode (); 70 | } else if (mMode == UpgradeMode::download) { 71 | drawDownLoadMode (); 72 | } else if (mMode == UpgradeMode::finished){ 73 | drawFinishedMode (); 74 | } 75 | } 76 | 77 | QPoint UpgradeWidget::getPoint (int arg, int w) { 78 | int x = width ()/2 + w * qCos((360-arg) * 3.14 /180 ) ; 79 | int y = height ()/2 + w * qSin ((360-arg) * 3.14 /180 ) ; 80 | return QPoint(x, y); 81 | } 82 | 83 | void UpgradeWidget::drawScanMode () { 84 | int w = (width ())/5; 85 | QPainter painter(this); 86 | 87 | QConicalGradient conicalGradient2(width()/2, height()/2, mRadian); 88 | conicalGradient2.setColorAt(0, QColor(0xFF, 0xFF, 0xFF, 0x7F)); 89 | conicalGradient2.setColorAt(0.3, QColor(0xFF, 0xFF, 0xFF, 0x3F)); 90 | conicalGradient2.setColorAt(0.7, QColor(0, 0, 0, 0)); 91 | conicalGradient2.setColorAt(1.0, QColor(0, 0, 0, 0)); 92 | 93 | painter.save(); 94 | painter.setPen(QPen(QBrush(conicalGradient2), w)); 95 | painter.drawEllipse(w/2+6, w/2+6, width ()-w-12, height ()-w-12); 96 | painter.restore(); 97 | 98 | // 外面的圆 99 | painter.save(); 100 | painter.setPen(QPen(QBrush(conicalGradient2), 10)); 101 | painter.drawEllipse(w/2, w/2, width ()-w, height ()-w); 102 | painter.restore(); 103 | 104 | // 最里面的圆 105 | painter.save(); 106 | painter.setPen(QPen(Qt::white, 5)); 107 | painter.drawEllipse(width ()/2-6, width ()/2-6, 12, 12); 108 | painter.restore (); 109 | 110 | // 画线 111 | painter.setPen(QPen(Qt::white, 3)); 112 | painter.drawLine (getPoint (mRadian, 6), 113 | getPoint (mRadian, height ()/2-8)); 114 | } 115 | 116 | void UpgradeWidget::drawDownLoadMode () { 117 | 118 | } 119 | 120 | void UpgradeWidget::drawFinishedMode () { 121 | // 122 | QPainter painter(this); 123 | 124 | 125 | } 126 | -------------------------------------------------------------------------------- /customviews/upgradewidget.h: -------------------------------------------------------------------------------- 1 | #ifndef UPGRADEWIDGET_H 2 | #define UPGRADEWIDGET_H 3 | 4 | #include 5 | #include 6 | 7 | enum UpgradeMode { 8 | scan = 0, // 扫描 9 | download = 1, // 下载 10 | finished = 2,//完成 11 | }; 12 | 13 | class UpgradeWidget : public QWidget 14 | { 15 | Q_OBJECT 16 | public: 17 | explicit UpgradeWidget(QWidget *parent = 0); 18 | 19 | signals: 20 | 21 | private slots: 22 | void on_timer_out(); 23 | 24 | protected: 25 | void paintEvent (QPaintEvent *event); 26 | 27 | private: 28 | QTimer * timer; 29 | int mRadian; 30 | UpgradeMode mMode; 31 | 32 | public: 33 | void start (); 34 | void stop (); 35 | 36 | private: 37 | QPoint getPoint (int arg, int w) ; 38 | 39 | void drawScanMode (); 40 | void drawDownLoadMode (); 41 | void drawFinishedMode (); 42 | 43 | }; 44 | 45 | #endif // UPGRADEWIDGET_H 46 | -------------------------------------------------------------------------------- /customviews/waveballwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef WAVEBALLWIDGET_H 2 | #define WAVEBALLWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | enum WaveBallMode { 10 | waveMode = 0, // 波形模式 11 | noWaveMode = 1, // 普通模式 12 | }; 13 | 14 | // 15 | class Bubble : public QObject{ 16 | Q_OBJECT 17 | public: 18 | explicit Bubble(QWidget *parent = 0, QPoint p = QPoint(), int w = 10, float s = 1.0): 19 | point(p), 20 | width(w), 21 | speed (s) { 22 | } 23 | 24 | public: 25 | QPoint point; 26 | int width; 27 | float speed; 28 | }; 29 | 30 | class WaveBallWidget : public QWidget 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | explicit WaveBallWidget(QWidget *parent = 0); 36 | ~WaveBallWidget(); 37 | 38 | protected: 39 | void paintEvent (QPaintEvent *event); 40 | 41 | private slots: 42 | void on_timer_out(); 43 | void on_roundTimer_out(); 44 | 45 | public: 46 | void startRound (); 47 | void stopRound (); 48 | 49 | void startWave (); 50 | void stopWave (); 51 | 52 | // 波形模式. 53 | void setWaveMode (WaveBallMode mode = waveMode); 54 | // 显示边框圆 55 | void showRound (bool isShow = true); 56 | // 显示分数 57 | void showScores (bool s); 58 | 59 | // 60 | void setProgress (float p); 61 | 62 | // 63 | void setIcon (QString icon, QSize size); 64 | 65 | private: 66 | int offset; 67 | float progress; 68 | // 圆的弧度 69 | int roundAlen; 70 | bool bShowRound; 71 | bool bShowBubble; 72 | 73 | // 波形模式 74 | WaveBallMode mWaveBallMode; 75 | // 气泡数组 76 | QVector bubbles; 77 | 78 | // 79 | bool bScores; 80 | 81 | QTimer * timer; 82 | QTimer * roundTimer; 83 | 84 | // 85 | bool bShowImage; 86 | QString mImagePath; 87 | QSize mImageSize; 88 | 89 | private: 90 | void drawWaveBallBg (); 91 | void drawWaveBall (); 92 | void drawFullWaveBall (); 93 | void drawRound (); 94 | void drawScores (); 95 | void drawBubble (); 96 | void drawImage (); 97 | 98 | Bubble * getRandBubble (); 99 | QColor getPenColor (); 100 | QLinearGradient getLinearGradient (bool isBackColor); 101 | QPoint getPoint (int arg, int w); 102 | }; 103 | 104 | #endif // WAVEBALLWIDGET_H 105 | -------------------------------------------------------------------------------- /dialog/aboutdialog.cpp: -------------------------------------------------------------------------------- 1 | #include "aboutdialog.h" 2 | #include "ui_aboutdialog.h" 3 | 4 | AboutDialog::AboutDialog(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::AboutDialog) 7 | { 8 | ui->setupUi(this); 9 | 10 | // 不显示状态栏 11 | // 设置窗体标题栏隐藏和窗口是否有任务栏图标 12 | this->setWindowFlags(Qt::FramelessWindowHint|Qt::Tool); 13 | 14 | 15 | // 16 | ui->topWidget->setAutoFillBackground(true); 17 | ui->mainWidget->setAutoFillBackground(true); 18 | 19 | // 20 | ui->lbTitle->setStyleSheet ("color:#FFFFFF"); 21 | 22 | // 23 | // QPalette palette; 24 | // palette.setBrush(QPalette::Background, QBrush(QPixmap(":/images/LoginBanner.png"))); 25 | // ui->topWidget->setPalette (palette); 26 | // 27 | QPalette palette2; 28 | palette2.setColor(QPalette::Background, QColor(0xFD,0xFD,0xFD)); 29 | ui->mainWidget->setPalette (palette2); 30 | 31 | // 关闭按钮 32 | ui->pbClose->setStyleSheet (QString("border-image: url(:/top/images/top/top_close.png)")); 33 | ui->icon->setStyleSheet ("border-image: url(:/other/images/other/icon.png)"); 34 | 35 | //这句很关键啊,否则就只能通过linkActivated信号,连接到自定义槽函数中打开了 36 | ui->guanwang->setOpenExternalLinks(true); 37 | ui->guanwang->setText(tr("http://sj.360.cn/index.html")); 38 | } 39 | 40 | AboutDialog::~AboutDialog() 41 | { 42 | delete ui; 43 | } 44 | 45 | void AboutDialog::on_pushButton_clicked() 46 | { 47 | this->close (); 48 | } 49 | 50 | void AboutDialog::on_pbClose_clicked() 51 | { 52 | this->close (); 53 | } 54 | -------------------------------------------------------------------------------- /dialog/aboutdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef ABOUTDIALOG_H 2 | #define ABOUTDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class AboutDialog; 8 | } 9 | 10 | class AboutDialog : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit AboutDialog(QWidget *parent = 0); 16 | ~AboutDialog(); 17 | 18 | private slots: 19 | void on_pushButton_clicked(); 20 | 21 | void on_pbClose_clicked(); 22 | 23 | private: 24 | Ui::AboutDialog *ui; 25 | }; 26 | 27 | #endif // ABOUTDIALOG_H 28 | -------------------------------------------------------------------------------- /dialog/aboutdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | AboutDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 520 10 | 290 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 520 22 | 290 23 | 24 | 25 | 26 | false 27 | 28 | 29 | 30 | 31 | 490 32 | 10 33 | 16 34 | 16 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 10 45 | 10 46 | 20 47 | 20 48 | 49 | 50 | 51 | 52 | 53 | 54 | 40 55 | 10 56 | 111 57 | 16 58 | 59 | 60 | 61 | 360安全卫士 62 | 63 | 64 | 65 | 66 | 67 | 410 68 | 240 69 | 71 70 | 41 71 | 72 | 73 | 74 | 确定 75 | 76 | 77 | pbClose 78 | icon 79 | lbTitle 80 | pushButton 81 | mainWidget 82 | 83 | 84 | 85 | 86 | 0 87 | 37 88 | 521 89 | 261 90 | 91 | 92 | 93 | 94 | 95 | 40 96 | 110 97 | 171 98 | 16 99 | 100 | 101 | 102 | 主程序版本: 11(11.0.0.1001) 103 | 104 | 105 | 106 | 107 | 108 | 40 109 | 140 110 | 161 111 | 16 112 | 113 | 114 | 115 | 备用木马库: 2017-03-17 116 | 117 | 118 | 119 | 120 | 121 | 40 122 | 170 123 | 231 124 | 16 125 | 126 | 127 | 128 | Copyright(c) 360.cn Inc. All Rights Reserved 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /dialog/market360dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "market360dialog.h" 2 | #include "ui_market360dialog.h" 3 | #include 4 | 5 | Market360Dialog::Market360Dialog(QWidget *parent) : 6 | QDialog(parent, Qt::FramelessWindowHint), 7 | ui(new Ui::Market360Dialog) 8 | { 9 | ui->setupUi(this); 10 | 11 | webview = NULL; 12 | ui->background->setStyleSheet ("background: #F3F3F3"); 13 | ui->icon->setStyleSheet ("image: url(:/other/images/other/icon.png)"); 14 | ui->close->setStyleSheet ("image: url(:/top/images/top/top_close_b.png);"); 15 | ui->min->setStyleSheet ("image: url(:/top/images/top/top_min_b.png);"); 16 | ui->bottom->setStyleSheet ("background-color: #F5F5F5"); 17 | 18 | optionToolButtons (); 19 | setTabBarIndex (0); 20 | } 21 | 22 | Market360Dialog::~Market360Dialog() 23 | { 24 | delete ui; 25 | } 26 | 27 | void Market360Dialog::createWebView (QString url) { 28 | if (webview == NULL) { 29 | webview = new QWebEngineView; 30 | ui->verticalLayout->addWidget (webview); 31 | } 32 | 33 | webview->load(QUrl(url)); 34 | } 35 | 36 | void Market360Dialog::on_close_clicked() 37 | { 38 | this->close (); 39 | } 40 | 41 | void Market360Dialog::optionToolButtons () { 42 | optionToolButton (ui->toolButton, 43 | QIcon(":/market/images/market/market_icon_1_b.png"), 44 | "首页", 45 | QSize(30, 30), 46 | "market_toolbutton"); 47 | optionToolButton (ui->toolButton_2, 48 | QIcon(":/market/images/market/market_icon_2_b.png"), 49 | "手机", 50 | QSize(30, 30), 51 | "market_toolbutton"); 52 | optionToolButton (ui->toolButton_3, 53 | QIcon(":/market/images/market/market_icon_3_b.png"), 54 | "出行", 55 | QSize(30, 30), 56 | "market_toolbutton"); 57 | optionToolButton (ui->toolButton_4, 58 | QIcon(":/market/images/market/market_icon_4_b.png"), 59 | "家居", 60 | QSize(30, 30), 61 | "market_toolbutton"); 62 | optionToolButton (ui->toolButton_5, 63 | QIcon(":/market/images/market/market_icon_5_b.png"), 64 | "陪护", 65 | QSize(30, 30), 66 | "market_toolbutton"); 67 | } 68 | 69 | 70 | void Market360Dialog::optionToolButton (QToolButton * tb, 71 | QIcon icon, 72 | QString text, 73 | QSize size, 74 | QString property) { 75 | QAction *pAction = new QAction(this); 76 | pAction->setText(text); 77 | pAction->setIcon(icon); 78 | tb->setIconSize(size); 79 | tb->setDefaultAction(pAction); 80 | tb->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 81 | tb->setProperty (property.toLatin1().data(), true); 82 | } 83 | 84 | 85 | void Market360Dialog::setTabBarIndex (int index) { 86 | ui->toolButton->setIcon (QIcon(index==0?":/market/images/market/market_icon_1_g.png":":/market/images/market/market_icon_1_b.png")); 87 | ui->toolButton->setStyleSheet (index==0?"color: #06c655;":"color: 8b8b8b;"); 88 | ui->toolButton_2->setIcon (QIcon(index==1?":/market/images/market/market_icon_2_g.png":":/market/images/market/market_icon_2_b.png")); 89 | ui->toolButton_2->setStyleSheet (index==1?"color: #06c655;":"color: 8b8b8b;"); 90 | ui->toolButton_3->setIcon (QIcon(index==2?":/market/images/market/market_icon_3_g.png":":/market/images/market/market_icon_3_b.png")); 91 | ui->toolButton_3->setStyleSheet (index==2?"color: #06c655;":"color: 8b8b8b;"); 92 | ui->toolButton_4->setIcon (QIcon(index==3?":/market/images/market/market_icon_4_g.png":":/market/images/market/market_icon_4_b.png")); 93 | ui->toolButton_4->setStyleSheet (index==3?"color: #06c655;":"color: 8b8b8b;"); 94 | ui->toolButton_5->setIcon (QIcon(index==4?":/market/images/market/market_icon_5_g.png":":/market/images/market/market_icon_5_b.png")); 95 | ui->toolButton_5->setStyleSheet (index==4?"color: #06c655;":"color: 8b8b8b;"); 96 | 97 | QString url[] = { 98 | QString("http://mall.safe.360.cn/index.html"), 99 | QString("http://mall.safe.360.cn/list_phone.html"), 100 | QString("http://mall.safe.360.cn/list_trip.html"), 101 | QString("http://mall.safe.360.cn/list_houseware.html"), 102 | QString("http://mall.safe.360.cn/list_accompany.html"), 103 | }; 104 | createWebView (url[index]) ; 105 | } 106 | 107 | 108 | void Market360Dialog::on_toolButton_clicked() 109 | { 110 | setTabBarIndex (0); 111 | } 112 | 113 | void Market360Dialog::on_toolButton_2_clicked() 114 | { 115 | setTabBarIndex (1); 116 | } 117 | 118 | void Market360Dialog::on_toolButton_3_clicked() 119 | { 120 | setTabBarIndex (2); 121 | } 122 | 123 | void Market360Dialog::on_toolButton_4_clicked() 124 | { 125 | setTabBarIndex (3); 126 | } 127 | 128 | void Market360Dialog::on_toolButton_5_clicked() 129 | { 130 | setTabBarIndex (4); 131 | } 132 | -------------------------------------------------------------------------------- /dialog/market360dialog.h: -------------------------------------------------------------------------------- 1 | #ifndef MARKET360DIALOG_H 2 | #define MARKET360DIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Ui { 9 | class Market360Dialog; 10 | } 11 | 12 | class Market360Dialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit Market360Dialog(QWidget *parent = 0); 18 | ~Market360Dialog(); 19 | 20 | private slots: 21 | 22 | void on_close_clicked(); 23 | 24 | void on_toolButton_clicked(); 25 | 26 | void on_toolButton_2_clicked(); 27 | 28 | void on_toolButton_3_clicked(); 29 | 30 | void on_toolButton_4_clicked(); 31 | 32 | void on_toolButton_5_clicked(); 33 | 34 | private: 35 | Ui::Market360Dialog *ui; 36 | QWebEngineView * webview; 37 | 38 | private: 39 | void optionToolButtons (); 40 | void optionToolButton (QToolButton * tb, 41 | QIcon icon, 42 | QString text, 43 | QSize size, 44 | QString property) ; 45 | void setTabBarIndex (int index); 46 | void createWebView (QString url) ; 47 | }; 48 | 49 | #endif // MARKET360DIALOG_H 50 | -------------------------------------------------------------------------------- /dialog/market360dialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Market360Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 620 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 620 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 920 32 | 620 33 | 34 | 35 | 36 | 37 | 38 | 10 39 | 10 40 | 20 41 | 20 42 | 43 | 44 | 45 | 46 | 47 | 48 | 40 49 | 10 50 | 59 51 | 16 52 | 53 | 54 | 55 | 360商城 56 | 57 | 58 | 59 | 60 | 61 | 890 62 | 10 63 | 20 64 | 20 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 860 75 | 10 76 | 20 77 | 20 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 270 88 | 10 89 | 60 90 | 70 91 | 92 | 93 | 94 | ... 95 | 96 | 97 | 98 | 99 | 100 | 350 101 | 10 102 | 60 103 | 70 104 | 105 | 106 | 107 | ... 108 | 109 | 110 | 111 | 112 | 113 | 430 114 | 10 115 | 60 116 | 70 117 | 118 | 119 | 120 | ... 121 | 122 | 123 | 124 | 125 | 126 | 510 127 | 10 128 | 60 129 | 70 130 | 131 | 132 | 133 | ... 134 | 135 | 136 | 137 | 138 | 139 | 590 140 | 10 141 | 60 142 | 70 143 | 144 | 145 | 146 | ... 147 | 148 | 149 | 150 | 151 | 152 | 0 153 | 80 154 | 921 155 | 541 156 | 157 | 158 | 159 | 160 | 161 | 0 162 | 0 163 | 921 164 | 541 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /dialog/optiondialog.h: -------------------------------------------------------------------------------- 1 | #ifndef OPTIONDIALOG_H 2 | #define OPTIONDIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace Ui { 10 | class OptionDialog; 11 | } 12 | 13 | class OptionItem : public QObject { 14 | Q_OBJECT 15 | public: 16 | explicit OptionItem(QWidget *parent = 0, QString t = "", QString i = "", int type = 0, bool canClick = true): 17 | mTitle(t), mIcon(i), mType(type), mCanClick(canClick){ 18 | } 19 | 20 | public: 21 | QString mTitle; 22 | QString mIcon; 23 | int mType; 24 | bool mCanClick; 25 | 26 | QVector subitems; 27 | }; 28 | 29 | class OptionDialog : public QDialog 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | explicit OptionDialog(QWidget *parent = 0); 35 | ~OptionDialog(); 36 | 37 | private slots: 38 | void on_close_clicked(); 39 | 40 | void on_pushButton_clicked(); 41 | 42 | void onTreeWidgetDidClicked(QTreeWidgetItem* item,int row); 43 | 44 | private: 45 | Ui::OptionDialog *ui; 46 | QVector items; 47 | QWidget * mOldWidget; 48 | int mOldType; 49 | 50 | private: 51 | void optionTreeWidget (); 52 | QWidget * topItemWidget (OptionItem * item); 53 | QWidget * cellItemWidget (OptionItem * item); 54 | }; 55 | 56 | #endif // OPTIONDIALOG_H 57 | -------------------------------------------------------------------------------- /dialog/optiondialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | OptionDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 780 10 | 500 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 780 22 | 500 23 | 24 | 25 | 26 | 27 | 28 | 0 29 | 30 30 | 780 31 | 430 32 | 33 | 34 | 35 | 36 | 37 | 0 38 | 0 39 | 191 40 | 429 41 | 42 | 43 | 44 | 45 | 1 46 | 47 | 48 | 49 | 50 | 51 | 52 | 190 53 | 0 54 | 591 55 | 429 56 | 57 | 58 | 59 | 60 | 61 | 10 62 | 0 63 | 571 64 | 421 65 | 66 | 67 | 68 | 功能定制 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 0 77 | 460 78 | 781 79 | 40 80 | 81 | 82 | 83 | 84 | 85 | 710 86 | 5 87 | 60 88 | 30 89 | 90 | 91 | 92 | 确定 93 | 94 | 95 | 96 | 97 | 98 | 10 99 | 5 100 | 121 101 | 32 102 | 103 | 104 | 105 | 恢复所有默认值 106 | 107 | 108 | 109 | 110 | 111 | 112 | 20 113 | 10 114 | 141 115 | 16 116 | 117 | 118 | 119 | 360设置中心 120 | 121 | 122 | 123 | 124 | 125 | 750 126 | 5 127 | 20 128 | 20 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /dialog/questiondialog.cpp: -------------------------------------------------------------------------------- 1 | #include "questiondialog.h" 2 | #include "ui_questiondialog.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | QuestionDialog::QuestionDialog(QWidget *parent) : 9 | QDialog(parent), 10 | ui(new Ui::QuestionDialog) 11 | { 12 | ui->setupUi(this); 13 | 14 | // 15 | // 不显示状态栏 16 | // 设置窗体标题栏隐藏和窗口是否有任务栏图标 17 | this->setWindowFlags(Qt::FramelessWindowHint|Qt::Tool); 18 | this->setStyleSheet ("background-color: #FAFAFA"); 19 | // 20 | ui->topWidget->setAutoFillBackground(true); 21 | ui->lbTitle->setStyleSheet ("color:#FFFFFF"); 22 | ui->topWidget->setStyleSheet ("background-color:#25C966"); 23 | 24 | // 关闭按钮 25 | ui->pbClose->setStyleSheet (QString("border-image: url(:/top/images/top/top_close.png)")); 26 | ui->pbMin->setStyleSheet (QString("border-image: url(:/top/images/top/top_min.png)")); 27 | ui->question->setStyleSheet (QString("border-image: url(:/question/images/question/question.png)")); 28 | ui->icon->setStyleSheet (QString("border-image: url(:/other/images/other/icon.png)")); 29 | //这句很关键啊,否则就只能通过linkActivated信号,连接到自定义槽函数中打开了 30 | ui->pbLuntan->setStyleSheet ("color: #FFFFFF"); 31 | ui->pbLuntan->setText ("进入360官方论坛"); 32 | 33 | optionGridLayout (); 34 | 35 | // 先隐藏 36 | ui->next->setHidden (true); 37 | 38 | ui->nextIcon->setStyleSheet ("border-image: url(:/question/images/question/next_icon2.png)"); 39 | 40 | //next 41 | ui->nextTitle->setStyleSheet ("color: #004c87;font-size: 15px;font-weight:bold;"); 42 | ui->nextPhone->setStyleSheet ("color: #004c87;font-size: 15px;font-weight:bold;"); 43 | ui->nextQQ->setStyleSheet ("color: #004c87;font-size: 15px;font-weight:bold;"); 44 | ui->nextTextEdit->setPlaceholderText (tr("请告诉我们你的问题的提示信息或相关截图")); 45 | ui->nextTextEdit->setStyleSheet ("border: 1px solid #e1e0e0;"); 46 | ui->nextOther->setStyleSheet ("color: #ABABAB"); 47 | ui->nextBack->setStyleSheet ("color: #0893E1"); 48 | 49 | // 50 | optionToolButtons (); 51 | optionComboBox (); 52 | } 53 | 54 | QuestionDialog::~QuestionDialog() 55 | { 56 | delete ui; 57 | } 58 | 59 | void QuestionDialog::on_pbClose_clicked() 60 | { 61 | this->close (); 62 | } 63 | 64 | void QuestionDialog::optionGridLayout () { 65 | const QString texts[] = {"USB连接问题", 66 | "管理预装软件问题", 67 | "无线连接问题", 68 | "悬浮窗问题", 69 | "备份,恢复", 70 | "应用下载安装使用", 71 | "存储卡管理", 72 | "联系人短信问题", 73 | "其他问题及建议"}; 74 | const QString icons[] = {":/question/images/question/question_icon1.png", 75 | ":/question/images/question/question_icon2.png", 76 | ":/question/images/question/question_icon3.png", 77 | ":/question/images/question/question_icon1.png", 78 | ":/question/images/question/question_icon1.png", 79 | ":/question/images/question/question_icon1.png", 80 | ":/question/images/question/question_icon1.png", 81 | ":/question/images/question/question_icon1.png", 82 | ":/question/images/question/question_icon1.png"}; 83 | 84 | 85 | ui->gridLayout->setSpacing(3); 86 | ui->gridLayout->setMargin(3); 87 | for(int i=0; i < 3; i++) { 88 | for(int j = 0; j < 3;j++) { 89 | QToolButton * tb = new QToolButton; 90 | tb->setText (texts[i*3+j]); 91 | tb->setIcon (QIcon (icons[i*3 +j])); 92 | tb->setIconSize (QSize(55, 55)); 93 | tb->setMinimumSize (100, 100); 94 | tb->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 95 | tb->setStyleSheet ("border-radius: 10px;border: 1px solid #e1e0e0;"); 96 | //tb->setProperty ("index", i*3+j); 97 | tb->setObjectName ("item_"+(i*3+j)); 98 | ui->gridLayout->addWidget (tb, i, j); 99 | 100 | connect (tb, SIGNAL(clicked(bool)), this, SLOT(onToolButtonDidClickedSlot(bool))); 101 | } 102 | } 103 | } 104 | 105 | void QuestionDialog::onToolButtonDidClickedSlot(bool b) { 106 | QToolButton * tb = (QToolButton *) sender (); 107 | qDebug()<objectName (); //打印源头对象名称 108 | if("item_0" == tb->objectName ()){ 109 | } else if("item_1" == tb->objectName ()){ 110 | } else if("item_2" == tb->objectName ()){ 111 | } else if("item_3" == tb->objectName ()){ 112 | } else if("item_4" == tb->objectName ()){ 113 | } else if("item_5" == tb->objectName ()){ 114 | } else if("item_6" == tb->objectName ()){ 115 | } else if("item_7" == tb->objectName ()){ 116 | } else if("item_8" == tb->objectName ()){ 117 | } 118 | 119 | // 偷懒吧,只做一个处理 120 | showHome (false); 121 | } 122 | 123 | void QuestionDialog::on_nextBack_clicked() 124 | { 125 | showHome (true); 126 | } 127 | 128 | void QuestionDialog::optionToolButtons () { 129 | 130 | ui->nextScreenshot->setText ("截图"); 131 | ui->nextScreenshot->setIcon (QIcon (":/question/images/question/next_tb_1.png")); 132 | ui->nextScreenshot->setIconSize (QSize(20, 20)); 133 | ui->nextScreenshot->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); 134 | ui->nextScreenshot->setStyleSheet ("border-radius: 2px;border: 1px solid #e1e0e0;background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #ffffff, stop:1 #e3ecf2);"); 135 | 136 | ui->nextPhoto->setText ("添加图片"); 137 | ui->nextPhoto->setIcon (QIcon (":/question/images/question/next_tb_2.png")); 138 | ui->nextPhoto->setIconSize (QSize(20, 20)); 139 | ui->nextPhoto->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); 140 | ui->nextPhoto->setStyleSheet ("border-radius: 2px;border: 1px solid #e1e0e0;background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #ffffff, stop:1 #e3ecf2);"); 141 | 142 | ui->nextAnnex->setText ("添加附件"); 143 | ui->nextAnnex->setIcon (QIcon (":/question/images/question/next_tb_3.png")); 144 | ui->nextAnnex->setIconSize (QSize(20, 20)); 145 | ui->nextAnnex->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); 146 | ui->nextAnnex->setStyleSheet ("border-radius: 2px;border: 1px solid #e1e0e0;background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #ffffff, stop:1 #e3ecf2);"); 147 | 148 | ui->nextPost->setText ("提交问题"); 149 | ui->nextPost->setIcon (QIcon (":/question/images/question/next_tb_1.png")); 150 | ui->nextPost->setIconSize (QSize(20, 20)); 151 | ui->nextPost->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); 152 | ui->nextPost->setStyleSheet ("border-radius: 2px;border: 1px solid #e1e0e0;background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #ffffff, stop:1 #e3ecf2);"); 153 | } 154 | 155 | void QuestionDialog::optionComboBox () { 156 | ui->nextComboBox->addItem(QWidget::tr("QQ")); 157 | ui->nextComboBox->addItem(QWidget::tr("飞信")); 158 | ui->nextComboBox->addItem(QWidget::tr("旺旺")); 159 | ui->nextComboBox->addItem(QWidget::tr("MSN")); 160 | ui->nextComboBox->addItem(QWidget::tr("邮箱")); 161 | ui->nextComboBox->addItem(QWidget::tr("电话/手机")); 162 | ui->nextComboBox->addItem(QWidget::tr("其它")); 163 | } 164 | 165 | void QuestionDialog::on_pbLuntan_clicked() 166 | { 167 | const QUrl url("http://bbs.360.cn/forum-140-1.html"); 168 | QDesktopServices::openUrl(url); 169 | } 170 | 171 | void QuestionDialog::showHome (bool s) { 172 | ui->home->setVisible (s); 173 | ui->next->setVisible (!s); 174 | } 175 | 176 | void QuestionDialog::on_pbMin_clicked() 177 | { 178 | this->showMinimized (); 179 | } 180 | -------------------------------------------------------------------------------- /dialog/questiondialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QUESTIONDIALOG_H 2 | #define QUESTIONDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class QuestionDialog; 8 | } 9 | 10 | class QuestionDialog : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit QuestionDialog(QWidget *parent = 0); 16 | ~QuestionDialog(); 17 | 18 | private slots: 19 | void on_pbClose_clicked(); 20 | 21 | void onToolButtonDidClickedSlot (bool); 22 | 23 | void on_nextBack_clicked(); 24 | 25 | void on_pbLuntan_clicked(); 26 | 27 | void on_pbMin_clicked(); 28 | 29 | private: 30 | Ui::QuestionDialog *ui; 31 | 32 | private: 33 | void optionGridLayout () ; 34 | void optionToolButtons () ; 35 | void optionComboBox () ; 36 | void showHome (bool s) ; 37 | }; 38 | 39 | #endif // QUESTIONDIALOG_H 40 | -------------------------------------------------------------------------------- /dialog/upgradedialog.cpp: -------------------------------------------------------------------------------- 1 | #include "upgradedialog.h" 2 | #include "ui_upgradedialog.h" 3 | #include 4 | #include 5 | 6 | UpgradeDialog::UpgradeDialog(QWidget *parent) : 7 | QDialog(parent, Qt::FramelessWindowHint), 8 | ui(new Ui::UpgradeDialog) 9 | { 10 | ui->setupUi(this); 11 | 12 | // 13 | ui->label->setStyleSheet ("color: #FFFFFF;"); 14 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 15 | ui->title->setAlignment (Qt::AlignCenter); 16 | ui->subtitle->setAlignment (Qt::AlignCenter); 17 | // 关闭按钮 18 | ui->close->setStyleSheet (QString("border-image: url(:/top/images/top/top_close.png)")); 19 | ui->icon->setStyleSheet ("border-image: url(:/other/images/other/icon.png)"); 20 | ui->pushButton->setStyleSheet (QString("background-color: #EDEDED;border-radius: 15px;color: #000000;font-size: 15px;border: 1px solid #4cb702;")); 21 | 22 | // 23 | ui->bottom->setStyleSheet ("QWidget#bottom{background-color: #F7F7F7}"); 24 | ui->middle->setStyleSheet ("QWidget#middle{background-color: #FFFFFF}"); 25 | //a59ce7 625eae 26 | ui->top->setStyleSheet ("QWidget#top{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #a59ce7, stop:1 #625eae);}"); 27 | 28 | //设置链接颜色: 29 | ui->subtitle->setOpenExternalLinks(true); 30 | ui->subtitle->setText(QString::fromLocal8Bit("您还可前往360官网覆盖安装最新版本,享受最优体验")); 31 | connect(ui->subtitle,SIGNAL(linkActivated(QString)),this,SLOT(openUrl(QString))); //在.h里面定义一个槽private slots: void openUrl(QString url); 32 | } 33 | 34 | UpgradeDialog::~UpgradeDialog() 35 | { 36 | delete ui; 37 | } 38 | 39 | void UpgradeDialog::on_close_clicked() 40 | { 41 | this->close (); 42 | } 43 | 44 | void UpgradeDialog::on_pushButton_clicked() 45 | { 46 | this->close (); 47 | } 48 | 49 | void UpgradeDialog::openUrl(QString url) { 50 | QDesktopServices::openUrl(QUrl(url)); 51 | } 52 | -------------------------------------------------------------------------------- /dialog/upgradedialog.h: -------------------------------------------------------------------------------- 1 | #ifndef UPGRADEDIALOG_H 2 | #define UPGRADEDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class UpgradeDialog; 8 | } 9 | 10 | class UpgradeDialog : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit UpgradeDialog(QWidget *parent = 0); 16 | ~UpgradeDialog(); 17 | 18 | private slots: 19 | void on_close_clicked(); 20 | 21 | void on_pushButton_clicked(); 22 | 23 | void openUrl(QString url); 24 | 25 | private: 26 | Ui::UpgradeDialog *ui; 27 | }; 28 | 29 | #endif // UPGRADEDIALOG_H 30 | -------------------------------------------------------------------------------- /dialog/upgradedialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | UpgradeDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 320 10 | 430 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 320 22 | 170 23 | 24 | 25 | 26 | 27 | 28 | 10 29 | 10 30 | 20 31 | 20 32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 39 | 10 40 | 121 41 | 16 42 | 43 | 44 | 45 | 360安全卫士-升级 46 | 47 | 48 | 49 | 50 | 51 | 290 52 | 10 53 | 20 54 | 20 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 0 66 | 380 67 | 320 68 | 50 69 | 70 | 71 | 72 | 73 | 74 | 20 75 | 20 76 | 171 77 | 16 78 | 79 | 80 | 81 | 当前版本: 11(11.0.0.1.1001) 82 | 83 | 84 | 85 | 86 | 87 | 220 88 | 10 89 | 80 90 | 30 91 | 92 | 93 | 94 | 取消 95 | 96 | 97 | 98 | 99 | 100 | 101 | 0 102 | 170 103 | 320 104 | 211 105 | 106 | 107 | 108 | 109 | 110 | 0 111 | 110 112 | 321 113 | 31 114 | 115 | 116 | 117 | 获取新版本中... 118 | 119 | 120 | 121 | 122 | 123 | 0 124 | 150 125 | 321 126 | 16 127 | 128 | 129 | 130 | 您还可前往360官网覆盖安装最新版本,享受最优体验 131 | 132 | 133 | 134 | 135 | 136 | 137 | 75 138 | 70 139 | 170 140 | 170 141 | 142 | 143 | 144 | 145 | 146 | 147 | UpgradeWidget 148 | QWidget 149 |
customviews/upgradewidget.h
150 | 1 151 |
152 |
153 | 154 | 155 |
156 | -------------------------------------------------------------------------------- /images/horse/icon_anweizhi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_anweizhi.png -------------------------------------------------------------------------------- /images/horse/icon_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_clear.png -------------------------------------------------------------------------------- /images/horse/icon_fix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_fix.png -------------------------------------------------------------------------------- /images/horse/icon_horse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_horse.png -------------------------------------------------------------------------------- /images/horse/icon_huifuqu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_huifuqu.png -------------------------------------------------------------------------------- /images/horse/icon_icon_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_icon_1.png -------------------------------------------------------------------------------- /images/horse/icon_icon_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_icon_2.png -------------------------------------------------------------------------------- /images/horse/icon_icon_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_icon_3.png -------------------------------------------------------------------------------- /images/horse/icon_optimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_optimize.png -------------------------------------------------------------------------------- /images/horse/icon_pb_bg_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_pb_bg_1.png -------------------------------------------------------------------------------- /images/horse/icon_pb_bg_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_pb_bg_2.png -------------------------------------------------------------------------------- /images/horse/icon_pb_bg_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_pb_bg_3.png -------------------------------------------------------------------------------- /images/horse/icon_pb_bg_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_pb_bg_4.png -------------------------------------------------------------------------------- /images/horse/icon_pb_bg_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_pb_bg_5.png -------------------------------------------------------------------------------- /images/horse/icon_quanpansaomiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_quanpansaomiao.png -------------------------------------------------------------------------------- /images/horse/icon_shangbaoqu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_shangbaoqu.png -------------------------------------------------------------------------------- /images/horse/icon_xinrenqu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/horse/icon_xinrenqu.png -------------------------------------------------------------------------------- /images/market/market_icon_1_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_1_b.png -------------------------------------------------------------------------------- /images/market/market_icon_1_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_1_g.png -------------------------------------------------------------------------------- /images/market/market_icon_2_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_2_b.png -------------------------------------------------------------------------------- /images/market/market_icon_2_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_2_g.png -------------------------------------------------------------------------------- /images/market/market_icon_3_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_3_b.png -------------------------------------------------------------------------------- /images/market/market_icon_3_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_3_g.png -------------------------------------------------------------------------------- /images/market/market_icon_4_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_4_b.png -------------------------------------------------------------------------------- /images/market/market_icon_4_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_4_g.png -------------------------------------------------------------------------------- /images/market/market_icon_5_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_5_b.png -------------------------------------------------------------------------------- /images/market/market_icon_5_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/market/market_icon_5_g.png -------------------------------------------------------------------------------- /images/menu/menu_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_about.png -------------------------------------------------------------------------------- /images/menu/menu_change.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_change.png -------------------------------------------------------------------------------- /images/menu/menu_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_help.png -------------------------------------------------------------------------------- /images/menu/menu_mian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_mian.png -------------------------------------------------------------------------------- /images/menu/menu_option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_option.png -------------------------------------------------------------------------------- /images/menu/menu_question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_question.png -------------------------------------------------------------------------------- /images/menu/menu_upgrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_upgrade.png -------------------------------------------------------------------------------- /images/menu/menu_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_web.png -------------------------------------------------------------------------------- /images/menu/menu_yinsi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/menu/menu_yinsi.png -------------------------------------------------------------------------------- /images/option/option_cell_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/option/option_cell_1.png -------------------------------------------------------------------------------- /images/option/option_top_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/option/option_top_1.png -------------------------------------------------------------------------------- /images/option/option_top_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/option/option_top_2.png -------------------------------------------------------------------------------- /images/option/option_top_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/option/option_top_3.png -------------------------------------------------------------------------------- /images/option/option_top_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/option/option_top_4.png -------------------------------------------------------------------------------- /images/option/option_top_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/option/option_top_5.png -------------------------------------------------------------------------------- /images/option/option_top_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/option/option_top_6.png -------------------------------------------------------------------------------- /images/other/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon.png -------------------------------------------------------------------------------- /images/other/icon_360.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_360.png -------------------------------------------------------------------------------- /images/other/icon_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_app.png -------------------------------------------------------------------------------- /images/other/icon_check_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_check_1.png -------------------------------------------------------------------------------- /images/other/icon_fanghuzhongxin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_fanghuzhongxin.png -------------------------------------------------------------------------------- /images/other/icon_fanlesuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_fanlesuo.png -------------------------------------------------------------------------------- /images/other/icon_fix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_fix.png -------------------------------------------------------------------------------- /images/other/icon_handler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_handler.png -------------------------------------------------------------------------------- /images/other/icon_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_help.png -------------------------------------------------------------------------------- /images/other/icon_liulanqi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_liulanqi.png -------------------------------------------------------------------------------- /images/other/icon_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_more.png -------------------------------------------------------------------------------- /images/other/icon_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_right.png -------------------------------------------------------------------------------- /images/other/icon_scan_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_scan_g.png -------------------------------------------------------------------------------- /images/other/icon_search_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_search_hover.png -------------------------------------------------------------------------------- /images/other/icon_search_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_search_normal.png -------------------------------------------------------------------------------- /images/other/icon_search_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_search_press.png -------------------------------------------------------------------------------- /images/other/icon_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_w.png -------------------------------------------------------------------------------- /images/other/icon_wanggou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_wanggou.png -------------------------------------------------------------------------------- /images/other/icon_waring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/other/icon_waring.png -------------------------------------------------------------------------------- /images/question/next_icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/question/next_icon2.png -------------------------------------------------------------------------------- /images/question/next_tb_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/question/next_tb_1.png -------------------------------------------------------------------------------- /images/question/next_tb_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/question/next_tb_2.png -------------------------------------------------------------------------------- /images/question/next_tb_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/question/next_tb_3.png -------------------------------------------------------------------------------- /images/question/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/question/question.png -------------------------------------------------------------------------------- /images/question/question_icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/question/question_icon1.png -------------------------------------------------------------------------------- /images/question/question_icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/question/question_icon2.png -------------------------------------------------------------------------------- /images/question/question_icon3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/question/question_icon3.png -------------------------------------------------------------------------------- /images/tab/tab_actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/tab/tab_actions.png -------------------------------------------------------------------------------- /images/tab/tab_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/tab/tab_app.png -------------------------------------------------------------------------------- /images/tab/tab_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/tab/tab_clear.png -------------------------------------------------------------------------------- /images/tab/tab_fix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/tab/tab_fix.png -------------------------------------------------------------------------------- /images/tab/tab_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/tab/tab_home.png -------------------------------------------------------------------------------- /images/tab/tab_horse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/tab/tab_horse.png -------------------------------------------------------------------------------- /images/tab/tab_market.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/tab/tab_market.png -------------------------------------------------------------------------------- /images/tab/tab_optimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/tab/tab_optimize.png -------------------------------------------------------------------------------- /images/top/top_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/top/top_close.png -------------------------------------------------------------------------------- /images/top/top_close_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/top/top_close_b.png -------------------------------------------------------------------------------- /images/top/top_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/top/top_menu.png -------------------------------------------------------------------------------- /images/top/top_min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/top/top_min.png -------------------------------------------------------------------------------- /images/top/top_min_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/top/top_min_b.png -------------------------------------------------------------------------------- /images/top/top_theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JianBiHua/qt_360_safe/63d617f95f6c00d849ccd07c9df1ba2062a403e7/images/top/top_theme.png -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | //设置皮肤 9 | QFile styleSheet(":/qss/styles.qss"); 10 | if (!styleSheet.open(QIODevice::ReadOnly)) { 11 | qWarning("Can't open the style sheet file."); 12 | return NULL; 13 | } 14 | qApp->setStyleSheet(styleSheet.readAll()); 15 | 16 | MainWindow w; 17 | w.show(); 18 | 19 | return a.exec(); 20 | } 21 | -------------------------------------------------------------------------------- /mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "customviews/hoverpushbutton.h" 9 | #include "customviews/statewidget.h" 10 | #include "popupwidgets/popupwidget.h" 11 | 12 | namespace Ui { 13 | class MainWindow; 14 | } 15 | 16 | class MainWindow : public QMainWindow 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | explicit MainWindow(QWidget *parent = 0); 22 | ~MainWindow(); 23 | 24 | private slots: 25 | void on_close_clicked(); 26 | 27 | void on_min_clicked(); 28 | 29 | void on_tbHome_clicked(); 30 | 31 | void on_tbHorse_clicked(); 32 | 33 | void on_tbClear_clicked(); 34 | 35 | void on_tbFix_clicked(); 36 | 37 | void on_tbYouhua_clicked(); 38 | 39 | void on_tbActions_clicked(); 40 | 41 | void on_tbMarket_clicked(); 42 | 43 | void on_tbApp_clicked(); 44 | 45 | void on_menu_clicked(); 46 | 47 | void shezhiActionSlot(); 48 | 49 | void jianchagengxinActionSlot(); 50 | 51 | void qiehuanActionSlot(); 52 | 53 | void wentifankuiActionSlot(); 54 | 55 | void luntanActionSlot(); 56 | 57 | void wangzhanActionSlot(); 58 | 59 | void yinsiActionSlot(); 60 | 61 | void mianfeiActionSlot(); 62 | 63 | void guanyuActionSlot(); 64 | 65 | void onHoverPushButtonHoverSlot(HoverPushButton*pb) ; 66 | 67 | void onHoverPushButtonNoHoverSlot(HoverPushButton*pb); 68 | 69 | void onMouseEnterPopupWidgetSlot(PopupWidget* widget); 70 | 71 | void onMouseLeavePopupWidgetSlot(PopupWidget* widget); 72 | 73 | private: 74 | Ui::MainWindow *ui; 75 | QMenu * contextmenu; 76 | QStackedWidget * stackedWidget; 77 | QPoint relativePos; 78 | PopupWidget * loginPopupWidget; 79 | 80 | private: 81 | void optionTopBtns (); 82 | void optionToolButton (QToolButton * tb, QIcon icon, QString text); 83 | void optionToolButtons (); 84 | 85 | void setTabBarIndex (int index); 86 | void updateStyle (QWidget * w); 87 | 88 | void createContextMenu (); 89 | void showContextMenu (); 90 | 91 | void showStackedWidget (); 92 | 93 | void showLoginPopupWidget (); 94 | void hideLoginPopupWidget (); 95 | 96 | protected: 97 | void mousePressEvent(QMouseEvent *event); 98 | void mouseMoveEvent(QMouseEvent *event); 99 | 100 | }; 101 | 102 | #endif // MAINWINDOW_H 103 | -------------------------------------------------------------------------------- /popupwidgets/dataconnectsetup.cpp: -------------------------------------------------------------------------------- 1 | #include "dataconnectsetup.h" 2 | #include "ui_dataconnectsetup.h" 3 | 4 | DataConnectSetup::DataConnectSetup(QWidget *parent) : 5 | QWidget(parent, Qt::FramelessWindowHint|Qt::Popup), 6 | ui(new Ui::DataConnectSetup) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | DataConnectSetup::~DataConnectSetup() 12 | { 13 | delete ui; 14 | } 15 | 16 | void DataConnectSetup::mousePressEvent(QMouseEvent *e) 17 | { 18 | setAttribute(Qt::WA_NoMouseReplay); 19 | QWidget::mousePressEvent(e); 20 | } 21 | -------------------------------------------------------------------------------- /popupwidgets/dataconnectsetup.h: -------------------------------------------------------------------------------- 1 | #ifndef DATACONNECTSETUP_H 2 | #define DATACONNECTSETUP_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class DataConnectSetup; 8 | } 9 | 10 | class DataConnectSetup : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit DataConnectSetup(QWidget *parent = 0); 16 | ~DataConnectSetup(); 17 | 18 | private: 19 | Ui::DataConnectSetup *ui; 20 | 21 | protected: 22 | void mousePressEvent(QMouseEvent *e); 23 | }; 24 | 25 | #endif // DATACONNECTSETUP_H 26 | -------------------------------------------------------------------------------- /popupwidgets/dataconnectsetup.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DataConnectSetup 6 | 7 | 8 | 9 | 0 10 | 0 11 | 400 12 | 300 13 | 14 | 15 | 16 | Form 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /popupwidgets/loginpopupwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LoginPopupWidget 6 | 7 | 8 | 9 | 0 10 | 0 11 | 400 12 | 300 13 | 14 | 15 | 16 | Form 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /popupwidgets/popupwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef POPUPWIDGET_H 2 | #define POPUPWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | enum PopupArrowDirection { 9 | NONE = -1, 10 | UP = 0, 11 | RIGHT = 1, 12 | DOWN= 2, 13 | LEFT = 3 14 | }; 15 | 16 | class PopupWidget : public QWidget 17 | { 18 | Q_OBJECT 19 | Q_PROPERTY(int alpha READ alpha WRITE setAlpha) 20 | public: 21 | explicit PopupWidget(QWidget *parent = 0); 22 | 23 | 24 | signals: 25 | void onMouseLeavePopupWidget (PopupWidget * widget); 26 | void onMouseEnterPopupWidget(PopupWidget * widget); 27 | 28 | private slots: 29 | void onGeometryAnimationValueChanged(QVariant v); 30 | 31 | protected: 32 | void paintEvent (QPaintEvent *event); 33 | void enterEvent(QEvent *event); 34 | void leaveEvent(QEvent * event) ; 35 | 36 | private: 37 | PopupArrowDirection mArrowDirection; 38 | QRect mArrowRect; 39 | int mAlpha; 40 | QRect mOldRect; 41 | 42 | public: 43 | void setArrow (PopupArrowDirection type, QRect rect); 44 | void addWidget (QWidget * widget); 45 | 46 | 47 | void setGeometry (const QRect & rect); 48 | void setGeometry (int x, int y, int w, int h) ; 49 | 50 | void setVisible (bool visible); 51 | 52 | private: 53 | int alpha() const; 54 | void setAlpha(const int alpha); 55 | 56 | }; 57 | 58 | #endif // POPUPWIDGET_H 59 | -------------------------------------------------------------------------------- /resource.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/top/top_close.png 4 | images/top/top_menu.png 5 | images/top/top_min.png 6 | images/top/top_theme.png 7 | images/top/top_close_b.png 8 | images/top/top_min_b.png 9 | images/other/icon_liulanqi.png 10 | images/other/icon_scan_g.png 11 | 12 | 13 | images/tab/tab_actions.png 14 | images/tab/tab_clear.png 15 | images/tab/tab_fix.png 16 | images/tab/tab_home.png 17 | images/tab/tab_horse.png 18 | images/tab/tab_optimize.png 19 | images/tab/tab_app.png 20 | images/tab/tab_market.png 21 | 22 | 23 | styles.qss 24 | 25 | 26 | images/other/icon.png 27 | images/other/icon_w.png 28 | images/other/icon_360.png 29 | images/other/icon_app.png 30 | images/other/icon_fanghuzhongxin.png 31 | images/other/icon_fanlesuo.png 32 | images/other/icon_fix.png 33 | images/other/icon_handler.png 34 | images/other/icon_help.png 35 | images/other/icon_more.png 36 | images/other/icon_right.png 37 | images/other/icon_wanggou.png 38 | images/other/icon_waring.png 39 | images/other/icon_search_hover.png 40 | images/other/icon_search_normal.png 41 | images/other/icon_search_press.png 42 | images/other/icon_liulanqi.png 43 | images/other/icon_scan_g.png 44 | images/other/icon_check_1.png 45 | 46 | 47 | images/menu/menu_about.png 48 | images/menu/menu_change.png 49 | images/menu/menu_help.png 50 | images/menu/menu_mian.png 51 | images/menu/menu_option.png 52 | images/menu/menu_question.png 53 | images/menu/menu_upgrade.png 54 | images/menu/menu_web.png 55 | images/menu/menu_yinsi.png 56 | 57 | 58 | images/question/next_icon2.png 59 | images/question/next_tb_1.png 60 | images/question/next_tb_2.png 61 | images/question/next_tb_3.png 62 | images/question/question_icon1.png 63 | images/question/question_icon2.png 64 | images/question/question_icon3.png 65 | images/question/question.png 66 | 67 | 68 | images/horse/icon_anweizhi.png 69 | images/horse/icon_horse.png 70 | images/horse/icon_huifuqu.png 71 | images/horse/icon_icon_1.png 72 | images/horse/icon_icon_2.png 73 | images/horse/icon_icon_3.png 74 | images/horse/icon_pb_bg_1.png 75 | images/horse/icon_pb_bg_2.png 76 | images/horse/icon_pb_bg_3.png 77 | images/horse/icon_pb_bg_4.png 78 | images/horse/icon_pb_bg_5.png 79 | images/horse/icon_quanpansaomiao.png 80 | images/horse/icon_shangbaoqu.png 81 | images/horse/icon_xinrenqu.png 82 | images/horse/icon_clear.png 83 | images/horse/icon_fix.png 84 | images/horse/icon_optimize.png 85 | 86 | 87 | images/market/market_icon_1_b.png 88 | images/market/market_icon_1_g.png 89 | images/market/market_icon_2_b.png 90 | images/market/market_icon_2_g.png 91 | images/market/market_icon_3_b.png 92 | images/market/market_icon_3_g.png 93 | images/market/market_icon_4_b.png 94 | images/market/market_icon_4_g.png 95 | images/market/market_icon_5_b.png 96 | images/market/market_icon_5_g.png 97 | 98 | 99 | images/option/option_cell_1.png 100 | images/option/option_top_1.png 101 | images/option/option_top_2.png 102 | images/option/option_top_3.png 103 | images/option/option_top_4.png 104 | images/option/option_top_5.png 105 | images/option/option_top_6.png 106 | 107 | 108 | -------------------------------------------------------------------------------- /styles.qss: -------------------------------------------------------------------------------- 1 | QPushButton{ 2 | border:none; 3 | } 4 | 5 | QProgressBar { 6 | background-color: transparent; 7 | color: #FF0000; 8 | } 9 | 10 | QProgressBar::chunk { 11 | background-color: transparent; 12 | color: #FF0000; 13 | } 14 | 15 | QLineEdit::hover { 16 | background-color: #000000; 17 | color: #FF0000; 18 | } 19 | 20 | *[market_toolbutton="true"] { 21 | border: 0px; 22 | border-radius: 0px; 23 | background-color: #00000000; 24 | color:rgb(124, 124, 124); 25 | padding-top: 5px; 26 | padding-bottom: 15px; 27 | } 28 | 29 | *[horsewidget_toolbutton_1="true"] { 30 | border: 0px; 31 | border-radius: 0px; 32 | background-color: #00000000; 33 | color:rgb(124, 124, 124); 34 | } 35 | 36 | *[horsewidget_toolbutton_2="true"] { 37 | border: 0px; 38 | border-radius: 0px; 39 | background-color: #00000000; 40 | color:rgb(124, 124, 124); 41 | } 42 | 43 | *[horsewidget_toolbutton_3="true"] { 44 | border: 0px; 45 | border-radius: 0px; 46 | background-color: #00000000; 47 | color:rgb(124, 124, 124); 48 | } 49 | 50 | *[homewidget_toolbutton="true"] { 51 | border: 0px; 52 | border-radius: 0px; 53 | background-color: #00000000; 54 | color:rgb(124, 124, 124); 55 | padding-bottom: 10px; 56 | } 57 | 58 | *[mainwindow_toolbutton="true"] { 59 | border: 0px; 60 | border-radius: 0px; 61 | background-color: #00000000; 62 | color:rgb(255, 255, 255); 63 | padding-top: 5px; 64 | padding-bottom: 20px; 65 | } 66 | 67 | *[download="true"] { 68 | border: 0px; 69 | border-radius: 0px; 70 | background-color: #00000000; 71 | color:rgb(0xA0, 0xA0, 0xA0); 72 | } 73 | 74 | /* 菜单栏按下时 */ 75 | *[mainwindow_toolbutton_selected="true"] { /* italicize selected tabs */ 76 | background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, 77 | stop:0 rgba(0, 0, 0, 0), 78 | stop:1 rgba(0, 0, 0, 32)); 79 | } 80 | -------------------------------------------------------------------------------- /widget/actionswidget.cpp: -------------------------------------------------------------------------------- 1 | #include "actionswidget.h" 2 | #include "ui_actionswidget.h" 3 | 4 | ActionsWidget::ActionsWidget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::ActionsWidget) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | ActionsWidget::~ActionsWidget() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /widget/actionswidget.h: -------------------------------------------------------------------------------- 1 | #ifndef ACTIONSWIDGET_H 2 | #define ACTIONSWIDGET_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class ActionsWidget; 8 | } 9 | 10 | class ActionsWidget : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit ActionsWidget(QWidget *parent = 0); 16 | ~ActionsWidget(); 17 | 18 | private: 19 | Ui::ActionsWidget *ui; 20 | }; 21 | 22 | #endif // ACTIONSWIDGET_H 23 | -------------------------------------------------------------------------------- /widget/actionswidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ActionsWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 700 10 | 666 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 100 20 | 80 21 | 26 22 | 22 23 | 24 | 25 | 26 | ... 27 | 28 | 29 | 30 | 31 | 32 | 150 33 | 610 34 | 100 35 | 20 36 | 37 | 38 | 39 | RadioButton 40 | 41 | 42 | 43 | 44 | 45 | 660 46 | 320 47 | 86 48 | 20 49 | 50 | 51 | 52 | CheckBox 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /widget/clear2widget.cpp: -------------------------------------------------------------------------------- 1 | #include "clear2widget.h" 2 | #include "ui_clear2widget.h" 3 | 4 | Clear2Widget::Clear2Widget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::Clear2Widget) 7 | { 8 | ui->setupUi(this); 9 | 10 | //ui->background->setStyleSheet ("QWidget#background{background-color: rgba(255, 255, 255, 230);}"); 11 | ui->bottom->setStyleSheet ("QWidget#bottom{background-color: #FFFFFF;}"); 12 | ui->top->setStyleSheet ("QWidget#top{background-color: #f1f9f1;}"); 13 | ui->pushButton->setStyleSheet ("background-color: transparent;border-radius: 16px;color: #4cb702;font-size: 15px;border: 1px solid #4cb702;"); 14 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 15 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 16 | // 17 | ui->waveBall->setWaveMode (WaveBallMode::noWaveMode); 18 | ui->waveBall->setProgress (1); 19 | ui->waveBall->showScores (false); 20 | ui->waveBall->setIcon (":/horse/images/horse/icon_clear.png", QSize(40, 40)); 21 | ui->waveBall->startRound (); 22 | // 23 | ui->progreBar->setProgress (0.3); 24 | } 25 | 26 | Clear2Widget::~Clear2Widget() 27 | { 28 | delete ui; 29 | } 30 | 31 | void Clear2Widget::on_pushButton_clicked() 32 | { 33 | emit onClear2IntoNextSignal (); 34 | } 35 | -------------------------------------------------------------------------------- /widget/clear2widget.h: -------------------------------------------------------------------------------- 1 | #ifndef CLEAR2WIDGET_H 2 | #define CLEAR2WIDGET_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class Clear2Widget; 8 | } 9 | 10 | class Clear2Widget : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit Clear2Widget(QWidget *parent = 0); 16 | ~Clear2Widget(); 17 | 18 | private slots: 19 | void on_pushButton_clicked(); 20 | 21 | private: 22 | Ui::Clear2Widget *ui; 23 | 24 | signals: 25 | void onClear2IntoNextSignal (); 26 | }; 27 | 28 | #endif // CLEAR2WIDGET_H 29 | -------------------------------------------------------------------------------- /widget/clear2widget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Clear2Widget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 920 32 | 460 33 | 34 | 35 | 36 | 37 | 38 | 0 39 | 0 40 | 920 41 | 130 42 | 43 | 44 | 45 | 46 | 47 | 40 48 | 20 49 | 90 50 | 90 51 | 52 | 53 | 54 | 55 | 56 | 57 | 0 58 | 126 59 | 920 60 | 4 61 | 62 | 63 | 64 | 65 | 66 | 67 | 160 68 | 40 69 | 401 70 | 30 71 | 72 | 73 | 74 | 正在扫描 75 | 76 | 77 | 78 | 79 | 80 | 160 81 | 80 82 | 381 83 | 16 84 | 85 | 86 | 87 | 正在扫描: 常用软件扫描 88 | 89 | 90 | 91 | 92 | 93 | 780 94 | 50 95 | 90 96 | 36 97 | 98 | 99 | 100 | 取消扫描 101 | 102 | 103 | 104 | 105 | 106 | 107 | 0 108 | 130 109 | 920 110 | 331 111 | 112 | 113 | 114 | 115 | 116 | 0 117 | 0 118 | 920 119 | 50 120 | 121 | 122 | 123 | 124 | 125 | 70 126 | 10 127 | 30 128 | 30 129 | 130 | 131 | 132 | 133 | 134 | 135 | 110 136 | 20 137 | 271 138 | 16 139 | 140 | 141 | 142 | 常用软件垃圾 共0项 0KB, 已选中0KB 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | WaveBallWidget 152 | QWidget 153 |
customviews/waveballwidget.h
154 | 1 155 |
156 | 157 | ProgressBarWidget 158 | QWidget 159 |
customviews/progressbarwidget.h
160 | 1 161 |
162 |
163 | 164 | 165 |
166 | -------------------------------------------------------------------------------- /widget/clearmenuwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "clearmenuwidget.h" 2 | #include "ui_clearmenuwidget.h" 3 | 4 | ClearMenuWidget::ClearMenuWidget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::ClearMenuWidget) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | ClearMenuWidget::~ClearMenuWidget() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /widget/clearmenuwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef CLEARMENUWIDGET_H 2 | #define CLEARMENUWIDGET_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class ClearMenuWidget; 8 | } 9 | 10 | class ClearMenuWidget : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit ClearMenuWidget(QWidget *parent = 0); 16 | ~ClearMenuWidget(); 17 | 18 | private: 19 | Ui::ClearMenuWidget *ui; 20 | }; 21 | 22 | #endif // CLEARMENUWIDGET_H 23 | -------------------------------------------------------------------------------- /widget/clearmenuwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ClearMenuWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 130 10 | 220 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 8 20 | 100 21 | 101 22 | 20 23 | 24 | 25 | 26 | 我是弹出框 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /widget/clearwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "clearwidget.h" 2 | #include "ui_clearwidget.h" 3 | #include 4 | 5 | ClearWidget::ClearWidget(QWidget *parent) : 6 | QWidget(parent), 7 | ui(new Ui::ClearWidget) 8 | { 9 | ui->setupUi(this); 10 | 11 | clearMenuWidget = NULL; 12 | 13 | // 14 | ui->background->setStyleSheet ("background-color: #FFFFFF;"); 15 | // 16 | ui->pushButton->setStyleSheet ("background-color: #16da6c;border-radius: 30px;color: #FFFFFF;font-size: 25px;"); 17 | 18 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 19 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 20 | // 21 | ui->wallBallWidget->setProgress (1); 22 | ui->wallBallWidget->setWaveMode (WaveBallMode::noWaveMode); 23 | ui->wallBallWidget->showScores (false); 24 | ui->wallBallWidget->setIcon (":/horse/images/horse/icon_clear.png", QSize(80, 80)); 25 | 26 | optionToolButtons (); 27 | 28 | 29 | clear2Widget = new Clear2Widget(this); 30 | clear2Widget->setVisible (false); 31 | connect (clear2Widget, SIGNAL(onClear2IntoNextSignal()), this, SLOT(onClear2IntoNextSlot())); 32 | } 33 | 34 | ClearWidget::~ClearWidget() 35 | { 36 | delete ui; 37 | } 38 | 39 | void ClearWidget::on_pushButton_clicked() 40 | { 41 | clear2Widget->setVisible (true); 42 | ui->home->setVisible (false); 43 | } 44 | 45 | void ClearWidget::onClear2IntoNextSlot () { 46 | clear2Widget->setVisible (false); 47 | ui->home->setVisible (true); 48 | } 49 | 50 | void ClearWidget::optionToolButtons () { 51 | 52 | // 53 | optionToolButton (ui->tb1, 54 | QIcon(":/horse/images/horse/icon_quanpansaomiao.png"), 55 | "单项清理", 56 | QSize(34, 32), 57 | "horsewidget_toolbutton_1") ; 58 | connect (ui->tb1, SIGNAL(onHoverToolButtonHoverSinal(HoverToolButton*)), this, SLOT(onHoverToolButtonHoverSlot(HoverToolButton*))); 59 | connect (ui->tb1, SIGNAL(onHoverToolButtonNoHoverSinal(HoverToolButton*)), this, SLOT(onHoverToolButtonNoHoverSlot(HoverToolButton*))); 60 | 61 | 62 | optionToolButton (ui->tb2, 63 | QIcon(":/horse/images/horse/icon_xinrenqu.png"), 64 | "自动清理", 65 | QSize(34, 32), 66 | "horsewidget_toolbutton_1") ; 67 | optionToolButton (ui->tb3, 68 | QIcon(":/horse/images/horse/icon_xinrenqu.png"), 69 | "恢复区", 70 | QSize(32, 32), 71 | "horsewidget_toolbutton_2") ; 72 | optionToolButton (ui->tb4, QIcon(":/horse/images/horse/icon_huifuqu.png"), 73 | "维修模式", 74 | QSize(32, 32), 75 | "horsewidget_toolbutton_2") ; 76 | optionToolButton (ui->tb5, QIcon(":/horse/images/horse/icon_shangbaoqu.png"), 77 | "上经典版清理", QSize(32, 32), 78 | "horsewidget_toolbutton_2") ; 79 | 80 | // 81 | optionToolButton (ui->tb6, QIcon(":/horse/images/horse/icon_icon_1.png"), 82 | "微信清理", 83 | QSize(32, 32), 84 | "horsewidget_toolbutton_3") ; 85 | optionToolButton (ui->tb7, QIcon(":/horse/images/horse/icon_icon_2.png"), 86 | "系统盘瘦身", 87 | QSize(32, 32), 88 | "horsewidget_toolbutton_3") ; 89 | optionToolButton (ui->tb8, QIcon(":/horse/images/horse/icon_icon_3.png"), 90 | "查找大文件", 91 | QSize(32, 32), 92 | "horsewidget_toolbutton_3") ; 93 | } 94 | 95 | void ClearWidget::optionToolButton (QToolButton * tb, 96 | QIcon icon, 97 | QString text, 98 | QSize size, 99 | QString property) { 100 | QAction *pAction = new QAction(this); 101 | pAction->setText(text); 102 | pAction->setIcon(icon); 103 | tb->setIconSize(size); 104 | tb->setDefaultAction(pAction); 105 | tb->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 106 | tb->setProperty (property.toLatin1().data(), true); 107 | } 108 | 109 | void ClearWidget::showClearMenuWidget () { 110 | if (clearMenuWidget == NULL) { 111 | clearMenuWidget = new PopupWidget (this); 112 | clearMenuWidget->setArrow (PopupArrowDirection::LEFT, QRect(0, 70, 10, 10)); 113 | clearMenuWidget->setGeometry (630, 150, 130, 220); 114 | connect (clearMenuWidget, SIGNAL(onMouseEnterPopupWidget(PopupWidget*)), this, 115 | SLOT(onMouseEnterPopupWidgetSlot(PopupWidget*))); 116 | connect (clearMenuWidget, SIGNAL(onMouseLeavePopupWidget(PopupWidget*)), this, 117 | SLOT(onMouseLeavePopupWidgetSlot(PopupWidget*))); 118 | clearMenuWidget->setWindowFlags (Qt::WindowStaysOnTopHint); 119 | // 120 | clearMenuWidget->addWidget (new ClearMenuWidget); 121 | } 122 | 123 | if (!clearMenuWidget->isVisible ()) { 124 | clearMenuWidget->setVisible (true); 125 | } 126 | } 127 | 128 | void ClearWidget::hideClearMenuWidget () { 129 | if (clearMenuWidget != NULL && clearMenuWidget->isVisible ()) { 130 | clearMenuWidget->setVisible (false); 131 | } 132 | } 133 | 134 | 135 | void ClearWidget::onHoverToolButtonHoverSlot(HoverToolButton*pb) { 136 | qDebug() << "onHoverToolButtonHoverSlot"; 137 | showClearMenuWidget (); 138 | } 139 | 140 | void ClearWidget::onHoverToolButtonNoHoverSlot(HoverToolButton*pb) { 141 | if (!clearMenuWidget->rect ().contains (clearMenuWidget->mapFromGlobal (QCursor::pos())) && 142 | !ui->tb1->rect ().contains (ui->tb1->mapFromGlobal (QCursor::pos()))) { 143 | hideClearMenuWidget (); 144 | } 145 | } 146 | 147 | void ClearWidget::onMouseEnterPopupWidgetSlot(PopupWidget* widget) { 148 | showClearMenuWidget (); 149 | } 150 | 151 | void ClearWidget::onMouseLeavePopupWidgetSlot(PopupWidget* widget) { 152 | if (!clearMenuWidget->rect ().contains (clearMenuWidget->mapFromGlobal (QCursor::pos())) && 153 | !ui->tb1->rect ().contains (ui->tb1->mapFromGlobal (QCursor::pos()))) { 154 | hideClearMenuWidget (); 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /widget/clearwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef CLEARWIDGET_H 2 | #define CLEARWIDGET_H 3 | 4 | #include 5 | #include 6 | #include "clear2widget.h" 7 | #include "popupwidgets/popupwidget.h" 8 | #include "widget/clearmenuwidget.h" 9 | #include "customviews/hovertoolbutton.h" 10 | 11 | namespace Ui { 12 | class ClearWidget; 13 | } 14 | 15 | class ClearWidget : public QWidget 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit ClearWidget(QWidget *parent = 0); 21 | ~ClearWidget(); 22 | 23 | private slots: 24 | void on_pushButton_clicked(); 25 | 26 | void onClear2IntoNextSlot (); 27 | 28 | void onHoverToolButtonHoverSlot(HoverToolButton*pb); 29 | 30 | void onHoverToolButtonNoHoverSlot(HoverToolButton*pb); 31 | 32 | void onMouseEnterPopupWidgetSlot(PopupWidget* widget); 33 | 34 | void onMouseLeavePopupWidgetSlot(PopupWidget* widget); 35 | 36 | private: 37 | Ui::ClearWidget *ui; 38 | Clear2Widget * clear2Widget; 39 | PopupWidget * clearMenuWidget; 40 | 41 | private: 42 | void optionToolButtons (); 43 | void optionToolButton (QToolButton * tb, 44 | QIcon icon, 45 | QString text, 46 | QSize size, 47 | QString property); 48 | 49 | void showClearMenuWidget () ; 50 | void hideClearMenuWidget (); 51 | }; 52 | 53 | #endif // CLEARWIDGET_H 54 | -------------------------------------------------------------------------------- /widget/clearwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ClearWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 360 29 | 150 30 | 400 31 | 20 32 | 33 | 34 | 35 | 养成良好的清理习惯,让电脑保持最轻松的状态 36 | 37 | 38 | 39 | 40 | 41 | 360 42 | 200 43 | 200 44 | 60 45 | 46 | 47 | 48 | 全面清理 49 | 50 | 51 | 52 | 53 | 54 | 110 55 | 90 56 | 190 57 | 190 58 | 59 | 60 | 61 | 62 | 63 | 64 | 360 65 | 110 66 | 400 67 | 40 68 | 69 | 70 | 71 | 清理垃圾.插件,痕迹,释放更多空间 72 | 73 | 74 | 75 | 76 | 77 | 710 78 | 390 79 | 70 80 | 70 81 | 82 | 83 | 84 | ... 85 | 86 | 87 | 88 | 89 | 90 | 780 91 | 390 92 | 70 93 | 70 94 | 95 | 96 | 97 | ... 98 | 99 | 100 | 101 | 102 | 103 | 850 104 | 390 105 | 70 106 | 70 107 | 108 | 109 | 110 | ... 111 | 112 | 113 | 114 | 115 | 116 | 590 117 | 200 118 | 60 119 | 60 120 | 121 | 122 | 123 | ... 124 | 125 | 126 | 127 | 128 | 129 | 20 130 | 390 131 | 70 132 | 70 133 | 134 | 135 | 136 | ... 137 | 138 | 139 | 140 | 141 | 142 | 90 143 | 390 144 | 70 145 | 70 146 | 147 | 148 | 149 | ... 150 | 151 | 152 | 153 | 154 | 155 | 160 156 | 390 157 | 70 158 | 70 159 | 160 | 161 | 162 | ... 163 | 164 | 165 | 166 | 167 | 168 | 230 169 | 390 170 | 70 171 | 70 172 | 173 | 174 | 175 | ... 176 | 177 | 178 | 179 | 180 | 181 | 182 | 0 183 | 0 184 | 920 185 | 460 186 | 187 | 188 | 189 | background 190 | home 191 | 192 | 193 | 194 | WaveBallWidget 195 | QWidget 196 |
customviews/waveballwidget.h
197 | 1 198 |
199 | 200 | HoverToolButton 201 | QToolButton 202 |
customviews/hovertoolbutton.h
203 |
204 |
205 | 206 | 207 |
208 | -------------------------------------------------------------------------------- /widget/fix2widget.cpp: -------------------------------------------------------------------------------- 1 | #include "fix2widget.h" 2 | #include "ui_fix2widget.h" 3 | 4 | Fix2Widget::Fix2Widget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::Fix2Widget) 7 | { 8 | ui->setupUi(this); 9 | 10 | //ui->background->setStyleSheet ("QWidget#background{background-color: rgba(255, 255, 255, 230);}"); 11 | ui->bottom->setStyleSheet ("QWidget#bottom{background-color: #FFFFFF;}"); 12 | ui->top->setStyleSheet ("QWidget#top{background-color: #f1f9f1;}"); 13 | ui->pushButton->setStyleSheet ("background-color: transparent;border-radius: 16px;color: #4cb702;font-size: 15px;border: 1px solid #4cb702;"); 14 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 15 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 16 | // 17 | ui->waveBall->setWaveMode (WaveBallMode::noWaveMode); 18 | ui->waveBall->setProgress (1); 19 | ui->waveBall->showScores (false); 20 | ui->waveBall->setIcon (":/horse/images/horse/icon_fix.png", QSize(40, 40)); 21 | ui->waveBall->startRound (); 22 | // 23 | ui->progreBar->setProgress (0.3); 24 | 25 | optionListWidget (); 26 | } 27 | 28 | Fix2Widget::~Fix2Widget() 29 | { 30 | delete ui; 31 | } 32 | 33 | void Fix2Widget::on_pushButton_clicked() 34 | { 35 | emit onFix2IntoNextSignal (); 36 | } 37 | 38 | void Fix2Widget::optionListWidget () { 39 | for (int i = 0; i < 4; i++ ) { 40 | QListWidgetItem *item = new QListWidgetItem; 41 | item->setSizeHint(QSize(900, 40)); //每次改变Item的高度 42 | 43 | QWidget * widget = new QWidget ; 44 | 45 | QWidget * icon = new QWidget (widget); 46 | icon->setGeometry (70, 10, 20, 20); 47 | 48 | QLabel * title = new QLabel (widget); 49 | title->setGeometry (100, 0, 80, 40); 50 | title->setAlignment (Qt::AlignCenter); 51 | title->setStyleSheet ("color: #000000; font-size:15px;"); 52 | title->setText ("常规修复-"); 53 | 54 | QLabel * subtitle = new QLabel (widget); 55 | subtitle->setGeometry (180, 0, 80, 40); 56 | subtitle->setAlignment (Qt::AlignCenter); 57 | subtitle->setStyleSheet ("color: #ababab; font-size:12px"); 58 | subtitle->setText ("1223456789"); 59 | 60 | ui->listWidget->addItem (item); 61 | ui->listWidget->setItemWidget(item, widget); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /widget/fix2widget.h: -------------------------------------------------------------------------------- 1 | #ifndef FIX2WIDGET_H 2 | #define FIX2WIDGET_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class Fix2Widget; 8 | } 9 | 10 | class Fix2Widget : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit Fix2Widget(QWidget *parent = 0); 16 | ~Fix2Widget(); 17 | 18 | private slots: 19 | void on_pushButton_clicked(); 20 | 21 | private: 22 | Ui::Fix2Widget *ui; 23 | 24 | signals: 25 | void onFix2IntoNextSignal (); 26 | 27 | private: 28 | void optionListWidget (); 29 | }; 30 | 31 | #endif // FIX2WIDGET_H 32 | -------------------------------------------------------------------------------- /widget/fix2widget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Fix2Widget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 920 32 | 460 33 | 34 | 35 | 36 | 37 | 38 | 0 39 | 0 40 | 920 41 | 130 42 | 43 | 44 | 45 | 46 | 47 | 40 48 | 20 49 | 90 50 | 90 51 | 52 | 53 | 54 | 55 | 56 | 57 | 0 58 | 126 59 | 920 60 | 4 61 | 62 | 63 | 64 | 65 | 66 | 67 | 160 68 | 40 69 | 401 70 | 30 71 | 72 | 73 | 74 | 扫描中 75 | 76 | 77 | 78 | 79 | 80 | 160 81 | 80 82 | 381 83 | 16 84 | 85 | 86 | 87 | 全面升级电脑开机速度,系统速度,上网速度,硬盘速度 88 | 89 | 90 | 91 | 92 | 93 | 780 94 | 50 95 | 90 96 | 36 97 | 98 | 99 | 100 | 取消扫描 101 | 102 | 103 | 104 | 105 | 106 | 107 | 0 108 | 130 109 | 920 110 | 331 111 | 112 | 113 | 114 | 115 | 116 | 0 117 | 0 118 | 921 119 | 331 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | WaveBallWidget 129 | QWidget 130 |
customviews/waveballwidget.h
131 | 1 132 |
133 | 134 | ProgressBarWidget 135 | QWidget 136 |
customviews/progressbarwidget.h
137 | 1 138 |
139 |
140 | 141 | 142 |
143 | -------------------------------------------------------------------------------- /widget/fixwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "fixwidget.h" 2 | #include "ui_fixwidget.h" 3 | 4 | FixWidget::FixWidget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::FixWidget) 7 | { 8 | ui->setupUi(this); 9 | 10 | // 11 | ui->background->setStyleSheet ("background-color: #FFFFFF;"); 12 | // 13 | ui->pushButton->setStyleSheet ("background-color: #16da6c;border-radius: 30px;color: #FFFFFF;font-size: 25px;"); 14 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 15 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 16 | // 17 | ui->wallBallWidget->setProgress (1); 18 | ui->wallBallWidget->setWaveMode (WaveBallMode::noWaveMode); 19 | ui->wallBallWidget->showScores (false); 20 | ui->wallBallWidget->setIcon (":/horse/images/horse/icon_fix.png", QSize(80, 80)); 21 | 22 | optionToolButtons (); 23 | 24 | fix2Widget = new Fix2Widget(this); 25 | fix2Widget->setVisible (false); 26 | connect (fix2Widget, SIGNAL(onFix2IntoNextSignal()), this, SLOT(onFix2IntoNextSlot())); 27 | } 28 | 29 | FixWidget::~FixWidget() 30 | { 31 | delete ui; 32 | } 33 | 34 | void FixWidget::on_pushButton_clicked() 35 | { 36 | fix2Widget->setVisible (true); 37 | ui->home->setVisible (false); 38 | } 39 | 40 | void FixWidget::onFix2IntoNextSlot() { 41 | fix2Widget->setVisible (false); 42 | ui->home->setVisible (true); 43 | } 44 | 45 | void FixWidget::optionToolButtons () { 46 | 47 | // 48 | optionToolButton (ui->tb1, 49 | QIcon(":/horse/images/horse/icon_quanpansaomiao.png"), 50 | "单项修补", 51 | QSize(34, 32), 52 | "horsewidget_toolbutton_1") ; 53 | 54 | optionToolButton (ui->tb2, 55 | QIcon(":/horse/images/horse/icon_xinrenqu.png"), 56 | "信任区", 57 | QSize(32, 32), 58 | "horsewidget_toolbutton_1") ; 59 | optionToolButton (ui->tb3, 60 | QIcon(":/horse/images/horse/icon_xinrenqu.png"), 61 | "恢复区", 62 | QSize(32, 32), 63 | "horsewidget_toolbutton_2") ; 64 | optionToolButton (ui->tb4, QIcon(":/horse/images/horse/icon_huifuqu.png"), 65 | "补丁管理", 66 | QSize(32, 32), 67 | "horsewidget_toolbutton_2") ; 68 | optionToolButton (ui->tb5, QIcon(":/horse/images/horse/icon_shangbaoqu.png"), 69 | "驱动管理", QSize(32, 32), 70 | "horsewidget_toolbutton_2") ; 71 | 72 | // 73 | optionToolButton (ui->tb6, QIcon(":/horse/images/horse/icon_icon_1.png"), 74 | "驱动大师", 75 | QSize(32, 32), 76 | "horsewidget_toolbutton_3") ; 77 | optionToolButton (ui->tb7, QIcon(":/horse/images/horse/icon_icon_2.png"), 78 | "主页维护", 79 | QSize(32, 32), 80 | "horsewidget_toolbutton_3") ; 81 | optionToolButton (ui->tb8, QIcon(":/horse/images/horse/icon_icon_3.png"), 82 | "主页修复", 83 | QSize(32, 32), 84 | "horsewidget_toolbutton_3") ; 85 | } 86 | 87 | void FixWidget::optionToolButton (QToolButton * tb, 88 | QIcon icon, 89 | QString text, 90 | QSize size, 91 | QString property) { 92 | QAction *pAction = new QAction(this); 93 | pAction->setText(text); 94 | pAction->setIcon(icon); 95 | tb->setIconSize(size); 96 | tb->setDefaultAction(pAction); 97 | tb->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 98 | tb->setProperty (property.toLatin1().data(), true); 99 | } 100 | -------------------------------------------------------------------------------- /widget/fixwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef FIXWIDGET_H 2 | #define FIXWIDGET_H 3 | 4 | #include 5 | #include 6 | #include "fix2widget.h" 7 | 8 | namespace Ui { 9 | class FixWidget; 10 | } 11 | 12 | class FixWidget : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit FixWidget(QWidget *parent = 0); 18 | ~FixWidget(); 19 | 20 | private: 21 | Ui::FixWidget *ui; 22 | Fix2Widget * fix2Widget; 23 | 24 | private slots: 25 | void on_pushButton_clicked(); 26 | 27 | void onFix2IntoNextSlot(); 28 | 29 | private: 30 | void optionToolButtons (); 31 | void optionToolButton (QToolButton * tb, 32 | QIcon icon, 33 | QString text, 34 | QSize size, 35 | QString property); 36 | }; 37 | 38 | #endif // FIXWIDGET_H 39 | -------------------------------------------------------------------------------- /widget/fixwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FixWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 360 29 | 150 30 | 400 31 | 20 32 | 33 | 34 | 35 | 修复电脑异常,及时更新补丁和驱动,确保电脑安全 36 | 37 | 38 | 39 | 40 | 41 | 360 42 | 200 43 | 200 44 | 60 45 | 46 | 47 | 48 | 全面修复 49 | 50 | 51 | 52 | 53 | 54 | 110 55 | 90 56 | 190 57 | 190 58 | 59 | 60 | 61 | 62 | 63 | 64 | 360 65 | 110 66 | 400 67 | 40 68 | 69 | 70 | 71 | 补漏洞,装驱动,修复异常系统 72 | 73 | 74 | 75 | 76 | 77 | 710 78 | 390 79 | 70 80 | 70 81 | 82 | 83 | 84 | ... 85 | 86 | 87 | 88 | 89 | 90 | 780 91 | 390 92 | 70 93 | 70 94 | 95 | 96 | 97 | ... 98 | 99 | 100 | 101 | 102 | 103 | 850 104 | 390 105 | 70 106 | 70 107 | 108 | 109 | 110 | ... 111 | 112 | 113 | 114 | 115 | 116 | 590 117 | 200 118 | 60 119 | 60 120 | 121 | 122 | 123 | ... 124 | 125 | 126 | 127 | 128 | 129 | 20 130 | 390 131 | 70 132 | 70 133 | 134 | 135 | 136 | ... 137 | 138 | 139 | 140 | 141 | 142 | 90 143 | 390 144 | 70 145 | 70 146 | 147 | 148 | 149 | ... 150 | 151 | 152 | 153 | 154 | 155 | 160 156 | 390 157 | 70 158 | 70 159 | 160 | 161 | 162 | ... 163 | 164 | 165 | 166 | 167 | 168 | 230 169 | 390 170 | 70 171 | 70 172 | 173 | 174 | 175 | ... 176 | 177 | 178 | 179 | 180 | 181 | 182 | 0 183 | 0 184 | 920 185 | 460 186 | 187 | 188 | 189 | background 190 | home 191 | 192 | 193 | 194 | WaveBallWidget 195 | QWidget 196 |
customviews/waveballwidget.h
197 | 1 198 |
199 |
200 | 201 | 202 |
203 | -------------------------------------------------------------------------------- /widget/fuctionswidget.cpp: -------------------------------------------------------------------------------- 1 | #include "fuctionswidget.h" 2 | #include "ui_fuctionswidget.h" 3 | #include 4 | #include 5 | #include "widget/actionswidget.h" 6 | 7 | FuctionsWidget::FuctionsWidget(QWidget *parent) : 8 | QWidget(parent), 9 | ui(new Ui::FuctionsWidget) 10 | { 11 | ui->setupUi(this); 12 | 13 | mOldIndex = -1; 14 | // 15 | ui->background->setStyleSheet ("background-color: #FFFFFF;"); 16 | ui->listWidgetBackGround->setStyleSheet ("background-color: #F3F3F3;"); 17 | 18 | functionList.append (new FunctionsItem(0, ":/other/images/other/icon_fanghuzhongxin.png", 19 | ":/other/images/other/icon_fanghuzhongxin.png", 20 | "全部工具", 0)); 21 | functionList.append (new FunctionsItem(0, ":/other/images/other/icon_fanghuzhongxin.png", 22 | ":/other/images/other/icon_fanghuzhongxin.png", 23 | "电脑安全", 1)); 24 | functionList.append (new FunctionsItem(0, ":/other/images/other/icon_fanghuzhongxin.png", 25 | ":/other/images/other/icon_fanghuzhongxin.png", 26 | "网络优化", 1)); 27 | functionList.append (new FunctionsItem(0, ":/other/images/other/icon_fanghuzhongxin.png", 28 | ":/other/images/other/icon_fanghuzhongxin.png", 29 | "系统工具", 1)); 30 | functionList.append (new FunctionsItem(0, ":/other/images/other/icon_fanghuzhongxin.png", 31 | ":/other/images/other/icon_fanghuzhongxin.png", "游戏优化", 1)); 32 | functionList.append (new FunctionsItem(0, ":/other/images/other/icon_fanghuzhongxin.png", 33 | ":/other/images/other/icon_fanghuzhongxin.png", 34 | "实用工具", 1)); 35 | functionList.append (new FunctionsItem(0, ":/other/images/other/icon_fanghuzhongxin.png", 36 | ":/other/images/other/icon_fanghuzhongxin.png", 37 | "我的工具", 0)); 38 | optionListWidget (); 39 | optoinScrollView (); 40 | 41 | // 42 | ui->redian->setStyleSheet ("color: #FFFFFF; background-color: #fa9626"); 43 | ui->redian->setAlignment (Qt::AlignCenter); 44 | ui->line->setStyleSheet ("background-color: #d9d9d9"); 45 | ui->line_2->setStyleSheet ("background-color: #d9d9d9"); 46 | ui->searchIcon->setCursor(Qt::ArrowCursor); 47 | ui->searchIcon->setStyleSheet ("border-image: url(:/other/images/other/icon_search_normal.png)"); 48 | ui->search->setStyleSheet ("#search{border: 1px solid #d9d9d9; border-radius: 15px;}"); 49 | ui->lineEdit->setAttribute(Qt::WA_MacShowFocusRect, false); 50 | ui->lineEdit->setPlaceholderText ("搜索工具"); 51 | ui->lineEdit->setStyleSheet ("border: 0px;"); 52 | } 53 | 54 | FuctionsWidget::~FuctionsWidget() 55 | { 56 | delete ui; 57 | } 58 | 59 | void FuctionsWidget::optoinScrollView () { 60 | scrollArea = new QScrollArea(ui->scrollview); 61 | // scrollArea->setBackgroundRole(QPalette::Dark); 62 | 63 | ActionsWidget * aw = new ActionsWidget; 64 | aw->setMinimumSize (0, aw->height ());; 65 | scrollArea->setWidget(aw); 66 | //强制滚动条总可见 水平 67 | //scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); 68 | //强制滚动条总可见 竖直 69 | scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); 70 | scrollArea->setGeometry (0, 0, ui->scrollview->width (), ui->scrollview->height ()); 71 | scrollArea->setStyleSheet ("background-color: #FFFFFF"); 72 | } 73 | 74 | void FuctionsWidget::optionListWidget () { 75 | 76 | ui->listWidget->setStyleSheet ("border: none; background-color: rgba(0, 0, 0, 0)"); 77 | ui->listWidget->setFocusPolicy(Qt::NoFocus); 78 | ui->listWidget->setSelectionMode (QAbstractItemView::NoSelection); 79 | connect (ui->listWidget, SIGNAL(itemClicked(QListWidgetItem*)), 80 | this, SLOT(onListwidgetClicked(QListWidgetItem*))); 81 | 82 | // 83 | for (int i = 0; i < functionList.size (); i++) { 84 | FunctionsItem * fi = functionList.at (i); 85 | 86 | QListWidgetItem *item = new QListWidgetItem; 87 | item->setSizeHint (QSize (140, !fi->type?60:40)); 88 | QWidget * widget = new QWidget; 89 | 90 | QWidget * back = new QWidget(widget) ; 91 | 92 | QWidget * icon = new QWidget(widget) ; 93 | icon->setStyleSheet (QString("border-image: url(%1)").arg (fi->icon)); 94 | 95 | QLabel *lb = new QLabel (widget); 96 | lb->setText (fi->name); 97 | lb->setStyleSheet ("color: #7e797f"); 98 | 99 | if (!fi->type) { 100 | back->setGeometry (0, 0, 150, 60); 101 | icon->setGeometry (15, 15, 30, 30); 102 | lb->setGeometry (45, 15, 100, 30); 103 | back->setStyleSheet ("background-color: rgba(0,0,0,0);border: 1px solid #e9e9ea;"); 104 | } else { 105 | back->setGeometry (0, 0, 150, 40); 106 | icon->setGeometry (30, 5, 30, 30); 107 | lb->setGeometry (70, 5, 100, 30); 108 | back->setStyleSheet ("background-color: rgba(0,0,0,0);"); 109 | } 110 | 111 | ui->listWidget->addItem (item); 112 | ui->listWidget->setItemWidget (item, widget); 113 | } 114 | 115 | // 116 | ui->listWidget->itemClicked (ui->listWidget->item (0)); 117 | } 118 | 119 | void FuctionsWidget::onListwidgetClicked(QListWidgetItem*item) { 120 | int index = ui->listWidget->row (item);;//ui->listWidget->currentRow (); 121 | FunctionsItem * fi = functionList.at (index); 122 | QWidget * widget = (QWidget *) ui->listWidget->itemWidget (item); 123 | 124 | if (mOldIndex != index) { 125 | QWidget* b=(QWidget*) widget->children ().at (0); 126 | QWidget* w=(QWidget*) widget->children ().at (1); 127 | QLabel* l=(QLabel*) widget->children ().at (2); 128 | 129 | w->setStyleSheet (QString("border-image: url(%1)").arg (fi->iconH)); 130 | l->setStyleSheet ("color: #5eb161"); 131 | b->setStyleSheet ("background-color: #FFFFFF"); 132 | 133 | if (mOldIndex != -1) { 134 | fi = functionList.at (mOldIndex); 135 | widget = (QWidget *) ui->listWidget->itemWidget (ui->listWidget->item (mOldIndex)); 136 | w=(QWidget*) widget->children ().at (1); 137 | l=(QLabel*) widget->children ().at (2); 138 | b=(QWidget*) widget->children ().at (0); 139 | 140 | if (!fi->type) { 141 | b->setStyleSheet ("background-color: rgba(0,0,0,0);border: 1px solid #e9e9ea;"); 142 | } else { 143 | b->setStyleSheet ("background-color: rgba(0,0,0,0)"); 144 | } 145 | w->setStyleSheet (QString("border-image: url(%1)").arg (fi->icon)); 146 | l->setStyleSheet ("color: #7e797f"); 147 | } 148 | } 149 | mOldIndex = index; 150 | } 151 | -------------------------------------------------------------------------------- /widget/fuctionswidget.h: -------------------------------------------------------------------------------- 1 | #ifndef FUCTIONSWIDGET_H 2 | #define FUCTIONSWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace Ui { 10 | class FuctionsWidget; 11 | } 12 | 13 | class FunctionsItem : public QObject { 14 | Q_OBJECT 15 | public: 16 | explicit FunctionsItem(QWidget *parent = 0, QString i="", QString hi="", QString n="", int t=0): 17 | icon(i), iconH(hi), name(n), type(t){ 18 | 19 | } 20 | 21 | QString icon; 22 | QString iconH; 23 | QString name; 24 | int type; // 25 | }; 26 | 27 | class FuctionsWidget : public QWidget 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | explicit FuctionsWidget(QWidget *parent = 0); 33 | ~FuctionsWidget(); 34 | 35 | private: 36 | Ui::FuctionsWidget *ui; 37 | QVector functionList; 38 | int mOldIndex ; 39 | QScrollArea * scrollArea; 40 | 41 | private: 42 | void optionListWidget (); 43 | void optoinScrollView (); 44 | 45 | private slots: 46 | void onListwidgetClicked(QListWidgetItem*item); 47 | }; 48 | 49 | #endif // FUCTIONSWIDGET_H 50 | -------------------------------------------------------------------------------- /widget/fuctionswidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FuctionsWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 0 29 | 0 30 | 150 31 | 460 32 | 33 | 34 | 35 | 36 | 37 | 38 | 150 39 | 0 40 | 771 41 | 461 42 | 43 | 44 | 45 | 46 | 47 | 0 48 | 60 49 | 771 50 | 401 51 | 52 | 53 | 54 | 55 | 56 | 57 | 0 58 | 0 59 | 771 60 | 61 61 | 62 | 63 | 64 | 65 | 66 | 30 67 | 20 68 | 31 69 | 16 70 | 71 | 72 | 73 | 热点 74 | 75 | 76 | 77 | 78 | 79 | 70 80 | 20 81 | 101 82 | 16 83 | 84 | 85 | 86 | 显卡,声卡出故障? 87 | 88 | 89 | 90 | 91 | 92 | 180 93 | 15 94 | 1 95 | 30 96 | 97 | 98 | 99 | 100 | 101 | 102 | 320 103 | 15 104 | 1 105 | 30 106 | 107 | 108 | 109 | 110 | 111 | 112 | 190 113 | 20 114 | 111 115 | 16 116 | 117 | 118 | 119 | 浏览器主页被劫持? 120 | 121 | 122 | 123 | 124 | 125 | 330 126 | 20 127 | 121 128 | 16 129 | 130 | 131 | 132 | 上不了网,怎么办? 133 | 134 | 135 | 136 | 137 | 138 | 500 139 | 10 140 | 251 141 | 31 142 | 143 | 144 | 145 | 146 | 147 | 30 148 | 5 149 | 211 150 | 21 151 | 152 | 153 | 154 | 155 | 156 | 157 | 5 158 | 5 159 | 20 160 | 20 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 0 174 | 0 175 | 150 176 | 460 177 | 178 | 179 | 180 | listWidgetBackGround 181 | listWidget 182 | right 183 | 184 | 185 | 186 | 187 | 0 188 | 0 189 | 920 190 | 460 191 | 192 | 193 | 194 | background 195 | main 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /widget/home2widget.cpp: -------------------------------------------------------------------------------- 1 | #include "home2widget.h" 2 | #include "ui_home2widget.h" 3 | #include 4 | #include 5 | 6 | Home2Widget::Home2Widget(QWidget *parent) : 7 | QWidget(parent), 8 | ui(new Ui::Home2Widget) 9 | { 10 | ui->setupUi(this); 11 | 12 | currentCheckWidget = NULL; 13 | // 14 | //ui->background->setStyleSheet ("QWidget#background{background-color: rgba(255, 255, 255, 230);}"); 15 | ui->bottom->setStyleSheet ("QWidget#bottom{background-color: #FFFFFF;}"); 16 | ui->top->setStyleSheet ("QWidget#top{background-color: #f1f9f1;}"); 17 | ui->pushButton->setStyleSheet ("background-color: transparent;border-radius: 16px;color: #4cb702;font-size: 15px;border: 1px solid #4cb702;"); 18 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 19 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 20 | // 21 | ui->waveBall->setWaveMode (WaveBallMode::noWaveMode); 22 | ui->waveBall->setProgress (1); 23 | ui->waveBall->startRound (); 24 | // 25 | ui->progreBar->setProgress (0); 26 | 27 | // 28 | ui->treeWidget->header ()->setVisible (false); 29 | ui->treeWidget->setFocusPolicy (Qt::NoFocus); 30 | ui->treeWidget->setSelectionMode (QAbstractItemView::NoSelection); 31 | ui->treeWidget->setIndentation (0); 32 | 33 | // 34 | 35 | reset (); 36 | 37 | timer = new QTimer (); 38 | connect (timer, SIGNAL(timeout()), this, SLOT(onTimeOut())); 39 | } 40 | 41 | void Home2Widget::start () { 42 | // 每两秒一个 43 | timer->start (1000*1); 44 | } 45 | 46 | void Home2Widget::stop () { 47 | timer->stop (); 48 | currentCheckWidget->stop (); 49 | } 50 | 51 | void Home2Widget::reset () { 52 | ui->treeWidget->clear (); 53 | 54 | Home2TreeObj * to = new Home2TreeObj(0, 0, NULL, "鼓掌检测共9项(.....)"); 55 | to->mSubItems.append (new Home2TreeObj(0, 1, ":/other/images/other/icon_check_1.png", "清理插件")); 56 | objs.append (to); 57 | optionTreeWidget (); 58 | 59 | } 60 | 61 | void Home2Widget::onTimeOut() { 62 | qDebug () << "onTimeOut: " << mIndex; 63 | 64 | // 更新进度 65 | ui->progreBar->setProgress (mIndex*1.0/27); 66 | 67 | ui->treeWidget->clear (); 68 | if (mIndex == 9) { 69 | Home2TreeObj * to = new Home2TreeObj(0, 0, NULL, "鼓掌检测共9项(.....)"); 70 | objs.insert (0, to); 71 | } else if (mIndex == 18) { 72 | Home2TreeObj * to = new Home2TreeObj(0, 0, NULL, "鼓掌检测共9项(.....)"); 73 | objs.insert (0, to); 74 | } else if (mIndex == 27) { 75 | Home2TreeObj * to = new Home2TreeObj(0, 0, NULL, "鼓掌检测共9项(.....)"); 76 | objs.insert (0, to); 77 | } 78 | 79 | Home2TreeObj * to = objs.last (); 80 | to->mSubItems.append (new Home2TreeObj(0, 1, ":/other/images/other/icon_check_1.png", "清理插件")); 81 | optionTreeWidget (); 82 | 83 | mIndex++; 84 | } 85 | 86 | Home2Widget::~Home2Widget() 87 | { 88 | delete ui; 89 | } 90 | 91 | void Home2Widget::on_pushButton_clicked() 92 | { 93 | emit onHome2IntoNextSignal (); 94 | } 95 | 96 | void Home2Widget::optionTreeWidget () { 97 | for (int i = 0; i < objs.size (); i++) { 98 | Home2TreeObj * oItem = objs.at (i); 99 | 100 | // 101 | QTreeWidgetItem* item = new QTreeWidgetItem; 102 | item->setSizeHint (0, QSize(900, 30)); 103 | ui->treeWidget->addTopLevelItem (item); 104 | ui->treeWidget->setItemWidget (item, 0, titleWidget (oItem)); 105 | 106 | // 子项 107 | qDebug () << "(100 * (oItem->mSubItems.size ()/7 +1): " << (90 * (oItem->mSubItems.size ()/7 +1)); 108 | QTreeWidgetItem* subItem = new QTreeWidgetItem; 109 | subItem->setSizeHint (0, QSize(900, (90 * (oItem->mSubItems.size ()/7 +1)))); 110 | item->addChild (subItem); 111 | ui->treeWidget->setItemWidget (subItem, 0, cellWidget (oItem, i==0)); 112 | } 113 | 114 | ui->treeWidget->expandAll (); 115 | } 116 | 117 | QWidget * Home2Widget::titleWidget (Home2TreeObj * obj) { 118 | QWidget * w = new QWidget ; 119 | w->setGeometry (0, 0, 900, 30); 120 | w->setStyleSheet ("background-color: #F3F3F3"); 121 | 122 | QLabel * lb = new QLabel (w); 123 | lb->setGeometry (70, 0, 900, 30); 124 | lb->setText (obj->mTitle); 125 | 126 | return w; 127 | } 128 | 129 | QWidget * Home2Widget::cellWidget (Home2TreeObj * obj, bool isLast) { 130 | QWidget * w = new QWidget ; 131 | w->setGeometry (0, 0, 900, (90 * (obj->mSubItems.size ()/7 +1))); 132 | 133 | for (int i = 0; i < obj->mSubItems.size (); i++) { 134 | Home2TreeObj * item = obj->mSubItems.at (i); 135 | 136 | QWidget * sub = new QWidget(w) ; 137 | sub->setGeometry (50+(i%7)*120, (i/7)*90, 100, 90); 138 | 139 | CheckWidget *cw = new CheckWidget(sub); 140 | cw->setGeometry (20, 15, 60, 60); 141 | cw->setIcon (item->mIcon); 142 | if (isLast && i == obj->mSubItems.size ()-1) { 143 | cw->start (); 144 | currentCheckWidget = cw; 145 | } else { 146 | cw->stop (); 147 | } 148 | QLabel * lb = new QLabel (sub); 149 | lb->setGeometry (0, 70, 100, 20); 150 | lb->setAlignment (Qt::AlignCenter); 151 | lb->setText (item->mTitle); 152 | } 153 | 154 | return w; 155 | } 156 | -------------------------------------------------------------------------------- /widget/home2widget.h: -------------------------------------------------------------------------------- 1 | #ifndef HOME2WIDGET_H 2 | #define HOME2WIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "customviews/checkwidget.h" 8 | 9 | namespace Ui { 10 | class Home2Widget; 11 | } 12 | 13 | class Home2TreeObj : public QObject { 14 | Q_OBJECT 15 | public: 16 | explicit Home2TreeObj(QWidget *parent = 0, int t = 0, QString i = NULL, QString n = "") : 17 | mType(t), mIcon (i), mTitle (n) 18 | {} 19 | public: 20 | // 0: 头 1: 子项 21 | int mType; 22 | // 23 | QString mIcon; 24 | QString mTitle; 25 | 26 | QVector mSubItems; 27 | }; 28 | 29 | class Home2Widget : public QWidget 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | explicit Home2Widget(QWidget *parent = 0); 35 | ~Home2Widget(); 36 | 37 | private: 38 | Ui::Home2Widget *ui; 39 | // 40 | QVector objs; 41 | CheckWidget * currentCheckWidget; 42 | QTimer * timer ; 43 | int mIndex; 44 | 45 | signals: 46 | void onHome2IntoNextSignal (); 47 | 48 | 49 | private slots: 50 | void on_pushButton_clicked(); 51 | 52 | void onTimeOut(); 53 | 54 | private: 55 | void optionTreeWidget (); 56 | QWidget * titleWidget (Home2TreeObj * obj); 57 | QWidget * cellWidget (Home2TreeObj * obj, bool isLast); 58 | void reset (); 59 | 60 | public: 61 | void start (); 62 | void stop (); 63 | }; 64 | 65 | #endif // HOME2WIDGET_H 66 | -------------------------------------------------------------------------------- /widget/home2widget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Home2Widget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 920 32 | 460 33 | 34 | 35 | 36 | 37 | 38 | 0 39 | 0 40 | 920 41 | 130 42 | 43 | 44 | 45 | 46 | 47 | 40 48 | 20 49 | 90 50 | 90 51 | 52 | 53 | 54 | 55 | 56 | 57 | 0 58 | 126 59 | 920 60 | 4 61 | 62 | 63 | 64 | 65 | 66 | 67 | 160 68 | 40 69 | 401 70 | 30 71 | 72 | 73 | 74 | 正在进行体检: 故障检测 75 | 76 | 77 | 78 | 79 | 80 | 160 81 | 80 82 | 381 83 | 16 84 | 85 | 86 | 87 | 尚未发现问题项目,请继续等待体检结果 88 | 89 | 90 | 91 | 92 | 93 | 780 94 | 50 95 | 90 96 | 36 97 | 98 | 99 | 100 | 取消体检 101 | 102 | 103 | 104 | 105 | 106 | 107 | 0 108 | 130 109 | 920 110 | 331 111 | 112 | 113 | 114 | 115 | 116 | 0 117 | 0 118 | 921 119 | 331 120 | 121 | 122 | 123 | 124 | 1 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | WaveBallWidget 134 | QWidget 135 |
customviews/waveballwidget.h
136 | 1 137 |
138 | 139 | ProgressBarWidget 140 | QWidget 141 |
customviews/progressbarwidget.h
142 | 1 143 |
144 |
145 | 146 | 147 |
148 | -------------------------------------------------------------------------------- /widget/homewidget.cpp: -------------------------------------------------------------------------------- 1 | #include "homewidget.h" 2 | #include "ui_homewidget.h" 3 | 4 | 5 | HomeWidget::HomeWidget(QWidget *parent) : 6 | QWidget(parent), 7 | ui(new Ui::HomeWidget) 8 | { 9 | ui->setupUi(this); 10 | 11 | // 12 | ui->background->setStyleSheet ("background-color: #FFFFFF;"); 13 | // 14 | ui->pushButton->setStyleSheet ("background-color: #16da6c;border-radius: 30px;color: #FFFFFF;font-size: 25px;"); 15 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 16 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 17 | // 18 | ui->wallBallWidget->setProgress (0.3); 19 | 20 | optionToolButtons (); 21 | optionStateWidgets (); 22 | 23 | // 24 | home2Widget = new Home2Widget(this); 25 | home2Widget->setVisible (false); 26 | connect (home2Widget, SIGNAL(onHome2IntoNextSignal()), this, SLOT(onHome2IntoNextSlot())); 27 | } 28 | 29 | HomeWidget::~HomeWidget() 30 | { 31 | delete ui; 32 | } 33 | 34 | void HomeWidget::optionStateWidgets () { 35 | ui->fangHuZhongXin->show (":/other/images/other/icon_fanghuzhongxin.png", "防护中心", 1); 36 | ui->wangGouXianPei->show (":/other/images/other/icon_wanggou.png", "网购先陪", 1); 37 | ui->fanLeSuo->show (":/other/images/other/icon_fanlesuo.png", "反勒索服务", 0); 38 | 39 | // 40 | connect (ui->fangHuZhongXin, SIGNAL(onStateWidgetHoverSinal(StateWidget*)), 41 | this, SLOT(onStateWidgetHoverSlot(StateWidget*))); 42 | connect (ui->fangHuZhongXin, SIGNAL(onStateWidgetNoHoverSinal(StateWidget*)), 43 | this, SLOT(onStateWidgetNoHoverSlot(StateWidget*))); 44 | connect (ui->wangGouXianPei, SIGNAL(onStateWidgetHoverSinal(StateWidget*)), 45 | this, SLOT(onStateWidgetHoverSlot(StateWidget*))); 46 | connect (ui->wangGouXianPei, SIGNAL(onStateWidgetNoHoverSinal(StateWidget*)), 47 | this, SLOT(onStateWidgetNoHoverSlot(StateWidget*))); 48 | connect (ui->fanLeSuo, SIGNAL(onStateWidgetHoverSinal(StateWidget*)), 49 | this, SLOT(onStateWidgetHoverSlot(StateWidget*))); 50 | connect (ui->fanLeSuo, SIGNAL(onStateWidgetNoHoverSinal(StateWidget*)), 51 | this, SLOT(onStateWidgetNoHoverSlot(StateWidget*))); 52 | } 53 | 54 | void HomeWidget::optionToolButtons () { 55 | optionToolButton (ui->tbApp, QIcon(":/other/images/other/icon_app.png"), "软件管理"); 56 | optionToolButton (ui->tbFix, QIcon(":/other/images/other/icon_fix.png"), "主页修复"); 57 | optionToolButton (ui->tbHandler, QIcon(":/other/images/other/icon_handler.png"), "手机助手"); 58 | optionToolButton (ui->tbMore, QIcon(":/other/images/other/icon_more.png"), "更多功能"); 59 | optionToolButton (ui->tbService, QIcon(":/other/images/other/icon_help.png"), "人工服务"); 60 | } 61 | 62 | void HomeWidget::optionToolButton (QToolButton * tb, QIcon icon, QString text) { 63 | QAction *pAction = new QAction(this); 64 | pAction->setText(text); 65 | pAction->setIcon(icon); 66 | tb->setIconSize(QSize(42, 42)); 67 | tb->setDefaultAction(pAction); 68 | tb->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 69 | tb->setProperty ("homewidget_toolbutton", true); 70 | } 71 | 72 | void HomeWidget::onStateWidgetHoverSlot(StateWidget*s) { 73 | 74 | } 75 | 76 | void HomeWidget::onStateWidgetNoHoverSlot(StateWidget*s) { 77 | 78 | } 79 | 80 | void HomeWidget::on_pushButton_clicked() 81 | { 82 | home2Widget->setVisible (true); 83 | ui->home->setVisible (false); 84 | home2Widget->start (); 85 | } 86 | 87 | void HomeWidget::onHome2IntoNextSlot() { 88 | home2Widget->setVisible (false); 89 | ui->home->setVisible (true); 90 | home2Widget->stop (); 91 | } 92 | -------------------------------------------------------------------------------- /widget/homewidget.h: -------------------------------------------------------------------------------- 1 | #ifndef HOMEWIDGET_H 2 | #define HOMEWIDGET_H 3 | 4 | #include 5 | #include 6 | #include "customviews/statewidget.h" 7 | #include "home2widget.h" 8 | 9 | namespace Ui { 10 | class HomeWidget; 11 | } 12 | 13 | class HomeWidget : public QWidget 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit HomeWidget(QWidget *parent = 0); 19 | ~HomeWidget(); 20 | 21 | private: 22 | Ui::HomeWidget *ui; 23 | Home2Widget * home2Widget; 24 | 25 | private: 26 | void optionStateWidgets (); 27 | void optionToolButtons () ; 28 | void optionToolButton (QToolButton * tb, QIcon icon, QString text); 29 | 30 | private slots: 31 | 32 | void onStateWidgetHoverSlot(StateWidget*s) ; 33 | 34 | void onStateWidgetNoHoverSlot(StateWidget*s); 35 | 36 | void on_pushButton_clicked(); 37 | 38 | void onHome2IntoNextSlot(); 39 | }; 40 | 41 | #endif // HOMEWIDGET_H 42 | -------------------------------------------------------------------------------- /widget/homewidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | HomeWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 360 29 | 150 30 | 400 31 | 20 32 | 33 | 34 | 35 | 系统可能已经存在高危风险 36 | 37 | 38 | 39 | 40 | 41 | 360 42 | 200 43 | 200 44 | 60 45 | 46 | 47 | 48 | 立即体检 49 | 50 | 51 | 52 | 53 | 54 | 550 55 | 390 56 | 70 57 | 70 58 | 59 | 60 | 61 | ... 62 | 63 | 64 | 65 | 66 | 67 | 620 68 | 390 69 | 70 70 | 70 71 | 72 | 73 | 74 | ... 75 | 76 | 77 | 78 | 79 | 80 | 110 81 | 90 82 | 190 83 | 190 84 | 85 | 86 | 87 | 88 | 89 | 90 | 360 91 | 110 92 | 400 93 | 40 94 | 95 | 96 | 97 | 已3天没有体检,建议立即体检! 98 | 99 | 100 | 101 | 102 | 103 | 690 104 | 390 105 | 70 106 | 70 107 | 108 | 109 | 110 | ... 111 | 112 | 113 | 114 | 115 | 116 | 760 117 | 390 118 | 70 119 | 70 120 | 121 | 122 | 123 | ... 124 | 125 | 126 | 127 | 128 | 129 | 830 130 | 390 131 | 70 132 | 70 133 | 134 | 135 | 136 | ... 137 | 138 | 139 | 140 | 141 | 142 | 20 143 | 390 144 | 70 145 | 70 146 | 147 | 148 | 149 | 150 | 151 | 152 | 90 153 | 390 154 | 70 155 | 70 156 | 157 | 158 | 159 | 160 | 161 | 162 | 160 163 | 390 164 | 70 165 | 70 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 0 174 | 0 175 | 920 176 | 460 177 | 178 | 179 | 180 | background 181 | home 182 | 183 | 184 | 185 | WaveBallWidget 186 | QWidget 187 |
customviews/waveballwidget.h
188 | 1 189 |
190 | 191 | StateWidget 192 | QWidget 193 |
customviews/statewidget.h
194 | 1 195 |
196 |
197 | 198 | 199 |
200 | -------------------------------------------------------------------------------- /widget/horse2widget.cpp: -------------------------------------------------------------------------------- 1 | #include "horse2widget.h" 2 | #include "ui_horse2widget.h" 3 | #include 4 | #include 5 | 6 | Horse2Widget::Horse2Widget(QWidget *parent) : 7 | QWidget(parent), 8 | ui(new Ui::Horse2Widget) 9 | { 10 | ui->setupUi(this); 11 | 12 | // 13 | //ui->background->setStyleSheet ("QWidget#background{background-color: rgba(255, 255, 255, 230);}"); 14 | ui->bottom->setStyleSheet ("QWidget#bottom{background-color: #FFFFFF;}"); 15 | ui->top->setStyleSheet ("QWidget#top{background-color: #f1f9f1;}"); 16 | ui->pushButton->setStyleSheet ("background-color: transparent;border-radius: 16px;color: #4cb702;font-size: 15px;border: 1px solid #4cb702;"); 17 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 18 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 19 | // 20 | ui->waveBall->setWaveMode (WaveBallMode::noWaveMode); 21 | ui->waveBall->setProgress (1); 22 | ui->waveBall->showScores (false); 23 | ui->waveBall->setIcon (":/horse/images/horse/icon_horse.png", QSize(40, 40)); 24 | ui->waveBall->startRound (); 25 | // 26 | 27 | // 28 | reset (); 29 | 30 | scanTimer = new QTimer; 31 | connect (scanTimer, SIGNAL(timeout()), this, SLOT(onScanTimerOut())); 32 | } 33 | 34 | void Horse2Widget::reset () { 35 | randTimerDis = 0; 36 | timerTick = 0; 37 | optionScanWidgets (); 38 | ui->progreBar->setProgress (0); 39 | } 40 | 41 | void Horse2Widget::start () { 42 | mScanIndex = 0; 43 | scanTimer->start (1000*1); 44 | 45 | ui->scan_1->setScanState (ScanState::scan); 46 | mCurrentScanWidget = ui->scan_1; 47 | } 48 | 49 | void Horse2Widget::stop () { 50 | scanTimer->stop (); 51 | } 52 | 53 | void Horse2Widget::onScanTimerOut() { 54 | timerTick++; 55 | ui->timer->setText (QString().sprintf("已用时: %02d:%02d:%02d", timerTick/3600, (timerTick%3600)/60, timerTick%60)); 56 | 57 | if (randTimerDis > 0 ) { 58 | randTimerDis--; 59 | return ; 60 | } 61 | 62 | QTime t= QTime::currentTime(); 63 | qsrand(t.msec()+t.second()*1000); 64 | // 随机生成一个时间间隔 65 | randTimerDis = qrand()%5 + 2; 66 | 67 | mCurrentScanWidget->setScanState (ScanState::finished); 68 | if (mScanIndex == 0) { 69 | mCurrentScanWidget = ui->scan_2; 70 | } else if (mScanIndex == 1) { 71 | mCurrentScanWidget = ui->scan_3; 72 | } else if (mScanIndex == 2) { 73 | mCurrentScanWidget = ui->scan_4; 74 | } else if (mScanIndex == 3) { 75 | mCurrentScanWidget = ui->scan_5; 76 | } else if (mScanIndex == 4) { 77 | mCurrentScanWidget = ui->scan_6; 78 | } else if (mScanIndex == 5) { 79 | mCurrentScanWidget = ui->scan_7; 80 | } else if (mScanIndex == 6) { 81 | mCurrentScanWidget = ui->scan_8; 82 | } else if (mScanIndex == 7) { 83 | mCurrentScanWidget = ui->scan_9; 84 | } else if (mScanIndex == 8) { 85 | mCurrentScanWidget = ui->scan_10; 86 | } else { 87 | mCurrentScanWidget = NULL; 88 | } 89 | if (mCurrentScanWidget != NULL) { 90 | mCurrentScanWidget->setScanState (ScanState::scan); 91 | } 92 | 93 | mScanIndex++; 94 | 95 | // 96 | ui->progreBar->setProgress (mScanIndex*1.0/10); 97 | qDebug () << "mScanIndex: " << mScanIndex; 98 | 99 | // 扫描完成. 100 | if (mCurrentScanWidget == NULL) { 101 | stop (); 102 | } 103 | } 104 | 105 | Horse2Widget::~Horse2Widget() 106 | { 107 | delete ui; 108 | } 109 | 110 | void Horse2Widget::on_pushButton_clicked() 111 | { 112 | emit onHorse2IntoNextSignal(); 113 | } 114 | 115 | void Horse2Widget::optionScanWidgets () { 116 | ui->scan_1->setTitle ("顽固木马"); 117 | ui->scan_1->setIcon (":/other/images/other/icon_liulanqi.png"); 118 | ui->scan_2->setTitle ("顽固木马"); 119 | ui->scan_2->setIcon (":/other/images/other/icon_liulanqi.png"); 120 | ui->scan_3->setTitle ("顽固木马"); 121 | ui->scan_3->setIcon (":/other/images/other/icon_liulanqi.png"); 122 | ui->scan_4->setTitle ("顽固木马"); 123 | ui->scan_4->setIcon (":/other/images/other/icon_liulanqi.png"); 124 | ui->scan_5->setTitle ("顽固木马"); 125 | ui->scan_5->setIcon (":/other/images/other/icon_liulanqi.png"); 126 | ui->scan_6->setTitle ("顽固木马"); 127 | ui->scan_6->setIcon (":/other/images/other/icon_liulanqi.png"); 128 | ui->scan_7->setTitle ("顽固木马"); 129 | ui->scan_7->setIcon (":/other/images/other/icon_liulanqi.png"); 130 | ui->scan_8->setTitle ("顽固木马"); 131 | ui->scan_8->setIcon (":/other/images/other/icon_liulanqi.png"); 132 | ui->scan_9->setTitle ("顽固木马"); 133 | ui->scan_9->setIcon (":/other/images/other/icon_liulanqi.png"); 134 | ui->scan_10->setTitle ("顽固木马"); 135 | ui->scan_10->setIcon (":/other/images/other/icon_liulanqi.png"); 136 | } 137 | 138 | void Horse2Widget::optionScanWidget(ScanWidget * widget) { 139 | 140 | } 141 | -------------------------------------------------------------------------------- /widget/horse2widget.h: -------------------------------------------------------------------------------- 1 | #ifndef HORSE2WIDGET_H 2 | #define HORSE2WIDGET_H 3 | 4 | #include 5 | #include 6 | #include "customviews/scanwidget.h" 7 | 8 | namespace Ui { 9 | class Horse2Widget; 10 | } 11 | 12 | class Horse2Widget : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit Horse2Widget(QWidget *parent = 0); 18 | ~Horse2Widget(); 19 | 20 | private: 21 | Ui::Horse2Widget *ui; 22 | QTimer * scanTimer; 23 | int mScanIndex; 24 | ScanWidget *mCurrentScanWidget; 25 | int timerTick; 26 | int randTimerDis; 27 | 28 | signals: 29 | void onHorse2IntoNextSignal (); 30 | 31 | private slots: 32 | void on_pushButton_clicked(); 33 | 34 | void onScanTimerOut(); 35 | 36 | private: 37 | void optionScanWidgets (); 38 | void optionScanWidget(ScanWidget * widget); 39 | 40 | public: 41 | void reset (); 42 | void start (); 43 | void stop (); 44 | }; 45 | 46 | #endif // HORSE2WIDGET_H 47 | -------------------------------------------------------------------------------- /widget/horsewidget.cpp: -------------------------------------------------------------------------------- 1 | #include "horsewidget.h" 2 | #include "ui_horsewidget.h" 3 | 4 | HorseWidget::HorseWidget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::HorseWidget) 7 | { 8 | ui->setupUi(this); 9 | 10 | // 11 | ui->background->setStyleSheet ("background-color: #FFFFFF;"); 12 | // 13 | ui->pushButton->setStyleSheet ("background-color: #16da6c;border-radius: 30px;color: #FFFFFF;font-size: 25px;"); 14 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 15 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 16 | // 17 | ui->wallBallWidget->setProgress (0.1); 18 | ui->wallBallWidget->setWaveMode (WaveBallMode::noWaveMode); 19 | ui->wallBallWidget->showScores (false); 20 | ui->wallBallWidget->setIcon (":/horse/images/horse/icon_horse.png", QSize(80, 80)); 21 | 22 | optionToolButtons (); 23 | optionPushButtons (); 24 | 25 | // 26 | horse2Widget = new Horse2Widget(this); 27 | horse2Widget->setVisible (false); 28 | connect (horse2Widget, SIGNAL(onHorse2IntoNextSignal()), this, SLOT(onHorse2IntoNextSlot())); 29 | } 30 | 31 | HorseWidget::~HorseWidget() 32 | { 33 | delete ui; 34 | } 35 | 36 | void HorseWidget::optionPushButtons () { 37 | ui->pushButton_2->setStyleSheet ("border-image: url(:/horse/images/horse/icon_pb_bg_1.png)"); 38 | ui->pushButton_3->setStyleSheet ("border-image: url(:/horse/images/horse/icon_pb_bg_2.png)"); 39 | ui->pushButton_4->setStyleSheet ("border-image: url(:/horse/images/horse/icon_pb_bg_3.png)"); 40 | ui->pushButton_5->setStyleSheet ("border-image: url(:/horse/images/horse/icon_pb_bg_4.png)"); 41 | ui->pushButton_6->setStyleSheet ("border-image: url(:/horse/images/horse/icon_pb_bg_5.png)"); 42 | } 43 | 44 | void HorseWidget::optionToolButtons () { 45 | 46 | // 47 | optionToolButton (ui->tbQuanpan, 48 | QIcon(":/horse/images/horse/icon_quanpansaomiao.png"), 49 | "全盘查杀", 50 | QSize(34, 32), 51 | "horsewidget_toolbutton_1") ; 52 | optionToolButton (ui->tbAnweizhi, 53 | QIcon(":/horse/images/horse/icon_anweizhi.png"), 54 | "按位置查杀", 55 | QSize(34, 32), 56 | "horsewidget_toolbutton_1") ; 57 | 58 | // 59 | optionToolButton (ui->tbXinrenqu, 60 | QIcon(":/horse/images/horse/icon_xinrenqu.png"), 61 | "信任区", 62 | QSize(32, 32), 63 | "horsewidget_toolbutton_2") ; 64 | optionToolButton (ui->tbHuifuqu, QIcon(":/horse/images/horse/icon_huifuqu.png"), 65 | "恢复区", 66 | QSize(32, 32), 67 | "horsewidget_toolbutton_2") ; 68 | optionToolButton (ui->tbShangbanqu, QIcon(":/horse/images/horse/icon_shangbaoqu.png"), 69 | "上报区", QSize(32, 32), 70 | "horsewidget_toolbutton_2") ; 71 | 72 | // 73 | optionToolButton (ui->tbXitong, QIcon(":/horse/images/horse/icon_icon_1.png"), 74 | "系统急救箱", 75 | QSize(32, 32), 76 | "horsewidget_toolbutton_3") ; 77 | optionToolButton (ui->tbShouji, QIcon(":/horse/images/horse/icon_icon_2.png"), 78 | "手机急救箱", 79 | QSize(32, 32), 80 | "horsewidget_toolbutton_3") ; 81 | optionToolButton (ui->tbWinPE, QIcon(":/horse/images/horse/icon_icon_3.png"), 82 | "WinPE版", 83 | QSize(32, 32), 84 | "horsewidget_toolbutton_3") ; 85 | } 86 | 87 | void HorseWidget::optionToolButton (QToolButton * tb, 88 | QIcon icon, 89 | QString text, 90 | QSize size, 91 | QString property) { 92 | QAction *pAction = new QAction(this); 93 | pAction->setText(text); 94 | pAction->setIcon(icon); 95 | tb->setIconSize(size); 96 | tb->setDefaultAction(pAction); 97 | tb->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 98 | tb->setProperty (property.toLatin1().data(), true); 99 | } 100 | 101 | 102 | void HorseWidget::on_pushButton_clicked() 103 | { 104 | horse2Widget->setVisible (true); 105 | ui->main->setVisible (false); 106 | 107 | // 开始扫描 108 | horse2Widget->reset (); 109 | horse2Widget->start (); 110 | } 111 | 112 | void HorseWidget::onHorse2IntoNextSlot () { 113 | horse2Widget->setVisible (false); 114 | ui->main->setVisible (true); 115 | 116 | // 117 | horse2Widget->stop (); 118 | } 119 | 120 | void HorseWidget::on_tbQuanpan_clicked() 121 | { 122 | horse2Widget->setVisible (true); 123 | ui->main->setVisible (false); 124 | 125 | horse2Widget->reset (); 126 | horse2Widget->start (); 127 | } 128 | 129 | void HorseWidget::on_pushButton_2_clicked() 130 | { 131 | 132 | } 133 | -------------------------------------------------------------------------------- /widget/horsewidget.h: -------------------------------------------------------------------------------- 1 | #ifndef HORSEWIDGET_H 2 | #define HORSEWIDGET_H 3 | 4 | #include 5 | #include 6 | #include "horse2widget.h" 7 | 8 | namespace Ui { 9 | class HorseWidget; 10 | } 11 | 12 | class HorseWidget : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit HorseWidget(QWidget *parent = 0); 18 | ~HorseWidget(); 19 | 20 | private: 21 | Ui::HorseWidget *ui; 22 | Horse2Widget * horse2Widget; 23 | 24 | private: 25 | void optionToolButtons (); 26 | void optionToolButton (QToolButton * tb, 27 | QIcon icon, 28 | QString text, 29 | QSize size, 30 | QString property); 31 | void optionPushButtons () ; 32 | 33 | signals: 34 | 35 | private slots: 36 | void on_pushButton_clicked(); 37 | 38 | void onHorse2IntoNextSlot (); 39 | void on_tbQuanpan_clicked(); 40 | void on_pushButton_2_clicked(); 41 | }; 42 | 43 | #endif // HORSEWIDGET_H 44 | -------------------------------------------------------------------------------- /widget/horsewidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | HorseWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 920 32 | 460 33 | 34 | 35 | 36 | 37 | 38 | 710 39 | 350 40 | 201 41 | 20 42 | 43 | 44 | 45 | 开启强化模式,仅限本次扫描 46 | 47 | 48 | 49 | 50 | 51 | 360 52 | 150 53 | 400 54 | 20 55 | 56 | 57 | 58 | 顶起木马查杀, 时刻保持电脑健康 59 | 60 | 61 | 62 | 63 | 64 | 40 65 | 400 66 | 40 67 | 60 68 | 69 | 70 | 71 | ... 72 | 73 | 74 | 75 | 76 | 77 | 160 78 | 360 79 | 25 80 | 25 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 360 91 | 200 92 | 200 93 | 60 94 | 95 | 96 | 97 | 快速查杀 98 | 99 | 100 | 101 | 102 | 103 | 660 104 | 200 105 | 60 106 | 60 107 | 108 | 109 | 110 | ... 111 | 112 | 113 | 114 | 115 | 116 | 110 117 | 400 118 | 40 119 | 60 120 | 121 | 122 | 123 | ... 124 | 125 | 126 | 127 | 128 | 129 | 780 130 | 390 131 | 60 132 | 70 133 | 134 | 135 | 136 | ... 137 | 138 | 139 | 140 | 141 | 142 | 40 143 | 360 144 | 25 145 | 25 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 120 156 | 90 157 | 190 158 | 190 159 | 160 | 161 | 162 | 163 | 164 | 165 | 200 166 | 360 167 | 25 168 | 25 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 850 179 | 390 180 | 60 181 | 70 182 | 183 | 184 | 185 | ... 186 | 187 | 188 | 189 | 190 | 191 | 360 192 | 110 193 | 400 194 | 40 195 | 196 | 197 | 198 | 上次扫描共10项威胁未处理 199 | 200 | 201 | 202 | 203 | 204 | 80 205 | 360 206 | 25 207 | 25 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 590 218 | 200 219 | 60 220 | 60 221 | 222 | 223 | 224 | ... 225 | 226 | 227 | 228 | 229 | 230 | 710 231 | 390 232 | 60 233 | 70 234 | 235 | 236 | 237 | ... 238 | 239 | 240 | 241 | 242 | 243 | 180 244 | 400 245 | 40 246 | 60 247 | 248 | 249 | 250 | ... 251 | 252 | 253 | 254 | 255 | 256 | 120 257 | 360 258 | 25 259 | 25 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | WaveBallWidget 271 | QWidget 272 |
customviews/waveballwidget.h
273 | 1 274 |
275 | 276 | FocusWidget 277 | QPushButton 278 |
customviews/focuswidget.h
279 |
280 |
281 | 282 | 283 |
284 | -------------------------------------------------------------------------------- /widget/loginwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "loginwidget.h" 2 | #include "ui_loginwidget.h" 3 | 4 | LoginWidget::LoginWidget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::LoginWidget) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | LoginWidget::~LoginWidget() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /widget/loginwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef LOGINWIDGET_H 2 | #define LOGINWIDGET_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class LoginWidget; 8 | } 9 | 10 | class LoginWidget : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit LoginWidget(QWidget *parent = 0); 16 | ~LoginWidget(); 17 | 18 | private: 19 | Ui::LoginWidget *ui; 20 | }; 21 | 22 | #endif // LOGINWIDGET_H 23 | -------------------------------------------------------------------------------- /widget/loginwidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | LoginWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 250 10 | 140 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 70 20 | 60 21 | 113 22 | 32 23 | 24 | 25 | 26 | 登陆 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /widget/optimize2widget.cpp: -------------------------------------------------------------------------------- 1 | #include "optimize2widget.h" 2 | #include "ui_optimize2widget.h" 3 | 4 | Optimize2Widget::Optimize2Widget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::Optimize2Widget) 7 | { 8 | ui->setupUi(this); 9 | 10 | // 11 | //ui->background->setStyleSheet ("QWidget#background{background-color: rgba(255, 255, 255, 230);}"); 12 | ui->bottom->setStyleSheet ("QWidget#bottom{background-color: #FFFFFF;}"); 13 | ui->top->setStyleSheet ("QWidget#top{background-color: #f1f9f1;}"); 14 | ui->pushButton->setStyleSheet ("background-color: transparent;border-radius: 16px;color: #4cb702;font-size: 15px;border: 1px solid #4cb702;"); 15 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 16 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 17 | // 18 | ui->waveBall->setWaveMode (WaveBallMode::noWaveMode); 19 | ui->waveBall->setProgress (1); 20 | ui->waveBall->showScores (false); 21 | ui->waveBall->setIcon (":/horse/images/horse/icon_optimize.png", QSize(40, 40)); 22 | ui->waveBall->startRound (); 23 | // 24 | ui->progreBar->setProgress (0.3); 25 | } 26 | 27 | Optimize2Widget::~Optimize2Widget() 28 | { 29 | delete ui; 30 | } 31 | 32 | void Optimize2Widget::on_pushButton_clicked() 33 | { 34 | emit onOptimize2IntoNextSignal (); 35 | } 36 | -------------------------------------------------------------------------------- /widget/optimize2widget.h: -------------------------------------------------------------------------------- 1 | #ifndef OPTIMIZE2WIDGET_H 2 | #define OPTIMIZE2WIDGET_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class Optimize2Widget; 8 | } 9 | 10 | class Optimize2Widget : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit Optimize2Widget(QWidget *parent = 0); 16 | ~Optimize2Widget(); 17 | 18 | private slots: 19 | void on_pushButton_clicked(); 20 | 21 | private: 22 | Ui::Optimize2Widget *ui; 23 | 24 | signals: 25 | void onOptimize2IntoNextSignal (); 26 | }; 27 | 28 | #endif // OPTIMIZE2WIDGET_H 29 | -------------------------------------------------------------------------------- /widget/optimize2widget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Optimize2Widget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 920 32 | 460 33 | 34 | 35 | 36 | 37 | 38 | 0 39 | 0 40 | 920 41 | 130 42 | 43 | 44 | 45 | 46 | 47 | 40 48 | 20 49 | 90 50 | 90 51 | 52 | 53 | 54 | 55 | 56 | 57 | 0 58 | 126 59 | 920 60 | 4 61 | 62 | 63 | 64 | 65 | 66 | 67 | 160 68 | 40 69 | 401 70 | 30 71 | 72 | 73 | 74 | 扫描中 75 | 76 | 77 | 78 | 79 | 80 | 160 81 | 80 82 | 381 83 | 16 84 | 85 | 86 | 87 | 全面升级电脑开机速度,系统速度,上网速度,硬盘速度 88 | 89 | 90 | 91 | 92 | 93 | 780 94 | 50 95 | 90 96 | 36 97 | 98 | 99 | 100 | 取消扫描 101 | 102 | 103 | 104 | 105 | 106 | 107 | 0 108 | 130 109 | 920 110 | 331 111 | 112 | 113 | 114 | 115 | 116 | 0 117 | 0 118 | 921 119 | 331 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | WaveBallWidget 129 | QWidget 130 |
customviews/waveballwidget.h
131 | 1 132 |
133 | 134 | ProgressBarWidget 135 | QWidget 136 |
customviews/progressbarwidget.h
137 | 1 138 |
139 |
140 | 141 | 142 |
143 | -------------------------------------------------------------------------------- /widget/optimizewidget.cpp: -------------------------------------------------------------------------------- 1 | #include "optimizewidget.h" 2 | #include "ui_optimizewidget.h" 3 | 4 | OptimizeWidget::OptimizeWidget(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::OptimizeWidget) 7 | { 8 | ui->setupUi(this); 9 | 10 | // 11 | ui->background->setStyleSheet ("background-color: #FFFFFF;"); 12 | // 13 | ui->pushButton->setStyleSheet ("background-color: #16da6c;border-radius: 30px;color: #FFFFFF;font-size: 25px;"); 14 | ui->title->setStyleSheet ("color: #444444;font-size: 25px;"); 15 | ui->subtitle->setStyleSheet ("color: #9b9999;font-size: 16px;"); 16 | // 17 | ui->wallBallWidget->setProgress (1); 18 | ui->wallBallWidget->setWaveMode (WaveBallMode::noWaveMode); 19 | ui->wallBallWidget->showScores (false); 20 | ui->wallBallWidget->setIcon (":/horse/images/horse/icon_optimize.png", QSize(80, 80)); 21 | 22 | optionToolButtons (); 23 | 24 | // 25 | optimize2Widget = new Optimize2Widget(this); 26 | optimize2Widget->setVisible (false); 27 | connect (optimize2Widget, SIGNAL(onOptimize2IntoNextSignal()), this, SLOT(onOptimize2IntoNextSlot())); 28 | } 29 | 30 | OptimizeWidget::~OptimizeWidget() 31 | { 32 | delete ui; 33 | } 34 | 35 | void OptimizeWidget::on_pushButton_clicked() 36 | { 37 | optimize2Widget->setVisible (true); 38 | ui->home->setVisible (false); 39 | } 40 | 41 | void OptimizeWidget::onOptimize2IntoNextSlot () { 42 | optimize2Widget->setVisible (false); 43 | ui->home->setVisible (true); 44 | } 45 | 46 | void OptimizeWidget::optionToolButtons () { 47 | 48 | // 49 | optionToolButton (ui->tb1, 50 | QIcon(":/horse/images/horse/icon_quanpansaomiao.png"), 51 | "单项加速", 52 | QSize(34, 32), 53 | "horsewidget_toolbutton_1") ; 54 | 55 | optionToolButton (ui->tb2, 56 | QIcon(":/horse/images/horse/icon_xinrenqu.png"), 57 | "启动项", 58 | QSize(32, 32), 59 | "horsewidget_toolbutton_1") ; 60 | optionToolButton (ui->tb3, 61 | QIcon(":/horse/images/horse/icon_xinrenqu.png"), 62 | "忽略项", 63 | QSize(32, 32), 64 | "horsewidget_toolbutton_2") ; 65 | // 66 | optionToolButton (ui->tb4, QIcon(":/horse/images/horse/icon_icon_1.png"), 67 | "开机时间", 68 | QSize(32, 32), 69 | "horsewidget_toolbutton_3") ; 70 | optionToolButton (ui->tb5, QIcon(":/horse/images/horse/icon_icon_2.png"), 71 | "优化记录", 72 | QSize(32, 32), 73 | "horsewidget_toolbutton_3") ; 74 | optionToolButton (ui->tb6, QIcon(":/horse/images/horse/icon_icon_3.png"), 75 | "小清新日历", 76 | QSize(32, 32), 77 | "horsewidget_toolbutton_3") ; 78 | } 79 | 80 | void OptimizeWidget::optionToolButton (QToolButton * tb, 81 | QIcon icon, 82 | QString text, 83 | QSize size, 84 | QString property) { 85 | QAction *pAction = new QAction(this); 86 | pAction->setText(text); 87 | pAction->setIcon(icon); 88 | tb->setIconSize(size); 89 | tb->setDefaultAction(pAction); 90 | tb->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 91 | tb->setProperty (property.toLatin1().data(), true); 92 | } 93 | -------------------------------------------------------------------------------- /widget/optimizewidget.h: -------------------------------------------------------------------------------- 1 | #ifndef OPTIMIZEWIDGET_H 2 | #define OPTIMIZEWIDGET_H 3 | 4 | #include 5 | #include 6 | #include "optimize2widget.h" 7 | 8 | namespace Ui { 9 | class OptimizeWidget; 10 | } 11 | 12 | class OptimizeWidget : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit OptimizeWidget(QWidget *parent = 0); 18 | ~OptimizeWidget(); 19 | 20 | private slots: 21 | void on_pushButton_clicked(); 22 | 23 | void onOptimize2IntoNextSlot (); 24 | 25 | private: 26 | Ui::OptimizeWidget *ui; 27 | Optimize2Widget * optimize2Widget; 28 | 29 | private: 30 | void optionToolButtons () ; 31 | void optionToolButton (QToolButton * tb, 32 | QIcon icon, 33 | QString text, 34 | QSize size, 35 | QString property) ; 36 | }; 37 | 38 | #endif // OPTIMIZEWIDGET_H 39 | -------------------------------------------------------------------------------- /widget/optimizewidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | OptimizeWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 920 10 | 460 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 920 22 | 460 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 920 32 | 460 33 | 34 | 35 | 36 | 37 | 38 | 360 39 | 150 40 | 400 41 | 20 42 | 43 | 44 | 45 | 同时优化网络配置, 硬盘传输速率, 全面提升电脑性能 46 | 47 | 48 | 49 | 50 | 51 | 360 52 | 200 53 | 200 54 | 60 55 | 56 | 57 | 58 | 全面提速 59 | 60 | 61 | 62 | 63 | 64 | 110 65 | 90 66 | 190 67 | 190 68 | 69 | 70 | 71 | 72 | 73 | 74 | 360 75 | 110 76 | 400 77 | 40 78 | 79 | 80 | 81 | 提升开机,运行数独,让电脑快如闪电 82 | 83 | 84 | 85 | 86 | 87 | 710 88 | 390 89 | 70 90 | 70 91 | 92 | 93 | 94 | ... 95 | 96 | 97 | 98 | 99 | 100 | 780 101 | 390 102 | 70 103 | 70 104 | 105 | 106 | 107 | ... 108 | 109 | 110 | 111 | 112 | 113 | 850 114 | 390 115 | 70 116 | 70 117 | 118 | 119 | 120 | ... 121 | 122 | 123 | 124 | 125 | 126 | 590 127 | 200 128 | 60 129 | 60 130 | 131 | 132 | 133 | ... 134 | 135 | 136 | 137 | 138 | 139 | 20 140 | 390 141 | 70 142 | 70 143 | 144 | 145 | 146 | ... 147 | 148 | 149 | 150 | 151 | 152 | 90 153 | 390 154 | 70 155 | 70 156 | 157 | 158 | 159 | ... 160 | 161 | 162 | 163 | 164 | 165 | 166 | WaveBallWidget 167 | QWidget 168 |
customviews/waveballwidget.h
169 | 1 170 |
171 |
172 | 173 | 174 |
175 | --------------------------------------------------------------------------------