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

28 lines
459 B
C
Raw Normal View History

#pragma once
2018-05-23 09:08:50 +00:00
#include <QJsonObject>
#include <string>
class CheckableItem
{
private:
2019-10-05 14:14:45 +00:00
bool m_checked = false;
std::string m_text;
unsigned int m_value = 1;
public:
2019-10-05 14:14:45 +00:00
CheckableItem() = default;
CheckableItem(const std::string& text);
2019-10-05 14:14:45 +00:00
std::string getText() const;
2019-10-05 14:14:45 +00:00
bool isChecked() const;
void setState(bool checked);
2018-05-23 09:08:50 +00:00
2019-10-05 14:14:45 +00:00
unsigned int value() const;
void setValue(unsigned int value);
2019-10-05 14:14:45 +00:00
unsigned int points() const;
};