新建清单分享界面-开发未完成

This commit is contained in:
JackLee_CN 2024-10-18 19:38:24 +08:00
parent 3ea9fce013
commit 99fd3d61ce
4 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#include "xsteam_push_manifest.h"
xsteam_push_manifest::xsteam_push_manifest(/* args */)
{
init_push_manifest_ui();
}
xsteam_push_manifest::~xsteam_push_manifest()
{
}
void xsteam_push_manifest::init_push_manifest_ui(){
setWindowTitle(tr("XSteam清单分享"));
}

View File

@ -0,0 +1,36 @@
#ifndef XSTEAM_PUSH_MANIFEST_H
#define XSTEAM_PUSH_MANIFEST_H
#include <QDialog>
#include <QMutex>
class xsteam_push_manifest:public QDialog
{
Q_OBJECT
public:
static xsteam_push_manifest *Instance()
{
if (!_instance)
{
static QMutex mutex;
mutex.lock();
if (!_instance)
{
_instance = new xsteam_push_manifest();
}
mutex.unlock();
}
return _instance;
}
private:
xsteam_push_manifest();
~xsteam_push_manifest();
xsteam_push_manifest(const xsteam_push_manifest &other);
const xsteam_push_manifest &operator=(const xsteam_push_manifest &other);
static xsteam_push_manifest* _instance;
static QMutex mutex;
void init_push_manifest_ui();
};
xsteam_push_manifest *xsteam_push_manifest::_instance = {};
QMutex xsteam_push_manifest::mutex;
#endif //XSTEAM_PUSH_MANIFEST_H

View File

@ -59,6 +59,8 @@ void xsteam_ui::xsteam_init_mind_layout()
btn_run_steam->setObjectName("RUN_STEAM"); btn_run_steam->setObjectName("RUN_STEAM");
btn_run_steamdb = new QPushButton(tr("SteamDB")); btn_run_steamdb = new QPushButton(tr("SteamDB"));
btn_run_steamdb->setObjectName("STEAM_DB"); btn_run_steamdb->setObjectName("STEAM_DB");
btn_push_manifest=new QPushButton(tr("清单分享"));
btn_push_manifest->setObjectName("PUSH_MANIFEST");
server_layout->addWidget(server_tag); server_layout->addWidget(server_tag);
server_layout->addWidget(server_txt); server_layout->addWidget(server_txt);
@ -67,6 +69,7 @@ void xsteam_ui::xsteam_init_mind_layout()
server_layout->addWidget(btn_run_steam); server_layout->addWidget(btn_run_steam);
server_layout->addWidget(btn_run_steamtools); server_layout->addWidget(btn_run_steamtools);
server_layout->addWidget(btn_run_steamdb); server_layout->addWidget(btn_run_steamdb);
server_layout->addWidget(btn_push_manifest);
server_layout->setStretch(0, 1); server_layout->setStretch(0, 1);
server_layout->setStretch(1, 7); server_layout->setStretch(1, 7);
server_layout->setStretch(2, 1); server_layout->setStretch(2, 1);
@ -197,6 +200,7 @@ void xsteam_ui::xsteam_init_connect()
connect(ip_all_dlc_table, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slots_rightMenu(QPoint))); connect(ip_all_dlc_table, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slots_rightMenu(QPoint)));
connect(ip_in_dlc_table, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slots_rightMenu(QPoint))); connect(ip_in_dlc_table, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slots_rightMenu(QPoint)));
connect(btn_dlc_push, SIGNAL(clicked()), this, SLOT(slots_get_uid_dlcs())); connect(btn_dlc_push, SIGNAL(clicked()), this, SLOT(slots_get_uid_dlcs()));
connect(btn_push_manifest, SIGNAL(clicked()), this, SLOT(slots_push_manifest()));
} }
void xsteam_ui::slots_get_uid_dlcs() void xsteam_ui::slots_get_uid_dlcs()
{ {
@ -436,6 +440,12 @@ void xsteam_ui::slots_run_steam_steamtools()
xsteam_run_steam_steamtools(RUN_MODE::STEAMTOOLS); xsteam_run_steam_steamtools(RUN_MODE::STEAMTOOLS);
} }
} }
void xsteam_ui::slots_push_manifest(){
xs_push_manifest = xsteam_push_manifest::Instance();
xs_push_manifest->setMaximumSize(((QWidget *)this->parent())->width(), ((QWidget *)this->parent())->height()-25);
xs_push_manifest->setGeometry(((QWidget *)this->parent())->geometry());
xs_push_manifest->exec();
}
void xsteam_ui::slots_open_server_edit() void xsteam_ui::slots_open_server_edit()
{ {
xs_src_edit_ui = xsteam_src_edit_ui::Instance(); xs_src_edit_ui = xsteam_src_edit_ui::Instance();
@ -458,6 +468,7 @@ void xsteam_ui::slots_open_about()
xs_about_ui->setGeometry(((QWidget *)this->parent())->geometry()); xs_about_ui->setGeometry(((QWidget *)this->parent())->geometry());
xs_about_ui->exec(); xs_about_ui->exec();
} }
void xsteam_ui::slots_table_append(UidData u_data) void xsteam_ui::slots_table_append(UidData u_data)
{ {
if (xs_state == PUSH_MODE::PUSH_ADD) if (xs_state == PUSH_MODE::PUSH_ADD)

View File

@ -16,6 +16,7 @@
#include "xsteam_about_ui.h" #include "xsteam_about_ui.h"
#include "xsteam_view.h" #include "xsteam_view.h"
#include "xsteam_git_fetch.h" #include "xsteam_git_fetch.h"
#include "xsteam_push_manifest.h"
#include <version.h> #include <version.h>
class xsteam_ui:public QWidget{ class xsteam_ui:public QWidget{
@ -55,6 +56,7 @@ private:
QPushButton* btn_uid_update; QPushButton* btn_uid_update;
QPushButton* btn_dlc_push; QPushButton* btn_dlc_push;
QPushButton* btn_run_steamdb; QPushButton* btn_run_steamdb;
QPushButton* btn_push_manifest;
QHBoxLayout* ip_data_layout; QHBoxLayout* ip_data_layout;
//入库游戏列表 //入库游戏列表
@ -79,6 +81,7 @@ private:
xsteam_set_ui * xs_sets_ui; xsteam_set_ui * xs_sets_ui;
xsteam_about_ui* xs_about_ui; xsteam_about_ui* xs_about_ui;
xsteam_git_fetch* xs_git_fetch; xsteam_git_fetch* xs_git_fetch;
xsteam_push_manifest* xs_push_manifest;
QSpacerItem * sparcer_item = new QSpacerItem(0,0,QSizePolicy::Expanding,QSizePolicy::Fixed); QSpacerItem * sparcer_item = new QSpacerItem(0,0,QSizePolicy::Expanding,QSizePolicy::Fixed);
UidData xs_data; UidData xs_data;
@ -88,6 +91,7 @@ private slots:
void slots_open_setting(); void slots_open_setting();
void slots_open_about(); void slots_open_about();
void slots_open_steamdb(); void slots_open_steamdb();
void slots_push_manifest();
void slots_imput_uid_push(); void slots_imput_uid_push();
void slots_server_combobox_load_data(); void slots_server_combobox_load_data();
void slots_disable_enable_function(bool state); void slots_disable_enable_function(bool state);