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.
162 lines
5.9 KiB
C++
162 lines
5.9 KiB
C++
/**********************************************************************
|
|
* @file FITKParameter.h
|
|
* @brief 数据参数接口声明
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-13
|
|
*********************************************************************/
|
|
#ifndef FITKParameter_H_
|
|
#define FITKParameter_H_
|
|
|
|
#include "FITKEasyParamAPI.h"
|
|
#include "FITKAbstractEasyParam.h"
|
|
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
|
|
|
|
namespace Core
|
|
{
|
|
class FITKParamBool;
|
|
class FITKParamInt;
|
|
class FITKParamDouble;
|
|
class FITKParamCombox;
|
|
class FITKParamString;
|
|
class FITKParamRadioGroup;
|
|
class FITKParamDoubleList;
|
|
class FITKParamBoolGroup;
|
|
/**
|
|
* @brief 数据参数接口类
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-13
|
|
*/
|
|
class FITKEasyParamAPI FITKParameter : public FITKAbstractDataManager<Core::FITKAbstractEasyParam>
|
|
{
|
|
public:
|
|
explicit FITKParameter() = default;
|
|
virtual ~FITKParameter();
|
|
|
|
/**
|
|
* @brief 参数数据拷贝
|
|
* @param[i] data
|
|
* @return void
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-13
|
|
*/
|
|
void copyPara(FITKParameter* data);
|
|
/**
|
|
* @brief 追加参数数据拷贝
|
|
* @param[i] data
|
|
* @return void
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-13
|
|
*/
|
|
void appendPara(FITKParameter* data);
|
|
/**
|
|
* @brief 获取所用数据
|
|
* @return QList<FITKAbstractEasyParam*>
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-21
|
|
*/
|
|
QList<FITKAbstractEasyParam*> getParameter();
|
|
/**
|
|
* @brief 创建Int参数并追加到m_propertyList
|
|
* @param[i] name 名称
|
|
* @param[i] value 初始值
|
|
* @param[i] upperLimit 阈值上限
|
|
* @param[i] lowerLimit 阈值下限
|
|
* @return FITKParamInt *
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-23
|
|
*/
|
|
FITKParamInt* createIntParameter(QString name, int value, int upperLimit = 99999999, int lowerLimit = -99999999);
|
|
/**
|
|
* @brief 创建Double参数并追加到m_propertyList
|
|
* @param[i] name 名称
|
|
* @param[i] value 初始值
|
|
* @param[i] upperLimit 阈值上限
|
|
* @param[i] lowerLimit 阈值下限
|
|
* @return FITKParamDouble *
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-23
|
|
*/
|
|
FITKParamDouble* createDoubleParameter(QString name, double value, double upperLimit = 99999999, double lowerLimit = -99999999);
|
|
/**
|
|
* @brief 创建DoubleList参数并追加到m_propertyList
|
|
* @param[i] name 名称
|
|
* @param[i] value 初始值
|
|
* @param[i] upperLimit 阈值上限
|
|
* @param[i] lowerLimit 阈值下限
|
|
* @return FITKParamDoubleList *
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-23
|
|
*/
|
|
FITKParamDoubleList* createDoubleListParameter(QString name, QList<double> value, double upperLimit = 99999999, double lowerLimit = -99999999);
|
|
/**
|
|
* @brief 创建String参数并追加到m_propertyList
|
|
* @param[i] name 名称
|
|
* @param[i] value 初始值
|
|
* @return FITKParamString *
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-21
|
|
*/
|
|
FITKParamString* createStringParameter(QString name, QString value);
|
|
/**
|
|
* @brief 创建Bool参数并追加到m_propertyList
|
|
* @param[i] name 名称
|
|
* @param[i] value 初始值
|
|
* @return FITKParamBool *
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-21
|
|
*/
|
|
FITKParamBool* createBoolParameter(QString name, bool value);
|
|
/**
|
|
* @brief 创建BoolGroup参数并追加到m_propertyList
|
|
* @param[i] name 名称
|
|
* @param[i] value 初始值
|
|
* @return FITKParamBoolGroup *
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-22
|
|
*/
|
|
FITKParamBoolGroup* createBoolGroupParameter(QString name, bool value);
|
|
/**
|
|
* @brief 创建Combox参数并追加到m_propertyList
|
|
* @param[i] name 名称
|
|
* @param[i] value 参数
|
|
* @param[i] index 初始值
|
|
* @return FITKParamCombox *
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-21
|
|
*/
|
|
FITKParamCombox* createComboxParameter(QString name, QStringList value, int index);
|
|
/**
|
|
* @brief 创建RadioGroup参数并追加到m_propertyList
|
|
* @param[i] name 名称
|
|
* @return FITKParamRadioGroup *
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-21
|
|
*/
|
|
FITKParamRadioGroup* createRadioGroupParameter(QString name);
|
|
/**
|
|
* @brief 仅保留名称一致的数据
|
|
* @param[i] data
|
|
* @return void
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-08-23
|
|
*/
|
|
void onlyKeepPara(FITKParameter* data);
|
|
/**
|
|
* @brief 拷贝并添加数据
|
|
* @param[i] oldData
|
|
* @return void
|
|
* @author liuzhonghua (liuzhonghuaszch@163.com)
|
|
* @date 2024-09-04
|
|
*/
|
|
void copyAppendPara(FITKAbstractEasyParam* oldData);
|
|
|
|
double getDoubleParaByName(QString name, bool& ok);
|
|
int getIntParaByName(QString name, bool& ok);
|
|
bool getBoolParaByName(QString name, bool& ok);
|
|
QString getStringParaByName(QString name, bool& ok);
|
|
QString getComboxCurrentParaByName(QString name, bool& ok);
|
|
};
|
|
}
|
|
|
|
#endif // !FITKParameter_H_
|