22#include "cc_tools_qt/details/ToolsNumericFieldBase.h"
24#include <QtCore/QList>
25#include <QtCore/QPair>
37class CC_TOOLS_API ToolsIntField :
public details::ToolsNumericFieldBase<long long int>
39 using Base = details::ToolsNumericFieldBase<long long int>;
42 using UnderlyingType = Base::UnderlyingType ;
43 using ActPtr = std::unique_ptr<ToolsIntField>;
44 using SpecialType = QPair<QString, UnderlyingType>;
45 using SpecialsList = QList<SpecialType>;
48 virtual ~ToolsIntField() noexcept;
50 UnderlyingType minValue() const;
52 UnderlyingType maxValue() const;
54 double getScaled() const;
56 void setScaled(
double value);
58 double scaleValue(UnderlyingType value) const;
60 bool isSigned() const;
62 std::
size_t valueTypeSize() const;
64 const SpecialsList& specials() const;
66 bool hasScaledDecimals() const;
67 int scaledDecimals() const;
69 UnderlyingType getDisplayValue() const;
70 void setDisplayValue(UnderlyingType value);
75 virtual UnderlyingType minValueImpl() const = 0;
76 virtual UnderlyingType maxValueImpl() const = 0;
77 virtual
double getScaledImpl() const = 0;
78 virtual
void setScaledImpl(
double value) = 0;
79 virtual
double scaleValueImpl(UnderlyingType value) const = 0;
80 virtual
bool isSignedImpl() const = 0;
81 virtual std::
size_t valueTypeSizeImpl() const = 0;
82 virtual const SpecialsList& specialsImpl() const = 0;
83 virtual
int scaledDecimalsImpl() const = 0;
84 virtual UnderlyingType getDisplayValueImpl() const = 0;
85 virtual
void setDisplayValueImpl(UnderlyingType value) = 0;
87 virtual
void dispatchImpl(ToolsFieldHandler& handler) override;
90using ToolsIntFieldPtr = ToolsIntField::ActPtr;