add: basic req trans.

This commit is contained in:
2025-06-18 13:18:31 +08:00
parent 280721f29b
commit 5dcf638e62
7 changed files with 121 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
#include "Transform.h"
#include <QMessageBox>
#include "ui_Transform.h"
@@ -16,4 +17,23 @@ TransForm::~TransForm()
void TransForm::SetClientCore(ClientCore* clientCore)
{
clientCore_ = clientCore;
fileTrans_ = new FileTrans(clientCore_);
}
void TransForm::SetTasks(const QVector<TransTask>& tasks)
{
tasks_ = tasks;
}
void TransForm::startTask()
{
for (auto& task : tasks_) {
}
}
void TransForm::showEvent(QShowEvent* event)
{
QDialog::showEvent(event);
startTask();
}

View File

@@ -4,6 +4,7 @@
#include <ClientCore.h>
#include <QDialog>
#include <QFile>
#include <FileTrans.h>
namespace Ui {
class TransForm;
@@ -19,9 +20,18 @@ public:
public:
void SetClientCore(ClientCore* clientCore);
void SetTasks(const QVector<TransTask>& tasks);
private:
ClientCore* clientCore_;
void startTask();
protected:
void showEvent(QShowEvent* event) override;
private:
QVector<TransTask> tasks_;
FileTrans* fileTrans_{};
ClientCore* clientCore_{};
Ui::TransForm* ui;
};