This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
ESGRAF48/source/CheckableItem/CheckableItem.h

31 lines
502 B
C++

#pragma once
#include <QJsonObject>
#include <string>
class CheckableItem
{
private:
bool m_checked = false;
std::string m_text;
unsigned int m_value = 1;
public:
CheckableItem() = default;
CheckableItem(const std::string &text);
std::string getText() const;
bool isChecked() const;
void setState(bool checked);
unsigned int value() const;
void setValue(unsigned int value);
unsigned int points() const;
void write(QJsonObject &json) const;
void read(const QJsonObject &json);
};