15 #ifndef BORNAGAIN_GUI_MODEL_DESCRIPTOR_DOUBLEDESCRIPTOR_H
16 #define BORNAGAIN_GUI_MODEL_DESCRIPTOR_DOUBLEDESCRIPTOR_H
18 #include "Fit/Param/RealLimits.h"
54 const RealLimits&
limits,
double* var,
const variant<QString, Unit>&
unit);
59 const variant<QString, Unit>&
unit);
65 function<
double()> getter,
const variant<QString, Unit>&
unit);
69 function<
void(
double)> setter,
function<
double()> getter,
70 const variant<QString, Unit>&
unit);
90 operator double()
const;
96 function<void(
double)>
set =
nullptr;
97 function<double()>
get =
nullptr;
99 function<QString()>
path =
nullptr;
QList< DoubleDescriptor > DoubleDescriptors
@ other
The unit has no enum value defined in here (e.g. when defined as an explicit string)
Describes properties of a double value which are necessary to allow GUI representation,...
variant< QString, Unit > unit
Unit of the value (internal unit only!)
QString label
A label text (short, no trailing colon)
function< void(double)> set
function to set the value
RealLimits limits
Limits of the value.
DoubleDescriptor()=default
function< double()> get
function to get the current value
QString tooltip
Tooltip text.
int decimals
numbers of decimals to be shown in an edit control
function< QString()> path
Path describing this value. Used e.g. for undo/redo.
DoubleDescriptor(const DoubleDescriptor &other)=default
Base class for a GUI data item.