mirror of
https://github.com/JasonYANG170/Health-Protection.git
synced 2024-11-23 12:16:36 +00:00
to add
This commit is contained in:
parent
acc0538a14
commit
aecdf18e71
57
Health-Protection-QT6/Health-Protection-QT6.pro
Normal file
57
Health-Protection-QT6/Health-Protection-QT6.pro
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
QT += core gui
|
||||||
|
QT += network
|
||||||
|
QT += multimedia
|
||||||
|
QT += multimedia network
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
|
CONFIG += c++17
|
||||||
|
|
||||||
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
|
# In order to do so, uncomment the following line.
|
||||||
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
dialog1.cpp \
|
||||||
|
dialog1x.cpp \
|
||||||
|
dialog2.cpp \
|
||||||
|
dialog3.cpp \
|
||||||
|
dialog4.cpp \
|
||||||
|
dialog5.cpp \
|
||||||
|
dialog6.cpp \
|
||||||
|
main.cpp \
|
||||||
|
mainwindow.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
dialog1.h \
|
||||||
|
dialog1x.h \
|
||||||
|
dialog2.h \
|
||||||
|
dialog3.h \
|
||||||
|
dialog4.h \
|
||||||
|
dialog5.h \
|
||||||
|
dialog6.h \
|
||||||
|
mainwindow.h
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
dialog1.ui \
|
||||||
|
dialog1x.ui \
|
||||||
|
dialog2.ui \
|
||||||
|
dialog3.ui \
|
||||||
|
dialog4.ui \
|
||||||
|
dialog5.ui \
|
||||||
|
dialog6.ui \
|
||||||
|
mainwindow.ui
|
||||||
|
|
||||||
|
TRANSLATIONS += \
|
||||||
|
Health-Protection-QT6_zh_CN.ts
|
||||||
|
CONFIG += lrelease
|
||||||
|
CONFIG += embed_translations
|
||||||
|
|
||||||
|
# Default rules for deployment.
|
||||||
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
|
DISTFILES += \
|
||||||
|
../../../../Desktop/39414350.jpg
|
||||||
|
|
||||||
|
RESOURCES +=
|
91
Health-Protection-QT6/Health-Protection-QT6_zh_CN.ts
Normal file
91
Health-Protection-QT6/Health-Protection-QT6_zh_CN.ts
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="zh_CN">
|
||||||
|
<context>
|
||||||
|
<name>Dialog1</name>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog1.ui" line="14"/>
|
||||||
|
<source>Dialog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog1.ui" line="62"/>
|
||||||
|
<location filename="dialog1.ui" line="75"/>
|
||||||
|
<source>PushButton</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>Dialog2</name>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog2.ui" line="14"/>
|
||||||
|
<source>Dialog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog2.ui" line="52"/>
|
||||||
|
<location filename="dialog2.ui" line="65"/>
|
||||||
|
<source>PushButton</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>Dialog3</name>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog3.ui" line="14"/>
|
||||||
|
<source>Dialog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog3.ui" line="52"/>
|
||||||
|
<location filename="dialog3.ui" line="65"/>
|
||||||
|
<location filename="dialog3.ui" line="78"/>
|
||||||
|
<location filename="dialog3.ui" line="91"/>
|
||||||
|
<source>PushButton</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>Dialog4</name>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog4.ui" line="14"/>
|
||||||
|
<source>Dialog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog4.ui" line="42"/>
|
||||||
|
<source>PushButton</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>Dialog5</name>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog5.ui" line="14"/>
|
||||||
|
<source>Dialog</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog5.ui" line="42"/>
|
||||||
|
<source>PushButton</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="mainwindow.ui" line="14"/>
|
||||||
|
<source>MainWindow</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="mainwindow.ui" line="34"/>
|
||||||
|
<location filename="mainwindow.ui" line="53"/>
|
||||||
|
<location filename="mainwindow.ui" line="73"/>
|
||||||
|
<location filename="mainwindow.ui" line="91"/>
|
||||||
|
<location filename="mainwindow.ui" line="110"/>
|
||||||
|
<source>PushButton</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
164
Health-Protection-QT6/dialog1.cpp
Normal file
164
Health-Protection-QT6/dialog1.cpp
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
#include "dialog1.h"
|
||||||
|
#include "ui_dialog1.h"
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QDir>
|
||||||
|
#include <QProcess>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QIcon>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QAction>
|
||||||
|
#include "dialog1x.h"
|
||||||
|
#include "ui_dialog1x.h"
|
||||||
|
Dialog1::Dialog1(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::Dialog1)
|
||||||
|
{
|
||||||
|
QPixmap img(":/Win11.jpg");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QIcon icon = QApplication::style()->standardIcon((QStyle::StandardPixmap)0);
|
||||||
|
QIcon icon1 = QApplication::style()->standardIcon((QStyle::StandardPixmap)9);
|
||||||
|
|
||||||
|
//设置通知栏的图标
|
||||||
|
trayIcon = new QSystemTrayIcon(this);
|
||||||
|
trayIcon->setIcon(icon);
|
||||||
|
|
||||||
|
//设置通知栏的单击事件
|
||||||
|
// connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(stTrayIconActive(QSystemTrayIcon::ActivationReason)));
|
||||||
|
|
||||||
|
//设置通知栏的右键菜单
|
||||||
|
//QMenu * menu = new QMenu();
|
||||||
|
|
||||||
|
//设置菜单项目
|
||||||
|
// QAction *actionHide = new QAction(icon, "Hide", menu);
|
||||||
|
|
||||||
|
//menu->addAction(actionHide);
|
||||||
|
// trayIcon->setContextMenu(menu);
|
||||||
|
// 设置Action的响应
|
||||||
|
//connect(actionHide, SIGNAL(triggered()), this, SLOT(stActionHide()));
|
||||||
|
trayIcon->show();
|
||||||
|
|
||||||
|
//托盘的消息提示
|
||||||
|
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialog1::~Dialog1()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QMessageBox>
|
||||||
|
void Dialog1::stTrayIconActive(QSystemTrayIcon::ActivationReason acReason)
|
||||||
|
{
|
||||||
|
switch (acReason)
|
||||||
|
{
|
||||||
|
case QSystemTrayIcon::Trigger:
|
||||||
|
{
|
||||||
|
showNormal();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Dialog1::on_pushButton_clicked()
|
||||||
|
{
|
||||||
|
|
||||||
|
QString neirong ;
|
||||||
|
QString biaoti ;
|
||||||
|
|
||||||
|
//实例 QSettings
|
||||||
|
//参数 1:如果没有按照章节 Qt01 进行,则注册表中没有 Qt01。
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
// if(reg->value("键名 001") != "")
|
||||||
|
// {
|
||||||
|
biaoti=reg->value("Title").toString();
|
||||||
|
neirong=reg->value("Content").toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
|
||||||
|
//菜单项--打开主面板
|
||||||
|
// QIcon icon = QApplication::style()->standardIcon((QStyle::StandardPixmap)0);
|
||||||
|
// QIcon icon1 = QApplication::style()->standardIcon((QStyle::StandardPixmap)9);
|
||||||
|
|
||||||
|
if(isVisible())
|
||||||
|
{
|
||||||
|
trayIcon->showMessage(biaoti, neirong);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
trayIcon->showMessage("提醒", "显示图片");
|
||||||
|
|
||||||
|
}
|
||||||
|
// QMessageBox::information(this,"检测执行","操作已执行");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
|
#include <QProcess>
|
||||||
|
void Dialog1::on_pushButton_2_clicked()
|
||||||
|
{
|
||||||
|
|
||||||
|
QString strText1=ui->textEdit->toPlainText();
|
||||||
|
QString strText2=ui->textEdit_2->toPlainText();
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",strText1);
|
||||||
|
reg->setValue("Content",strText2);
|
||||||
|
reg->setValue("Chooese",12);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}
|
||||||
|
#include <QJsonParseError>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QJsonArray>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QEventLoop>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QtWidgets>
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QNetworkReply>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1::on_pushButton_3_clicked()
|
||||||
|
{
|
||||||
|
Dialog1x d;
|
||||||
|
d.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
39
Health-Protection-QT6/dialog1.h
Normal file
39
Health-Protection-QT6/dialog1.h
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#ifndef DIALOG1_H
|
||||||
|
#define DIALOG1_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QIcon>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog1;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dialog1 : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Dialog1(QWidget *parent = nullptr);
|
||||||
|
~Dialog1();
|
||||||
|
QSystemTrayIcon *trayIcon;
|
||||||
|
void on_pushButton_clicked();
|
||||||
|
private slots:
|
||||||
|
|
||||||
|
void stTrayIconActive(QSystemTrayIcon::ActivationReason acReason);
|
||||||
|
void on_pushButton_2_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_3_clicked();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Dialog1 *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOG1_H
|
144
Health-Protection-QT6/dialog1.ui
Normal file
144
Health-Protection-QT6/dialog1.ui
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog1</class>
|
||||||
|
<widget class="QDialog" name="Dialog1">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>407</width>
|
||||||
|
<height>291</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 15pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>请输入标题:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 15pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>请输入内容:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit_2">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Maximum</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>保存</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>预览</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_3">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 10pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>联网获取(BETA)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
987
Health-Protection-QT6/dialog1x.cpp
Normal file
987
Health-Protection-QT6/dialog1x.cpp
Normal file
|
@ -0,0 +1,987 @@
|
||||||
|
#include "dialog1x.h"
|
||||||
|
#include "qstyle.h"
|
||||||
|
#include "ui_dialog1x.h"
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QIcon>
|
||||||
|
#include <QAction>
|
||||||
|
#include <windows.h>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QNetworkReply>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <tlhelp32.h>
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QTime>
|
||||||
|
#include<QStyle>
|
||||||
|
#include <QDir>
|
||||||
|
#include <QProcess>
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include "qstyle.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
#include <QJsonParseError>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QJsonArray>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QNetworkReply>
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
Dialog1x::Dialog1x(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::Dialog1x)
|
||||||
|
{
|
||||||
|
QPixmap img(":/Win11.jpg");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QIcon icon = QApplication::style()->standardIcon((QStyle::StandardPixmap)0);
|
||||||
|
QIcon icon1 = QApplication::style()->standardIcon((QStyle::StandardPixmap)9);
|
||||||
|
|
||||||
|
//设置通知栏的图标
|
||||||
|
trayIcon = new QSystemTrayIcon(this);
|
||||||
|
trayIcon->setIcon(icon);
|
||||||
|
|
||||||
|
//设置通知栏的单击事件
|
||||||
|
// connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(stTrayIconActive(QSystemTrayIcon::ActivationReason)));
|
||||||
|
|
||||||
|
//设置通知栏的右键菜单
|
||||||
|
// QMenu * menu = new QMenu();
|
||||||
|
|
||||||
|
//设置菜单项目
|
||||||
|
// QAction *actionHide = new QAction(icon, "Hide", menu);
|
||||||
|
|
||||||
|
// menu->addAction(actionHide);
|
||||||
|
// trayIcon->setContextMenu(menu);
|
||||||
|
// 设置Action的响应
|
||||||
|
// connect(actionHide, SIGNAL(triggered()), this, SLOT(stActionHide()));
|
||||||
|
trayIcon->show();
|
||||||
|
|
||||||
|
//托盘的消息提示
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialog1x::~Dialog1x()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_clicked()
|
||||||
|
{
|
||||||
|
// trayIcon->showMessage("提醒", "显示图片");
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/weather");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QString info1 = jsonObj["city"].toString();
|
||||||
|
|
||||||
|
//对象类型需要使用新的QJsonObject对象存放,然后使用新的QJsonObject获取其中值
|
||||||
|
QJsonObject jObj2 = jsonDoc["info"].toObject();
|
||||||
|
//获取jObj2中指定键的值(值对应的类型直接使用对应函数转)
|
||||||
|
QString key1Val = jObj2["type"].toString();
|
||||||
|
|
||||||
|
|
||||||
|
QString key1Val2 = jObj2["low"].toString();
|
||||||
|
|
||||||
|
|
||||||
|
QString key1Val3 = jObj2["high"].toString();
|
||||||
|
|
||||||
|
|
||||||
|
QString key1Val4 = jObj2["tip"].toString();
|
||||||
|
|
||||||
|
QJsonObject jObj7 = jObj2["air"].toObject();
|
||||||
|
QString key1Val5 = jObj7["aqi_name"].toString();
|
||||||
|
//QMessageBox::information(this, "JSON Data", key1Val5);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Chooese",1);
|
||||||
|
reg->setValue("Title",key1Val4);
|
||||||
|
reg->setValue("Content",info1+" "+key1Val+" "+key1Val3+" "+key1Val2+" 空气质量:"+key1Val5);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val4, info1+" "+key1Val+" "+key1Val3+" "+key1Val2+" 空气质量:"+key1Val5);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_2_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/en?type=sj");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["zh"].toString();
|
||||||
|
QString key1Val2 = jObj2["en"].toString();
|
||||||
|
|
||||||
|
|
||||||
|
//QMessageBox::information(this, "JSON Data", key1Val5);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val2);
|
||||||
|
reg->setValue("Content",key1Val);
|
||||||
|
reg->setValue("Chooese",2);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val2, key1Val);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_3_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://v1.jinrishici.com/shuqing/shanggan");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
QString key1Val = jsonObj["content"].toString();
|
||||||
|
QString key1Val2 = jsonObj["origin"].toString();
|
||||||
|
QString key1Val3 = jsonObj["author"].toString();
|
||||||
|
|
||||||
|
|
||||||
|
//QMessageBox::information(this, "JSON Data", key1Val5);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
//QMessageBox::warning(this, "Error", key1Val);
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2+" 作者:"+key1Val3);
|
||||||
|
reg->setValue("Chooese",3);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2+" 作者:"+key1Val3);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_4_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/hotlist?type=baiduRD");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
|
||||||
|
//组合对象第一层类型为数组,需要使用QJsonArray对象存放
|
||||||
|
QJsonArray jArr2 = jsonObj["data"].toArray();
|
||||||
|
//数组中存放的对象,使用QJsonObject接收
|
||||||
|
QJsonObject jObj3 = jArr2.at(0).toObject();
|
||||||
|
//获取对象中的指定键的值
|
||||||
|
QString name = jObj3["title"].toString();
|
||||||
|
QString name2 = jObj3["desc"].toString();
|
||||||
|
|
||||||
|
// QMessageBox::information(this, "JSON Data", name);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",name);
|
||||||
|
reg->setValue("Content",name2);
|
||||||
|
reg->setValue("Chooese",4);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(name, name2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <QtMultimedia/QMediaPlayer>
|
||||||
|
|
||||||
|
#include <QtMultimedia>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <QtCore/QCoreApplication>
|
||||||
|
#include <QtMultimedia/QMediaPlayer>
|
||||||
|
#include <QMediaPlayer>
|
||||||
|
void Dialog1x::on_radioButton_5_clicked()
|
||||||
|
{
|
||||||
|
// 创建一个QMediaPlayer对象
|
||||||
|
|
||||||
|
//QMediaPlayer *player = new QMediaPlayer;
|
||||||
|
//播放进度的信号提示
|
||||||
|
// connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64)));
|
||||||
|
// player->setSource(QUrl("http://m701.music.126.net/20230506173759/4ee9e9e326dc2496679fc4bdc7887c3b/jdymusic/obj/wo3DlMOGwrbDjj7DisKw/17718433824/acca/41eb/8112/efa4dce840121844afcb957bcb2d4fd1.mp3"));
|
||||||
|
//0~100音量范围,默认是100
|
||||||
|
//player->play();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_6_clicked()
|
||||||
|
{
|
||||||
|
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=aquarius&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",6);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_7_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=pisces&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",7);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_8_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=aries&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",8);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_9_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=taurus&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",9);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_10_clicked()
|
||||||
|
{
|
||||||
|
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=gemini&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",10);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_11_clicked()
|
||||||
|
{
|
||||||
|
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=cancer&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",11);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_14_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=leo&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",14);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_17_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=virgo&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",17);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_19_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=libra&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",19);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_16_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=scorpio&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",16);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_13_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=sagittarius&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",13);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
trayIcon->showMessage(key1Val, key1Val2);
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
|
||||||
|
void Dialog1x::on_radioButton_15_clicked()
|
||||||
|
{
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/horoscope?type=capricornus&time=today");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
QJsonObject jObj2 = jsonDoc["data"].toObject();
|
||||||
|
QString key1Val = jObj2["title"].toString();
|
||||||
|
QJsonObject jObj3 = jObj2["fortunetext"].toObject();
|
||||||
|
|
||||||
|
QString key1Val2 = jObj3["all"].toString();
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val);
|
||||||
|
// QMessageBox::information(this, "JSON Data", key1Val2);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("Title",key1Val);
|
||||||
|
reg->setValue("Content",key1Val2);
|
||||||
|
reg->setValue("Chooese",15);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
QSettings *reg3 = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
QString Title=reg3->value("Title").toString();
|
||||||
|
QString Content=reg3->value("Content").toString();
|
||||||
|
trayIcon->showMessage(Title, Content);
|
||||||
|
//neirong=reg->value("Content").toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
delete reg3;
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog1x::stTrayIconActive(QSystemTrayIcon::ActivationReason acReason)
|
||||||
|
{
|
||||||
|
switch (acReason)
|
||||||
|
{
|
||||||
|
case QSystemTrayIcon::Trigger:
|
||||||
|
{
|
||||||
|
showNormal();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
81
Health-Protection-QT6/dialog1x.h
Normal file
81
Health-Protection-QT6/dialog1x.h
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
#ifndef DIALOG1X_H
|
||||||
|
#define DIALOG1X_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include "dialog1.h"
|
||||||
|
#include "dialog2.h"
|
||||||
|
#include "dialog3.h"
|
||||||
|
#include "dialog4.h"
|
||||||
|
#include "dialog5.h"
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QIcon>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDialog>
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog1x;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dialog1x : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Dialog1x(QWidget *parent = nullptr);
|
||||||
|
~Dialog1x();
|
||||||
|
QSystemTrayIcon *trayIcon;
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
void on_radioButton_2_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_3_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_4_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_5_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_6_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_7_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_8_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_9_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_10_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_11_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_14_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_17_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_19_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_16_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_13_clicked();
|
||||||
|
|
||||||
|
void on_radioButton_15_clicked();
|
||||||
|
void stTrayIconActive(QSystemTrayIcon::ActivationReason acReason);
|
||||||
|
private slots:
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Dialog1x *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOG1X_H
|
338
Health-Protection-QT6/dialog1x.ui
Normal file
338
Health-Protection-QT6/dialog1x.ui
Normal file
|
@ -0,0 +1,338 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog1x</class>
|
||||||
|
<widget class="QDialog" name="Dialog1x">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>362</width>
|
||||||
|
<height>250</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_2">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>每日英语</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_4">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>每日新闻</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" rowspan="5">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border:2px groove gray;border-radius:10px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>每日星座</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_6">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>水瓶座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QRadioButton" name="radioButton_14">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>狮子座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_7">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>双鱼座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QRadioButton" name="radioButton_17">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>处女座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_8">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>白羊座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QRadioButton" name="radioButton_19">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>天秤座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_9">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>金牛座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QRadioButton" name="radioButton_16">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>天蝎座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_10">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>双子座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QRadioButton" name="radioButton_13">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>射手座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_11">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>巨蟹座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QRadioButton" name="radioButton_15">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}
|
||||||
|
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>摩羯座</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_5">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>每日一曲(BETA)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton_3">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>每日诗词</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="radioButton">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>每日天气</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{width:160px;high:160px;background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:10px;padding:2px 4px;border-style: outset;}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
<zorder>widget</zorder>
|
||||||
|
<zorder>buttonBox</zorder>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>Dialog1x</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>Dialog1x</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
48
Health-Protection-QT6/dialog2.cpp
Normal file
48
Health-Protection-QT6/dialog2.cpp
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
#include "dialog2.h"
|
||||||
|
#include "ui_dialog2.h"
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
|
#include <QProcess>
|
||||||
|
Dialog2::Dialog2(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::Dialog2)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialog2::~Dialog2()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Dialog2::on_pushButton_clicked()
|
||||||
|
{
|
||||||
|
QProcess p(0);
|
||||||
|
p.start("cmd", QStringList()<<"/c"<<"shutdown -a");
|
||||||
|
p.waitForStarted();
|
||||||
|
p.waitForFinished();
|
||||||
|
QString strTemp=QString::fromLocal8Bit(p.readAllStandardOutput()); //获得输出
|
||||||
|
}
|
||||||
|
|
||||||
|
void Dialog2::on_pushButton_2_clicked()
|
||||||
|
{
|
||||||
|
double time=ui->textEdit->toPlainText().toDouble();
|
||||||
|
time=time*60*60;
|
||||||
|
QString b = QString::number(time, 'f', 0);
|
||||||
|
QProcess p(0);
|
||||||
|
p.start("cmd", QStringList()<<"/c"<<"shutdown -s -t "+b);
|
||||||
|
p.waitForStarted();
|
||||||
|
p.waitForFinished();
|
||||||
|
QString strTemp=QString::fromLocal8Bit(p.readAllStandardOutput()); //获得输出
|
||||||
|
// QMessageBox testMassage;
|
||||||
|
// testMassage.setText(strTemp);
|
||||||
|
// testMassage.exec();
|
||||||
|
}
|
||||||
|
|
27
Health-Protection-QT6/dialog2.h
Normal file
27
Health-Protection-QT6/dialog2.h
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#ifndef DIALOG2_H
|
||||||
|
#define DIALOG2_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog2;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dialog2 : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Dialog2(QWidget *parent = nullptr);
|
||||||
|
~Dialog2();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_pushButton_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_2_clicked();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Dialog2 *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOG2_H
|
97
Health-Protection-QT6/dialog2.ui
Normal file
97
Health-Protection-QT6/dialog2.ui
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog2</class>
|
||||||
|
<widget class="QDialog" name="Dialog2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>227</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 13pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>将会在</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 13pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>分钟后关闭计算机</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>关闭定时</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>设置定时</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
141
Health-Protection-QT6/dialog3.cpp
Normal file
141
Health-Protection-QT6/dialog3.cpp
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
#include "dialog3.h"
|
||||||
|
#include "ui_dialog3.h"
|
||||||
|
|
||||||
|
#include <QtNetwork/QNetworkAccessManager>
|
||||||
|
#include <QtNetwork/QNetworkRequest>
|
||||||
|
#include <QtNetwork/QNetworkReply>
|
||||||
|
#include <QtWidgets/QWidget>
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <qnetwork.h>
|
||||||
|
|
||||||
|
Dialog3::Dialog3(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::Dialog3)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialog3::~Dialog3()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
#include <windows.h>
|
||||||
|
#include <tlhelp32.h>
|
||||||
|
#include <QProcess>
|
||||||
|
void ClearProcessByProcessName(const QString &strPrcessName)
|
||||||
|
{
|
||||||
|
PROCESSENTRY32 pe32;
|
||||||
|
pe32.dwSize=sizeof(pe32);
|
||||||
|
HANDLE hProcessSnap=::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
|
||||||
|
BOOL bMore=::Process32First(hProcessSnap,&pe32);
|
||||||
|
while(bMore) {
|
||||||
|
int len= WideCharToMultiByte(CP_ACP, 0, pe32.szExeFile, wcslen(pe32.szExeFile),
|
||||||
|
NULL, 0, NULL, NULL);
|
||||||
|
char* m_char = new char[len+1];
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, pe32.szExeFile, wcslen(pe32.szExeFile),
|
||||||
|
m_char, len, NULL, NULL);
|
||||||
|
m_char[len]='\0';
|
||||||
|
|
||||||
|
if(strcmp(strPrcessName.toStdString().c_str(), m_char) == 0) {
|
||||||
|
HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, pe32.th32ProcessID);
|
||||||
|
if(hProcess != NULL) {
|
||||||
|
TerminateProcess(hProcess, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bMore=::Process32Next(hProcessSnap,&pe32);
|
||||||
|
|
||||||
|
delete[] m_char;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QString apps;
|
||||||
|
void Dialog3::on_pushButton_clicked()
|
||||||
|
{
|
||||||
|
QString app=ui->textEdit->toPlainText();
|
||||||
|
apps=app;
|
||||||
|
ClearProcessByProcessName(app);
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QMessageBox>
|
||||||
|
void Dialog3::on_pushButton_2_clicked()
|
||||||
|
{
|
||||||
|
int app=ui->textEdit_2->toPlainText().toInt()*1000*60;
|
||||||
|
id1 = startTimer(app);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Dialog3::on_pushButton_3_clicked()
|
||||||
|
{
|
||||||
|
if (print_lock){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//防止重复执行
|
||||||
|
print_lock = true;
|
||||||
|
|
||||||
|
//获取打印行数
|
||||||
|
|
||||||
|
|
||||||
|
//循环打印
|
||||||
|
while(true) {
|
||||||
|
QString app=ui->textEdit->toPlainText();
|
||||||
|
apps=app;
|
||||||
|
ClearProcessByProcessName(app);
|
||||||
|
//将数据输出到文件中或是做一些其他操作...
|
||||||
|
|
||||||
|
//更新进度值
|
||||||
|
|
||||||
|
|
||||||
|
//停止
|
||||||
|
if (stop_flag) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//优先响应UI事件,防止卡死, 提升用户体验
|
||||||
|
qApp->processEvents();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print_lock = false;
|
||||||
|
stop_flag = false;
|
||||||
|
|
||||||
|
// 在需要停止线程的地方,发送中断信号
|
||||||
|
// thread->requestInterruption();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Dialog3::on_pushButton_4_clicked()
|
||||||
|
{
|
||||||
|
if (print_lock)
|
||||||
|
stop_flag = true;
|
||||||
|
else
|
||||||
|
stop_flag = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Dialog3::timerEvent(QTimerEvent * ev)
|
||||||
|
{
|
||||||
|
if(ev->timerId() == id1)
|
||||||
|
{
|
||||||
|
QString app=ui->textEdit->toPlainText();
|
||||||
|
ClearProcessByProcessName(app);
|
||||||
|
killTimer(id1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ev->timerId() == id2)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#include <QTimer> //定时器类
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
|
||||||
|
|
39
Health-Protection-QT6/dialog3.h
Normal file
39
Health-Protection-QT6/dialog3.h
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#ifndef DIALOG3_H
|
||||||
|
#define DIALOG3_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog3;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dialog3 : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Dialog3(QWidget *parent = nullptr);
|
||||||
|
~Dialog3();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_pushButton_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_2_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_3_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_4_clicked();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Dialog3 *ui;
|
||||||
|
virtual void timerEvent(QTimerEvent *);
|
||||||
|
int id1; //定时器1的唯一标示
|
||||||
|
int id2; //定时器2的唯一标示
|
||||||
|
bool print_lock;
|
||||||
|
bool stop_flag;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // DIALOG3_H
|
207
Health-Protection-QT6/dialog3.ui
Normal file
207
Health-Protection-QT6/dialog3.ui
Normal file
|
@ -0,0 +1,207 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog3</class>
|
||||||
|
<widget class="QDialog" name="Dialog3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 15pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>请输入限定时长的应用程序名称:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 15pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>将在</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit_2">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 15pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>分钟后关闭</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Maximum</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>立即关闭</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>延时关闭</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_3">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>禁止运行</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_4">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>允许运行</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
116
Health-Protection-QT6/dialog4.cpp
Normal file
116
Health-Protection-QT6/dialog4.cpp
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
#include "dialog4.h"
|
||||||
|
#include "ui_dialog4.h"
|
||||||
|
#include <QSettings>
|
||||||
|
Dialog4::Dialog4(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::Dialog4)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
// if(reg->value("键名 001") != "")
|
||||||
|
// {
|
||||||
|
int chooese=reg->value("AppsUseLightTheme").toInt();
|
||||||
|
//neirong=reg->value("Content").toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
if(chooese==1){
|
||||||
|
ui->checkBox->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
QSettings *reg2 = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
// if(reg->value("键名 001") != "")
|
||||||
|
// {
|
||||||
|
int chooese2=reg2->value("AutoNight").toInt();
|
||||||
|
//neirong=reg->value("Content").toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg2;
|
||||||
|
if(chooese2==1){
|
||||||
|
ui->checkBox_2->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialog4::~Dialog4()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
#include <windows.h>
|
||||||
|
#include <tlhelp32.h>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QTime>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog4::on_checkBox_clicked(bool checked)
|
||||||
|
{
|
||||||
|
if(checked){
|
||||||
|
//实例 QSettings
|
||||||
|
QSettings *reg = new
|
||||||
|
QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
//if(reg->value("Start Page") != "")
|
||||||
|
//{
|
||||||
|
//IE 默认主页修改为:百度首页
|
||||||
|
reg->setValue("AppsUseLightTheme",0);
|
||||||
|
reg->setValue("SystemUsesLightTheme",0);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}else{
|
||||||
|
//实例 QSettings
|
||||||
|
QSettings *reg = new
|
||||||
|
QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
//if(reg->value("Start Page") != "")
|
||||||
|
//{
|
||||||
|
//IE 默认主页修改为:百度首页
|
||||||
|
reg->setValue("AppsUseLightTheme",1);
|
||||||
|
reg->setValue("SystemUsesLightTheme",1);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog4::on_checkBox_2_clicked(bool checked)
|
||||||
|
{
|
||||||
|
if(checked){
|
||||||
|
// QTime time = QTime::currentTime();
|
||||||
|
// QString time1=time.toString("hh");
|
||||||
|
//int time2=time1.toInt();
|
||||||
|
QString NightONstr=ui->textEdit->toPlainText();
|
||||||
|
int NightON=NightONstr.toInt();
|
||||||
|
QString NightOFFstr=ui->textEdit_2->toPlainText();
|
||||||
|
int NightOFF=NightOFFstr.toInt();
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("NightON",NightON);
|
||||||
|
reg->setValue("NightOFF",NightOFF);
|
||||||
|
reg->setValue("AutoNight",1);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}else{
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("AutoNight",0);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
30
Health-Protection-QT6/dialog4.h
Normal file
30
Health-Protection-QT6/dialog4.h
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef DIALOG4_H
|
||||||
|
#define DIALOG4_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog4;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dialog4 : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Dialog4(QWidget *parent = nullptr);
|
||||||
|
~Dialog4();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
|
||||||
|
|
||||||
|
void on_checkBox_clicked(bool checked);
|
||||||
|
|
||||||
|
void on_checkBox_2_clicked(bool checked);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Dialog4 *ui;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOG4_H
|
133
Health-Protection-QT6/dialog4.ui
Normal file
133
Health-Protection-QT6/dialog4.ui
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog4</class>
|
||||||
|
<widget class="QDialog" name="Dialog4">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 16pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>将在</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 16pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>点开启深色模式</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 16pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>将在</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="textEdit_2">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 16pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>点关闭深色模式</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QCheckBox{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QCheckBox:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QCheckBox:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>开启定时</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QCheckBox{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QCheckBox:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QCheckBox:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>开启深色模式</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
255
Health-Protection-QT6/dialog5.cpp
Normal file
255
Health-Protection-QT6/dialog5.cpp
Normal file
|
@ -0,0 +1,255 @@
|
||||||
|
#include "dialog5.h"
|
||||||
|
#include "ui_dialog5.h"
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QNetworkReply>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
|
#include <QProcess>
|
||||||
|
QString ves3="V8.5";
|
||||||
|
Dialog5::Dialog5(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::Dialog5)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
// if(reg->value("键名 001") != "")
|
||||||
|
// {
|
||||||
|
int chooese=reg->value("start").toInt();
|
||||||
|
//neirong=reg->value("Content").toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
if(chooese==1){
|
||||||
|
ui->checkBox->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
QSettings *reg2 = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
// if(reg->value("键名 001") != "")
|
||||||
|
// {
|
||||||
|
int chooese2=reg2->value("startmini").toInt();
|
||||||
|
//neirong=reg->value("Content").toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg2;
|
||||||
|
if(chooese2==1){
|
||||||
|
ui->checkBox_2->setCheckState(Qt::Checked);
|
||||||
|
}
|
||||||
|
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||||
|
QUrl url("https://api.vvhan.com/api/qqsc?key=55800ce777767fcd63f59beaf0eee9ff");
|
||||||
|
QNetworkRequest request(url);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config = request.sslConfiguration();
|
||||||
|
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(config);
|
||||||
|
|
||||||
|
QNetworkReply *reply = manager->get(request);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
|
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data = reply->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
// QMessageBox::information(this, "JSON Data", QString(data));
|
||||||
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8());
|
||||||
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
|
|
||||||
|
// 获取数据
|
||||||
|
QString info = jsonObj["content"].toString();
|
||||||
|
|
||||||
|
ui->textBrowser->setPlainText("当前版本:V8.5\n\n公告:\n"+info);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
|
||||||
|
QMessageBox::warning(this, "Error", reply->errorString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply->deleteLater();
|
||||||
|
manager->deleteLater();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
QNetworkAccessManager *manager2 = new QNetworkAccessManager(this);
|
||||||
|
QUrl url2("https://api.vvhan.com/api/qqsc?key=969c8d1f86b653696f929406faa0bbc0");
|
||||||
|
QNetworkRequest request2(url2);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config2 = request2.sslConfiguration();
|
||||||
|
config2.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request2.setSslConfiguration(config2);
|
||||||
|
|
||||||
|
QNetworkReply *reply2 = manager2->get(request2);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply2, &QNetworkReply::finished, [=]() {
|
||||||
|
|
||||||
|
if (reply2->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data2 = reply2->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
// QMessageBox::information(this, "JSON Data", QString(data));
|
||||||
|
QJsonDocument jsonDoc2 = QJsonDocument::fromJson(QString(data2).toUtf8());
|
||||||
|
QJsonObject jsonObj2 = jsonDoc2.object();
|
||||||
|
|
||||||
|
// 获取数据
|
||||||
|
QString info2 = jsonObj2["content"].toString();
|
||||||
|
if(info2!=ves3){
|
||||||
|
// QMessageBox::warning(this, "Error", "已发布新版本\""+info2+"\"。\n点击右上角发现新版本按钮下载最新版本。");
|
||||||
|
ui->pushButton->setText("发现新版本,点击跳转");
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
ui->pushButton->setText("暂无更新");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
|
||||||
|
QMessageBox::warning(this, "Error", reply2->errorString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply2->deleteLater();
|
||||||
|
manager2->deleteLater();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialog5::~Dialog5()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog5::on_checkBox_clicked(bool checked)
|
||||||
|
{
|
||||||
|
if(checked){
|
||||||
|
|
||||||
|
QSettings* settings = new QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
|
||||||
|
auto application_name = QApplication::applicationName();
|
||||||
|
auto path = settings->value(application_name).toString();
|
||||||
|
QString appPath = QApplication::applicationFilePath();
|
||||||
|
QString newPath = QDir::toNativeSeparators(appPath);
|
||||||
|
if (path != newPath) {
|
||||||
|
settings->setValue(application_name, newPath);
|
||||||
|
}
|
||||||
|
delete settings;
|
||||||
|
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("start",1);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}else{
|
||||||
|
QSettings* settings = new QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
|
||||||
|
auto application_name = QApplication::applicationName();
|
||||||
|
settings->remove(application_name);
|
||||||
|
|
||||||
|
|
||||||
|
delete settings;
|
||||||
|
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("start",0);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog5::on_checkBox_2_clicked(bool checked)
|
||||||
|
{
|
||||||
|
if(checked){
|
||||||
|
QSettings* settings = new QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
|
||||||
|
auto application_name = QApplication::applicationName();
|
||||||
|
settings->remove(application_name);
|
||||||
|
|
||||||
|
|
||||||
|
delete settings;
|
||||||
|
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("startmini",1);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}else{
|
||||||
|
QSettings* settings = new QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
|
||||||
|
auto application_name = QApplication::applicationName();
|
||||||
|
settings->remove(application_name);
|
||||||
|
|
||||||
|
|
||||||
|
delete settings;
|
||||||
|
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//设定值有修改,没有创建。
|
||||||
|
reg->setValue("startmini",0);
|
||||||
|
//用完删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <QDesktopServices>
|
||||||
|
void Dialog5::on_pushButton_clicked()
|
||||||
|
{
|
||||||
|
QDesktopServices::openUrl(QUrl("https://github.com/JasonYANG170/Health-Protection/releases", QUrl::TolerantMode));
|
||||||
|
}
|
||||||
|
#include "dialog6.h"
|
||||||
|
#include "ui_dialog6.h"
|
||||||
|
|
||||||
|
|
||||||
|
void Dialog5::on_pushButton_2_clicked()
|
||||||
|
{
|
||||||
|
Dialog6 d;
|
||||||
|
d.exec();
|
||||||
|
}
|
||||||
|
|
36
Health-Protection-QT6/dialog5.h
Normal file
36
Health-Protection-QT6/dialog5.h
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#ifndef DIALOG5_H
|
||||||
|
#define DIALOG5_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog5;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dialog5 : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Dialog5(QWidget *parent = nullptr);
|
||||||
|
~Dialog5();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
|
||||||
|
|
||||||
|
void on_checkBox_clicked(bool checked);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void on_checkBox_2_clicked(bool checked);
|
||||||
|
|
||||||
|
|
||||||
|
void on_pushButton_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_2_clicked();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Dialog5 *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOG5_H
|
182
Health-Protection-QT6/dialog5.ui
Normal file
182
Health-Protection-QT6/dialog5.ui
Normal file
|
@ -0,0 +1,182 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog5</class>
|
||||||
|
<widget class="QDialog" name="Dialog5">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>476</width>
|
||||||
|
<height>341</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>200</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>1000</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QWidget{background:rgb(170, 255, 255);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/Desktop/39414350.jpg);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Health-Protection健康守护</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTextBrowser" name="textBrowser">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 10pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_2">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QCheckBox{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QCheckBox:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QCheckBox:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>自动最小化</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QCheckBox{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QCheckBox:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QCheckBox:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>开机自启动</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);;border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>更新跳转</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);;border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>捐赠</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
14
Health-Protection-QT6/dialog6.cpp
Normal file
14
Health-Protection-QT6/dialog6.cpp
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#include "dialog6.h"
|
||||||
|
#include "ui_dialog6.h"
|
||||||
|
|
||||||
|
Dialog6::Dialog6(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::Dialog6)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialog6::~Dialog6()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
22
Health-Protection-QT6/dialog6.h
Normal file
22
Health-Protection-QT6/dialog6.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#ifndef DIALOG6_H
|
||||||
|
#define DIALOG6_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog6;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dialog6 : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Dialog6(QWidget *parent = nullptr);
|
||||||
|
~Dialog6();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Dialog6 *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOG6_H
|
95
Health-Protection-QT6/dialog6.ui
Normal file
95
Health-Protection-QT6/dialog6.ui
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog6</class>
|
||||||
|
<widget class="QDialog" name="Dialog6">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>528</width>
|
||||||
|
<height>270</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p><span style=" font-size:14pt; font-weight:700;">开发留言</span></p><p><span style=" font-size:14pt;">您的捐赠是我最大的动力,</span></p><p><span style=" font-size:14pt;">感谢支持</span></p><p><span style=" font-size:14pt; font-weight:700;">palpay捐赠</span></p><p><span style=" font-size:14pt;">qw200477@163.com</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/Desktop/a1bf4725bee712e6916866de02eb50f.jpg);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/Desktop/6b73c9ae58aaad1b631e73f3dd357e9.jpg);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>Dialog6</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>Dialog6</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
10
Health-Protection-QT6/img.qrc
Normal file
10
Health-Protection-QT6/img.qrc
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>../../../../Desktop/8eea737026dbeeae250de40cffd742b9.png</file>
|
||||||
|
<file>../../../../Desktop/1212.jpg</file>
|
||||||
|
<file>../../../../Desktop/223.jpg</file>
|
||||||
|
<file>../../../../Desktop/39414350.jpg</file>
|
||||||
|
<file>../../../../Desktop/6b73c9ae58aaad1b631e73f3dd357e9.jpg</file>
|
||||||
|
<file>../../../../Desktop/a1bf4725bee712e6916866de02eb50f.jpg</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
43
Health-Protection-QT6/main.cpp
Normal file
43
Health-Protection-QT6/main.cpp
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QLocale>
|
||||||
|
#include <QTranslator>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
|
QTranslator translator;
|
||||||
|
const QStringList uiLanguages = QLocale::system().uiLanguages();
|
||||||
|
for (const QString &locale : uiLanguages) {
|
||||||
|
const QString baseName = "Health-Protection-QT6_" + QLocale(locale).name();
|
||||||
|
if (translator.load(":/i18n/" + baseName)) {
|
||||||
|
a.installTranslator(&translator);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MainWindow w;
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
// if(reg->value("键名 001") != "")
|
||||||
|
// {
|
||||||
|
int chooese=reg->value("startmini").toInt();
|
||||||
|
//neirong=reg->value("Content").toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
if(chooese==1){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
w.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
return a.exec();
|
||||||
|
}
|
337
Health-Protection-QT6/mainwindow.cpp
Normal file
337
Health-Protection-QT6/mainwindow.cpp
Normal file
|
@ -0,0 +1,337 @@
|
||||||
|
#include "dialog1x.h"
|
||||||
|
#include "ui_dialog1x.h"
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include "qstyle.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QIcon>
|
||||||
|
#include "dialog1.h"
|
||||||
|
#include "ui_dialog1.h"
|
||||||
|
#include <QAction>
|
||||||
|
#include <windows.h>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QNetworkReply>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <tlhelp32.h>
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QTime>
|
||||||
|
QString ves="V8.5";
|
||||||
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
|
: QMainWindow(parent)
|
||||||
|
, ui(new Ui::MainWindow)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
||||||
|
QPixmap img(":/Win11.jpg");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QIcon icon = QApplication::style()->standardIcon((QStyle::StandardPixmap)0);
|
||||||
|
QIcon icon1 = QApplication::style()->standardIcon((QStyle::StandardPixmap)9);
|
||||||
|
|
||||||
|
//设置通知栏的图标
|
||||||
|
trayIcon = new QSystemTrayIcon(this);
|
||||||
|
trayIcon->setIcon(icon);
|
||||||
|
|
||||||
|
//设置通知栏的单击事件
|
||||||
|
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(stTrayIconActive(QSystemTrayIcon::ActivationReason)));
|
||||||
|
|
||||||
|
//设置通知栏的右键菜单
|
||||||
|
QMenu * menu = new QMenu();
|
||||||
|
|
||||||
|
//设置菜单项目
|
||||||
|
QAction *actionHide = new QAction("Hide", menu);
|
||||||
|
|
||||||
|
menu->addAction(actionHide);
|
||||||
|
trayIcon->setContextMenu(menu);
|
||||||
|
// 设置Action的响应
|
||||||
|
connect(actionHide, SIGNAL(triggered()), this, SLOT(stActionHide()));
|
||||||
|
trayIcon->show();
|
||||||
|
QSettings *reg = new QSettings("HKEY_CURRENT_USER\\Software\\Qt01", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
// if(reg->value("键名 001") != "")
|
||||||
|
// {
|
||||||
|
|
||||||
|
Dialog1x *aa = new Dialog1x;
|
||||||
|
Dialog1 *bb = new Dialog1;
|
||||||
|
int Chooese=reg->value("Chooese").toInt();
|
||||||
|
switch (Chooese) {
|
||||||
|
case 1:
|
||||||
|
aa->on_radioButton_clicked();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
aa->on_radioButton_2_clicked();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
aa->on_radioButton_3_clicked();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
aa->on_radioButton_4_clicked();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
aa->on_radioButton_5_clicked();
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
aa->on_radioButton_6_clicked();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
aa->on_radioButton_7_clicked();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
aa->on_radioButton_8_clicked();
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
aa->on_radioButton_9_clicked();
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
aa->on_radioButton_10_clicked();
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
aa->on_radioButton_11_clicked();
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
bb->on_pushButton_clicked();
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
aa->on_radioButton_13_clicked();
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
aa->on_radioButton_14_clicked();
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
aa->on_radioButton_15_clicked();
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
aa->on_radioButton_16_clicked();
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
aa->on_radioButton_17_clicked();
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
//p.on_radioButton_19_clicked()
|
||||||
|
break;
|
||||||
|
case 19:
|
||||||
|
aa->on_radioButton_19_clicked();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
|
||||||
|
//托盘的消息提示
|
||||||
|
|
||||||
|
|
||||||
|
int NightON;
|
||||||
|
int NightOFF;
|
||||||
|
int AutoNight;
|
||||||
|
//实例 QSettings
|
||||||
|
//参数 1:如果没有按照章节 Qt01 进行,则注册表中没有 Qt01。
|
||||||
|
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
// if(reg->value("键名 001") != "")
|
||||||
|
// {
|
||||||
|
NightON=reg->value("NightON").toInt();
|
||||||
|
NightOFF=reg->value("NightOFF").toInt();
|
||||||
|
AutoNight=reg->value("AutoNight").toInt();
|
||||||
|
// }
|
||||||
|
delete reg;
|
||||||
|
//删除 QSettings
|
||||||
|
|
||||||
|
if(AutoNight==1){
|
||||||
|
if (print_lock){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//防止重复执行
|
||||||
|
print_lock = true;
|
||||||
|
|
||||||
|
//获取打印行数
|
||||||
|
|
||||||
|
|
||||||
|
//循环打印
|
||||||
|
while(true) {
|
||||||
|
|
||||||
|
QTime time = QTime::currentTime();
|
||||||
|
QString time1=time.toString("hh");
|
||||||
|
int time2=time1.toInt();
|
||||||
|
//将数据输出到文件中或是做一些其他操作...
|
||||||
|
if(NightON==time2){
|
||||||
|
QSettings *reg = new
|
||||||
|
QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
//if(reg->value("Start Page") != "")
|
||||||
|
//{
|
||||||
|
//IE 默认主页修改为:百度首页
|
||||||
|
reg->setValue("AppsUseLightTheme",1);
|
||||||
|
reg->setValue("SystemUsesLightTheme",1);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}
|
||||||
|
if(NightOFF==time2){
|
||||||
|
QSettings *reg = new
|
||||||
|
QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat);
|
||||||
|
|
||||||
|
//判断 value 是否为空,不为空则输出
|
||||||
|
//if(reg->value("Start Page") != "")
|
||||||
|
//{
|
||||||
|
//IE 默认主页修改为:百度首页
|
||||||
|
reg->setValue("AppsUseLightTheme",0);
|
||||||
|
reg->setValue("SystemUsesLightTheme",0);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//删除 QSettings
|
||||||
|
delete reg;
|
||||||
|
}
|
||||||
|
//更新进度值
|
||||||
|
|
||||||
|
|
||||||
|
//停止
|
||||||
|
if (AutoNight==0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//优先响应UI事件,防止卡死, 提升用户体验
|
||||||
|
qApp->processEvents();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print_lock = false;
|
||||||
|
stop_flag = false;
|
||||||
|
|
||||||
|
// 在需要停止线程的地方,发送中断信号
|
||||||
|
// thread->requestInterruption();
|
||||||
|
|
||||||
|
}
|
||||||
|
QNetworkAccessManager *manager2 = new QNetworkAccessManager(this);
|
||||||
|
QUrl url2("https://api.vvhan.com/api/qqsc?key=969c8d1f86b653696f929406faa0bbc0");
|
||||||
|
QNetworkRequest request2(url2);
|
||||||
|
|
||||||
|
// Set unsafe SSL configuration
|
||||||
|
QSslConfiguration config2 = request2.sslConfiguration();
|
||||||
|
config2.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request2.setSslConfiguration(config2);
|
||||||
|
|
||||||
|
QNetworkReply *reply2 = manager2->get(request2);
|
||||||
|
|
||||||
|
// Connect to the finished signal
|
||||||
|
connect(reply2, &QNetworkReply::finished, [=]() {
|
||||||
|
|
||||||
|
if (reply2->error() == QNetworkReply::NoError) {
|
||||||
|
// Read the JSON data
|
||||||
|
QByteArray data2 = reply2->readAll();
|
||||||
|
|
||||||
|
// Display the JSON data in a message box
|
||||||
|
|
||||||
|
// QMessageBox::information(this, "JSON Data", QString(data));
|
||||||
|
QJsonDocument jsonDoc2 = QJsonDocument::fromJson(QString(data2).toUtf8());
|
||||||
|
QJsonObject jsonObj2 = jsonDoc2.object();
|
||||||
|
|
||||||
|
// 获取数据
|
||||||
|
QString info2 = jsonObj2["content"].toString();
|
||||||
|
if(info2!=ves){
|
||||||
|
QMessageBox::warning(this, "Error", "已发布新版本\""+info2+"\"。\n点击\"设置\"下载最新版本。");
|
||||||
|
// ui->pushButton_4->setText("发现新版本");
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
// ui->pushButton_4->setText("暂无更新");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Display an error message
|
||||||
|
|
||||||
|
QMessageBox::warning(this, "Error", reply2->errorString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
reply2->deleteLater();
|
||||||
|
manager2->deleteLater();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::stTrayIconActive(QSystemTrayIcon::ActivationReason acReason)
|
||||||
|
{
|
||||||
|
switch (acReason)
|
||||||
|
{
|
||||||
|
case QSystemTrayIcon::Trigger:
|
||||||
|
{
|
||||||
|
showNormal();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MainWindow::~MainWindow()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_clicked()
|
||||||
|
{
|
||||||
|
Dialog1 d;
|
||||||
|
d.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_5_clicked()
|
||||||
|
{
|
||||||
|
Dialog2 d;
|
||||||
|
d.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_4_clicked()
|
||||||
|
{
|
||||||
|
Dialog3 d;
|
||||||
|
d.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_3_clicked()
|
||||||
|
{
|
||||||
|
Dialog4 d;
|
||||||
|
d.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_2_clicked()
|
||||||
|
{
|
||||||
|
Dialog5 d;
|
||||||
|
d.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
60
Health-Protection-QT6/mainwindow.h
Normal file
60
Health-Protection-QT6/mainwindow.h
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
#include "dialog1x.h"
|
||||||
|
#include "ui_dialog1x.h"
|
||||||
|
#ifndef MAINWINDOW_H
|
||||||
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include "dialog1.h"
|
||||||
|
#include "dialog2.h"
|
||||||
|
#include "dialog3.h"
|
||||||
|
#include "dialog4.h"
|
||||||
|
#include "dialog5.h"
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QImage>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QIcon>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
namespace Ui { class MainWindow; }
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class MainWindow : public QMainWindow
|
||||||
|
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
MainWindow(QWidget *parent = nullptr);
|
||||||
|
~MainWindow();
|
||||||
|
QSystemTrayIcon *trayIcon;
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_pushButton_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_5_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_4_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_3_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_2_clicked();
|
||||||
|
void stTrayIconActive(QSystemTrayIcon::ActivationReason acReason);
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::MainWindow *ui;
|
||||||
|
|
||||||
|
int id1; //定时器1的唯一标示
|
||||||
|
int id2; //定时器2的唯一标示
|
||||||
|
bool print_lock;
|
||||||
|
bool stop_flag;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MAINWINDOW_H
|
173
Health-Protection-QT6/mainwindow.ui
Normal file
173
Health-Protection-QT6/mainwindow.ui
Normal file
|
@ -0,0 +1,173 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MainWindow</class>
|
||||||
|
<widget class="QMainWindow" name="MainWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>613</width>
|
||||||
|
<height>480</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>YANG Health-Peotection</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 30pt "华文琥珀";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p align="center">Health-Protection-QT6重构版</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border-image: url(:/Desktop/8eea737026dbeeae250de40cffd742b9.png);
|
||||||
|
border:2px groove gray;
|
||||||
|
border-radius:35px;
|
||||||
|
background-color: rgb(170, 255, 0);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>设置</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(255, 255, 0);;border:2px groove gray;border-radius:35px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>自动播报</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_3">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color:rgb(255, 170, 0); ;border:2px groove gray;border-radius:35px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
|
||||||
|
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>护眼助手</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_4">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(85, 255, 255);border:2px groove gray;border-radius:35px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>健康守护</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_5">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>70</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton{background-color: rgb(0, 255, 127);border:2px groove gray;border-radius:35px;padding:2px 4px;border-style: outset;font: 16pt "华文琥珀";}
|
||||||
|
|
||||||
|
QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}
|
||||||
|
QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>定时关机</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>613</width>
|
||||||
|
<height>18</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
|
@ -0,0 +1,133 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'dialog1.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 6.6.0
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DIALOG1_H
|
||||||
|
#define UI_DIALOG1_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QPushButton>
|
||||||
|
#include <QtWidgets/QSpacerItem>
|
||||||
|
#include <QtWidgets/QTextEdit>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_Dialog1
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QVBoxLayout *verticalLayout;
|
||||||
|
QLabel *label;
|
||||||
|
QTextEdit *textEdit;
|
||||||
|
QLabel *label_2;
|
||||||
|
QTextEdit *textEdit_2;
|
||||||
|
QSpacerItem *verticalSpacer;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QPushButton *pushButton_2;
|
||||||
|
QPushButton *pushButton;
|
||||||
|
QPushButton *pushButton_3;
|
||||||
|
|
||||||
|
void setupUi(QDialog *Dialog1)
|
||||||
|
{
|
||||||
|
if (Dialog1->objectName().isEmpty())
|
||||||
|
Dialog1->setObjectName("Dialog1");
|
||||||
|
Dialog1->resize(407, 291);
|
||||||
|
verticalLayout = new QVBoxLayout(Dialog1);
|
||||||
|
verticalLayout->setObjectName("verticalLayout");
|
||||||
|
label = new QLabel(Dialog1);
|
||||||
|
label->setObjectName("label");
|
||||||
|
label->setStyleSheet(QString::fromUtf8("font: 15pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(label);
|
||||||
|
|
||||||
|
textEdit = new QTextEdit(Dialog1);
|
||||||
|
textEdit->setObjectName("textEdit");
|
||||||
|
textEdit->setMinimumSize(QSize(0, 40));
|
||||||
|
textEdit->setMaximumSize(QSize(16777215, 40));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(textEdit);
|
||||||
|
|
||||||
|
label_2 = new QLabel(Dialog1);
|
||||||
|
label_2->setObjectName("label_2");
|
||||||
|
label_2->setStyleSheet(QString::fromUtf8("font: 15pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(label_2);
|
||||||
|
|
||||||
|
textEdit_2 = new QTextEdit(Dialog1);
|
||||||
|
textEdit_2->setObjectName("textEdit_2");
|
||||||
|
textEdit_2->setMaximumSize(QSize(16777215, 40));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(textEdit_2);
|
||||||
|
|
||||||
|
verticalSpacer = new QSpacerItem(0, 30, QSizePolicy::Minimum, QSizePolicy::Maximum);
|
||||||
|
|
||||||
|
verticalLayout->addItem(verticalSpacer);
|
||||||
|
|
||||||
|
horizontalLayout = new QHBoxLayout();
|
||||||
|
horizontalLayout->setObjectName("horizontalLayout");
|
||||||
|
pushButton_2 = new QPushButton(Dialog1);
|
||||||
|
pushButton_2->setObjectName("pushButton_2");
|
||||||
|
pushButton_2->setMinimumSize(QSize(0, 40));
|
||||||
|
pushButton_2->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(pushButton_2);
|
||||||
|
|
||||||
|
pushButton = new QPushButton(Dialog1);
|
||||||
|
pushButton->setObjectName("pushButton");
|
||||||
|
pushButton->setMinimumSize(QSize(0, 40));
|
||||||
|
pushButton->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(pushButton);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout);
|
||||||
|
|
||||||
|
pushButton_3 = new QPushButton(Dialog1);
|
||||||
|
pushButton_3->setObjectName("pushButton_3");
|
||||||
|
pushButton_3->setMinimumSize(QSize(0, 40));
|
||||||
|
pushButton_3->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 10pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(pushButton_3);
|
||||||
|
|
||||||
|
|
||||||
|
retranslateUi(Dialog1);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(Dialog1);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *Dialog1)
|
||||||
|
{
|
||||||
|
Dialog1->setWindowTitle(QCoreApplication::translate("Dialog1", "Dialog", nullptr));
|
||||||
|
label->setText(QCoreApplication::translate("Dialog1", "\350\257\267\350\276\223\345\205\245\346\240\207\351\242\230\357\274\232", nullptr));
|
||||||
|
label_2->setText(QCoreApplication::translate("Dialog1", "\350\257\267\350\276\223\345\205\245\345\206\205\345\256\271\357\274\232", nullptr));
|
||||||
|
pushButton_2->setText(QCoreApplication::translate("Dialog1", "\344\277\235\345\255\230", nullptr));
|
||||||
|
pushButton->setText(QCoreApplication::translate("Dialog1", "\351\242\204\350\247\210", nullptr));
|
||||||
|
pushButton_3->setText(QCoreApplication::translate("Dialog1", "\350\201\224\347\275\221\350\216\267\345\217\226\357\274\210BETA\357\274\211", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog1: public Ui_Dialog1 {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DIALOG1_H
|
|
@ -0,0 +1,294 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'dialog1x.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 6.6.0
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DIALOG1X_H
|
||||||
|
#define UI_DIALOG1X_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QAbstractButton>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QDialogButtonBox>
|
||||||
|
#include <QtWidgets/QGridLayout>
|
||||||
|
#include <QtWidgets/QGroupBox>
|
||||||
|
#include <QtWidgets/QRadioButton>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
#include <QtWidgets/QWidget>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_Dialog1x
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QVBoxLayout *verticalLayout_2;
|
||||||
|
QWidget *widget;
|
||||||
|
QGridLayout *gridLayout_3;
|
||||||
|
QRadioButton *radioButton_2;
|
||||||
|
QRadioButton *radioButton_4;
|
||||||
|
QGroupBox *groupBox;
|
||||||
|
QGridLayout *gridLayout;
|
||||||
|
QRadioButton *radioButton_6;
|
||||||
|
QRadioButton *radioButton_14;
|
||||||
|
QRadioButton *radioButton_7;
|
||||||
|
QRadioButton *radioButton_17;
|
||||||
|
QRadioButton *radioButton_8;
|
||||||
|
QRadioButton *radioButton_19;
|
||||||
|
QRadioButton *radioButton_9;
|
||||||
|
QRadioButton *radioButton_16;
|
||||||
|
QRadioButton *radioButton_10;
|
||||||
|
QRadioButton *radioButton_13;
|
||||||
|
QRadioButton *radioButton_11;
|
||||||
|
QRadioButton *radioButton_15;
|
||||||
|
QRadioButton *radioButton_5;
|
||||||
|
QRadioButton *radioButton_3;
|
||||||
|
QRadioButton *radioButton;
|
||||||
|
QDialogButtonBox *buttonBox;
|
||||||
|
|
||||||
|
void setupUi(QDialog *Dialog1x)
|
||||||
|
{
|
||||||
|
if (Dialog1x->objectName().isEmpty())
|
||||||
|
Dialog1x->setObjectName("Dialog1x");
|
||||||
|
Dialog1x->resize(362, 250);
|
||||||
|
verticalLayout_2 = new QVBoxLayout(Dialog1x);
|
||||||
|
verticalLayout_2->setObjectName("verticalLayout_2");
|
||||||
|
widget = new QWidget(Dialog1x);
|
||||||
|
widget->setObjectName("widget");
|
||||||
|
widget->setMaximumSize(QSize(16777215, 16777215));
|
||||||
|
widget->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;"));
|
||||||
|
gridLayout_3 = new QGridLayout(widget);
|
||||||
|
gridLayout_3->setObjectName("gridLayout_3");
|
||||||
|
radioButton_2 = new QRadioButton(widget);
|
||||||
|
radioButton_2->setObjectName("radioButton_2");
|
||||||
|
radioButton_2->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout_3->addWidget(radioButton_2, 1, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton_4 = new QRadioButton(widget);
|
||||||
|
radioButton_4->setObjectName("radioButton_4");
|
||||||
|
radioButton_4->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout_3->addWidget(radioButton_4, 3, 0, 1, 1);
|
||||||
|
|
||||||
|
groupBox = new QGroupBox(widget);
|
||||||
|
groupBox->setObjectName("groupBox");
|
||||||
|
groupBox->setStyleSheet(QString::fromUtf8("border:2px groove gray;border-radius:10px;"));
|
||||||
|
gridLayout = new QGridLayout(groupBox);
|
||||||
|
gridLayout->setObjectName("gridLayout");
|
||||||
|
radioButton_6 = new QRadioButton(groupBox);
|
||||||
|
radioButton_6->setObjectName("radioButton_6");
|
||||||
|
radioButton_6->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_6, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton_14 = new QRadioButton(groupBox);
|
||||||
|
radioButton_14->setObjectName("radioButton_14");
|
||||||
|
radioButton_14->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_14, 0, 1, 1, 1);
|
||||||
|
|
||||||
|
radioButton_7 = new QRadioButton(groupBox);
|
||||||
|
radioButton_7->setObjectName("radioButton_7");
|
||||||
|
radioButton_7->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_7, 1, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton_17 = new QRadioButton(groupBox);
|
||||||
|
radioButton_17->setObjectName("radioButton_17");
|
||||||
|
radioButton_17->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_17, 1, 1, 1, 1);
|
||||||
|
|
||||||
|
radioButton_8 = new QRadioButton(groupBox);
|
||||||
|
radioButton_8->setObjectName("radioButton_8");
|
||||||
|
radioButton_8->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_8, 2, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton_19 = new QRadioButton(groupBox);
|
||||||
|
radioButton_19->setObjectName("radioButton_19");
|
||||||
|
radioButton_19->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_19, 2, 1, 1, 1);
|
||||||
|
|
||||||
|
radioButton_9 = new QRadioButton(groupBox);
|
||||||
|
radioButton_9->setObjectName("radioButton_9");
|
||||||
|
radioButton_9->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_9, 3, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton_16 = new QRadioButton(groupBox);
|
||||||
|
radioButton_16->setObjectName("radioButton_16");
|
||||||
|
radioButton_16->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_16, 3, 1, 1, 1);
|
||||||
|
|
||||||
|
radioButton_10 = new QRadioButton(groupBox);
|
||||||
|
radioButton_10->setObjectName("radioButton_10");
|
||||||
|
radioButton_10->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_10, 4, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton_13 = new QRadioButton(groupBox);
|
||||||
|
radioButton_13->setObjectName("radioButton_13");
|
||||||
|
radioButton_13->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_13, 4, 1, 1, 1);
|
||||||
|
|
||||||
|
radioButton_11 = new QRadioButton(groupBox);
|
||||||
|
radioButton_11->setObjectName("radioButton_11");
|
||||||
|
radioButton_11->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_11, 5, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton_15 = new QRadioButton(groupBox);
|
||||||
|
radioButton_15->setObjectName("radioButton_15");
|
||||||
|
radioButton_15->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(170, 255, 255);;border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout->addWidget(radioButton_15, 5, 1, 1, 1);
|
||||||
|
|
||||||
|
|
||||||
|
gridLayout_3->addWidget(groupBox, 0, 1, 5, 1);
|
||||||
|
|
||||||
|
radioButton_5 = new QRadioButton(widget);
|
||||||
|
radioButton_5->setObjectName("radioButton_5");
|
||||||
|
radioButton_5->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout_3->addWidget(radioButton_5, 4, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton_3 = new QRadioButton(widget);
|
||||||
|
radioButton_3->setObjectName("radioButton_3");
|
||||||
|
radioButton_3->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout_3->addWidget(radioButton_3, 2, 0, 1, 1);
|
||||||
|
|
||||||
|
radioButton = new QRadioButton(widget);
|
||||||
|
radioButton->setObjectName("radioButton");
|
||||||
|
radioButton->setStyleSheet(QString::fromUtf8("QRadioButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:5px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QRadioButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QRadioButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
gridLayout_3->addWidget(radioButton, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_2->addWidget(widget);
|
||||||
|
|
||||||
|
buttonBox = new QDialogButtonBox(Dialog1x);
|
||||||
|
buttonBox->setObjectName("buttonBox");
|
||||||
|
buttonBox->setMaximumSize(QSize(16777215, 50));
|
||||||
|
buttonBox->setStyleSheet(QString::fromUtf8("QPushButton{width:160px;high:160px;background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:10px;padding:2px 4px;border-style: outset;}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
buttonBox->setOrientation(Qt::Horizontal);
|
||||||
|
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||||
|
|
||||||
|
verticalLayout_2->addWidget(buttonBox);
|
||||||
|
|
||||||
|
widget->raise();
|
||||||
|
buttonBox->raise();
|
||||||
|
|
||||||
|
retranslateUi(Dialog1x);
|
||||||
|
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog1x, qOverload<>(&QDialog::accept));
|
||||||
|
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog1x, qOverload<>(&QDialog::reject));
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(Dialog1x);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *Dialog1x)
|
||||||
|
{
|
||||||
|
Dialog1x->setWindowTitle(QCoreApplication::translate("Dialog1x", "Dialog", nullptr));
|
||||||
|
radioButton_2->setText(QCoreApplication::translate("Dialog1x", "\346\257\217\346\227\245\350\213\261\350\257\255", nullptr));
|
||||||
|
radioButton_4->setText(QCoreApplication::translate("Dialog1x", "\346\257\217\346\227\245\346\226\260\351\227\273", nullptr));
|
||||||
|
groupBox->setTitle(QCoreApplication::translate("Dialog1x", "\346\257\217\346\227\245\346\230\237\345\272\247", nullptr));
|
||||||
|
radioButton_6->setText(QCoreApplication::translate("Dialog1x", "\346\260\264\347\223\266\345\272\247", nullptr));
|
||||||
|
radioButton_14->setText(QCoreApplication::translate("Dialog1x", "\347\213\256\345\255\220\345\272\247", nullptr));
|
||||||
|
radioButton_7->setText(QCoreApplication::translate("Dialog1x", "\345\217\214\351\261\274\345\272\247", nullptr));
|
||||||
|
radioButton_17->setText(QCoreApplication::translate("Dialog1x", "\345\244\204\345\245\263\345\272\247", nullptr));
|
||||||
|
radioButton_8->setText(QCoreApplication::translate("Dialog1x", "\347\231\275\347\276\212\345\272\247", nullptr));
|
||||||
|
radioButton_19->setText(QCoreApplication::translate("Dialog1x", "\345\244\251\347\247\244\345\272\247", nullptr));
|
||||||
|
radioButton_9->setText(QCoreApplication::translate("Dialog1x", "\351\207\221\347\211\233\345\272\247", nullptr));
|
||||||
|
radioButton_16->setText(QCoreApplication::translate("Dialog1x", "\345\244\251\350\235\216\345\272\247", nullptr));
|
||||||
|
radioButton_10->setText(QCoreApplication::translate("Dialog1x", "\345\217\214\345\255\220\345\272\247", nullptr));
|
||||||
|
radioButton_13->setText(QCoreApplication::translate("Dialog1x", "\345\260\204\346\211\213\345\272\247", nullptr));
|
||||||
|
radioButton_11->setText(QCoreApplication::translate("Dialog1x", "\345\267\250\350\237\271\345\272\247", nullptr));
|
||||||
|
radioButton_15->setText(QCoreApplication::translate("Dialog1x", "\346\221\251\347\276\257\345\272\247", nullptr));
|
||||||
|
radioButton_5->setText(QCoreApplication::translate("Dialog1x", "\346\257\217\346\227\245\344\270\200\346\233\262\357\274\210BETA\357\274\211", nullptr));
|
||||||
|
radioButton_3->setText(QCoreApplication::translate("Dialog1x", "\346\257\217\346\227\245\350\257\227\350\257\215", nullptr));
|
||||||
|
radioButton->setText(QCoreApplication::translate("Dialog1x", "\346\257\217\346\227\245\345\244\251\346\260\224", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog1x: public Ui_Dialog1x {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DIALOG1X_H
|
|
@ -0,0 +1,113 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'dialog2.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 6.6.0
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DIALOG2_H
|
||||||
|
#define UI_DIALOG2_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QPushButton>
|
||||||
|
#include <QtWidgets/QTextEdit>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_Dialog2
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QVBoxLayout *verticalLayout;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QLabel *label;
|
||||||
|
QTextEdit *textEdit;
|
||||||
|
QLabel *label_2;
|
||||||
|
QHBoxLayout *horizontalLayout_2;
|
||||||
|
QPushButton *pushButton;
|
||||||
|
QPushButton *pushButton_2;
|
||||||
|
|
||||||
|
void setupUi(QDialog *Dialog2)
|
||||||
|
{
|
||||||
|
if (Dialog2->objectName().isEmpty())
|
||||||
|
Dialog2->setObjectName("Dialog2");
|
||||||
|
Dialog2->resize(400, 227);
|
||||||
|
verticalLayout = new QVBoxLayout(Dialog2);
|
||||||
|
verticalLayout->setObjectName("verticalLayout");
|
||||||
|
horizontalLayout = new QHBoxLayout();
|
||||||
|
horizontalLayout->setObjectName("horizontalLayout");
|
||||||
|
label = new QLabel(Dialog2);
|
||||||
|
label->setObjectName("label");
|
||||||
|
label->setStyleSheet(QString::fromUtf8("font: 13pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label);
|
||||||
|
|
||||||
|
textEdit = new QTextEdit(Dialog2);
|
||||||
|
textEdit->setObjectName("textEdit");
|
||||||
|
textEdit->setMaximumSize(QSize(16777215, 30));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(textEdit);
|
||||||
|
|
||||||
|
label_2 = new QLabel(Dialog2);
|
||||||
|
label_2->setObjectName("label_2");
|
||||||
|
label_2->setStyleSheet(QString::fromUtf8("font: 13pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label_2);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout);
|
||||||
|
|
||||||
|
horizontalLayout_2 = new QHBoxLayout();
|
||||||
|
horizontalLayout_2->setObjectName("horizontalLayout_2");
|
||||||
|
pushButton = new QPushButton(Dialog2);
|
||||||
|
pushButton->setObjectName("pushButton");
|
||||||
|
pushButton->setMinimumSize(QSize(0, 60));
|
||||||
|
pushButton->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(pushButton);
|
||||||
|
|
||||||
|
pushButton_2 = new QPushButton(Dialog2);
|
||||||
|
pushButton_2->setObjectName("pushButton_2");
|
||||||
|
pushButton_2->setMinimumSize(QSize(0, 60));
|
||||||
|
pushButton_2->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(pushButton_2);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_2);
|
||||||
|
|
||||||
|
|
||||||
|
retranslateUi(Dialog2);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(Dialog2);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *Dialog2)
|
||||||
|
{
|
||||||
|
Dialog2->setWindowTitle(QCoreApplication::translate("Dialog2", "Dialog", nullptr));
|
||||||
|
label->setText(QCoreApplication::translate("Dialog2", "\345\260\206\344\274\232\345\234\250", nullptr));
|
||||||
|
label_2->setText(QCoreApplication::translate("Dialog2", "\345\210\206\351\222\237\345\220\216\345\205\263\351\227\255\350\256\241\347\256\227\346\234\272", nullptr));
|
||||||
|
pushButton->setText(QCoreApplication::translate("Dialog2", "\345\205\263\351\227\255\345\256\232\346\227\266", nullptr));
|
||||||
|
pushButton_2->setText(QCoreApplication::translate("Dialog2", "\350\256\276\347\275\256\345\256\232\346\227\266", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog2: public Ui_Dialog2 {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DIALOG2_H
|
|
@ -0,0 +1,175 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'dialog3.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 6.6.0
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DIALOG3_H
|
||||||
|
#define UI_DIALOG3_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QPushButton>
|
||||||
|
#include <QtWidgets/QSpacerItem>
|
||||||
|
#include <QtWidgets/QTextEdit>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_Dialog3
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QVBoxLayout *verticalLayout_2;
|
||||||
|
QSpacerItem *verticalSpacer_3;
|
||||||
|
QLabel *label;
|
||||||
|
QTextEdit *textEdit;
|
||||||
|
QSpacerItem *verticalSpacer_2;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QLabel *label_2;
|
||||||
|
QTextEdit *textEdit_2;
|
||||||
|
QLabel *label_3;
|
||||||
|
QSpacerItem *verticalSpacer;
|
||||||
|
QHBoxLayout *horizontalLayout_2;
|
||||||
|
QPushButton *pushButton;
|
||||||
|
QPushButton *pushButton_2;
|
||||||
|
QHBoxLayout *horizontalLayout_3;
|
||||||
|
QPushButton *pushButton_3;
|
||||||
|
QPushButton *pushButton_4;
|
||||||
|
|
||||||
|
void setupUi(QDialog *Dialog3)
|
||||||
|
{
|
||||||
|
if (Dialog3->objectName().isEmpty())
|
||||||
|
Dialog3->setObjectName("Dialog3");
|
||||||
|
Dialog3->resize(400, 300);
|
||||||
|
verticalLayout_2 = new QVBoxLayout(Dialog3);
|
||||||
|
verticalLayout_2->setObjectName("verticalLayout_2");
|
||||||
|
verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
verticalLayout_2->addItem(verticalSpacer_3);
|
||||||
|
|
||||||
|
label = new QLabel(Dialog3);
|
||||||
|
label->setObjectName("label");
|
||||||
|
label->setStyleSheet(QString::fromUtf8("font: 15pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
verticalLayout_2->addWidget(label);
|
||||||
|
|
||||||
|
textEdit = new QTextEdit(Dialog3);
|
||||||
|
textEdit->setObjectName("textEdit");
|
||||||
|
textEdit->setMinimumSize(QSize(0, 0));
|
||||||
|
textEdit->setMaximumSize(QSize(16777215, 30));
|
||||||
|
|
||||||
|
verticalLayout_2->addWidget(textEdit);
|
||||||
|
|
||||||
|
verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
verticalLayout_2->addItem(verticalSpacer_2);
|
||||||
|
|
||||||
|
horizontalLayout = new QHBoxLayout();
|
||||||
|
horizontalLayout->setObjectName("horizontalLayout");
|
||||||
|
label_2 = new QLabel(Dialog3);
|
||||||
|
label_2->setObjectName("label_2");
|
||||||
|
label_2->setStyleSheet(QString::fromUtf8("font: 15pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label_2);
|
||||||
|
|
||||||
|
textEdit_2 = new QTextEdit(Dialog3);
|
||||||
|
textEdit_2->setObjectName("textEdit_2");
|
||||||
|
textEdit_2->setMaximumSize(QSize(16777215, 30));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(textEdit_2);
|
||||||
|
|
||||||
|
label_3 = new QLabel(Dialog3);
|
||||||
|
label_3->setObjectName("label_3");
|
||||||
|
label_3->setStyleSheet(QString::fromUtf8("font: 15pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label_3);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_2->addLayout(horizontalLayout);
|
||||||
|
|
||||||
|
verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Maximum);
|
||||||
|
|
||||||
|
verticalLayout_2->addItem(verticalSpacer);
|
||||||
|
|
||||||
|
horizontalLayout_2 = new QHBoxLayout();
|
||||||
|
horizontalLayout_2->setObjectName("horizontalLayout_2");
|
||||||
|
pushButton = new QPushButton(Dialog3);
|
||||||
|
pushButton->setObjectName("pushButton");
|
||||||
|
pushButton->setMinimumSize(QSize(0, 40));
|
||||||
|
pushButton->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(pushButton);
|
||||||
|
|
||||||
|
pushButton_2 = new QPushButton(Dialog3);
|
||||||
|
pushButton_2->setObjectName("pushButton_2");
|
||||||
|
pushButton_2->setMinimumSize(QSize(0, 40));
|
||||||
|
pushButton_2->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(pushButton_2);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_2->addLayout(horizontalLayout_2);
|
||||||
|
|
||||||
|
horizontalLayout_3 = new QHBoxLayout();
|
||||||
|
horizontalLayout_3->setObjectName("horizontalLayout_3");
|
||||||
|
pushButton_3 = new QPushButton(Dialog3);
|
||||||
|
pushButton_3->setObjectName("pushButton_3");
|
||||||
|
pushButton_3->setMinimumSize(QSize(0, 40));
|
||||||
|
pushButton_3->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout_3->addWidget(pushButton_3);
|
||||||
|
|
||||||
|
pushButton_4 = new QPushButton(Dialog3);
|
||||||
|
pushButton_4->setObjectName("pushButton_4");
|
||||||
|
pushButton_4->setMinimumSize(QSize(0, 40));
|
||||||
|
pushButton_4->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:20px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout_3->addWidget(pushButton_4);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_2->addLayout(horizontalLayout_3);
|
||||||
|
|
||||||
|
|
||||||
|
retranslateUi(Dialog3);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(Dialog3);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *Dialog3)
|
||||||
|
{
|
||||||
|
Dialog3->setWindowTitle(QCoreApplication::translate("Dialog3", "Dialog", nullptr));
|
||||||
|
label->setText(QCoreApplication::translate("Dialog3", "\350\257\267\350\276\223\345\205\245\351\231\220\345\256\232\346\227\266\351\225\277\347\232\204\345\272\224\347\224\250\347\250\213\345\272\217\345\220\215\347\247\260\357\274\232", nullptr));
|
||||||
|
label_2->setText(QCoreApplication::translate("Dialog3", "\345\260\206\345\234\250", nullptr));
|
||||||
|
label_3->setText(QCoreApplication::translate("Dialog3", "\345\210\206\351\222\237\345\220\216\345\205\263\351\227\255", nullptr));
|
||||||
|
pushButton->setText(QCoreApplication::translate("Dialog3", "\347\253\213\345\215\263\345\205\263\351\227\255", nullptr));
|
||||||
|
pushButton_2->setText(QCoreApplication::translate("Dialog3", "\345\273\266\346\227\266\345\205\263\351\227\255", nullptr));
|
||||||
|
pushButton_3->setText(QCoreApplication::translate("Dialog3", "\347\246\201\346\255\242\350\277\220\350\241\214", nullptr));
|
||||||
|
pushButton_4->setText(QCoreApplication::translate("Dialog3", "\345\205\201\350\256\270\350\277\220\350\241\214", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog3: public Ui_Dialog3 {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DIALOG3_H
|
|
@ -0,0 +1,148 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'dialog4.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 6.6.0
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DIALOG4_H
|
||||||
|
#define UI_DIALOG4_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QCheckBox>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QTextEdit>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_Dialog4
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QVBoxLayout *verticalLayout;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QLabel *label;
|
||||||
|
QTextEdit *textEdit;
|
||||||
|
QLabel *label_2;
|
||||||
|
QHBoxLayout *horizontalLayout_2;
|
||||||
|
QLabel *label_3;
|
||||||
|
QTextEdit *textEdit_2;
|
||||||
|
QLabel *label_4;
|
||||||
|
QHBoxLayout *horizontalLayout_3;
|
||||||
|
QCheckBox *checkBox_2;
|
||||||
|
QCheckBox *checkBox;
|
||||||
|
QHBoxLayout *horizontalLayout_5;
|
||||||
|
|
||||||
|
void setupUi(QDialog *Dialog4)
|
||||||
|
{
|
||||||
|
if (Dialog4->objectName().isEmpty())
|
||||||
|
Dialog4->setObjectName("Dialog4");
|
||||||
|
Dialog4->resize(400, 300);
|
||||||
|
verticalLayout = new QVBoxLayout(Dialog4);
|
||||||
|
verticalLayout->setObjectName("verticalLayout");
|
||||||
|
horizontalLayout = new QHBoxLayout();
|
||||||
|
horizontalLayout->setObjectName("horizontalLayout");
|
||||||
|
label = new QLabel(Dialog4);
|
||||||
|
label->setObjectName("label");
|
||||||
|
label->setStyleSheet(QString::fromUtf8("font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label);
|
||||||
|
|
||||||
|
textEdit = new QTextEdit(Dialog4);
|
||||||
|
textEdit->setObjectName("textEdit");
|
||||||
|
textEdit->setMaximumSize(QSize(16777215, 40));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(textEdit);
|
||||||
|
|
||||||
|
label_2 = new QLabel(Dialog4);
|
||||||
|
label_2->setObjectName("label_2");
|
||||||
|
label_2->setStyleSheet(QString::fromUtf8("font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label_2);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout);
|
||||||
|
|
||||||
|
horizontalLayout_2 = new QHBoxLayout();
|
||||||
|
horizontalLayout_2->setObjectName("horizontalLayout_2");
|
||||||
|
label_3 = new QLabel(Dialog4);
|
||||||
|
label_3->setObjectName("label_3");
|
||||||
|
label_3->setStyleSheet(QString::fromUtf8("font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(label_3);
|
||||||
|
|
||||||
|
textEdit_2 = new QTextEdit(Dialog4);
|
||||||
|
textEdit_2->setObjectName("textEdit_2");
|
||||||
|
textEdit_2->setMaximumSize(QSize(16777215, 40));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(textEdit_2);
|
||||||
|
|
||||||
|
label_4 = new QLabel(Dialog4);
|
||||||
|
label_4->setObjectName("label_4");
|
||||||
|
label_4->setStyleSheet(QString::fromUtf8("font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(label_4);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_2);
|
||||||
|
|
||||||
|
horizontalLayout_3 = new QHBoxLayout();
|
||||||
|
horizontalLayout_3->setObjectName("horizontalLayout_3");
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_3);
|
||||||
|
|
||||||
|
checkBox_2 = new QCheckBox(Dialog4);
|
||||||
|
checkBox_2->setObjectName("checkBox_2");
|
||||||
|
checkBox_2->setMinimumSize(QSize(0, 60));
|
||||||
|
checkBox_2->setStyleSheet(QString::fromUtf8("QCheckBox{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QCheckBox:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QCheckBox:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(checkBox_2);
|
||||||
|
|
||||||
|
checkBox = new QCheckBox(Dialog4);
|
||||||
|
checkBox->setObjectName("checkBox");
|
||||||
|
checkBox->setMinimumSize(QSize(0, 60));
|
||||||
|
checkBox->setStyleSheet(QString::fromUtf8("QCheckBox{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QCheckBox:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QCheckBox:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(checkBox);
|
||||||
|
|
||||||
|
horizontalLayout_5 = new QHBoxLayout();
|
||||||
|
horizontalLayout_5->setObjectName("horizontalLayout_5");
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_5);
|
||||||
|
|
||||||
|
|
||||||
|
retranslateUi(Dialog4);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(Dialog4);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *Dialog4)
|
||||||
|
{
|
||||||
|
Dialog4->setWindowTitle(QCoreApplication::translate("Dialog4", "Dialog", nullptr));
|
||||||
|
label->setText(QCoreApplication::translate("Dialog4", "\345\260\206\345\234\250", nullptr));
|
||||||
|
label_2->setText(QCoreApplication::translate("Dialog4", "\347\202\271\345\274\200\345\220\257\346\267\261\350\211\262\346\250\241\345\274\217", nullptr));
|
||||||
|
label_3->setText(QCoreApplication::translate("Dialog4", "\345\260\206\345\234\250", nullptr));
|
||||||
|
label_4->setText(QCoreApplication::translate("Dialog4", "\347\202\271\345\205\263\351\227\255\346\267\261\350\211\262\346\250\241\345\274\217", nullptr));
|
||||||
|
checkBox_2->setText(QCoreApplication::translate("Dialog4", "\345\274\200\345\220\257\345\256\232\346\227\266", nullptr));
|
||||||
|
checkBox->setText(QCoreApplication::translate("Dialog4", "\345\274\200\345\220\257\346\267\261\350\211\262\346\250\241\345\274\217", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog4: public Ui_Dialog4 {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DIALOG4_H
|
|
@ -0,0 +1,172 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'dialog5.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 6.6.0
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DIALOG5_H
|
||||||
|
#define UI_DIALOG5_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QCheckBox>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QGridLayout>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QPushButton>
|
||||||
|
#include <QtWidgets/QTextBrowser>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
#include <QtWidgets/QWidget>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_Dialog5
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QVBoxLayout *verticalLayout;
|
||||||
|
QWidget *widget;
|
||||||
|
QVBoxLayout *verticalLayout_3;
|
||||||
|
QGridLayout *gridLayout;
|
||||||
|
QLabel *label;
|
||||||
|
QVBoxLayout *verticalLayout_2;
|
||||||
|
QLabel *label_2;
|
||||||
|
QTextBrowser *textBrowser;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QCheckBox *checkBox_2;
|
||||||
|
QCheckBox *checkBox;
|
||||||
|
QHBoxLayout *horizontalLayout_2;
|
||||||
|
QPushButton *pushButton;
|
||||||
|
QPushButton *pushButton_2;
|
||||||
|
|
||||||
|
void setupUi(QDialog *Dialog5)
|
||||||
|
{
|
||||||
|
if (Dialog5->objectName().isEmpty())
|
||||||
|
Dialog5->setObjectName("Dialog5");
|
||||||
|
Dialog5->resize(476, 341);
|
||||||
|
verticalLayout = new QVBoxLayout(Dialog5);
|
||||||
|
verticalLayout->setObjectName("verticalLayout");
|
||||||
|
widget = new QWidget(Dialog5);
|
||||||
|
widget->setObjectName("widget");
|
||||||
|
widget->setMinimumSize(QSize(0, 200));
|
||||||
|
widget->setMaximumSize(QSize(16777215, 1000));
|
||||||
|
widget->setStyleSheet(QString::fromUtf8("QWidget{background:rgb(170, 255, 255);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}"));
|
||||||
|
verticalLayout_3 = new QVBoxLayout(widget);
|
||||||
|
verticalLayout_3->setObjectName("verticalLayout_3");
|
||||||
|
gridLayout = new QGridLayout();
|
||||||
|
gridLayout->setObjectName("gridLayout");
|
||||||
|
label = new QLabel(widget);
|
||||||
|
label->setObjectName("label");
|
||||||
|
label->setMinimumSize(QSize(200, 0));
|
||||||
|
label->setStyleSheet(QString::fromUtf8("border-image: url(:/Desktop/39414350.jpg);"));
|
||||||
|
|
||||||
|
gridLayout->addWidget(label, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
verticalLayout_2 = new QVBoxLayout();
|
||||||
|
verticalLayout_2->setObjectName("verticalLayout_2");
|
||||||
|
label_2 = new QLabel(widget);
|
||||||
|
label_2->setObjectName("label_2");
|
||||||
|
label_2->setMaximumSize(QSize(16777215, 50));
|
||||||
|
|
||||||
|
verticalLayout_2->addWidget(label_2);
|
||||||
|
|
||||||
|
textBrowser = new QTextBrowser(widget);
|
||||||
|
textBrowser->setObjectName("textBrowser");
|
||||||
|
textBrowser->setStyleSheet(QString::fromUtf8("font: 10pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
verticalLayout_2->addWidget(textBrowser);
|
||||||
|
|
||||||
|
|
||||||
|
gridLayout->addLayout(verticalLayout_2, 0, 1, 1, 1);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_3->addLayout(gridLayout);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addWidget(widget);
|
||||||
|
|
||||||
|
horizontalLayout = new QHBoxLayout();
|
||||||
|
horizontalLayout->setObjectName("horizontalLayout");
|
||||||
|
checkBox_2 = new QCheckBox(Dialog5);
|
||||||
|
checkBox_2->setObjectName("checkBox_2");
|
||||||
|
checkBox_2->setMaximumSize(QSize(16777215, 60));
|
||||||
|
checkBox_2->setStyleSheet(QString::fromUtf8("QCheckBox{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QCheckBox:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QCheckBox:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(checkBox_2);
|
||||||
|
|
||||||
|
checkBox = new QCheckBox(Dialog5);
|
||||||
|
checkBox->setObjectName("checkBox");
|
||||||
|
checkBox->setMinimumSize(QSize(0, 60));
|
||||||
|
checkBox->setStyleSheet(QString::fromUtf8("QCheckBox{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QCheckBox:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QCheckBox:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(checkBox);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout);
|
||||||
|
|
||||||
|
horizontalLayout_2 = new QHBoxLayout();
|
||||||
|
horizontalLayout_2->setObjectName("horizontalLayout_2");
|
||||||
|
pushButton = new QPushButton(Dialog5);
|
||||||
|
pushButton->setObjectName("pushButton");
|
||||||
|
pushButton->setMinimumSize(QSize(0, 60));
|
||||||
|
pushButton->setMaximumSize(QSize(16777215, 60));
|
||||||
|
pushButton->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);;border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}"));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(pushButton);
|
||||||
|
|
||||||
|
pushButton_2 = new QPushButton(Dialog5);
|
||||||
|
pushButton_2->setObjectName("pushButton_2");
|
||||||
|
pushButton_2->setMinimumSize(QSize(0, 60));
|
||||||
|
pushButton_2->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);;border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}"));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(pushButton_2);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_2);
|
||||||
|
|
||||||
|
|
||||||
|
retranslateUi(Dialog5);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(Dialog5);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *Dialog5)
|
||||||
|
{
|
||||||
|
Dialog5->setWindowTitle(QCoreApplication::translate("Dialog5", "Dialog", nullptr));
|
||||||
|
label->setText(QString());
|
||||||
|
label_2->setText(QCoreApplication::translate("Dialog5", "Health-Protection\345\201\245\345\272\267\345\256\210\346\212\244", nullptr));
|
||||||
|
checkBox_2->setText(QCoreApplication::translate("Dialog5", "\350\207\252\345\212\250\346\234\200\345\260\217\345\214\226", nullptr));
|
||||||
|
checkBox->setText(QCoreApplication::translate("Dialog5", "\345\274\200\346\234\272\350\207\252\345\220\257\345\212\250", nullptr));
|
||||||
|
pushButton->setText(QCoreApplication::translate("Dialog5", "\346\233\264\346\226\260\350\267\263\350\275\254", nullptr));
|
||||||
|
pushButton_2->setText(QCoreApplication::translate("Dialog5", "\346\215\220\350\265\240", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog5: public Ui_Dialog5 {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DIALOG5_H
|
|
@ -0,0 +1,93 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'dialog6.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 6.6.0
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DIALOG6_H
|
||||||
|
#define UI_DIALOG6_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QAbstractButton>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
#include <QtWidgets/QDialogButtonBox>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_Dialog6
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QVBoxLayout *verticalLayout;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QLabel *label_3;
|
||||||
|
QLabel *label_2;
|
||||||
|
QLabel *label;
|
||||||
|
QDialogButtonBox *buttonBox;
|
||||||
|
|
||||||
|
void setupUi(QDialog *Dialog6)
|
||||||
|
{
|
||||||
|
if (Dialog6->objectName().isEmpty())
|
||||||
|
Dialog6->setObjectName("Dialog6");
|
||||||
|
Dialog6->resize(528, 270);
|
||||||
|
verticalLayout = new QVBoxLayout(Dialog6);
|
||||||
|
verticalLayout->setObjectName("verticalLayout");
|
||||||
|
horizontalLayout = new QHBoxLayout();
|
||||||
|
horizontalLayout->setObjectName("horizontalLayout");
|
||||||
|
label_3 = new QLabel(Dialog6);
|
||||||
|
label_3->setObjectName("label_3");
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label_3);
|
||||||
|
|
||||||
|
label_2 = new QLabel(Dialog6);
|
||||||
|
label_2->setObjectName("label_2");
|
||||||
|
label_2->setStyleSheet(QString::fromUtf8("border-image: url(:/Desktop/a1bf4725bee712e6916866de02eb50f.jpg);"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label_2);
|
||||||
|
|
||||||
|
label = new QLabel(Dialog6);
|
||||||
|
label->setObjectName("label");
|
||||||
|
label->setStyleSheet(QString::fromUtf8("border-image: url(:/Desktop/6b73c9ae58aaad1b631e73f3dd357e9.jpg);"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout);
|
||||||
|
|
||||||
|
buttonBox = new QDialogButtonBox(Dialog6);
|
||||||
|
buttonBox->setObjectName("buttonBox");
|
||||||
|
buttonBox->setOrientation(Qt::Horizontal);
|
||||||
|
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||||
|
|
||||||
|
verticalLayout->addWidget(buttonBox);
|
||||||
|
|
||||||
|
|
||||||
|
retranslateUi(Dialog6);
|
||||||
|
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog6, qOverload<>(&QDialog::accept));
|
||||||
|
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog6, qOverload<>(&QDialog::reject));
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(Dialog6);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *Dialog6)
|
||||||
|
{
|
||||||
|
Dialog6->setWindowTitle(QCoreApplication::translate("Dialog6", "Dialog", nullptr));
|
||||||
|
label_3->setText(QCoreApplication::translate("Dialog6", "<html><head/><body><p><span style=\" font-size:14pt; font-weight:700;\">\345\274\200\345\217\221\347\225\231\350\250\200</span></p><p><span style=\" font-size:14pt;\">\346\202\250\347\232\204\346\215\220\350\265\240\346\230\257\346\210\221\346\234\200\345\244\247\347\232\204\345\212\250\345\212\233\357\274\214</span></p><p><span style=\" font-size:14pt;\">\346\204\237\350\260\242\346\224\257\346\214\201</span></p><p><span style=\" font-size:14pt; font-weight:700;\">palpay\346\215\220\350\265\240</span></p><p><span style=\" font-size:14pt;\">qw200477@163.com</span></p></body></html>", nullptr));
|
||||||
|
label_2->setText(QString());
|
||||||
|
label->setText(QString());
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Dialog6: public Ui_Dialog6 {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DIALOG6_H
|
|
@ -0,0 +1,170 @@
|
||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'mainwindow.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 6.6.0
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_MAINWINDOW_H
|
||||||
|
#define UI_MAINWINDOW_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QMainWindow>
|
||||||
|
#include <QtWidgets/QMenuBar>
|
||||||
|
#include <QtWidgets/QPushButton>
|
||||||
|
#include <QtWidgets/QStatusBar>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
#include <QtWidgets/QWidget>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_MainWindow
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QWidget *centralwidget;
|
||||||
|
QVBoxLayout *verticalLayout_4;
|
||||||
|
QLabel *label;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QVBoxLayout *verticalLayout_2;
|
||||||
|
QLabel *label_2;
|
||||||
|
QPushButton *pushButton_2;
|
||||||
|
QVBoxLayout *verticalLayout;
|
||||||
|
QPushButton *pushButton;
|
||||||
|
QPushButton *pushButton_3;
|
||||||
|
QPushButton *pushButton_4;
|
||||||
|
QPushButton *pushButton_5;
|
||||||
|
QMenuBar *menubar;
|
||||||
|
QStatusBar *statusbar;
|
||||||
|
|
||||||
|
void setupUi(QMainWindow *MainWindow)
|
||||||
|
{
|
||||||
|
if (MainWindow->objectName().isEmpty())
|
||||||
|
MainWindow->setObjectName("MainWindow");
|
||||||
|
MainWindow->resize(613, 480);
|
||||||
|
centralwidget = new QWidget(MainWindow);
|
||||||
|
centralwidget->setObjectName("centralwidget");
|
||||||
|
verticalLayout_4 = new QVBoxLayout(centralwidget);
|
||||||
|
verticalLayout_4->setObjectName("verticalLayout_4");
|
||||||
|
label = new QLabel(centralwidget);
|
||||||
|
label->setObjectName("label");
|
||||||
|
label->setMaximumSize(QSize(16777215, 60));
|
||||||
|
label->setStyleSheet(QString::fromUtf8("font: 30pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";"));
|
||||||
|
|
||||||
|
verticalLayout_4->addWidget(label);
|
||||||
|
|
||||||
|
horizontalLayout = new QHBoxLayout();
|
||||||
|
horizontalLayout->setObjectName("horizontalLayout");
|
||||||
|
verticalLayout_2 = new QVBoxLayout();
|
||||||
|
verticalLayout_2->setObjectName("verticalLayout_2");
|
||||||
|
label_2 = new QLabel(centralwidget);
|
||||||
|
label_2->setObjectName("label_2");
|
||||||
|
label_2->setStyleSheet(QString::fromUtf8("border-image: url(:/Desktop/8eea737026dbeeae250de40cffd742b9.png);\n"
|
||||||
|
"border:2px groove gray;\n"
|
||||||
|
"border-radius:35px;\n"
|
||||||
|
"background-color: rgb(170, 255, 0);"));
|
||||||
|
|
||||||
|
verticalLayout_2->addWidget(label_2);
|
||||||
|
|
||||||
|
pushButton_2 = new QPushButton(centralwidget);
|
||||||
|
pushButton_2->setObjectName("pushButton_2");
|
||||||
|
pushButton_2->setMaximumSize(QSize(16777215, 70));
|
||||||
|
pushButton_2->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);border:2px groove gray;border-radius:30px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
verticalLayout_2->addWidget(pushButton_2);
|
||||||
|
|
||||||
|
|
||||||
|
horizontalLayout->addLayout(verticalLayout_2);
|
||||||
|
|
||||||
|
verticalLayout = new QVBoxLayout();
|
||||||
|
verticalLayout->setObjectName("verticalLayout");
|
||||||
|
pushButton = new QPushButton(centralwidget);
|
||||||
|
pushButton->setObjectName("pushButton");
|
||||||
|
pushButton->setMaximumSize(QSize(16777215, 70));
|
||||||
|
pushButton->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(255, 255, 0);;border:2px groove gray;border-radius:35px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}"));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(pushButton);
|
||||||
|
|
||||||
|
pushButton_3 = new QPushButton(centralwidget);
|
||||||
|
pushButton_3->setObjectName("pushButton_3");
|
||||||
|
pushButton_3->setMaximumSize(QSize(16777215, 70));
|
||||||
|
pushButton_3->setStyleSheet(QString::fromUtf8("QPushButton{background-color:rgb(255, 170, 0); ;border:2px groove gray;border-radius:35px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}"));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(pushButton_3);
|
||||||
|
|
||||||
|
pushButton_4 = new QPushButton(centralwidget);
|
||||||
|
pushButton_4->setObjectName("pushButton_4");
|
||||||
|
pushButton_4->setMaximumSize(QSize(16777215, 70));
|
||||||
|
pushButton_4->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(85, 255, 255);border:2px groove gray;border-radius:35px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}"));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(pushButton_4);
|
||||||
|
|
||||||
|
pushButton_5 = new QPushButton(centralwidget);
|
||||||
|
pushButton_5->setObjectName("pushButton_5");
|
||||||
|
pushButton_5->setMaximumSize(QSize(16777215, 70));
|
||||||
|
pushButton_5->setStyleSheet(QString::fromUtf8("QPushButton{background-color: rgb(0, 255, 127);border:2px groove gray;border-radius:35px;padding:2px 4px;border-style: outset;font: 16pt \"\345\215\216\346\226\207\347\220\245\347\217\200\";}\n"
|
||||||
|
"\n"
|
||||||
|
"QPushButton:hover{background-color:rgb(229, 241, 251); color: black;}\n"
|
||||||
|
"QPushButton:pressed{background-color:rgb(204, 228, 247);border-style: inset;}"));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(pushButton_5);
|
||||||
|
|
||||||
|
|
||||||
|
horizontalLayout->addLayout(verticalLayout);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_4->addLayout(horizontalLayout);
|
||||||
|
|
||||||
|
MainWindow->setCentralWidget(centralwidget);
|
||||||
|
menubar = new QMenuBar(MainWindow);
|
||||||
|
menubar->setObjectName("menubar");
|
||||||
|
menubar->setGeometry(QRect(0, 0, 613, 18));
|
||||||
|
MainWindow->setMenuBar(menubar);
|
||||||
|
statusbar = new QStatusBar(MainWindow);
|
||||||
|
statusbar->setObjectName("statusbar");
|
||||||
|
MainWindow->setStatusBar(statusbar);
|
||||||
|
|
||||||
|
retranslateUi(MainWindow);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(MainWindow);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QMainWindow *MainWindow)
|
||||||
|
{
|
||||||
|
MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "YANG Health-Peotection", nullptr));
|
||||||
|
label->setText(QCoreApplication::translate("MainWindow", "<html><head/><body><p align=\"center\">Health-Protection-QT6\351\207\215\346\236\204\347\211\210</p></body></html>", nullptr));
|
||||||
|
label_2->setText(QString());
|
||||||
|
pushButton_2->setText(QCoreApplication::translate("MainWindow", "\350\256\276\347\275\256", nullptr));
|
||||||
|
pushButton->setText(QCoreApplication::translate("MainWindow", "\350\207\252\345\212\250\346\222\255\346\212\245", nullptr));
|
||||||
|
pushButton_3->setText(QCoreApplication::translate("MainWindow", "\346\212\244\347\234\274\345\212\251\346\211\213", nullptr));
|
||||||
|
pushButton_4->setText(QCoreApplication::translate("MainWindow", "\345\201\245\345\272\267\345\256\210\346\212\244", nullptr));
|
||||||
|
pushButton_5->setText(QCoreApplication::translate("MainWindow", "\345\256\232\346\227\266\345\205\263\346\234\272", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MainWindow: public Ui_MainWindow {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_MAINWINDOW_H
|
Loading…
Reference in New Issue
Block a user