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.

117 lines
3.1 KiB
C

/**
*
* @file FITKThreadPoolPrivate.h
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*
*/
#ifndef __FITKTHREADPOOL_PRIVATE_H___
#define __FITKTHREADPOOL_PRIVATE_H___
#include "FITKAbstractObject.hpp"
#include <QObject>
#include <QList>
#include <QThreadPool>
namespace AppFrame
{
class FITKSignalTransfer;
}
namespace Core
{
class FITKThreadTask;
/**
* @brief qt线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
class FITKThreadPoolPrivate : public QObject, public FITKAbstractObject
{
Q_OBJECT
friend FITKThreadTask;
public:
/**
* @brief Construct a new FITKThreadPoolPrivate object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
explicit FITKThreadPoolPrivate() = default;
/**
* @brief Destroy the FITKThreadPoolPrivate object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
~FITKThreadPoolPrivate();
/**
* @brief 线
* @param[i] task
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
void addTask(FITKThreadTask* task);
/**
* @brief
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
int taskCount();
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
void waitForFinished();
/**
* @brief
* @param sigTransfer
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
void setSignalTransfer(AppFrame::FITKSignalTransfer* sigTransfer);
/**
* @brief
* @param[i] task 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-31
*/
bool isContains(FITKThreadTask* task);
private:
/**
* @brief
* @param[i] task
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
void removeTask(FITKThreadTask* task);
private:
/**
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
QList<FITKThreadTask*> _taskList{};
/**
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
QThreadPool _threadPool{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
AppFrame::FITKSignalTransfer* _sigTransfer{};
};
}
#endif