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.

198 lines
5.6 KiB
C

/**
*
* @file FITKWorkBenchHandler.h
* @brief workbench
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*
*/
#ifndef __FITK_WORKBENCH_HANDLER_H___
#define __FITK_WORKBENCH_HANDLER_H___
#include "FITKAppFrameworkAPI.h"
#include "FITKAppSettings.h"
#include <QList>
namespace AppFrame
{
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
struct IOFileInfo
{
QString _path{}; // 文件路径
QString _name{}; // 文件名
QString _describe{}; // 文件描述
QString _suffix{}; // 文件后缀
bool _isFile{ true }; //是否是文件false表示是folder文件夹
};
/**
* @brief workbench
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
class FITKAppFrameworkAPI FITKWorkBenchHandler : public FITKAppSettings
{
public:
/**
* @brief Construct a new FITKWorkBenchHandler object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
explicit FITKWorkBenchHandler();
/**
* @brief Destroy the FITKWorkBenchHandler object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
virtual ~FITKWorkBenchHandler() = default;
/**
* @brief workbench
* @return true
* @return false
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
virtual bool workingInWorkBench();
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
virtual void execHandler() = 0;
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-27
*/
virtual void execOutput() = 0;
/**
* @brief INI
* @return QString
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
QString getIniFile() const;
/**
* @brief
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
int getInputFilesCount();
/**
* @brief
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
int getOutputFilesCount();
/**
* @brief index
* @param[i] index
* @return IOFileInfo
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
IOFileInfo getInputFileInfo(const int index);
/**
* @brief index
* @param[i] index
* @return IOFileInfo
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
IOFileInfo getOututFileInfo(const int index);
/**
* @brief index
* @return QString
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
QString getOutputPath();
/**
* @brief
* @return bool
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-31
*/
bool isProjectFileMode();
/**
* @brief houutput
* @param[i] info
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-05
*/
void appendOutputInfo(const IOFileInfo& info);
/**
* @brief
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-05
*/
int getOutputInfoCount();
/**
* @brief index
* @param[i] index
* @return IOFileInfo index
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-05
*/
IOFileInfo getOutputInfoAt(const int index);
/**
* @brief
* @param[i] index
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-05
*/
void removeOutputInfo(int index);
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-05
*/
void clearOutputInfo();
/**
* @brief INI
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-05
*/
virtual void write() override;
protected:
/**
* @brief ini
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
void read() override;
protected:
/**
* @brief workbench
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
bool _workingInWorkBench{ false };
/**
* @brief ini
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
QString _iniFile{};
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-26
*/
QList<IOFileInfo> _outputInfos{};
};
}
#endif