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.

138 lines
3.7 KiB
C

/**
*
* @file FITKExecProgramDriver.h
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*
*/
#ifndef _FITKEXEC_PROGRAMER_DRIVER_H___
#define _FITKEXEC_PROGRAMER_DRIVER_H___
#include "FITKAbstractProgramDriver.h"
class QProcess;
namespace AppFrame
{
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
class FITKAppFrameworkAPI FITKExecProgramDriver : public FITKAbstractProgramerDriver
{
Q_OBJECT
public:
/**
* @brief Construct a new FITKExecProgramDriver object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
explicit FITKExecProgramDriver();
/**
* @brief Destroy the FITKExecProgramDriver object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
virtual ~FITKExecProgramDriver();
/**
* @brief
* @param[i] program
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
void setExecProgram(const QString & program);
/**
* @brief
* @return QString
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
QString getExecProgram() const;
/**
* @brief
* @param path
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-22
*/
void setWorkingDirectory(const QString & path);
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-22
*/
QString getWorkingDirectory() const;
/**
* @brief
* @author libaojun (libaojunqd@Foxmail.com)
* @date 2024-06-09
*/
void start() override;
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
void stop() override;
/**
* @brief
* @param[i] s
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
void enableSendMessage(bool s);
/**
* @brief
* @return true
* @return false
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
bool isSendMessage() const;
private slots:
/**
* @brief procss
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
void sendMessageSlot();
private:
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
QString _program{};
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-22
*/
QString _workDir{};
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
QProcess* _process{};
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
bool _sendMessage{true};
};
}
#endif