15class Tool :
public QObject
20 int toolValue READ getToolValue WRITE setToolValue NOTIFY toolValueChanged)
34 Tool (QObject * parent =
nullptr);
35 Z_DISABLE_COPY_MOVE (Tool)
38 [[nodiscard]]
int getToolValue ()
const;
39 void setToolValue (
int tool);
40 Q_SIGNAL
void toolValueChanged (
int tool);
46 static constexpr auto kToolValueKey =
"toolValue"sv;
47 friend void to_json (nlohmann::json &j,
const Tool &tool)
49 j[kToolValueKey] = tool.tool_;
51 friend void from_json (
const nlohmann::json &j, Tool &tool)
53 j.at (kToolValueKey).get_to (tool.tool_);
57 ToolType tool_{ ToolType::Select };