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

145 lines
4.0 KiB
C

/**
*
* @file FITKWidgetSciNotation.h
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*
*/
#ifndef _FITKWidgetSciNotation_H
#define _FITKWidgetSciNotation_H
#include "FITKEasyParamAPI.h"
#include <QLineEdit>
namespace Core
{
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
class FITKEasyParamAPI FITKWidgetSciNotation :public QLineEdit
{
Q_OBJECT;
public:
/**
* @brief Construct a new FITKWidgetSciNotation object
* @param[i] parent My Param doc
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
FITKWidgetSciNotation(QWidget* parent);
/**
* @brief Destroy the FITKWidgetSciNotation object
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
virtual ~FITKWidgetSciNotation();
/**
* @brief
* @param[i] range
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-27
*/
void setRange(double* range);
/**
* @brief
* @param[i] message
* @param[o] value double
* @return true
* @return false
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
static bool isValidText(QString message, double& value);
/**
* @brief
* @return QString
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
QString getCurrentValidText();
/**
* @brief double
* @param[o] value
* @return true
* @return false
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
bool getCurrentValidValue(double& value);
/**
* @brief
* @param[i] value
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-27
*/
void setCurrentValidValue(double value);
/**
* @brief
* @param val
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-29
*/
void setValue(double val);
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-29
*/
double value();
signals:
;
/**
* @brief LineEdit
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
void dataChanged();
private slots:
;
/**
* @brief LineEdit
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
void slot_textChanged();
/**
* @brief
* @param text
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-29
*/
void slot_textEdited(const QString & text);
protected:
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-06-11
*/
QString _currentValidText = "";
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-27
*/
double _range[2] = { -9e99,9e99 };
/**
* @brief
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-29
*/
double _value = 0.;
};
}
#endif