File indexing completed on 2024-05-12 16:21:18

0001 // SPDX-FileCopyrightText: 2023 Jonah BrĂ¼chert <jbb@kaidan.im>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 
0005 #pragma once
0006 
0007 #include <QObject>
0008 #include <QUrl>
0009 
0010 class ThumbnailSource : public QObject {
0011     Q_OBJECT
0012 
0013     Q_PROPERTY(QString videoId READ videoId WRITE setVideoId NOTIFY videoIdChanged)
0014     Q_PROPERTY(QUrl cachedPath READ cachedPath NOTIFY cachedPathChanged)
0015 
0016 public:
0017     QString videoId() const {
0018         return m_videoId;
0019     }
0020     void setVideoId(const QString &id);
0021     Q_SIGNAL void videoIdChanged();
0022 
0023     QUrl cachedPath() const {
0024         return m_cachedPath;
0025     }
0026     void setCachedPath(const QUrl &path) {
0027         m_cachedPath = path;
0028         cachedPathChanged();
0029     }
0030     Q_SIGNAL void cachedPathChanged();
0031 
0032 private:
0033     QString m_videoId;
0034     QUrl m_cachedPath;
0035 };