更新所有窗口样式为sui

This commit is contained in:
JackLee_CN 2024-10-31 12:23:59 +08:00
parent 537944bf0c
commit ab1edfecdf
10 changed files with 30 additions and 16 deletions

View File

@ -16,7 +16,7 @@ sui::~sui()
void sui::init_layout()
{
m_title=new sui_title(this);
m_title->set_title_txt(tr("XSteam"));
m_title->set_title(tr("XSteam"));
setObjectName(tr("m_widget"));
m_layout->addWidget(m_title);
m_title->setMouseTracking(true);

View File

@ -273,8 +273,9 @@ void sui_title::up_maximize()
void sui_title::set_type(QD_TYPE _type)
{
m_type = _type;
disconnect(m_icon_button, SIGNAL(clicked(bool)), this, SLOT(slots_ico_menu()));
}
void sui_title::set_title_txt(QString str)
void sui_title::set_title(QString str)
{
m_title_label->setText(str);
}

View File

@ -30,7 +30,7 @@ class sui_title: public QWidget
public:
explicit sui_title(QWidget *parent = nullptr);
~sui_title();
void set_title_txt(QString str);
void set_title(QString str);
void set_type(QD_TYPE _type);
protected:
//双击标题栏进行界面的最大化/还原

View File

@ -2,6 +2,7 @@
xsteam_about_ui::xsteam_about_ui()
{
m_widget=new QWidget();
m_Layout = new QVBoxLayout();
f_Layout =new QHBoxLayout();
copyright_tips_txt=new QLabel(tr("Copyright © 2024 JackLee_CN. All rights reserved."));
@ -15,7 +16,8 @@ xsteam_about_ui::xsteam_about_ui()
load_about();
setWindowTitle(tr("About XSteam"));
m_Layout->setContentsMargins(0, 0, 0, 0);
setLayout(m_Layout);
m_widget->setLayout(m_Layout);
layout()->addWidget(m_widget);
}
xsteam_about_ui::~xsteam_about_ui()
{

View File

@ -10,8 +10,8 @@
#include <QIODevice>
#include <QLabel>
#include <version.h>
class xsteam_about_ui :public QDialog{
#include "sui.h"
class xsteam_about_ui :public sui{
Q_OBJECT
public:
static xsteam_about_ui *Instance()
@ -23,6 +23,8 @@ public:
if (!_instance)
{
_instance = new xsteam_about_ui();
_instance->title()->set_type(QD_CLOSE);
_instance->title()->set_title(tr("XSteam关于"));
}
mutex.unlock();
}
@ -35,6 +37,7 @@ private:
const xsteam_about_ui &operator=(const xsteam_about_ui &other);
static xsteam_about_ui* _instance;
static QMutex mutex;
QWidget* m_widget={};
QVBoxLayout* m_Layout={};
QHBoxLayout* f_Layout={};
QTextEdit* info={};

View File

@ -10,7 +10,7 @@ xsteam_set_ui::~xsteam_set_ui()
}
void xsteam_set_ui::init_set()
{
setWindowTitle(tr("XSteam设置"));
main_qwidget=new QWidget;
main_layout = new QVBoxLayout;
foot_layout = new QHBoxLayout;
body_layout = new QVBoxLayout;
@ -72,8 +72,9 @@ void xsteam_set_ui::init_set()
main_layout->addLayout(foot_layout);
main_layout->setStretch(0, 8);
main_layout->setStretch(1, 2);
main_layout->setContentsMargins(5, 5, 5, 5);
setLayout(main_layout);
main_layout->setContentsMargins(5, 5, 5, 5);
main_qwidget->setLayout(main_layout);
layout()->addWidget(main_qwidget);
connect_slots();
}
void xsteam_set_ui::connect_slots(){

View File

@ -1,7 +1,6 @@
#ifndef XSTEAM_SET_UI_H
#define XSTEAM_SET_UI_H
#include <QDialog>
#include <QMutex>
#include <QLineEdit>
#include <QMutexLocker>
@ -15,7 +14,8 @@
#include <QLabel>
#include "xsteam_base.h"
#include "xsteam_ex.h"
class xsteam_set_ui :public QDialog{
#include "sui.h"
class xsteam_set_ui :public sui{
Q_OBJECT
public:
static xsteam_set_ui *Instance()
@ -27,6 +27,8 @@ public:
if (!_instance)
{
_instance = new xsteam_set_ui();
_instance->title()->set_type(QD_CLOSE);
_instance->title()->set_title(tr("XSteam设置"));
}
mutex.unlock();
}
@ -41,6 +43,7 @@ private:
static QMutex mutex;
void init_set();
void connect_slots();
QWidget* main_qwidget;
QVBoxLayout* main_layout;
QVBoxLayout* body_layout;
QHBoxLayout* foot_layout;

View File

@ -1,7 +1,6 @@
#ifndef XSTEAM_SRC_EDIT_UI_H
#define XSTEAM_SRC_EDIT_UI_H
#include <QDialog>
#include <QMutex>
#include <QGroupBox>
#include <QTableView>
@ -33,6 +32,7 @@ public:
{
_instance = new xsteam_src_edit_ui();
_instance->title()->set_type(QD_CLOSE);
_instance->title()->set_title(tr("XSteam源地址管理"));
}
mutex.unlock();
}

View File

@ -2,6 +2,7 @@
xsteam_update_ui::xsteam_update_ui()
{
m_widget=new QWidget();
m_Layout = new QVBoxLayout();
f_Layout =new QHBoxLayout();
copyright_tips_txt=new QLabel(tr("Copyright © 2024 JackLee_CN. All rights reserved."));
@ -15,7 +16,8 @@ xsteam_update_ui::xsteam_update_ui()
load_about();
setWindowTitle(tr("About XSteam"));
m_Layout->setContentsMargins(0, 0, 0, 0);
setLayout(m_Layout);
m_widget->setLayout(m_Layout);
layout()->addWidget(m_widget);
}
xsteam_update_ui::~xsteam_update_ui()
{

View File

@ -1,7 +1,6 @@
#ifndef XSTEAM_UPDATE_UI_H
#define XSTEAM_UPDATE_UI_H
#include <QDialog>
#include <QMutex>
#include <QMutexLocker>
#include <QVBoxLayout>
@ -10,8 +9,8 @@
#include <QIODevice>
#include <QLabel>
#include <version.h>
class xsteam_update_ui :public QDialog{
#include "sui.h"
class xsteam_update_ui :public sui{
Q_OBJECT
public:
static xsteam_update_ui *Instance()
@ -23,6 +22,8 @@ public:
if (!_instance)
{
_instance = new xsteam_update_ui();
_instance->title()->set_type(QD_CLOSE);
_instance->title()->set_title(tr("XSteam更新"));
}
mutex.unlock();
}
@ -35,6 +36,7 @@ private:
const xsteam_update_ui &operator=(const xsteam_update_ui &other);
static xsteam_update_ui* _instance;
static QMutex mutex;
QWidget* m_widget={};
QVBoxLayout* m_Layout={};
QHBoxLayout* f_Layout={};
QTextEdit* info={};