mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Resolved remaining issues with ApiModel
This commit is contained in:
parent
89fef6d7f4
commit
9abee12658
8 changed files with 79 additions and 66 deletions
|
@ -42,36 +42,6 @@ private:
|
|||
};
|
||||
|
||||
using ModelStatus = ModelStatusClass::Value;
|
||||
|
||||
|
||||
class ModelStatusTest : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ModelStatusTest(QObject *parent = nullptr) : QObject(parent) {
|
||||
m_timer.setInterval(500);
|
||||
connect(&m_timer, &QTimer::timeout, this, &ModelStatusTest::rotateStatus);
|
||||
m_timer.setSingleShot(false);
|
||||
m_timer.start();
|
||||
}
|
||||
Q_PROPERTY(ModelStatus status READ status WRITE setStatus NOTIFY statusChanged)
|
||||
|
||||
ModelStatus status() const { return m_status; }
|
||||
|
||||
void setStatus(ModelStatus newStatus) {
|
||||
m_status = newStatus;
|
||||
emit statusChanged();
|
||||
}
|
||||
signals:
|
||||
void statusChanged();
|
||||
private slots:
|
||||
void rotateStatus() {
|
||||
setStatus(static_cast<ModelStatus>((m_status + 1) % ModelStatus::LoadingMore));
|
||||
}
|
||||
private:
|
||||
ModelStatus m_status = ModelStatus::Uninitialised;
|
||||
QTimer m_timer;
|
||||
};
|
||||
|
||||
}
|
||||
} // NS Jellyfin
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue