More constructors for ChangeableText

This commit is contained in:
2021-09-05 23:21:59 +02:00
parent b983070b4d
commit cd25518d86

View File

@ -30,6 +30,10 @@ public:
class ChangeableText : public virtual TextInterface
{
public:
ChangeableText() = default;
ChangeableText(std::string &&title) : m_title{std::move(title)} {}
ChangeableText(const std::string &title) : m_title{title} {}
std::string text() const override { return m_title; }
void setTitle(std::string &&title) { m_title = std::move(title); }
void setTitle(const std::string &title) { m_title = title; }