ESGRAF48/source/Genus/CheckableItem.h

24 lines
377 B
C
Raw Normal View History

#pragma once
2018-05-23 09:08:50 +00:00
#include <QJsonObject>
#include <string>
class CheckableItem
{
private:
2018-05-23 15:47:04 +00:00
bool m_checked = false;
std::string m_text;
public:
2018-05-23 15:47:04 +00:00
CheckableItem() = default;
CheckableItem(const std::string &text);
2018-05-23 15:47:04 +00:00
std::string getText() const;
bool isChecked() const;
void setState(bool checked);
2018-05-23 09:08:50 +00:00
2018-05-23 15:47:04 +00:00
void write(QJsonObject &json) const;
void read(const QJsonObject &json);
};