You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Kernel/FITKCore/FITKThreadTask.h

98 lines
2.7 KiB
C

/**
*
* @file FITKThreadTask.h
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*
*/
#ifndef __FITKTHREAD_H____
#define __FITKTHREAD_H____
#include "FITKCoreAPI.h"
#include "FITKAbstractObject.hpp"
#include <QRunnable>
#include <QObject>
#include <QString>
namespace Core
{
class FITKThreadTaskGroup;
/**
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
class FITKCoreAPI FITKThreadTask : public QObject, public QRunnable, public FITKAbstractObject
{
Q_OBJECT
friend FITKThreadTaskGroup;
public:
/**
* @brief Construct a new FITKThreadTask object
* @param[i] parent
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
explicit FITKThreadTask(QObject* parent = nullptr);
virtual ~FITKThreadTask() = 0;
/**
* @brief
* @param[o] success
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
void setResultMark(bool *success);
signals:
/**
* @brief 线 0~100
* @param[o] sender
* @param[o] process 线 0-100
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
void sendProcessSig(QObject* sender, int process);
// /**
// * @brief 线程发送出的信息
// * @param[o] message 发送的信息
// * @author LiBaojun (libaojunqd@foxmail.com)
// * @date 2024-03-02
// */
// void sendMessageSig(QString message);
/**
* @brief 线
* @param[o] ta 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
void taskFinishedSig(FITKThreadTask* ta);
private:
/**
* @brief
* @param[i] group
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-13
*/
void setTaskGroup(FITKThreadTaskGroup* group);
protected:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-18
*/
bool* _resultMark{ nullptr };
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-18
*/
FITKThreadTaskGroup* _taskGroup{ nullptr };
};
}
#endif