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/RunWidget.h

190 lines
5.3 KiB
C

/**********************************************************************
* @file RunWidget.h
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*********************************************************************/
#ifndef _RunWidget_H
#define _RunWidget_H
#include "GUICalculateDialogAPI.h"
#include "GUICalculateWidgetBase.h"
class QAbstractButton;
namespace Ui {
class RunWidget;
}
namespace EventOper {
class ParaWidgetInterfaceOperator;
}
namespace Interface {
class FITKOFRunControl;
}
namespace GUI
{
/**
* @brief CPU
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
enum class RunCPUType {
Serial,
Parallel,
};
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
class GUICalculateDialogAPI RunWidget : public GUICalculateWidgetBase
{
Q_OBJECT;
public:
/**
* @brief
* @param[i] oper
* @param[i] parent
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
RunWidget(EventOper::ParaWidgetInterfaceOperator* oper, QWidget* parent = nullptr);
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
~RunWidget();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void init();
/**
* @brief
* @param[i] event
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void showEvent(QShowEvent * event);
/**
* @brief
* @param[i] event
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void resizeEvent(QResizeEvent * event);
private slots:
;
/**
* @brief CPU
* @param[i] button QRadioButton
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void slotCPUChange(QAbstractButton* button);
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void slotProcessFinish();
/**
* @brief CPU
* @param[i] arg1 CPU
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void on_spinBox_NumOfPro_valueChanged(int arg1);
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void on_pushButton_Stop_clicked();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void on_pushButton_Run_clicked();
private:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void updataTime();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void updateOutput();
/**
* @brief CPU
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void initCPU();
/**
* @brief CPU
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void updateCPU();
/**
* @brief
* @param[i] casePath
* @return bool
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-29
*/
bool clearCasePath(QString casePath);
/**
* @brief
* @param[i] casePath
* @return bool
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-29
*/
bool writeCase(QString casePath);
/**
* @brief
* @param[i] workDir
* @param[i] caseDir
* @return QString
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-30
*/
QString creatStartSh(QString workDir, QString caseDir);
/**
* @brief
* @param[i] isRun
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
void setRunType(bool isRun);
private:
/**
* @brief UI
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
Ui::RunWidget* _ui = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-02
*/
Interface::FITKOFRunControl* _runConObj = nullptr;
};
}
#endif