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/FITK_Kernel/FITKEasyParam/FITKParamRadioGroup.h

178 lines
6.2 KiB
C

/**********************************************************************
* @file FITKParamRadioGroup.h
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*********************************************************************/
#ifndef FITKParamRadioGroup_H
#define FITKParamRadioGroup_H
#include "FITKEasyParamAPI.h"
#include "FITKAbstractEasyParam.h"
namespace Core
{
class FITKParameter;
/**
* @brief RadioGroupValue
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-21
*/
struct FITKRadioGroupValue
{
QString _name; //名称RadioButton的名称
FITKParameter* _value; //数据组RadioButton后面的数据
QList<bool> _labelValue; //标签公有数据在当前RadioButton勾选时是否可用标签
};
//数据对象对应界面示例
//| RadioButton 数据组 公有数据1可不用在此RadioButton被点击时标签为 false,true,true,true
//| RadioButton 公有数据2可不用在此RadioButton被点击时标签为 true,false,true,true
//| RadioButton 数据组 标签为 true,true,true,true
//| RadioButton 标签为 true,true,true,true
//| RadioButton 数据组 公有数据3可不用在此RadioButton被点击时标签为 true,true,false,true
//|-------------------------------------------
//| 公有数据1
//| 公有数据2
//| 公有数据3
//| 公有数据4
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
class FITKEasyParamAPI FITKParamRadioGroup :public FITKAbstractEasyParam
{
Q_OBJECT;
public:
/**
* @brief
* @return void
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
FITKParamRadioGroup();
/**
* @brief
* @return void
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
~FITKParamRadioGroup();
/**
* @brief
* @param[i] data
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
void copyParaData(FITKAbstractEasyParam* data) override;
/**
* @brief
* @return FITKEasyParamType
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
FITKAbstractEasyParam::FITKEasyParamType getParamType() override;
/**
* @brief
* @param[i] name
* @param[i] value FITKParamRadioGroup
* @param[i] label -
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
void appendValue(QString name, FITKParameter* value, QList<bool> label = QList<bool>());
/**
* @brief
* @param[i] subValue
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
void setSubValue(FITKParameter* subValue);
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
QList<FITKRadioGroupValue> getRadioValues();
/**
* @brief
* @return QList<FITKAbstractEasyParam*>
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
QList<FITKAbstractEasyParam*> getSubValues();
/**
* @brief
* @return FITKParameter*
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-09
*/
FITKParameter* getSubValuePara();
/**
* @brief Radio
* @return QList<bool>
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-08-21
*/
QList<bool> getCurrentValueSubState();
/**
* @brief
* @param[i] index
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
void setCurrentIndex(int index);
/**
* @brief
* @param[i] name
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
void setCurrentValue(QString name);
/**
* @brief
* @return QString
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
QString getCurrentValue();
/**
* @brief Radio
* @return FITKRadioGroupValue Radio
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-09
*/
FITKRadioGroupValue getCurrentRadioGroupValue();
/**
* @brief
* @return int
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
int getCurrentValueIndex();
private:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
int _currentIndex = 0;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
QList<FITKRadioGroupValue> _value{};
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-21
*/
FITKParameter* _subValue = {};
};
}
#endif