22#include "cc_tools_qt/details/ToolsNumericFieldBase.h"
24#include <QtCore/QList>
25#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 [[nodiscard]] UnderlyingType minValue() const;
53 [[nodiscard]] UnderlyingType maxValue() const;
55 [[nodiscard]]
double getScaled() const;
57 void setScaled(
double value);
59 [[nodiscard]]
double scaleValue(UnderlyingType value) const;
61 [[nodiscard]]
bool isSigned() const;
63 [[nodiscard]] std::
size_t valueTypeSize() const;
65 [[nodiscard]] const SpecialsList& specials() const;
67 [[nodiscard]]
bool hasScaledDecimals() const;
68 [[nodiscard]]
int scaledDecimals() const;
70 [[nodiscard]] UnderlyingType getDisplayValue() const;
71 void setDisplayValue(UnderlyingType value);
73 [[nodiscard]] ActPtr actClone();
76 [[nodiscard]] virtual UnderlyingType minValueImpl() const = 0;
77 [[nodiscard]] virtual UnderlyingType maxValueImpl() const = 0;
78 [[nodiscard]] virtual
double getScaledImpl() const = 0;
79 virtual
void setScaledImpl(
double value) = 0;
80 [[nodiscard]] virtual
double scaleValueImpl(UnderlyingType value) const = 0;
81 [[nodiscard]] virtual
bool isSignedImpl() const = 0;
82 [[nodiscard]] virtual std::
size_t valueTypeSizeImpl() const = 0;
83 [[nodiscard]] virtual const SpecialsList& specialsImpl() const = 0;
84 [[nodiscard]] virtual
int scaledDecimalsImpl() const = 0;
85 [[nodiscard]] virtual UnderlyingType getDisplayValueImpl() const = 0;
86 virtual
void setDisplayValueImpl(UnderlyingType value) = 0;
88 virtual
void dispatchImpl(ToolsFieldHandler& handler) override;
91using ToolsUnsignedLongFieldPtr = ToolsUnsignedLongField::ActPtr;