增加提示功能

This commit is contained in:
JackLee_CN 2024-10-17 19:56:23 +08:00
parent 017edb3018
commit c5213e6804
3 changed files with 21 additions and 22 deletions

View File

@ -32,11 +32,12 @@ void xsteam_about_ui::load_about()
QByteArray line = file.readLine();
strs.append(QString::fromStdString(line.data()));
}
strs.append("QT Version:"+QString::fromStdString(QT_VERSION_STR)+"\n");
strs.append("GCC Version:"+QString::fromStdString(GCC_GXX_VERSION_STR)+"\n");
strs.append("GXX Version:"+QString::fromStdString(GCC_GXX_VERSION_STR)+"\n");
strs.append("LIBCURL Version:"+QString::fromStdString(LIBCURL_VERSION_STR)+"\n");
strs.append("LIBGIT2 Version:"+QString::fromStdString(LIBGIT2_VERSION_STR)+"\n");
strs.append(QString::fromStdString("编译环境")+"\n");
strs.append("qt_version:"+QString::fromStdString(QT_VERSION_STR)+"\n");
strs.append("gcc_version:"+QString::fromStdString(GCC_GXX_VERSION_STR)+"\n");
strs.append("g++_version:"+QString::fromStdString(GCC_GXX_VERSION_STR)+"\n");
strs.append("libcurl_version:"+QString::fromStdString(LIBCURL_VERSION_STR)+"\n");
strs.append("libgit2_version:"+QString::fromStdString(LIBGIT2_VERSION_STR)+"\n");
info->setPlainText(strs);
}
}

View File

@ -1,11 +1,11 @@
#include "xsteam_ui.h"
xsteam_ui::xsteam_ui(QWidget *parent) : QWidget(parent),
main_layout(new QVBoxLayout),
head_layout(new QHBoxLayout),
info_layout(new QHBoxLayout),
mind_layout(new QVBoxLayout),
foot_layout(new QHBoxLayout)
{
// xsteam_init_head_layout();
xsteam_init_info_layout();
xsteam_init_mind_layout();
xsteam_init_foot_layout();
xsteam_init_style();
@ -31,20 +31,17 @@ xsteam_ui::~xsteam_ui()
}
void xsteam_ui::xsteam_init_main_layout()
{
main_layout->addLayout(head_layout);
main_layout->addLayout(mind_layout);
main_layout->addLayout(foot_layout);
setLayout(main_layout);
}
void xsteam_ui::xsteam_init_head_layout()
void xsteam_ui::xsteam_init_info_layout()
{
head_tag = new QLabel();
head_tag->setText(tr("Public Steam"));
QFont font("Microsoft YaHei", 10, 75);
head_tag->setFont(font);
head_layout->addItem(sparcer_item);
head_layout->addWidget(head_tag);
head_layout->addItem(sparcer_item);
info_layout=new QHBoxLayout();
info_txt_tag=new QLabel(tr("本工具建议配合SteamTools和Steam++使用"));
info_layout->addItem(sparcer_item);
info_layout->addWidget(info_txt_tag);
info_layout->addItem(sparcer_item);
}
void xsteam_ui::xsteam_init_mind_layout()
{
@ -137,6 +134,7 @@ void xsteam_ui::xsteam_init_mind_layout()
ip_data_layout->setStretch(1, 2);
mind_layout->addLayout(server_layout);
mind_layout->addLayout(info_layout);
mind_layout->addLayout(ip_data_layout);
}
void xsteam_ui::xsteam_init_foot_layout()

View File

@ -16,7 +16,6 @@
#include "xsteam_about_ui.h"
#include "xsteam_view.h"
#include "xsteam_git_fetch.h"
#include <iostream>
#include <version.h>
class xsteam_ui:public QWidget{
@ -25,7 +24,7 @@ public:
xsteam_ui(QWidget* parent=nullptr);
~xsteam_ui();
void xsteam_init_main_layout();
void xsteam_init_head_layout();
void xsteam_init_info_layout();
void xsteam_init_mind_layout();
void xsteam_init_foot_layout();
void xsteam_init_style();
@ -34,10 +33,9 @@ private:
void table_load_ui_data();
private:
QVBoxLayout* main_layout;
QHBoxLayout* head_layout;
QHBoxLayout* info_layout;
QVBoxLayout* mind_layout;
QHBoxLayout* foot_layout;
QLabel* head_tag;
//托管服务器选择
QHBoxLayout* server_layout;
QLabel* server_tag;
@ -46,6 +44,8 @@ private:
QPushButton* btn_fetch_src_data;
QPushButton* btn_run_steam;
QPushButton* btn_run_steamtools;
//头部信息
QLabel* info_txt_tag;
//入库游戏信息
QHBoxLayout* ip_layout;
QHBoxLayout* ip_iu_layout;