21#include "cc_tools_qt/details/ToolsNumericFieldBase.h"
23#include <QtCore/QList>
24#include <QtCore/QPair>
36class CC_TOOLS_API ToolsIntField :
public details::ToolsNumericFieldBase<long long int>
38 using Base = details::ToolsNumericFieldBase<long long int>;
41 using UnderlyingType = Base::UnderlyingType ;
42 using ActPtr = std::unique_ptr<ToolsIntField>;
43 using SpecialType = QPair<QString, UnderlyingType>;
44 using SpecialsList = QList<SpecialType>;
47 virtual ~ToolsIntField() noexcept;
49 UnderlyingType minValue() const;
51 UnderlyingType maxValue() const;
53 double getScaled() const;
55 void setScaled(
double value);
57 double scaleValue(UnderlyingType value) const;
59 bool isSigned() const;
61 std::
size_t valueTypeSize() const;
63 const SpecialsList& specials() const;
65 bool hasScaledDecimals() const;
66 int scaledDecimals() const;
68 UnderlyingType getDisplayValue() const;
69 void setDisplayValue(UnderlyingType value);
74 virtual UnderlyingType minValueImpl() const = 0;
75 virtual UnderlyingType maxValueImpl() const = 0;
76 virtual
double getScaledImpl() const = 0;
77 virtual
void setScaledImpl(
double value) = 0;
78 virtual
double scaleValueImpl(UnderlyingType value) const = 0;
79 virtual
bool isSignedImpl() const = 0;
80 virtual std::
size_t valueTypeSizeImpl() const = 0;
81 virtual const SpecialsList& specialsImpl() const = 0;
82 virtual
int scaledDecimalsImpl() const = 0;
83 virtual UnderlyingType getDisplayValueImpl() const = 0;
84 virtual
void setDisplayValueImpl(UnderlyingType value) = 0;
86 virtual
void dispatchImpl(ToolsFieldHandler& handler) override;
89using ToolsIntFieldPtr = ToolsIntField::ActPtr;