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/FITKAppFramework/FITKAbstractProgramDriver.h

214 lines
6.3 KiB
C

/**
*
* @file FITKAbstractProgramDriver.h
* @brief
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*
*/
#ifndef __FITK_ABSTRACTPROGRAM_DRIVER_H__
#define __FITK_ABSTRACTPROGRAM_DRIVER_H__
#include "FITKAppFrameworkAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataObject.h"
#include "FITK_Kernel/FITKCore/FITKVarientParams.h"
#include <QStringList>
#include "FITK_Kernel/FITKCore/FITKVarientParams.h"
class QFileSystemWatcher;
namespace AppFrame
{
/**
* @brief
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
class FITKAppFrameworkAPI FITKProgramInputInfo
: public Core::FITKAbstractObject, public Core::FITKVarientParams
{
public:
/**
* @brief Construct a new FITKProgramInputInfo object
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
explicit FITKProgramInputInfo() = default;
/**
* @brief Destroy the FITKProgramInputInfo object
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
virtual ~FITKProgramInputInfo() = 0;
/**
* @brief
* @param[i] args
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
virtual void setArgs(const QStringList& args);
/**
* @brief
* @return QStringList
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
virtual QStringList args() = 0;
/**
* @brief
* @return QStringList
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
virtual void setMonitorFiles(QStringList &monitorFiles) = 0;
/**
* @brief
* @return QStringList
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
virtual QStringList getMonitorFiles();
/**
* @brief
* @return QStringList
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
virtual void setMonitorPath(QStringList &monitorpath) = 0;
/**
* @brief
* @return QStringList
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
virtual QStringList getMonitorPath();
};
/**
* @brief driver
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
class FITKAppFrameworkAPI FITKAbstractProgramerDriver
: public Core::FITKAbstractDataObject
{
Q_OBJECT
public:
/**
* @brief Construct a new FITKAbstractProgramerDriver object
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
explicit FITKAbstractProgramerDriver() = default;
/**
* @brief Destroy the FITKAbstractProgramerDriver object
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
virtual ~FITKAbstractProgramerDriver();
/**
* @brief
* @return int
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
virtual int getProgramType() = 0;
/**
* @brief
* @return QString
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
virtual QString getProgramName() = 0;
/**
* @brief
* @param[i] info
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
virtual void setInputInfo(FITKProgramInputInfo* info);
/**
* @brief
* @return FITKProgramInputInfo*
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
FITKProgramInputInfo* getProgramInput();
/**
* @brief
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
virtual void start() = 0;
/**
* @brief
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-07-02
*/
virtual void stop() = 0;
signals:
/**
* @brief
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-07-02
*/
void sig_Finish();
protected:
/**
* @brief signal transfer
* @param[i] messageType
* @param[i] message
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
void sendMessage(int messageType, const QString& message);
/**
* @brief
* @param[i] m
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
void monitorFileDirectories(bool m = true);
private slots:
/**
* @brief
* @param[i] file
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
void fileChangedSlot(const QString& file);
/**
* @brief
* @param[i] dir
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
void directoryChangedSlot(const QString& dir);
protected:
/**
* @brief
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
FITKProgramInputInfo* _inputInfo{};
/**
* @brief
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-15
*/
QFileSystemWatcher* _fileWatcher{};
};
}
#endif