FOSSredder 0.5.0
Loading...
Searching...
No Matches
Status.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <QObject>
9#include <QString>
10
11namespace ui {
12
16class Status : public QObject {
17 Q_OBJECT
18 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
19
20public:
25 explicit Status(QObject* parent = nullptr) : QObject(parent) {}
26
31 QString text() const {
32 return text_;
33 }
34
39 void setText(const QString& value) {
40 if (text_ == value)
41 return;
42 text_ = value;
43 emit textChanged();
44 }
45
46signals:
51
52private:
53 QString text_;
54};
55
56} // namespace ui
QString text() const
Returns the current status text.
Definition Status.h:31
Status(QObject *parent=nullptr)
Creates the status state object.
Definition Status.h:25
void setText(const QString &value)
Updates the current status text.
Definition Status.h:39
QString text
Definition Status.h:18
void textChanged()
Emitted when the status text changes.