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