Skip to content

Commit

Permalink
Update file(s): 2024-11-25
Browse files Browse the repository at this point in the history
  • Loading branch information
horsicq committed Nov 25, 2024
1 parent 491f38e commit 27155f0
Show file tree
Hide file tree
Showing 14 changed files with 430 additions and 331 deletions.
8 changes: 4 additions & 4 deletions AbstractWidgets/abstractwidgets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ set(ABSTRACTWIDGETS_SOURCES
${CMAKE_CURRENT_LIST_DIR}/generictablewidget.cpp
${CMAKE_CURRENT_LIST_DIR}/generictablewidget.h
${CMAKE_CURRENT_LIST_DIR}/generictablewidget.ui
${CMAKE_CURRENT_LIST_DIR}/ELF/elf_defs.cpp
${CMAKE_CURRENT_LIST_DIR}/ELF/elf_defs.h
${CMAKE_CURRENT_LIST_DIR}/MACH/mach_defs.cpp
${CMAKE_CURRENT_LIST_DIR}/MACH/mach_defs.h
${CMAKE_CURRENT_LIST_DIR}/Specific/elf_defs.cpp
${CMAKE_CURRENT_LIST_DIR}/Specific/elf_defs.h
${CMAKE_CURRENT_LIST_DIR}/Specific/mach_defs.cpp
${CMAKE_CURRENT_LIST_DIR}/Specific/mach_defs.h
)
23 changes: 13 additions & 10 deletions AbstractWidgets/dialogprocessdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,16 @@
*/
#include "dialogprocessdata.h"

DialogProcessData::DialogProcessData(QWidget *pParent, ProcessData *pProcessData, XOptions *pOptions) : XDialogProcess(pParent)
DialogProcessData::DialogProcessData(QWidget *pParent) : XDialogProcess(pParent)
{
this->g_pProcessData = pProcessData;

pProcessData->setPdStruct(getPdStruct());
pProcessData->setOptions(pOptions);

g_pProcessData = new ProcessData;
g_pThread = new QThread;

pProcessData->moveToThread(g_pThread);
g_pProcessData->moveToThread(g_pThread);

connect(g_pThread, SIGNAL(started()), pProcessData, SLOT(process()));
connect(pProcessData, SIGNAL(completed(qint64)), this, SLOT(onCompleted(qint64)));
connect(pProcessData, SIGNAL(errorMessage(QString)), this, SLOT(errorMessageSlot(QString)));
connect(g_pThread, SIGNAL(started()), g_pProcessData, SLOT(process()));
connect(g_pProcessData, SIGNAL(completed(qint64)), this, SLOT(onCompleted(qint64)));
connect(g_pProcessData, SIGNAL(errorMessage(QString)), this, SLOT(errorMessageSlot(QString)));

g_pThread->start();
}
Expand All @@ -47,4 +43,11 @@ DialogProcessData::~DialogProcessData()
g_pThread->wait();

delete g_pThread;
delete g_pProcessData;
}

void DialogProcessData::setData(QStandardItemModel **ppModel, QList<FW_DEF::HEADER_RECORD> *pListHeaderRecords, FW_DEF::CWOPTIONS *pCwOptions)
{
g_pProcessData->setData(ppModel, pListHeaderRecords, pCwOptions, getPdStruct());
g_pThread->start();
}
3 changes: 2 additions & 1 deletion AbstractWidgets/dialogprocessdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ class DialogProcessData : public XDialogProcess {
Q_OBJECT

public:
explicit DialogProcessData(QWidget *pParent, ProcessData *pProcessData, XOptions *pOptions);
explicit DialogProcessData(QWidget *pParent);
~DialogProcessData();
void setData(QStandardItemModel **ppModel, QList<FW_DEF::HEADER_RECORD> *pListHeaderRecords, FW_DEF::CWOPTIONS *pCwOptions);

private:
ProcessData *g_pProcessData;
Expand Down
Loading

0 comments on commit 27155f0

Please sign in to comment.