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/GUIDialog/GUICalculateDialog/CalculateDriver.h

73 lines
2.2 KiB
C

/**********************************************************************
* @file CalculateDriver.h
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-05
*********************************************************************/
#include "FITK_Kernel/FITKAppFramework/FITKExecProgramDriver.h"
#include "FITK_Kernel/FITKAppFramework/FITKProgramDriverFactory.h"
#include <QProcess>
namespace GUI
{
class CalculateDriver : public AppFrame::FITKAbstractProgramerDriver
{
Q_OBJECT;
public:
CalculateDriver();
~CalculateDriver();
/**
* @brief
* @param[i] program
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-05
*/
void setExecProgram(const QString & program);
/**
* @brief
* @return QString
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-05
*/
QString getExecProgram() const;
virtual int getProgramType() override;
virtual QString getProgramName() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-05
*/
void start() override;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-05
*/
void stop() override;
private slots:
;
void slotProcessOutput();
void slotProcessOutputError();
void slotProcessFinish(int exitCode, QProcess::ExitStatus exitStatus);
void slotMainwindowClose();
private:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-05
*/
QString _program{};
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-05
*/
QProcess* _process{};
};
Register2FITKProgramDriverFactory(1, CalculateDriver, CalculateDriver)
} // namespace GUI