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

156 lines
4.4 KiB
C

/**********************************************************************
* @file CompSelectComBoxWidget.h
* @brief comBox
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*********************************************************************/
#ifndef _CompSelectComBoxWidget_H
#define _CompSelectComBoxWidget_H
#include <QWidget>
#include <QVariant>
namespace Ui {
class CompSelectComBoxWidget;
}
namespace Core {
class FITKParameter;
}
namespace GUI {
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
class CompSelectComBoxWidget;
typedef Core::FITKParameter* (*getSubDataFormText)(const QString&, CompSelectComBoxWidget*);
/**
* @brief comBox
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
class CompSelectComBoxWidget :public QWidget
{
Q_OBJECT;
public:
/**
* @brief
* @param[i] type combox
* @param[i] parent
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
CompSelectComBoxWidget(QString type, QWidget* parent = nullptr);
/**
* @brief
* @return void
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
~CompSelectComBoxWidget();
/**
* @brief
* @return void
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
void init();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
void update();
/**
* @brief
* @param[i] function
* @param[i] index solution
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
void setFunction(getSubDataFormText function);
/**
* @brief
* @param[i] Options
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
void setOptions(QStringList Options);
/**
* @brief
* @param[i] index
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
void setCurrentText(const QString index);
/**
* @brief
* @param[i] data
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
void setSubWidgetData(Core::FITKParameter* data);
/**
* @brief
* @param[i] name
* @param[i] data
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-27
*/
void setData(QString name, QVariant data);
/**
* @brief
* @param[i] name
* @return QVariant
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-27
*/
QVariant getData(const QString name);
private slots:
;
/**
* @brief /
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
void on_pushButton_clicked();
/**
* @brief
* @param[i] index
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
void on_comboBox_currentIndexChanged(int index);
private:
/**
* @brief ui
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
Ui::CompSelectComBoxWidget* _ui = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
QString _type = "";
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-26
*/
getSubDataFormText _myFunction = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-27
*/
QHash<QString, QVariant> _data = {};
};
}
#endif