准备整理代码
|
@ -1,37 +1,37 @@
|
||||||
|
//
|
||||||
|
// Created by 孙羽 on 2023/07/27.
|
||||||
//
|
//
|
||||||
// Created by 孙羽 on 2023/07/27.
|
//说明:没有注释的项请勿修改
|
||||||
//
|
|
||||||
//说明:没有注释的项请勿修改
|
|
||||||
#ifndef OFFICEASSISTANT_CONFIG_H
|
#ifndef OFFICEASSISTANT_CONFIG_H
|
||||||
#define OFFICEASSISTANT_CONFIG_H
|
#define OFFICEASSISTANT_CONFIG_H
|
||||||
#define CONFIG_URL "http://softapi.s103.y01.cn/addons/Kmdsoft/Index/config" //获取导航栏信息的地址
|
#define CONFIG_URL "http://softapi.s103.y01.cn/addons/Kmdsoft/Index/config" //获取导航栏信息的地址
|
||||||
#define OP_URL "http://softapi.s103.y01.cn/addons/Kmdsoft/Index/op" //上传是否设置开机启动、是否建立桌面快捷方式的地址
|
#define OP_URL "http://softapi.s103.y01.cn/addons/Kmdsoft/Index/op" //上传是否设置开机启动、是否建立桌面快捷方式的地址
|
||||||
#define DEVICE_URL "http://softapi.s103.y01.cn/addons/Kmdsoft/Index/device" //上传设备信息的地址
|
#define DEVICE_URL "http://softapi.s103.y01.cn/addons/Kmdsoft/Index/device" //上传设备信息的地址
|
||||||
#define WECHAT_URL " http://softapi.s103.y01.cn/addons/Kmdsoft/Wxdk/open"
|
#define WECHAT_URL " http://softapi.s103.y01.cn/addons/Kmdsoft/Wxdk/open"
|
||||||
#define BASE_URL "http://softapi.s103.y01.cn/" //域名
|
#define BASE_URL "http://softapi.s103.y01.cn/" //域名
|
||||||
#define DEFAULT_FILE "/config/config.kmd" //默认配置文件位置
|
#define DEFAULT_FILE "/config/config.kmd" //默认配置文件位置
|
||||||
#define DEFAULT_NAVBAR_FILLE "/config/default_navbar.kmd"
|
#define DEFAULT_NAVBAR_FILLE "/config/default_navbar.kmd"
|
||||||
#define KEY "3b046cfe4a2a3e62141a4840f2006210a3224e3615312bef6e19f4983921abe0" //Key
|
#define KEY "3b046cfe4a2a3e62141a4840f2006210a3224e3615312bef6e19f4983921abe0" //Key
|
||||||
#define NAME "办公助手" //中文名
|
#define NAME "办公助手" //中文名
|
||||||
#define LOGO_TITLEBAR "/images/icon/logo_navbar.png" //标题栏图标
|
#define LOGO_TITLEBAR "/images/logo_titlebar.png" //标题栏图标
|
||||||
#define ENG_NAME "OfficeAssistant" //英文名
|
#define ENG_NAME "OfficeAssistant" //英文名
|
||||||
#define LENG_NAME L"OfficeAssistant" //英文名(宽字符)
|
#define LENG_NAME L"OfficeAssistant" //英文名(宽字符)
|
||||||
#define ADD_AUTOSTART 1
|
#define ADD_AUTOSTART 1
|
||||||
#define ADD_SHORTCUT 2
|
#define ADD_SHORTCUT 2
|
||||||
#define VERSION "1.0.0" //软件版本
|
#define VERSION "1.0.0" //软件版本
|
||||||
#define RELEASE "20230801" //Release
|
#define RELEASE "20230801" //Release
|
||||||
#define SOFTWARE_URL "http://softapi.s103.y01.cn/addons/Kmdsoft/App/update/type/add"
|
#define SOFTWARE_URL "http://softapi.s103.y01.cn/addons/Kmdsoft/App/update/type/add"
|
||||||
#define DEFAULT_BACKGROUND_COLOR "#333332" //默认背景色,若从服务器读不到即使用这个
|
#define DEFAULT_BACKGROUND_COLOR "#333332" //默认背景色,若从服务器读不到即使用这个
|
||||||
#define DEFAULT_COLOR "#3399FF" //
|
#define DEFAULT_COLOR "#3399FF" //
|
||||||
#define DEFAULT_TEXT_COLOR "#FFFFFF" //默认文字颜色
|
#define DEFAULT_TEXT_COLOR "#FFFFFF" //默认文字颜色
|
||||||
#define DEFAULT_COVER_COLOR "#0033FF" //鼠标指向后变成的颜色,也是“添加应用”等几个按钮的默认颜色
|
#define DEFAULT_COVER_COLOR "#0033FF" //鼠标指向后变成的颜色,也是“添加应用”等几个按钮的默认颜色
|
||||||
#define DEFAULT_IMAGE "/images/svg/default.svg" //默认图标
|
#define DEFAULT_IMAGE "/images/svg/default.svg" //默认图标
|
||||||
#define DEFAULT_SVG_PATH "/images/svg/"
|
#define DEFAULT_SVG_PATH "/images/svg/"
|
||||||
#define DEFAULT_LOGO "/images/logo.png" //logo路径
|
#define DEFAULT_LOGO "/images/logo.png" //logo路径
|
||||||
#define TITLE " " //标题栏
|
#define TITLE " " //标题栏
|
||||||
#define TEXT_SIZE 7 //字体大小。不是所有字体受此项控制
|
#define TEXT_SIZE 7 //字体大小。不是所有字体受此项控制
|
||||||
#define TEXT_SIZE_BIG 10
|
#define TEXT_SIZE_BIG 10
|
||||||
//分类
|
//分类
|
||||||
#define ALL 1
|
#define ALL 1
|
||||||
#define ELITE 2
|
#define ELITE 2
|
||||||
#define SOFT 3
|
#define SOFT 3
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//
|
//
|
||||||
// Created by HW on 2023/07/26.
|
// Created by HW on 2023/07/26.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ NavBar::NavBar(MainScreen *mainScreen,QWidget *parent) :
|
||||||
layout2 = new QHBoxLayout;
|
layout2 = new QHBoxLayout;
|
||||||
layout_right = new QHBoxLayout;
|
layout_right = new QHBoxLayout;
|
||||||
layout_left = new QHBoxLayout;
|
layout_left = new QHBoxLayout;
|
||||||
|
getLogoFromInternet(&config_response);
|
||||||
logo_label = new QLabel(this);
|
logo_label = new QLabel(this);
|
||||||
logo_label->setAttribute(Qt::WA_TranslucentBackground);
|
logo_label->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
//*logo = logo->scaled(this->width() / (5 / scale), this->height());
|
//*logo = logo->scaled(this->width() / (5 / scale), this->height());
|
||||||
|
@ -138,9 +139,7 @@ void NavBar::resizeEvent(QResizeEvent *event) {
|
||||||
}
|
}
|
||||||
logo_label->setMaximumSize(event->size().width() / 5, event->size().height());
|
logo_label->setMaximumSize(event->size().width() / 5, event->size().height());
|
||||||
}
|
}
|
||||||
/*void NavBar::getLogoFromInternet(ConfigResponse *configResponse) {
|
void NavBar::getLogoFromInternet(ConfigResponse *configResponse) {
|
||||||
qColor.setNamedColor(configResponse->basic.backgroud_color);
|
|
||||||
|
|
||||||
QUrl url_logo(configResponse->basic.logo_url);
|
QUrl url_logo(configResponse->basic.logo_url);
|
||||||
QNetworkRequest *request_logo = new QNetworkRequest(url_logo);
|
QNetworkRequest *request_logo = new QNetworkRequest(url_logo);
|
||||||
manager = new QNetworkAccessManager;
|
manager = new QNetworkAccessManager;
|
||||||
|
@ -156,17 +155,17 @@ void NavBar::resizeEvent(QResizeEvent *event) {
|
||||||
reply->close();
|
reply->close();
|
||||||
if (downloadSuccess == true) {
|
if (downloadSuccess == true) {
|
||||||
*buffer = reply->readAll();
|
*buffer = reply->readAll();
|
||||||
logo = new ;
|
QFile logo(QApplication::applicationDirPath() + DEFAULT_LOGO);
|
||||||
logo->loadFromData(*buffer);
|
if (logo.open(QIODevice::WriteOnly)) {
|
||||||
|
logo.write(*buffer);
|
||||||
|
logo.close();
|
||||||
|
}
|
||||||
buffer->clear();
|
buffer->clear();
|
||||||
}else
|
|
||||||
{
|
|
||||||
getLogoFromLocal();
|
|
||||||
}
|
}
|
||||||
delete manager;
|
delete manager;
|
||||||
manager = nullptr;
|
manager = nullptr;
|
||||||
|
|
||||||
}*/
|
}
|
||||||
void NavBar::storeToBuffer() {
|
void NavBar::storeToBuffer() {
|
||||||
buffer = new QByteArray;
|
buffer = new QByteArray;
|
||||||
|
|
||||||
|
@ -182,7 +181,7 @@ void NavBar::cancelDownload() {
|
||||||
QString dir = QApplication::applicationDirPath();
|
QString dir = QApplication::applicationDirPath();
|
||||||
QFile file(dir + DEFAULT_FILE);
|
QFile file(dir + DEFAULT_FILE);
|
||||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
QMessageBox::warning(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("无法打开配置文件"));
|
QMessageBox::warning(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("无法打开配置文件"));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
buffer->clear();
|
buffer->clear();
|
||||||
|
@ -199,7 +198,7 @@ void NavBar::cancelDownload() {
|
||||||
QJsonArray *array = new QJsonArray;
|
QJsonArray *array = new QJsonArray;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QMessageBox::warning(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("配置文件损坏"));
|
QMessageBox::warning(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("配置文件损坏"));
|
||||||
delete obj_root;
|
delete obj_root;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//
|
//
|
||||||
// Created by HW on 2023/07/26.
|
// Created by HW on 2023/07/26.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@ protected:
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
|
|
||||||
|
void getLogoFromInternet(ConfigResponse* configResponse);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::NavBar *ui;
|
Ui::NavBar *ui;
|
||||||
|
@ -52,7 +54,6 @@ private:
|
||||||
QPixmap *logo;
|
QPixmap *logo;
|
||||||
QLabel *logo_label;
|
QLabel *logo_label;
|
||||||
bool downloadSuccess=true;
|
bool downloadSuccess=true;
|
||||||
//void getLogoFromInternet(ConfigResponse *configResponse);
|
|
||||||
//void getLogoFromLocal();
|
//void getLogoFromLocal();
|
||||||
MainScreen *mainScreen;
|
MainScreen *mainScreen;
|
||||||
QHBoxLayout *layout_left;
|
QHBoxLayout *layout_left;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//
|
//
|
||||||
// Created by HW on 2023/07/27.
|
// Created by HW on 2023/07/27.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -31,11 +31,11 @@
|
||||||
#pragma comment(lib, "Qt5Network.lib")
|
#pragma comment(lib, "Qt5Network.lib")
|
||||||
#endif
|
#endif
|
||||||
#pragma comment(lib,"comsuppw.lib")
|
#pragma comment(lib,"comsuppw.lib")
|
||||||
//读取注册表获取MachineUUID
|
//读取注册表获取MachineUUID
|
||||||
bool IsWin11AndLater()
|
bool IsWin11AndLater()
|
||||||
{
|
{
|
||||||
|
|
||||||
//Windows 10 从内部版本 10240 开始,以内部版本 19044 结束。Windows 11 从内部版本 22000 开始,那么:
|
//Windows 10 从内部版本 10240 开始,以内部版本 19044 结束。Windows 11 从内部版本 22000 开始,那么:
|
||||||
//Environment.OSVersion.Version.Build >= 22000;
|
//Environment.OSVersion.Version.Build >= 22000;
|
||||||
NTSTATUS(WINAPI * RtlGetVersion)(LPOSVERSIONINFOEXW);
|
NTSTATUS(WINAPI * RtlGetVersion)(LPOSVERSIONINFOEXW);
|
||||||
OSVERSIONINFOEXW osInfo;
|
OSVERSIONINFOEXW osInfo;
|
||||||
|
@ -54,40 +54,40 @@ RequestBodyBase::RequestBodyBase(){
|
||||||
wchar_t unix_time[65]={0};
|
wchar_t unix_time[65]={0};
|
||||||
wsprintf(unix_time,L"%ld",std::time(0));
|
wsprintf(unix_time,L"%ld",std::time(0));
|
||||||
QString request_id=QString::fromWCharArray(unix_time);
|
QString request_id=QString::fromWCharArray(unix_time);
|
||||||
//打开配置文件
|
//打开配置文件
|
||||||
QString dir=QApplication::applicationDirPath();
|
QString dir=QApplication::applicationDirPath();
|
||||||
QFile *infFile=new QFile(dir+"/config/information.kmd");
|
QFile *infFile=new QFile(dir+"/config/information.kmd");
|
||||||
if(!infFile->open(QIODevice::ReadOnly|QIODevice::Text)){
|
if(!infFile->open(QIODevice::ReadOnly|QIODevice::Text)){
|
||||||
QMessageBox::critical(nullptr,QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("无法打开配置文件"));
|
QMessageBox::critical(nullptr,QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("无法打开配置文件"));
|
||||||
delete infFile;
|
delete infFile;
|
||||||
exit_manager.exit(1);
|
exit_manager.exit(1);
|
||||||
}
|
}
|
||||||
//读取配置文件
|
//读取配置文件
|
||||||
QByteArray bytes;
|
QByteArray bytes;
|
||||||
bytes=infFile->readAll();
|
bytes=infFile->readAll();
|
||||||
infFile->close();
|
infFile->close();
|
||||||
delete infFile;
|
delete infFile;
|
||||||
//转化为json
|
//转化为json
|
||||||
qJsonDocument=QJsonDocument::fromJson(bytes);
|
qJsonDocument=QJsonDocument::fromJson(bytes);
|
||||||
if(qJsonDocument.isObject()){
|
if(qJsonDocument.isObject()){
|
||||||
//读取数据,写入对应字段
|
//读取数据,写入对应字段
|
||||||
QJsonObject obj_root=qJsonDocument.object();
|
QJsonObject obj_root=qJsonDocument.object();
|
||||||
if(obj_root.value("product")==QJsonValue::Undefined){
|
if(obj_root.value("product")==QJsonValue::Undefined){
|
||||||
QMessageBox::critical(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("配置文件损坏"));
|
QMessageBox::critical(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("配置文件损坏"));
|
||||||
exit_manager.exit(1);
|
exit_manager.exit(1);
|
||||||
}
|
}
|
||||||
product=obj_root.value("product").toString();
|
product=obj_root.value("product").toString();
|
||||||
if(obj_root.value("partner_id")==QJsonValue::Undefined){
|
if(obj_root.value("partner_id")==QJsonValue::Undefined){
|
||||||
QMessageBox::critical(nullptr , QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("配置文件损坏"));
|
QMessageBox::critical(nullptr , QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("配置文件损坏"));
|
||||||
exit_manager.exit(1);
|
exit_manager.exit(1);
|
||||||
}
|
}
|
||||||
parter_id=obj_root.value("partner_id").toString();
|
parter_id=obj_root.value("partner_id").toString();
|
||||||
}else{
|
}else{
|
||||||
//处理错误
|
//处理错误
|
||||||
QMessageBox::critical(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("配置文件损坏"));
|
QMessageBox::critical(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("配置文件损坏"));
|
||||||
exit_manager.exit(1);
|
exit_manager.exit(1);
|
||||||
}
|
}
|
||||||
//获取操作系统版本
|
//获取操作系统版本
|
||||||
this->os="Windows";
|
this->os="Windows";
|
||||||
OSVERSIONINFOEXW os;
|
OSVERSIONINFOEXW os;
|
||||||
os.dwOSVersionInfoSize=sizeof(os);
|
os.dwOSVersionInfoSize=sizeof(os);
|
||||||
|
@ -96,12 +96,12 @@ RequestBodyBase::RequestBodyBase(){
|
||||||
*(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandleA("ntdll"), "RtlGetVersion");
|
*(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandleA("ntdll"), "RtlGetVersion");
|
||||||
if (RtlGetVersion != nullptr) {
|
if (RtlGetVersion != nullptr) {
|
||||||
RtlGetVersion(&os);
|
RtlGetVersion(&os);
|
||||||
switch (os.dwMajorVersion) {//主版本号
|
switch (os.dwMajorVersion) {//主版本号
|
||||||
case 5: //不兼容Windows 2000,因此5.x一定是Windows XP
|
case 5: //不兼容Windows 2000,因此5.x一定是Windows XP
|
||||||
os_version = "Windows XP";
|
os_version = "Windows XP";
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
switch (os.dwMinorVersion) { //次版本号
|
switch (os.dwMinorVersion) { //次版本号
|
||||||
case 0:
|
case 0:
|
||||||
os_version = "Windows Vista or Windows Server 2008";
|
os_version = "Windows Vista or Windows Server 2008";
|
||||||
break;
|
break;
|
||||||
|
@ -117,7 +117,7 @@ RequestBodyBase::RequestBodyBase(){
|
||||||
default:
|
default:
|
||||||
os_version = "Unknown";
|
os_version = "Unknown";
|
||||||
}
|
}
|
||||||
case 10: //这几个系统都是10.0
|
case 10: //这几个系统都是10.0
|
||||||
if (IsWin11AndLater()) {
|
if (IsWin11AndLater()) {
|
||||||
os_version = "Windows 11 or Windows Server 2022";
|
os_version = "Windows 11 or Windows Server 2022";
|
||||||
}
|
}
|
||||||
|
@ -135,10 +135,10 @@ RequestBodyBase::RequestBodyBase(){
|
||||||
|
|
||||||
this->release = RELEASE;
|
this->release = RELEASE;
|
||||||
this->version = VERSION;
|
this->version = VERSION;
|
||||||
//读取MachineGUID并取MD5作为device_id
|
//读取MachineGUID并取MD5作为device_id
|
||||||
QByteArray hash = QCryptographicHash::hash(getMachineGUID().toUtf8(), QCryptographicHash::Md5);
|
QByteArray hash = QCryptographicHash::hash(getMachineGUID().toUtf8(), QCryptographicHash::Md5);
|
||||||
device_id = hash.toHex();
|
device_id = hash.toHex();
|
||||||
//加入json序列
|
//加入json序列
|
||||||
QJsonValue value = device_id;
|
QJsonValue value = device_id;
|
||||||
QJsonObject obj_root = qJsonDocument.object();
|
QJsonObject obj_root = qJsonDocument.object();
|
||||||
obj_root.insert("device_id", value);
|
obj_root.insert("device_id", value);
|
||||||
|
@ -156,7 +156,7 @@ RequestBodyBase::RequestBodyBase(){
|
||||||
QJsonValue sign_json(sign);
|
QJsonValue sign_json(sign);
|
||||||
QJsonValue requestId_json=QJsonValue(request_id);
|
QJsonValue requestId_json=QJsonValue(request_id);
|
||||||
obj_root=qJsonDocument.object();
|
obj_root=qJsonDocument.object();
|
||||||
//插入request_id
|
//插入request_id
|
||||||
obj_root.insert(QString::fromLocal8Bit("request_id"),requestId_json);
|
obj_root.insert(QString::fromLocal8Bit("request_id"),requestId_json);
|
||||||
obj_root.insert(QString::fromLocal8Bit("os"), os_json);
|
obj_root.insert(QString::fromLocal8Bit("os"), os_json);
|
||||||
obj_root.insert(QString::fromLocal8Bit("os_version"), os_version_json);
|
obj_root.insert(QString::fromLocal8Bit("os_version"), os_version_json);
|
||||||
|
@ -197,20 +197,20 @@ void ConfigRequest::sendRequest(ConfigResponse *configResponse) {
|
||||||
|
|
||||||
QNetworkAccessManager *httpMgr = new QNetworkAccessManager();
|
QNetworkAccessManager *httpMgr = new QNetworkAccessManager();
|
||||||
QNetworkRequest requestInfo;
|
QNetworkRequest requestInfo;
|
||||||
//HTTP请求
|
//HTTP请求
|
||||||
//请求头
|
//请求头
|
||||||
QString url = CONFIG_URL;
|
QString url = CONFIG_URL;
|
||||||
requestInfo.setUrl(QUrl(CONFIG_URL));
|
requestInfo.setUrl(QUrl(CONFIG_URL));
|
||||||
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/json"));
|
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/json"));
|
||||||
//保存响应的变量
|
//保存响应的变量
|
||||||
reply = httpMgr->post(requestInfo,qJsonDocument.toJson());
|
reply = httpMgr->post(requestInfo,qJsonDocument.toJson());
|
||||||
qDebug() << qJsonDocument.toJson();
|
qDebug() << qJsonDocument.toJson();
|
||||||
//开启一个循环,直到超时或者获取到数据为止
|
//开启一个循环,直到超时或者获取到数据为止
|
||||||
connect(reply,&QNetworkReply::finished, &eventLoop, &QEventLoop::quit);
|
connect(reply,&QNetworkReply::finished, &eventLoop, &QEventLoop::quit);
|
||||||
//设置定时器防止超时
|
//设置定时器防止超时
|
||||||
connect(timer,&QTimer::timeout,this,&ConfigRequest::cancelDownload);
|
connect(timer,&QTimer::timeout,this,&ConfigRequest::cancelDownload);
|
||||||
timer->start(5000);
|
timer->start(5000);
|
||||||
//启动循环
|
//启动循环
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
timer->stop();
|
timer->stop();
|
||||||
//delete httpMgr;
|
//delete httpMgr;
|
||||||
|
@ -219,11 +219,11 @@ void ConfigRequest::sendRequest(ConfigResponse *configResponse) {
|
||||||
configResponse->succeed = false;
|
configResponse->succeed = false;
|
||||||
//memset(configResponse,0,sizeof(*configResponse));
|
//memset(configResponse,0,sizeof(*configResponse));
|
||||||
auto error = reply->error();
|
auto error = reply->error();
|
||||||
//如果没有错误
|
//如果没有错误
|
||||||
if(reply->error() == QNetworkReply::NoError) {
|
if(reply->error() == QNetworkReply::NoError) {
|
||||||
buffer = reply->readAll();
|
buffer = reply->readAll();
|
||||||
}else{
|
}else{
|
||||||
//如果有错误
|
//如果有错误
|
||||||
configResponse->succeed=false;
|
configResponse->succeed=false;
|
||||||
//delete reply;
|
//delete reply;
|
||||||
delete timer;
|
delete timer;
|
||||||
|
@ -232,13 +232,15 @@ void ConfigRequest::sendRequest(ConfigResponse *configResponse) {
|
||||||
}
|
}
|
||||||
//qDebug() << result.toJson();
|
//qDebug() << result.toJson();
|
||||||
result = QJsonDocument::fromJson(buffer);
|
result = QJsonDocument::fromJson(buffer);
|
||||||
//如果数据完整
|
//如果数据完整
|
||||||
if(result.isObject()){
|
if(result.isObject()){
|
||||||
QJsonObject obj_root=result.object();
|
QJsonObject obj_root=result.object();
|
||||||
QJsonArray array;
|
QJsonArray array;
|
||||||
|
|
||||||
array = obj_root.value("data").toObject().value("menu").toArray();
|
array = obj_root.value("data").toObject().value("menu").toArray();
|
||||||
QJsonObject obj_basic = obj_root.value("data").toObject().value("basic").toObject();
|
QJsonObject obj_data = obj_root.value("data").toObject();
|
||||||
|
QString basic_str= obj_data.value("basic").toString();
|
||||||
|
QJsonObject obj_basic=QJsonDocument::fromJson(basic_str.toUtf8()).object();
|
||||||
configResponse->basic.logo_url = obj_basic.value("logo").toString();
|
configResponse->basic.logo_url = obj_basic.value("logo").toString();
|
||||||
configResponse->basic.device_id = obj_basic.value("device_id").toString();
|
configResponse->basic.device_id = obj_basic.value("device_id").toString();
|
||||||
configResponse->basic.dev_id = obj_basic.value("dev_id").toString();
|
configResponse->basic.dev_id = obj_basic.value("dev_id").toString();
|
||||||
|
@ -253,7 +255,7 @@ void ConfigRequest::sendRequest(ConfigResponse *configResponse) {
|
||||||
button.img=object.value("img").toString();
|
button.img=object.value("img").toString();
|
||||||
button.orig_name= object.value("orig_name").toString();
|
button.orig_name= object.value("orig_name").toString();
|
||||||
// button.img_cover=object.value("img_cover").toString();
|
// button.img_cover=object.value("img_cover").toString();
|
||||||
button.title=object.value("title").toString();
|
button.title=object.value("name").toString();
|
||||||
button.categroy_id = object.value("category_id").toString();
|
button.categroy_id = object.value("category_id").toString();
|
||||||
button.op = object.value("op").toString();
|
button.op = object.value("op").toString();
|
||||||
button.func=object.value("func").toString();
|
button.func=object.value("func").toString();
|
||||||
|
@ -269,7 +271,7 @@ void ConfigRequest::sendRequest(ConfigResponse *configResponse) {
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//数据不完整
|
//数据不完整
|
||||||
configResponse->succeed=false;
|
configResponse->succeed=false;
|
||||||
//delete reply;
|
//delete reply;
|
||||||
delete timer;
|
delete timer;
|
||||||
|
@ -288,18 +290,18 @@ void RequestBodyBase::sendRequest() {
|
||||||
timer = new QTimer(this);
|
timer = new QTimer(this);
|
||||||
QNetworkAccessManager *httpMgr = new QNetworkAccessManager();
|
QNetworkAccessManager *httpMgr = new QNetworkAccessManager();
|
||||||
QNetworkRequest requestInfo;
|
QNetworkRequest requestInfo;
|
||||||
//HTTP请求
|
//HTTP请求
|
||||||
//请求头
|
//请求头
|
||||||
requestInfo.setUrl(QUrl(OP_URL));
|
requestInfo.setUrl(QUrl(OP_URL));
|
||||||
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/json"));
|
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/json"));
|
||||||
//保存响应的变量
|
//保存响应的变量
|
||||||
reply = httpMgr->post(requestInfo,qJsonDocument.toJson());
|
reply = httpMgr->post(requestInfo,qJsonDocument.toJson());
|
||||||
//开启一个循环,直到超时或者获取到数据为止
|
//开启一个循环,直到超时或者获取到数据为止
|
||||||
connect(reply,&QNetworkReply::finished, this, &RequestBodyBase::cancelDownload);
|
connect(reply,&QNetworkReply::finished, this, &RequestBodyBase::cancelDownload);
|
||||||
//设置定时器防止超时
|
//设置定时器防止超时
|
||||||
connect(timer,&QTimer::timeout,&eventLoop,&QEventLoop::quit);
|
connect(timer,&QTimer::timeout,&eventLoop,&QEventLoop::quit);
|
||||||
timer->start(5000);
|
timer->start(5000);
|
||||||
//启动循环
|
//启动循环
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
delete timer;
|
delete timer;
|
||||||
delete httpMgr;
|
delete httpMgr;
|
||||||
|
@ -310,15 +312,15 @@ void RequestBodyBase::sendRequest() {
|
||||||
DeviceRequest::DeviceRequest() : RequestBodyBase() {
|
DeviceRequest::DeviceRequest() : RequestBodyBase() {
|
||||||
//CPU
|
//CPU
|
||||||
QString cpu = QSysInfo::currentCpuArchitecture();
|
QString cpu = QSysInfo::currentCpuArchitecture();
|
||||||
//内存大小
|
//内存大小
|
||||||
MEMORYSTATUSEX status;
|
MEMORYSTATUSEX status;
|
||||||
status.dwLength = sizeof(status);
|
status.dwLength = sizeof(status);
|
||||||
GlobalMemoryStatusEx(&status);
|
GlobalMemoryStatusEx(&status);
|
||||||
int ram = status.ullTotalPhys / 1024 / 1024;
|
int ram = status.ullTotalPhys / 1024 / 1024;
|
||||||
//硬盘大小
|
//硬盘大小
|
||||||
QStorageInfo storage = QStorageInfo::root();
|
QStorageInfo storage = QStorageInfo::root();
|
||||||
int disk = storage.bytesTotal() / static_cast<qulonglong>(1024 * 1024 * 1024);
|
int disk = storage.bytesTotal() / static_cast<qulonglong>(1024 * 1024 * 1024);
|
||||||
//显卡型号
|
//显卡型号
|
||||||
QStringList gpus;
|
QStringList gpus;
|
||||||
BOOL success;
|
BOOL success;
|
||||||
DWORD deviceIndex = 0;
|
DWORD deviceIndex = 0;
|
||||||
|
@ -346,9 +348,9 @@ DeviceRequest::DeviceRequest() : RequestBodyBase() {
|
||||||
deviceIndex++;
|
deviceIndex++;
|
||||||
displayDevice.cb = sizeof(displayDevice);
|
displayDevice.cb = sizeof(displayDevice);
|
||||||
}
|
}
|
||||||
//主板型号
|
//主板型号
|
||||||
QString motherboard = QSysInfo::prettyProductName();
|
QString motherboard = QSysInfo::prettyProductName();
|
||||||
//WMI获取网卡型号
|
//WMI获取网卡型号
|
||||||
HRESULT hr = CoInitializeEx(0, COINIT_MULTITHREADED);
|
HRESULT hr = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
std::cerr << "Failed to initialize COM library." << std::endl;
|
std::cerr << "Failed to initialize COM library." << std::endl;
|
||||||
|
@ -455,7 +457,7 @@ DeviceRequest::DeviceRequest() : RequestBodyBase() {
|
||||||
|
|
||||||
pClassObj->Release();
|
pClassObj->Release();
|
||||||
}
|
}
|
||||||
//WMI获取声卡型号
|
//WMI获取声卡型号
|
||||||
hr = pSvc->ExecQuery(
|
hr = pSvc->ExecQuery(
|
||||||
_bstr_t("WQL"),
|
_bstr_t("WQL"),
|
||||||
_bstr_t("SELECT * FROM Win32_SoundDevice"),
|
_bstr_t("SELECT * FROM Win32_SoundDevice"),
|
||||||
|
@ -534,8 +536,8 @@ DeviceRequest::DeviceRequest() : RequestBodyBase() {
|
||||||
DISPLAY_DEVICE d = { sizeof(DISPLAY_DEVICE) };
|
DISPLAY_DEVICE d = { sizeof(DISPLAY_DEVICE) };
|
||||||
::EnumDisplayDevices(NULL, 0, &d, 0);
|
::EnumDisplayDevices(NULL, 0, &d, 0);
|
||||||
QString monitor=QString::fromWCharArray(d.DeviceString, wcslen(d.DeviceString));
|
QString monitor=QString::fromWCharArray(d.DeviceString, wcslen(d.DeviceString));
|
||||||
//发送
|
//发送
|
||||||
//构造JSON
|
//构造JSON
|
||||||
QJsonDocument *device=new QJsonDocument;
|
QJsonDocument *device=new QJsonDocument;
|
||||||
QJsonObject *object=new QJsonObject;
|
QJsonObject *object=new QJsonObject;
|
||||||
object->insert("CPU",QJsonValue(cpu));
|
object->insert("CPU",QJsonValue(cpu));
|
||||||
|
@ -576,18 +578,18 @@ DeviceRequest::DeviceRequest() : RequestBodyBase() {
|
||||||
timer = new QTimer(this);
|
timer = new QTimer(this);
|
||||||
QNetworkAccessManager *httpMgr = new QNetworkAccessManager();
|
QNetworkAccessManager *httpMgr = new QNetworkAccessManager();
|
||||||
QNetworkRequest requestInfo;
|
QNetworkRequest requestInfo;
|
||||||
//HTTP请求
|
//HTTP请求
|
||||||
//请求头
|
//请求头
|
||||||
requestInfo.setUrl(QUrl(DEVICE_URL));
|
requestInfo.setUrl(QUrl(DEVICE_URL));
|
||||||
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/json"));
|
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("application/json"));
|
||||||
//保存响应的变量
|
//保存响应的变量
|
||||||
reply = httpMgr->post(requestInfo,qJsonDocument.toJson());
|
reply = httpMgr->post(requestInfo,qJsonDocument.toJson());
|
||||||
//开启一个循环,直到超时或者获取到数据为止
|
//开启一个循环,直到超时或者获取到数据为止
|
||||||
connect(reply,&QNetworkReply::finished, &eventLoop, &QEventLoop::quit);
|
connect(reply,&QNetworkReply::finished, &eventLoop, &QEventLoop::quit);
|
||||||
//设置定时器防止超时
|
//设置定时器防止超时
|
||||||
connect(timer,&QTimer::timeout,this,&DeviceRequest::cancelDownload);
|
connect(timer,&QTimer::timeout,this,&DeviceRequest::cancelDownload);
|
||||||
timer->start(5000);
|
timer->start(5000);
|
||||||
//启动循环
|
//启动循环
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
delete httpMgr;
|
delete httpMgr;
|
||||||
}
|
}
|
||||||
|
@ -596,8 +598,8 @@ bool SoftwareRequest::sendRequest(QHash<QString,QString>&startMenu, QHash<QStrin
|
||||||
timer = new QTimer(this);
|
timer = new QTimer(this);
|
||||||
QNetworkAccessManager* httpMgr = new QNetworkAccessManager();
|
QNetworkAccessManager* httpMgr = new QNetworkAccessManager();
|
||||||
QNetworkRequest requestInfo;
|
QNetworkRequest requestInfo;
|
||||||
//HTTP请求
|
//HTTP请求
|
||||||
//请求头
|
//请求头
|
||||||
QJsonArray array;
|
QJsonArray array;
|
||||||
for(auto record : *records)
|
for(auto record : *records)
|
||||||
{
|
{
|
||||||
|
@ -625,33 +627,33 @@ bool SoftwareRequest::sendRequest(QHash<QString,QString>&startMenu, QHash<QStrin
|
||||||
QString url = SOFTWARE_URL;
|
QString url = SOFTWARE_URL;
|
||||||
requestInfo.setUrl(url);
|
requestInfo.setUrl(url);
|
||||||
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/json"));
|
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/json"));
|
||||||
//保存响应的变量
|
//保存响应的变量
|
||||||
reply = httpMgr->post(requestInfo, qJsonDocument.toJson());
|
reply = httpMgr->post(requestInfo, qJsonDocument.toJson());
|
||||||
qDebug() << qJsonDocument.toJson();
|
qDebug() << qJsonDocument.toJson();
|
||||||
//开启一个循环,直到超时或者获取到数据为止
|
//开启一个循环,直到超时或者获取到数据为止
|
||||||
connect(reply, &QNetworkReply::finished, &eventLoop, &QEventLoop::quit);
|
connect(reply, &QNetworkReply::finished, &eventLoop, &QEventLoop::quit);
|
||||||
//设置定时器防止超时
|
//设置定时器防止超时
|
||||||
connect(timer, &QTimer::timeout, this, &SoftwareRequest::cancelDownload);
|
connect(timer, &QTimer::timeout, this, &SoftwareRequest::cancelDownload);
|
||||||
timer->start(5000);
|
timer->start(5000);
|
||||||
//启动循环
|
//启动循环
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
timer->stop();
|
timer->stop();
|
||||||
delete timer;
|
delete timer;
|
||||||
QJsonDocument result;
|
QJsonDocument result;
|
||||||
// auto error = reply->error();
|
// auto error = reply->error();
|
||||||
//如果没有错误
|
//如果没有错误
|
||||||
qDebug() << reply->error();
|
qDebug() << reply->error();
|
||||||
if (reply->error() == QNetworkReply::NoError) {
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
result = QJsonDocument::fromJson(reply->readAll());
|
result = QJsonDocument::fromJson(reply->readAll());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//如果有错误
|
//如果有错误
|
||||||
delete httpMgr;
|
delete httpMgr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//qDebug() << result.toJson();
|
//qDebug() << result.toJson();
|
||||||
|
|
||||||
//如果数据完整
|
//如果数据完整
|
||||||
if (result.isObject()) {
|
if (result.isObject()) {
|
||||||
QJsonObject obj_root2 = result.object();
|
QJsonObject obj_root2 = result.object();
|
||||||
QJsonArray array = obj_root2.value("data").toObject().value("menu").toArray();
|
QJsonArray array = obj_root2.value("data").toObject().value("menu").toArray();
|
||||||
|
@ -701,7 +703,7 @@ bool SoftwareRequest::sendRequest(QHash<QString,QString>&startMenu, QHash<QStrin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//数据不完整
|
//数据不完整
|
||||||
//delete reply;
|
//delete reply;
|
||||||
delete httpMgr;
|
delete httpMgr;
|
||||||
return false;
|
return false;
|
||||||
|
@ -718,18 +720,18 @@ QString OpenWeChatRequest::sendRequest(bool notuse)
|
||||||
timer = new QTimer(this);
|
timer = new QTimer(this);
|
||||||
QNetworkAccessManager* httpMgr = new QNetworkAccessManager();
|
QNetworkAccessManager* httpMgr = new QNetworkAccessManager();
|
||||||
QNetworkRequest requestInfo;
|
QNetworkRequest requestInfo;
|
||||||
//HTTP请求
|
//HTTP请求
|
||||||
//请求头
|
//请求头
|
||||||
requestInfo.setUrl(QUrl(WECHAT_URL));
|
requestInfo.setUrl(QUrl(WECHAT_URL));
|
||||||
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/json"));
|
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/json"));
|
||||||
//保存响应的变量
|
//保存响应的变量
|
||||||
reply = httpMgr->post(requestInfo, qJsonDocument.toJson());
|
reply = httpMgr->post(requestInfo, qJsonDocument.toJson());
|
||||||
//开启一个循环,直到超时或者获取到数据为止
|
//开启一个循环,直到超时或者获取到数据为止
|
||||||
connect(reply, &QNetworkReply::finished, this, &OpenWeChatRequest::cancelDownload);
|
connect(reply, &QNetworkReply::finished, this, &OpenWeChatRequest::cancelDownload);
|
||||||
//设置定时器防止超时
|
//设置定时器防止超时
|
||||||
connect(timer, &QTimer::timeout, &eventLoop, &QEventLoop::quit);
|
connect(timer, &QTimer::timeout, &eventLoop, &QEventLoop::quit);
|
||||||
timer->start(5000);
|
timer->start(5000);
|
||||||
//启动循环
|
//启动循环
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
timer->stop();
|
timer->stop();
|
||||||
QByteArray buffer = reply->readAll();
|
QByteArray buffer = reply->readAll();
|
||||||
|
@ -755,18 +757,18 @@ void OpRequest::sendRequest()
|
||||||
qJsonDocument.setObject(object);
|
qJsonDocument.setObject(object);
|
||||||
QNetworkAccessManager* httpMgr = new QNetworkAccessManager();
|
QNetworkAccessManager* httpMgr = new QNetworkAccessManager();
|
||||||
QNetworkRequest requestInfo;
|
QNetworkRequest requestInfo;
|
||||||
//HTTP请求
|
//HTTP请求
|
||||||
//请求头
|
//请求头
|
||||||
requestInfo.setUrl(QUrl(OP_URL));
|
requestInfo.setUrl(QUrl(OP_URL));
|
||||||
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/json"));
|
requestInfo.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/json"));
|
||||||
//保存响应的变量
|
//保存响应的变量
|
||||||
reply = httpMgr->post(requestInfo, qJsonDocument.toJson());
|
reply = httpMgr->post(requestInfo, qJsonDocument.toJson());
|
||||||
//开启一个循环,直到超时或者获取到数据为止
|
//开启一个循环,直到超时或者获取到数据为止
|
||||||
connect(reply, &QNetworkReply::finished, this, &OpRequest::cancelDownload);
|
connect(reply, &QNetworkReply::finished, this, &OpRequest::cancelDownload);
|
||||||
//设置定时器防止超时
|
//设置定时器防止超时
|
||||||
connect(timer, &QTimer::timeout, &eventLoop, &QEventLoop::quit);
|
connect(timer, &QTimer::timeout, &eventLoop, &QEventLoop::quit);
|
||||||
timer->start(5000);
|
timer->start(5000);
|
||||||
//启动循环
|
//启动循环
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
timer->stop();
|
timer->stop();
|
||||||
delete timer;
|
delete timer;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "sqlitehelper.h"
|
#include "sqlitehelper.h"
|
||||||
|
|
||||||
#include <complex.h>
|
#include <complex.h>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
@ -126,7 +126,7 @@ SQLiteHelper::SQLiteHelper(QObject *parent)
|
||||||
}
|
}
|
||||||
if (!db.open())
|
if (!db.open())
|
||||||
{
|
{
|
||||||
QMessageBox::critical(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("无法打开数据库"));
|
QMessageBox::critical(nullptr, QString::fromLocal8Bit("提示"), QString::fromLocal8Bit("无法打开数据库"));
|
||||||
exit_manager.exit(1);
|
exit_manager.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,9 +172,9 @@ bool SQLiteHelper::update_software()
|
||||||
path.remove(path.length() - 1, 1);
|
path.remove(path.length() - 1, 1);
|
||||||
records.insert(path, record);
|
records.insert(path, record);
|
||||||
}*/
|
}*/
|
||||||
//开始菜单中已安装软件列表
|
//开始菜单中已安装软件列表
|
||||||
WCHAR path[MAX_PATH];
|
WCHAR path[MAX_PATH];
|
||||||
HRESULT hr = SHGetFolderPathW(nullptr, CSIDL_COMMON_PROGRAMS, nullptr, 0, path);//获取ProgramData中开始菜单的路径
|
HRESULT hr = SHGetFolderPathW(nullptr, CSIDL_COMMON_PROGRAMS, nullptr, 0, path);//获取ProgramData中开始菜单的路径
|
||||||
std::wstring path_str(path);
|
std::wstring path_str(path);
|
||||||
getMenu(path_str, paths);
|
getMenu(path_str, paths);
|
||||||
|
|
||||||
|
@ -182,11 +182,11 @@ bool SQLiteHelper::update_software()
|
||||||
{
|
{
|
||||||
path[i] = 0;
|
path[i] = 0;
|
||||||
}
|
}
|
||||||
hr = SHGetFolderPathW(nullptr, CSIDL_PROGRAMS, nullptr, 0, path);//获取用户文件夹中开始菜单的路径
|
hr = SHGetFolderPathW(nullptr, CSIDL_PROGRAMS, nullptr, 0, path);//获取用户文件夹中开始菜单的路径
|
||||||
path_str.clear();
|
path_str.clear();
|
||||||
path_str = std::wstring(path);
|
path_str = std::wstring(path);
|
||||||
getMenu(path_str, paths);
|
getMenu(path_str, paths);
|
||||||
// 打开注册表中的已安装软件列表
|
// 打开注册表中的已安装软件列表
|
||||||
QHash<QString, Record> reg_records;
|
QHash<QString, Record> reg_records;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||||
|
@ -226,7 +226,7 @@ bool SQLiteHelper::update_software()
|
||||||
&cbSecurityDescriptor, // security descriptor
|
&cbSecurityDescriptor, // security descriptor
|
||||||
&ftLastWriteTime); // last write time
|
&ftLastWriteTime); // last write time
|
||||||
|
|
||||||
// 枚举该列表下所有子键
|
// 枚举该列表下所有子键
|
||||||
for (DWORD i = 0; i < cSubKeys; i++)
|
for (DWORD i = 0; i < cSubKeys; i++)
|
||||||
{
|
{
|
||||||
WCHAR szSubKey[MAX_PATH] = { 0 };
|
WCHAR szSubKey[MAX_PATH] = { 0 };
|
||||||
|
@ -234,7 +234,7 @@ bool SQLiteHelper::update_software()
|
||||||
if (RegEnumKeyExW(hKey, i, szSubKey, &dwSize, NULL, NULL, NULL, NULL)
|
if (RegEnumKeyExW(hKey, i, szSubKey, &dwSize, NULL, NULL, NULL, NULL)
|
||||||
== ERROR_SUCCESS)
|
== ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
// 读取软件属性值
|
// 读取软件属性值
|
||||||
HKEY hSubKey;
|
HKEY hSubKey;
|
||||||
if (RegOpenKeyExW(hKey, szSubKey, 0, KEY_READ | KEY_WOW64_64KEY, &hSubKey) == ERROR_SUCCESS)
|
if (RegOpenKeyExW(hKey, szSubKey, 0, KEY_READ | KEY_WOW64_64KEY, &hSubKey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@ bool SQLiteHelper::update_software()
|
||||||
WCHAR buffer[MAX_PATH] = { 0 };
|
WCHAR buffer[MAX_PATH] = { 0 };
|
||||||
DWORD buffer_num;
|
DWORD buffer_num;
|
||||||
dwSize = MAX_PATH * sizeof(WCHAR);
|
dwSize = MAX_PATH * sizeof(WCHAR);
|
||||||
//安装文件夹
|
//安装文件夹
|
||||||
if (RegQueryValueExW(hSubKey, L"InstallLocation", NULL, NULL,
|
if (RegQueryValueExW(hSubKey, L"InstallLocation", NULL, NULL,
|
||||||
(LPBYTE)szProductPath, &dwSize) != ERROR_SUCCESS)
|
(LPBYTE)szProductPath, &dwSize) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -251,7 +251,7 @@ bool SQLiteHelper::update_software()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
QString path = QString::fromWCharArray(szProductPath);
|
QString path = QString::fromWCharArray(szProductPath);
|
||||||
//软件名
|
//软件名
|
||||||
if (RegQueryValueExW(hSubKey, L"DisplayName", NULL, NULL,
|
if (RegQueryValueExW(hSubKey, L"DisplayName", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize) != ERROR_SUCCESS)
|
(LPBYTE)buffer, &dwSize) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -260,22 +260,22 @@ bool SQLiteHelper::update_software()
|
||||||
}
|
}
|
||||||
record.name = QString::fromWCharArray(buffer);
|
record.name = QString::fromWCharArray(buffer);
|
||||||
record.orig_name = QString::fromWCharArray(buffer);
|
record.orig_name = QString::fromWCharArray(buffer);
|
||||||
//图标
|
//图标
|
||||||
RegQueryValueExW(hSubKey, L"DisplayIcon", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"DisplayIcon", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize);
|
(LPBYTE)buffer, &dwSize);
|
||||||
record.logo = QString::fromWCharArray(buffer);
|
record.logo = QString::fromWCharArray(buffer);
|
||||||
//主版本号
|
//主版本号
|
||||||
RegQueryValueExW(hSubKey, L"VersionMajor", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"VersionMajor", NULL, NULL,
|
||||||
(LPBYTE)&buffer_num, &dwSize);
|
(LPBYTE)&buffer_num, &dwSize);
|
||||||
QString versionMajor = QString::number(buffer_num);
|
QString versionMajor = QString::number(buffer_num);
|
||||||
//次版本号
|
//次版本号
|
||||||
RegQueryValueExW(hSubKey, L"VersionMinor", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"VersionMinor", NULL, NULL,
|
||||||
(LPBYTE)&buffer_num, &dwSize);
|
(LPBYTE)&buffer_num, &dwSize);
|
||||||
QString versionMinor = QString::number(buffer_num);
|
QString versionMinor = QString::number(buffer_num);
|
||||||
//将主版本号和次版本号拼接在一起
|
//将主版本号和次版本号拼接在一起
|
||||||
QString version = versionMajor + "." + versionMinor;
|
QString version = versionMajor + "." + versionMinor;
|
||||||
record.version = version;
|
record.version = version;
|
||||||
//开发者
|
//开发者
|
||||||
RegQueryValueExW(hSubKey, L"Publisher", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"Publisher", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize);
|
(LPBYTE)buffer, &dwSize);
|
||||||
record.dev = QString::fromWCharArray(buffer);
|
record.dev = QString::fromWCharArray(buffer);
|
||||||
|
@ -336,7 +336,7 @@ bool SQLiteHelper::update_software()
|
||||||
&cbSecurityDescriptor, // security descriptor
|
&cbSecurityDescriptor, // security descriptor
|
||||||
&ftLastWriteTime); // last write time
|
&ftLastWriteTime); // last write time
|
||||||
|
|
||||||
// 枚举该列表下所有子键
|
// 枚举该列表下所有子键
|
||||||
for (DWORD i = 0; i < cSubKeys; i++)
|
for (DWORD i = 0; i < cSubKeys; i++)
|
||||||
{
|
{
|
||||||
WCHAR szSubKey[MAX_PATH] = { 0 };
|
WCHAR szSubKey[MAX_PATH] = { 0 };
|
||||||
|
@ -344,7 +344,7 @@ bool SQLiteHelper::update_software()
|
||||||
if (RegEnumKeyExW(hkey2, i, szSubKey, &dwSize, NULL, NULL, NULL, NULL)
|
if (RegEnumKeyExW(hkey2, i, szSubKey, &dwSize, NULL, NULL, NULL, NULL)
|
||||||
== ERROR_SUCCESS)
|
== ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
// 读取软件属性值
|
// 读取软件属性值
|
||||||
HKEY hSubKey;
|
HKEY hSubKey;
|
||||||
if (RegOpenKeyExW(hkey2, szSubKey, 0, KEY_READ | KEY_WOW64_64KEY, &hSubKey) == ERROR_SUCCESS)
|
if (RegOpenKeyExW(hkey2, szSubKey, 0, KEY_READ | KEY_WOW64_64KEY, &hSubKey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -353,7 +353,7 @@ bool SQLiteHelper::update_software()
|
||||||
WCHAR buffer[MAX_PATH] = { 0 };
|
WCHAR buffer[MAX_PATH] = { 0 };
|
||||||
DWORD buffer_num;
|
DWORD buffer_num;
|
||||||
dwSize = MAX_PATH * sizeof(WCHAR);
|
dwSize = MAX_PATH * sizeof(WCHAR);
|
||||||
//安装文件夹
|
//安装文件夹
|
||||||
if (RegQueryValueExW(hSubKey, L"InstallLocation", NULL, NULL,
|
if (RegQueryValueExW(hSubKey, L"InstallLocation", NULL, NULL,
|
||||||
(LPBYTE)szProductPath, &dwSize) != ERROR_SUCCESS)
|
(LPBYTE)szProductPath, &dwSize) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -361,7 +361,7 @@ bool SQLiteHelper::update_software()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
QString path = QString::fromWCharArray(szProductPath);
|
QString path = QString::fromWCharArray(szProductPath);
|
||||||
//软件名
|
//软件名
|
||||||
if (RegQueryValueExW(hSubKey, L"DisplayName", NULL, NULL,
|
if (RegQueryValueExW(hSubKey, L"DisplayName", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize) != ERROR_SUCCESS)
|
(LPBYTE)buffer, &dwSize) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -370,22 +370,22 @@ bool SQLiteHelper::update_software()
|
||||||
}
|
}
|
||||||
record.name = QString::fromWCharArray(buffer);
|
record.name = QString::fromWCharArray(buffer);
|
||||||
record.orig_name = QString::fromWCharArray(buffer);
|
record.orig_name = QString::fromWCharArray(buffer);
|
||||||
//图标
|
//图标
|
||||||
RegQueryValueExW(hSubKey, L"DisplayIcon", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"DisplayIcon", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize);
|
(LPBYTE)buffer, &dwSize);
|
||||||
record.logo = QString::fromWCharArray(buffer);
|
record.logo = QString::fromWCharArray(buffer);
|
||||||
//主版本号
|
//主版本号
|
||||||
RegQueryValueExW(hSubKey, L"VersionMajor", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"VersionMajor", NULL, NULL,
|
||||||
(LPBYTE)&buffer_num, &dwSize);
|
(LPBYTE)&buffer_num, &dwSize);
|
||||||
QString versionMajor = QString::number(buffer_num);
|
QString versionMajor = QString::number(buffer_num);
|
||||||
//次版本号
|
//次版本号
|
||||||
RegQueryValueExW(hSubKey, L"VersionMinor", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"VersionMinor", NULL, NULL,
|
||||||
(LPBYTE)&buffer_num, &dwSize);
|
(LPBYTE)&buffer_num, &dwSize);
|
||||||
QString versionMinor = QString::number(buffer_num);
|
QString versionMinor = QString::number(buffer_num);
|
||||||
//将主版本号和次版本号拼接在一起
|
//将主版本号和次版本号拼接在一起
|
||||||
QString version = versionMajor + "." + versionMinor;
|
QString version = versionMajor + "." + versionMinor;
|
||||||
record.version = version;
|
record.version = version;
|
||||||
//开发者
|
//开发者
|
||||||
RegQueryValueExW(hSubKey, L"Publisher", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"Publisher", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize);
|
(LPBYTE)buffer, &dwSize);
|
||||||
record.dev = QString::fromWCharArray(buffer);
|
record.dev = QString::fromWCharArray(buffer);
|
||||||
|
@ -445,7 +445,7 @@ bool SQLiteHelper::update_software()
|
||||||
&cbSecurityDescriptor, // security descriptor
|
&cbSecurityDescriptor, // security descriptor
|
||||||
&ftLastWriteTime); // last write time
|
&ftLastWriteTime); // last write time
|
||||||
|
|
||||||
// 枚举该列表下所有子键
|
// 枚举该列表下所有子键
|
||||||
for (DWORD i = 0; i < cSubKeys; i++)
|
for (DWORD i = 0; i < cSubKeys; i++)
|
||||||
{
|
{
|
||||||
WCHAR szSubKey[MAX_PATH] = { 0 };
|
WCHAR szSubKey[MAX_PATH] = { 0 };
|
||||||
|
@ -453,7 +453,7 @@ bool SQLiteHelper::update_software()
|
||||||
if (RegEnumKeyExW(hkey3, i, szSubKey, &dwSize, NULL, NULL, NULL, NULL)
|
if (RegEnumKeyExW(hkey3, i, szSubKey, &dwSize, NULL, NULL, NULL, NULL)
|
||||||
== ERROR_SUCCESS)
|
== ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
// 读取软件属性值
|
// 读取软件属性值
|
||||||
HKEY hSubKey;
|
HKEY hSubKey;
|
||||||
if (RegOpenKeyExW(hkey3, szSubKey, 0, KEY_READ | KEY_WOW64_64KEY, &hSubKey) == ERROR_SUCCESS)
|
if (RegOpenKeyExW(hkey3, szSubKey, 0, KEY_READ | KEY_WOW64_64KEY, &hSubKey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -462,7 +462,7 @@ bool SQLiteHelper::update_software()
|
||||||
WCHAR buffer[MAX_PATH] = { 0 };
|
WCHAR buffer[MAX_PATH] = { 0 };
|
||||||
DWORD buffer_num;
|
DWORD buffer_num;
|
||||||
dwSize = MAX_PATH * sizeof(WCHAR);
|
dwSize = MAX_PATH * sizeof(WCHAR);
|
||||||
//安装文件夹
|
//安装文件夹
|
||||||
if (RegQueryValueExW(hSubKey, L"InstallLocation", NULL, NULL,
|
if (RegQueryValueExW(hSubKey, L"InstallLocation", NULL, NULL,
|
||||||
(LPBYTE)szProductPath, &dwSize) != ERROR_SUCCESS)
|
(LPBYTE)szProductPath, &dwSize) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -470,7 +470,7 @@ bool SQLiteHelper::update_software()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
QString path = QString::fromWCharArray(szProductPath);
|
QString path = QString::fromWCharArray(szProductPath);
|
||||||
//软件名
|
//软件名
|
||||||
if (RegQueryValueExW(hSubKey, L"DisplayName", NULL, NULL,
|
if (RegQueryValueExW(hSubKey, L"DisplayName", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize) != ERROR_SUCCESS)
|
(LPBYTE)buffer, &dwSize) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -479,22 +479,22 @@ bool SQLiteHelper::update_software()
|
||||||
}
|
}
|
||||||
record.name = QString::fromWCharArray(buffer);
|
record.name = QString::fromWCharArray(buffer);
|
||||||
record.orig_name = QString::fromWCharArray(buffer);
|
record.orig_name = QString::fromWCharArray(buffer);
|
||||||
//图标
|
//图标
|
||||||
RegQueryValueExW(hSubKey, L"DisplayIcon", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"DisplayIcon", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize);
|
(LPBYTE)buffer, &dwSize);
|
||||||
record.logo = QString::fromWCharArray(buffer);
|
record.logo = QString::fromWCharArray(buffer);
|
||||||
//主版本号
|
//主版本号
|
||||||
RegQueryValueExW(hSubKey, L"VersionMajor", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"VersionMajor", NULL, NULL,
|
||||||
(LPBYTE)&buffer_num, &dwSize);
|
(LPBYTE)&buffer_num, &dwSize);
|
||||||
QString versionMajor = QString::number(buffer_num);
|
QString versionMajor = QString::number(buffer_num);
|
||||||
//次版本号
|
//次版本号
|
||||||
RegQueryValueExW(hSubKey, L"VersionMinor", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"VersionMinor", NULL, NULL,
|
||||||
(LPBYTE)&buffer_num, &dwSize);
|
(LPBYTE)&buffer_num, &dwSize);
|
||||||
QString versionMinor = QString::number(buffer_num);
|
QString versionMinor = QString::number(buffer_num);
|
||||||
//将主版本号和次版本号拼接在一起
|
//将主版本号和次版本号拼接在一起
|
||||||
QString version = versionMajor + "." + versionMinor;
|
QString version = versionMajor + "." + versionMinor;
|
||||||
record.version = version;
|
record.version = version;
|
||||||
//开发者
|
//开发者
|
||||||
RegQueryValueExW(hSubKey, L"Publisher", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"Publisher", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize);
|
(LPBYTE)buffer, &dwSize);
|
||||||
record.dev = QString::fromWCharArray(buffer);
|
record.dev = QString::fromWCharArray(buffer);
|
||||||
|
@ -551,7 +551,7 @@ bool SQLiteHelper::update_software()
|
||||||
&cbSecurityDescriptor, // security descriptor
|
&cbSecurityDescriptor, // security descriptor
|
||||||
&ftLastWriteTime); // last write time
|
&ftLastWriteTime); // last write time
|
||||||
|
|
||||||
// 枚举该列表下所有子键
|
// 枚举该列表下所有子键
|
||||||
for (DWORD i = 0; i < cSubKeys; i++)
|
for (DWORD i = 0; i < cSubKeys; i++)
|
||||||
for (DWORD i = 0; ; i++)
|
for (DWORD i = 0; ; i++)
|
||||||
{
|
{
|
||||||
|
@ -560,7 +560,7 @@ bool SQLiteHelper::update_software()
|
||||||
if (RegEnumKeyExW(hkey4, i, szSubKey, &dwSize, NULL, NULL, NULL, NULL)
|
if (RegEnumKeyExW(hkey4, i, szSubKey, &dwSize, NULL, NULL, NULL, NULL)
|
||||||
== ERROR_SUCCESS)
|
== ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
//读取软件属性值
|
//读取软件属性值
|
||||||
HKEY hSubKey;
|
HKEY hSubKey;
|
||||||
if (RegOpenKeyExW(hkey3, szSubKey, 0, KEY_READ | KEY_WOW64_64KEY, &hSubKey) == ERROR_SUCCESS)
|
if (RegOpenKeyExW(hkey3, szSubKey, 0, KEY_READ | KEY_WOW64_64KEY, &hSubKey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -569,7 +569,7 @@ bool SQLiteHelper::update_software()
|
||||||
WCHAR buffer[MAX_PATH] = { 0 };
|
WCHAR buffer[MAX_PATH] = { 0 };
|
||||||
DWORD buffer_num;
|
DWORD buffer_num;
|
||||||
dwSize = MAX_PATH * sizeof(WCHAR);
|
dwSize = MAX_PATH * sizeof(WCHAR);
|
||||||
//安装文件夹
|
//安装文件夹
|
||||||
if (RegQueryValueExW(hSubKey, L"InstallLocation", NULL, NULL,
|
if (RegQueryValueExW(hSubKey, L"InstallLocation", NULL, NULL,
|
||||||
(LPBYTE)szProductPath, &dwSize) != ERROR_SUCCESS)
|
(LPBYTE)szProductPath, &dwSize) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -577,7 +577,7 @@ bool SQLiteHelper::update_software()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
QString path = QString::fromWCharArray(szProductPath);
|
QString path = QString::fromWCharArray(szProductPath);
|
||||||
//软件名
|
//软件名
|
||||||
if (RegQueryValueExW(hSubKey, L"DisplayName", NULL, NULL,
|
if (RegQueryValueExW(hSubKey, L"DisplayName", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize) != ERROR_SUCCESS)
|
(LPBYTE)buffer, &dwSize) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -586,22 +586,22 @@ bool SQLiteHelper::update_software()
|
||||||
}
|
}
|
||||||
record.name = QString::fromWCharArray(buffer);
|
record.name = QString::fromWCharArray(buffer);
|
||||||
record.orig_name = QString::fromWCharArray(buffer);
|
record.orig_name = QString::fromWCharArray(buffer);
|
||||||
//图标
|
//图标
|
||||||
RegQueryValueExW(hSubKey, L"DisplayIcon", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"DisplayIcon", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize);
|
(LPBYTE)buffer, &dwSize);
|
||||||
record.logo = QString::fromWCharArray(buffer);
|
record.logo = QString::fromWCharArray(buffer);
|
||||||
//主版本号
|
//主版本号
|
||||||
RegQueryValueExW(hSubKey, L"VersionMajor", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"VersionMajor", NULL, NULL,
|
||||||
(LPBYTE)&buffer_num, &dwSize);
|
(LPBYTE)&buffer_num, &dwSize);
|
||||||
QString versionMajor = QString::number(buffer_num);
|
QString versionMajor = QString::number(buffer_num);
|
||||||
//次版本号
|
//次版本号
|
||||||
RegQueryValueExW(hSubKey, L"VersionMinor", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"VersionMinor", NULL, NULL,
|
||||||
(LPBYTE)&buffer_num, &dwSize);
|
(LPBYTE)&buffer_num, &dwSize);
|
||||||
QString versionMinor = QString::number(buffer_num);
|
QString versionMinor = QString::number(buffer_num);
|
||||||
//将主版本号和次版本号拼接在一起
|
//将主版本号和次版本号拼接在一起
|
||||||
QString version = versionMajor + "." + versionMinor;
|
QString version = versionMajor + "." + versionMinor;
|
||||||
record.version = version;
|
record.version = version;
|
||||||
//开发者
|
//开发者
|
||||||
RegQueryValueExW(hSubKey, L"Publisher", NULL, NULL,
|
RegQueryValueExW(hSubKey, L"Publisher", NULL, NULL,
|
||||||
(LPBYTE)buffer, &dwSize);
|
(LPBYTE)buffer, &dwSize);
|
||||||
record.dev = QString::fromWCharArray(buffer);
|
record.dev = QString::fromWCharArray(buffer);
|
||||||
|
@ -622,7 +622,7 @@ bool SQLiteHelper::update_software()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//对比两个路径,找出公共部分(划掉)
|
//对比两个路径,找出公共部分(划掉)
|
||||||
QHash<QString, Record> public_programs_list;
|
QHash<QString, Record> public_programs_list;
|
||||||
/*for(auto path:*paths)
|
/*for(auto path:*paths)
|
||||||
{
|
{
|
||||||
|
@ -679,7 +679,7 @@ bool SQLiteHelper::update_software()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//进行网络请求,补全字段
|
//进行网络请求,补全字段
|
||||||
SoftwareRequest software_request;
|
SoftwareRequest software_request;
|
||||||
bool ok=software_request.sendRequest(*paths,&public_programs_list,array);
|
bool ok=software_request.sendRequest(*paths,&public_programs_list,array);
|
||||||
if(!ok)
|
if(!ok)
|
||||||
|
@ -882,7 +882,7 @@ void SetSVGBackColor(QDomElement& elem, QString strtagname, QString strattr, QSt
|
||||||
bool SQLiteHelper::get_software(QList<ButtonStruct>* button_structs, ConfigResponse* config_response)
|
bool SQLiteHelper::get_software(QList<ButtonStruct>* button_structs, ConfigResponse* config_response)
|
||||||
{
|
{
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
QString sql = "select * from kmd_menu where type='navbar' order by sort,orig_name asc ;";
|
QString sql = "select * from kmd_menu where is_navbar=1 order by sort,orig_name asc ;";
|
||||||
if (!query.exec(sql))
|
if (!query.exec(sql))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -906,7 +906,7 @@ bool SQLiteHelper::get_software(QList<ButtonStruct>* button_structs, ConfigRespo
|
||||||
buffer = file.readAll();
|
buffer = file.readAll();
|
||||||
QJsonDocument result;
|
QJsonDocument result;
|
||||||
result = QJsonDocument::fromJson(buffer);
|
result = QJsonDocument::fromJson(buffer);
|
||||||
//如果数据完整
|
//如果数据完整
|
||||||
if (result.isObject()) {
|
if (result.isObject()) {
|
||||||
QJsonObject obj_root = result.object();
|
QJsonObject obj_root = result.object();
|
||||||
QJsonArray array;
|
QJsonArray array;
|
||||||
|
@ -1003,19 +1003,19 @@ bool SQLiteHelper::get_software(QList<ButtonStruct>* button_structs, ConfigRespo
|
||||||
|
|
||||||
QSvgRenderer* render_image = new QSvgRenderer(*buffer);
|
QSvgRenderer* render_image = new QSvgRenderer(*buffer);
|
||||||
QPainter painter_image(image);
|
QPainter painter_image(image);
|
||||||
painter_image.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
painter_image.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
||||||
painter_image.fillRect(image->rect(), Qt::transparent); // 填充透明色
|
painter_image.fillRect(image->rect(), Qt::transparent); // 填充透明色
|
||||||
painter_image.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
painter_image.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
||||||
render_image->render(&painter_image);
|
render_image->render(&painter_image);
|
||||||
//修改颜色
|
//修改颜色
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
doc.setContent(*buffer);
|
doc.setContent(*buffer);
|
||||||
SetSVGBackColor(doc.documentElement(), "path", "fill", title_cover_color);
|
SetSVGBackColor(doc.documentElement(), "path", "fill", title_cover_color);
|
||||||
QSvgRenderer* render_image_cover = new QSvgRenderer(doc.toByteArray());
|
QSvgRenderer* render_image_cover = new QSvgRenderer(doc.toByteArray());
|
||||||
QPainter painter_image_cover(image_cover);
|
QPainter painter_image_cover(image_cover);
|
||||||
painter_image_cover.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
painter_image_cover.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
||||||
painter_image_cover.fillRect(image_cover->rect(), Qt::transparent); // 填充透明色
|
painter_image_cover.fillRect(image_cover->rect(), Qt::transparent); // 填充透明色
|
||||||
painter_image_cover.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
painter_image_cover.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
||||||
render_image_cover->render(&painter_image_cover);
|
render_image_cover->render(&painter_image_cover);
|
||||||
|
|
||||||
delete render_image;
|
delete render_image;
|
||||||
|
@ -1048,19 +1048,19 @@ bool SQLiteHelper::get_software(QList<ButtonStruct>* button_structs, ConfigRespo
|
||||||
file.close();
|
file.close();
|
||||||
QSvgRenderer* render_image = new QSvgRenderer(svg_buffer);
|
QSvgRenderer* render_image = new QSvgRenderer(svg_buffer);
|
||||||
QPainter painter_image(image);
|
QPainter painter_image(image);
|
||||||
painter_image.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
painter_image.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
||||||
painter_image.fillRect(image->rect(), Qt::transparent); // 填充透明色
|
painter_image.fillRect(image->rect(), Qt::transparent); // 填充透明色
|
||||||
painter_image.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
painter_image.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
||||||
render_image->render(&painter_image);
|
render_image->render(&painter_image);
|
||||||
//修改颜色
|
//修改颜色
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
doc.setContent(svg_buffer);
|
doc.setContent(svg_buffer);
|
||||||
SetSVGBackColor(doc.documentElement(), "path", "fill", title_cover_color);
|
SetSVGBackColor(doc.documentElement(), "path", "fill", title_cover_color);
|
||||||
QSvgRenderer* render_image_cover = new QSvgRenderer(doc.toByteArray());
|
QSvgRenderer* render_image_cover = new QSvgRenderer(doc.toByteArray());
|
||||||
QPainter painter_image_cover(image_cover);
|
QPainter painter_image_cover(image_cover);
|
||||||
painter_image_cover.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
painter_image_cover.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
||||||
painter_image_cover.fillRect(image_cover->rect(), Qt::transparent); // 填充透明色
|
painter_image_cover.fillRect(image_cover->rect(), Qt::transparent); // 填充透明色
|
||||||
painter_image_cover.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
painter_image_cover.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
||||||
render_image_cover->render(&painter_image_cover);
|
render_image_cover->render(&painter_image_cover);
|
||||||
|
|
||||||
delete render_image;
|
delete render_image;
|
||||||
|
@ -1076,19 +1076,19 @@ bool SQLiteHelper::get_software(QList<ButtonStruct>* button_structs, ConfigRespo
|
||||||
file.close();
|
file.close();
|
||||||
QSvgRenderer* render_image = new QSvgRenderer(svg_buffer);
|
QSvgRenderer* render_image = new QSvgRenderer(svg_buffer);
|
||||||
QPainter painter_image(image);
|
QPainter painter_image(image);
|
||||||
painter_image.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
painter_image.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
||||||
painter_image.fillRect(image->rect(), Qt::transparent); // 填充透明色
|
painter_image.fillRect(image->rect(), Qt::transparent); // 填充透明色
|
||||||
painter_image.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
painter_image.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
||||||
render_image->render(&painter_image);
|
render_image->render(&painter_image);
|
||||||
//修改颜色
|
//修改颜色
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
doc.setContent(svg_buffer);
|
doc.setContent(svg_buffer);
|
||||||
SetSVGBackColor(doc.documentElement(), "path", "fill", title_cover_color);
|
SetSVGBackColor(doc.documentElement(), "path", "fill", title_cover_color);
|
||||||
QSvgRenderer* render_image_cover = new QSvgRenderer(doc.toByteArray());
|
QSvgRenderer* render_image_cover = new QSvgRenderer(doc.toByteArray());
|
||||||
QPainter painter_image_cover(image_cover);
|
QPainter painter_image_cover(image_cover);
|
||||||
painter_image_cover.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
painter_image_cover.setCompositionMode(QPainter::CompositionMode_Clear); // 清除画布
|
||||||
painter_image_cover.fillRect(image_cover->rect(), Qt::transparent); // 填充透明色
|
painter_image_cover.fillRect(image_cover->rect(), Qt::transparent); // 填充透明色
|
||||||
painter_image_cover.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
painter_image_cover.setCompositionMode(QPainter::CompositionMode_SourceOver); // 恢复默认值
|
||||||
render_image_cover->render(&painter_image_cover);
|
render_image_cover->render(&painter_image_cover);
|
||||||
|
|
||||||
delete render_image;
|
delete render_image;
|
||||||
|
@ -1258,7 +1258,7 @@ bool SQLiteHelper::insert_software(QString name, QString orig_name, QString path
|
||||||
query.addBindValue(true);
|
query.addBindValue(true);
|
||||||
if(!query.exec())
|
if(!query.exec())
|
||||||
{
|
{
|
||||||
//QMessageBox::critical(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("写入数据库失败"));
|
//QMessageBox::critical(nullptr, QString::fromLocal8Bit("错误"), QString::fromLocal8Bit("写入数据库失败"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
|
@ -1324,7 +1324,7 @@ bool SQLiteHelper::get_category(QList<Categrory>& categrories,bool is_edit,bool
|
||||||
}
|
}
|
||||||
while (query.next())
|
while (query.next())
|
||||||
{
|
{
|
||||||
if (query.value("name") == QString::fromLocal8Bit("全部"))
|
if (query.value("name") == QString::fromLocal8Bit("全部"))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1361,7 +1361,7 @@ bool SQLiteHelper::get_category(QList<Categrory>& categrories,bool is_edit,bool
|
||||||
}
|
}
|
||||||
while (query.next())
|
while (query.next())
|
||||||
{
|
{
|
||||||
if (query.value("name") == QString::fromLocal8Bit("全部"))
|
if (query.value("name") == QString::fromLocal8Bit("全部"))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
After Width: | Height: | Size: 30 KiB |
|
@ -1 +0,0 @@
|
||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1691497575694" class="icon" viewBox="0 0 1243 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4021" xmlns:xlink="http://www.w3.org/1999/xlink" width="242.7734375" height="200"><path d="M839.68 323.584c13.312 0 26.624 1.243 39.863 2.414-35.62-166.62-214.309-291.109-417.865-291.109-227.62 0.805-414.135 155.868-414.135 352.768 0 113.518 62.171 207.14 165.449 279.625l-41.691 124.343 144.969-72.411c51.931 10.24 93.623 20.48 144.896 20.48 13.312 0 25.965-0.585 38.62-1.756a318.61 318.61 0 0 1-12.655-87.04c0.586-180.516 155.795-327.24 352.622-327.24zM616.887 211.383c31.451 0 51.931 20.48 51.931 51.931 0 30.72-20.48 51.932-51.931 51.932-30.793 0-62.172-20.553-62.172-51.932 0-31.451 31.379-51.931 62.172-51.931zM327.022 315.246c-30.72 0-62.172-20.553-62.172-51.932 0-31.451 31.452-51.931 62.172-51.931 30.793 0 51.931 20.48 51.931 51.931 0 30.72-20.48 51.932-51.931 51.932z m890.807 331.337c0-165.45-165.45-300.69-352.11-300.69-196.828 0-352.037 135.24-352.037 300.69 0 166.034 155.21 300.763 352.037 300.763 41.106 0 82.798-10.24 124.416-20.553l113.518 62.172-31.379-103.278c83.383-63.342 145.555-146.14 145.555-239.104zM751.616 594.65c-20.48 0-41.691-20.48-41.691-41.691 0-20.48 21.211-41.691 41.691-41.691 31.451 0 51.931 20.553 51.931 41.691 0 21.211-20.48 41.691-51.931 41.691z m227.694 0c-20.553 0-41.107-20.48-41.107-41.691 0-20.48 20.48-41.691 41.107-41.691 31.378 0 51.931 20.553 51.931 41.691 0 21.211-20.553 41.691-51.931 41.691z" fill="#00CE12" p-id="4022"></path></svg>
|
|
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.8 KiB |
BIN
images/logo.png
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 30 KiB |
|
@ -1,72 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
||||||
<title>发生错误</title>
|
|
||||||
<meta name="robots" content="noindex,nofollow" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
||||||
<link rel="shortcut icon" href="/assets/img/favicon.ico" />
|
|
||||||
<style>
|
|
||||||
* {-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}
|
|
||||||
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,caption,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video {margin:0;padding:0;border:0;outline:0;vertical-align:baseline;background:transparent;}
|
|
||||||
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section {display:block;}
|
|
||||||
html {font-size:16px;line-height:24px;width:100%;height:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;overflow-y:scroll;overflow-x:hidden;}
|
|
||||||
img {vertical-align:middle;max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic;}
|
|
||||||
body {min-height:100%;background:#f4f6f8;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",微软雅黑,Arial,sans-serif;}
|
|
||||||
.clearfix {clear:both;zoom:1;}
|
|
||||||
.clearfix:before,.clearfix:after {content:"\0020";display:block;height:0;visibility:hidden;}
|
|
||||||
.clearfix:after {clear:both;}
|
|
||||||
body.error-page-wrapper,.error-page-wrapper.preview {background-position:center center;background-repeat:no-repeat;background-size:cover;position:relative;}
|
|
||||||
.error-page-wrapper .content-container {border-radius:2px;text-align:center;box-shadow:0 0 30px rgba(99,99,99,0.06);padding:50px;background-color:#fff;width:100%;max-width:560px;position:absolute;left:50%;top:50%;margin-top:-220px;margin-left:-280px;}
|
|
||||||
.error-page-wrapper .content-container.in {left:0px;opacity:1;}
|
|
||||||
.error-page-wrapper .head-line {transition:color .2s linear;font-size:40px;line-height:60px;letter-spacing:-1px;margin-bottom:20px;color:#777;}
|
|
||||||
.error-page-wrapper .subheader {transition:color .2s linear;font-size:32px;line-height:46px;color:#494949;}
|
|
||||||
.error-page-wrapper .hr {height:1px;background-color:#eee;width:80%;max-width:350px;margin:25px auto;}
|
|
||||||
.error-page-wrapper .context {transition:color .2s linear;font-size:16px;line-height:27px;color:#aaa;}
|
|
||||||
.error-page-wrapper .context p {margin:0;}
|
|
||||||
.error-page-wrapper .context p:nth-child(n+2) {margin-top:16px;}
|
|
||||||
.error-page-wrapper .buttons-container {margin-top:35px;overflow:hidden;}
|
|
||||||
.error-page-wrapper .buttons-container a {transition:text-indent .2s ease-out,color .2s linear,background-color .2s linear;text-indent:0px;font-size:14px;text-transform:uppercase;text-decoration:none;color:#fff;background-color:#2ecc71;border-radius:99px;padding:8px 0 8px;text-align:center;display:inline-block;overflow:hidden;position:relative;width:45%;}
|
|
||||||
.error-page-wrapper .buttons-container a:hover {text-indent:15px;}
|
|
||||||
.error-page-wrapper .buttons-container a:nth-child(1) {float:left;}
|
|
||||||
.error-page-wrapper .buttons-container a:nth-child(2) {float:right;}
|
|
||||||
@media screen and (max-width:580px) {
|
|
||||||
.error-page-wrapper {padding:30px 5%;}
|
|
||||||
.error-page-wrapper .content-container {padding:37px;position:static;left:0;margin-top:0;margin-left:0;}
|
|
||||||
.error-page-wrapper .head-line {font-size:36px;}
|
|
||||||
.error-page-wrapper .subheader {font-size:27px;line-height:37px;}
|
|
||||||
.error-page-wrapper .hr {margin:30px auto;width:215px;}
|
|
||||||
}
|
|
||||||
@media screen and (max-width:450px) {
|
|
||||||
.error-page-wrapper {padding:30px;}
|
|
||||||
.error-page-wrapper .head-line {font-size:32px;}
|
|
||||||
.error-page-wrapper .hr {margin:25px auto;width:180px;}
|
|
||||||
.error-page-wrapper .context {font-size:15px;line-height:22px;}
|
|
||||||
.error-page-wrapper .context p:nth-child(n+2) {margin-top:10px;}
|
|
||||||
.error-page-wrapper .buttons-container {margin-top:29px;}
|
|
||||||
.error-page-wrapper .buttons-container a {float:none !important;width:65%;margin:0 auto;font-size:13px;padding:9px 0;}
|
|
||||||
.error-page-wrapper .buttons-container a:nth-child(2) {margin-top:12px;}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body class="error-page-wrapper">
|
|
||||||
<div class="content-container">
|
|
||||||
<div class="head-line">
|
|
||||||
<img src="/assets/img/error.svg" alt="" width="120"/>
|
|
||||||
</div>
|
|
||||||
<div class="subheader">
|
|
||||||
你所浏览的页面暂时无法访问{"s":"\/assets\/addons\/kmdsoft\/images\/wxdk\/menu\/hao123.svg"} </div>
|
|
||||||
<div class="hr"></div>
|
|
||||||
<div class="context">
|
|
||||||
|
|
||||||
<p>
|
|
||||||
你可以返回上一页重试 </p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="buttons-container">
|
|
||||||
<a href="/">返回主页</a>
|
|
||||||
<a href="javascript:" onclick="history.go(-1)">返回上一页</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1 +0,0 @@
|
||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1691984353220" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1412" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M680.416757 459.07972 573.090357 459.07972 573.090357 351.753319c0-30.312376-24.800849-55.113225-55.113225-55.113225l0 0c-30.312376 0-55.113225 24.800849-55.113225 55.113225l0 107.326401L355.537506 459.07972c-30.312376 0-55.113225 24.800849-55.113225 55.113225l0 0c0 30.312376 24.800849 55.113225 55.113225 55.113225l107.326401 0 0 107.326401c0 30.312376 24.800849 55.113225 55.113225 55.113225l0 0c30.312376 0 55.113225-24.800849 55.113225-55.113225L573.090357 569.30617l107.326401 0c30.312376 0 55.113225-24.800849 55.113225-55.113225l0 0C735.529983 483.880569 710.729134 459.07972 680.416757 459.07972z" fill="#272636" p-id="1413"></path><path d="M511.771803 76.893274c-239.630682 0-435.106726 195.47195-435.106726 435.103656 0 94.841042 30.642904 182.753277 82.499969 254.379595 13.024641 20.517289 32.243355 42.841737 59.010999 66.24168 77.483722 71.033823 180.62787 114.488521 293.595758 114.488521 103.163591 0 198.122313-36.252669 272.847202-96.638991 0.907673-0.728594 1.814322-1.456165 2.716878-2.192945 0.475837-0.38988 0.954745-0.775666 1.425466-1.165546 22.744004-18.662035 43.799552-39.940664 62.682621-63.755046 59.665915-74.495668 95.433536-168.876222 95.433536-271.356244C946.877505 272.370341 751.405555 76.893274 511.771803 76.893274zM829.009004 763.432473c-66.787102 37.028335-141.208069 57.060577-188.409091 66.422805-90.930989 18.152429-200.3654-12.568247-240.679571-31.591509-68.068282-32.116465-89.183182-64.577784-124.267235-97.739045l-20.070104-19.195178c-47.562249-44.911886-98.123808-39.531342-113.870444-4.776793-22.51069-50.329269-35.056424-106.024755-35.056424-164.555823 0.001023-92.624561 31.394011-178.147376 84.049255-246.521626 68.905346-40.120766 147.548474-61.442374 196.569958-71.193459 91.102904-18.147312 200.535269 12.568247 240.679571 31.592532 68.240197 32.115442 89.182158 64.576761 124.43915 97.91403l20.070104 19.023262c47.082318 44.544519 95.120404 38.818097 109.209284 4.267187 22.610974 50.424436 35.21299 106.243743 35.21299 164.91705C916.885424 606.854345 883.972826 694.26516 829.009004 763.432473z" fill="#272636" p-id="1414"></path></svg>
|
|
Before Width: | Height: | Size: 2.4 KiB |
|
@ -1 +0,0 @@
|
||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1691984341795" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1245" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M837.818182 116.363636a69.818182 69.818182 0 0 1 69.818182 69.818182v651.636364a69.818182 69.818182 0 0 1-69.818182 69.818182H186.181818a69.818182 69.818182 0 0 1-69.818182-69.818182V186.181818a69.818182 69.818182 0 0 1 69.818182-69.818182h651.636364zM269.893818 695.831273c-12.218182-0.093091-18.501818 5.492364-20.759273 17.454545-1.815273 9.634909-1.978182 19.316364-1.88509 28.997818l0.116363 14.498909c-0.139636 23.296 5.771636 29.114182 28.672 29.114182l483.84-0.046545c19.362909 0 26.065455-6.446545 26.810182-25.879273 0.232727-6.749091 0.232727-13.498182 0.162909-20.270545l-0.069818-10.146909c-0.116364-27.694545-5.818182-33.629091-33.047273-33.629091L351.883636 695.854545c-27.322182 0-54.667636 0.186182-81.966545-0.046545z m458.752 27.415272c6.958545 0.023273 13.800727 1.163636 13.498182 9.984-0.302545 7.959273-6.818909 8.890182-13.172364 8.890182-34.490182 0.046545-69.003636 0-103.493818-0.093091a22.714182 22.714182 0 0 1-5.538909-0.674909c-5.678545-1.442909-11.170909-3.700364-10.472727-10.612363 0.605091-6.423273 6.190545-7.400727 11.496727-7.447273 18.641455-0.116364 37.306182-0.046545 55.947636-0.046546v-0.046545c17.245091 0 34.490182-0.069818 51.735273 0.046545zM331.473455 209.152a139.170909 139.170909 0 0 0-47.848728 8.075636c-24.925091 8.704-46.917818 38.213818-46.987636 64.698182-0.232727 107.543273-0.186182 215.086545-0.093091 322.629818 0 13.032727 4.235636 25.064727 11.589818 35.793455 17.687273 25.809455 43.706182 36.608 73.634909 36.724364 122.949818 0.535273 245.922909 0.232727 368.872728 0.279272 13.684364 0 26.926545-0.977455 40.378181-4.631272 35.793455-9.728 58.461091-37.655273 58.484364-74.938182 0.023273-102.260364 0-204.497455-0.139636-306.757818-0.046545-31.208727-13.102545-55.389091-40.657455-70.56291-14.429091-7.959273-30.370909-11.170909-47.034182-11.124363-63.022545 0.139636-126.045091 0.046545-189.067636 0.046545l-120.762182 0.093091a7779.84 7779.84 0 0 1-60.369454-0.325818z m377.018181 38.912a46.545455 46.545455 0 0 1 46.545455 46.545455v248.226909a46.545455 46.545455 0 0 1-46.545455 46.545454H318.045091a46.545455 46.545455 0 0 1-46.545455-46.545454V294.632727a46.545455 46.545455 0 0 1 46.545455-46.545454h390.446545z m-65.536 238.731636c-2.722909 2.746182-1.605818 6.469818-0.372363 9.448728l5.399272 12.683636c3.165091 7.144727 5.701818 12.404364 9.285819 20.48l6.376727 14.778182c10.146909 24.087273 12.497455 4.561455 13.730909 0 2.978909-11.240727 10.542545-16.523636 21.387636-17.175273l3.723637-0.069818c2.56-0.116364 4.933818-0.814545 5.143272-4.352 0.139636-2.397091-1.28-3.979636-3.118545-5.259636l-27.880727-16.128-26.018909-14.894546c-2.490182-1.326545-5.096727-2.094545-7.68 0.488727z m-143.918545-188.392727a120.32 120.32 0 1 0 0 240.64 120.32 120.32 0 0 0 0-240.64z m20.340364 137.937455c-3.490909 39.517091-17.501091 67.421091-20.340364 67.421091-2.699636 0-15.197091-25.506909-19.2-62.324364l-0.465455-5.096727h40.029091z m-69.469091 0c1.349818 18.385455 4.770909 36.026182 9.658181 51.828363 1.675636 5.376 3.490909 10.426182 5.352728 14.894546a91.182545 91.182545 0 0 1-54.016-61.719273l-1.140364-5.026909h40.145455z m138.426181 0a91.112727 91.112727 0 0 1-54.923636 66.653091c1.861818-4.421818 3.677091-9.355636 5.352727-14.592 4.258909-13.265455 7.447273-27.741091 9.192728-42.91491l0.884363-9.169454h39.493818z m-123.578181-101.911273c-1.838545 4.491636-3.607273 9.495273-5.259637 14.848a235.287273 235.287273 0 0 0-9.355636 48.942545l-0.581818 8.750546h-40.727273a91.066182 91.066182 0 0 1 50.269091-70.004364l4.538182-2.071273 1.117091-0.465454z m34.280727-0.884364c3.025455 0 17.082182 28.253091 20.410182 68.165818l0.372363 5.259637H478.952727c2.397091-42.635636 16.989091-73.425455 20.107637-73.425455z m34.536727 0.977455a91.136 91.136 0 0 1 54.877091 67.304727l0.814546 5.143273H549.236364a230.446545 230.446545 0 0 0-10.379637-58.018909 179.595636 179.595636 0 0 0-5.282909-14.429091z" fill="#2c2c2c" p-id="1246"></path></svg>
|
|
Before Width: | Height: | Size: 4.2 KiB |
|
@ -1 +1 @@
|
||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1691497575694" class="icon" viewBox="0 0 1243 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4021" xmlns:xlink="http://www.w3.org/1999/xlink" width="242.7734375" height="200"><path d="M839.68 323.584c13.312 0 26.624 1.243 39.863 2.414-35.62-166.62-214.309-291.109-417.865-291.109-227.62 0.805-414.135 155.868-414.135 352.768 0 113.518 62.171 207.14 165.449 279.625l-41.691 124.343 144.969-72.411c51.931 10.24 93.623 20.48 144.896 20.48 13.312 0 25.965-0.585 38.62-1.756a318.61 318.61 0 0 1-12.655-87.04c0.586-180.516 155.795-327.24 352.622-327.24zM616.887 211.383c31.451 0 51.931 20.48 51.931 51.931 0 30.72-20.48 51.932-51.931 51.932-30.793 0-62.172-20.553-62.172-51.932 0-31.451 31.379-51.931 62.172-51.931zM327.022 315.246c-30.72 0-62.172-20.553-62.172-51.932 0-31.451 31.452-51.931 62.172-51.931 30.793 0 51.931 20.48 51.931 51.931 0 30.72-20.48 51.932-51.931 51.932z m890.807 331.337c0-165.45-165.45-300.69-352.11-300.69-196.828 0-352.037 135.24-352.037 300.69 0 166.034 155.21 300.763 352.037 300.763 41.106 0 82.798-10.24 124.416-20.553l113.518 62.172-31.379-103.278c83.383-63.342 145.555-146.14 145.555-239.104zM751.616 594.65c-20.48 0-41.691-20.48-41.691-41.691 0-20.48 21.211-41.691 41.691-41.691 31.451 0 51.931 20.553 51.931 41.691 0 21.211-20.48 41.691-51.931 41.691z m227.694 0c-20.553 0-41.107-20.48-41.107-41.691 0-20.48 20.48-41.691 41.107-41.691 31.378 0 51.931 20.553 51.931 41.691 0 21.211-20.553 41.691-51.931 41.691z" fill="#00CE12" p-id="4022"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1691679612388" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1664" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M541.696 86.308571l316.952381 140.775619A73.142857 73.142857 0 0 1 902.095238 293.936762v436.126476a73.142857 73.142857 0 0 1-43.446857 66.852572l-316.952381 140.751238a73.142857 73.142857 0 0 1-59.392 0l-316.952381-140.751238A73.142857 73.142857 0 0 1 121.904762 730.063238V293.936762a73.142857 73.142857 0 0 1 43.446857-66.852572l316.952381-140.751238a73.142857 73.142857 0 0 1 59.392 0zM195.047619 362.788571v367.274667l286.476191 127.21981V485.546667L195.047619 362.788571z m633.904762 2.633143l-274.285714 117.516191V851.870476L828.952381 730.063238V365.421714zM512 153.185524L207.335619 288.475429l307.760762 131.900952 304.591238-130.56L512 153.185524z" p-id="1665"></path></svg>
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1019 B |
|
@ -1 +0,0 @@
|
||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1691984353220" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1412" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M680.416757 459.07972 573.090357 459.07972 573.090357 351.753319c0-30.312376-24.800849-55.113225-55.113225-55.113225l0 0c-30.312376 0-55.113225 24.800849-55.113225 55.113225l0 107.326401L355.537506 459.07972c-30.312376 0-55.113225 24.800849-55.113225 55.113225l0 0c0 30.312376 24.800849 55.113225 55.113225 55.113225l107.326401 0 0 107.326401c0 30.312376 24.800849 55.113225 55.113225 55.113225l0 0c30.312376 0 55.113225-24.800849 55.113225-55.113225L573.090357 569.30617l107.326401 0c30.312376 0 55.113225-24.800849 55.113225-55.113225l0 0C735.529983 483.880569 710.729134 459.07972 680.416757 459.07972z" fill="#272636" p-id="1413"></path><path d="M511.771803 76.893274c-239.630682 0-435.106726 195.47195-435.106726 435.103656 0 94.841042 30.642904 182.753277 82.499969 254.379595 13.024641 20.517289 32.243355 42.841737 59.010999 66.24168 77.483722 71.033823 180.62787 114.488521 293.595758 114.488521 103.163591 0 198.122313-36.252669 272.847202-96.638991 0.907673-0.728594 1.814322-1.456165 2.716878-2.192945 0.475837-0.38988 0.954745-0.775666 1.425466-1.165546 22.744004-18.662035 43.799552-39.940664 62.682621-63.755046 59.665915-74.495668 95.433536-168.876222 95.433536-271.356244C946.877505 272.370341 751.405555 76.893274 511.771803 76.893274zM829.009004 763.432473c-66.787102 37.028335-141.208069 57.060577-188.409091 66.422805-90.930989 18.152429-200.3654-12.568247-240.679571-31.591509-68.068282-32.116465-89.183182-64.577784-124.267235-97.739045l-20.070104-19.195178c-47.562249-44.911886-98.123808-39.531342-113.870444-4.776793-22.51069-50.329269-35.056424-106.024755-35.056424-164.555823 0.001023-92.624561 31.394011-178.147376 84.049255-246.521626 68.905346-40.120766 147.548474-61.442374 196.569958-71.193459 91.102904-18.147312 200.535269 12.568247 240.679571 31.592532 68.240197 32.115442 89.182158 64.576761 124.43915 97.91403l20.070104 19.023262c47.082318 44.544519 95.120404 38.818097 109.209284 4.267187 22.610974 50.424436 35.21299 106.243743 35.21299 164.91705C916.885424 606.854345 883.972826 694.26516 829.009004 763.432473z" fill="#272636" p-id="1414"></path></svg>
|
|
Before Width: | Height: | Size: 2.4 KiB |