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