feat: initial video wallpaper implementation
C++ / fmt (pull_request) Failing after 10s
C++ / build (pull_request) Failing after 11s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 8s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 35s
Python / verify (pull_request) Failing after 1m32s
Rust / build (pull_request) Successful in 1m0s
Rust / fmt (pull_request) Successful in 36s
Rust / clippy (pull_request) Successful in 1m4s

This commit is contained in:
2026-10-24 23:28:17 +02:00
parent 187e97a081
commit f858fc5e9e
14 changed files with 1280 additions and 88 deletions
+11 -1
View File
@@ -28,6 +28,9 @@ class FileSystemEntry : public QObject {
Q_PROPERTY(qint64 size READ size CONSTANT)
Q_PROPERTY(bool isDir READ isDir CONSTANT)
Q_PROPERTY(bool isImage READ isImage CONSTANT)
Q_PROPERTY(bool isVideo READ isVideo CONSTANT)
Q_PROPERTY(
QString thumbnailPath READ thumbnailPath NOTIFY thumbnailPathChanged)
Q_PROPERTY(QString mimeType READ mimeType CONSTANT)
public:
@@ -45,18 +48,24 @@ class FileSystemEntry : public QObject {
[[nodiscard]] qint64 size() const;
[[nodiscard]] bool isDir() const;
[[nodiscard]] bool isImage() const;
[[nodiscard]] bool isVideo() const;
[[nodiscard]] QString thumbnailPath() const;
[[nodiscard]] QString mimeType() const;
void setThumbnailPath(const QString& path);
void updateRelativePath(const QDir& dir);
signals:
void relativePathChanged();
void thumbnailPathChanged();
private:
const QFileInfo m_fileInfo;
const QString m_path;
QString m_relativePath;
QString m_thumbnailPath;
mutable bool m_isImage;
mutable bool m_isImageInitialised;
@@ -91,7 +100,7 @@ class FileSystemModel : public QAbstractListModel {
NOTIFY entriesChanged)
public:
enum Filter { NoFilter, Images, Files, Dirs };
enum Filter { NoFilter, Images, Videos, Media, Files, Dirs };
Q_ENUM(Filter)
explicit FileSystemModel(QObject* parent = nullptr);
@@ -156,6 +165,7 @@ class FileSystemModel : public QAbstractListModel {
void updateEntriesForDir(const QString& dir);
void applyChanges(
const QSet<QString>& removedPaths, const QSet<QString>& addedPaths);
void startThumbnailGeneration(FileSystemEntry* entry);
[[nodiscard]] bool compareEntries(
const FileSystemEntry* a, const FileSystemEntry* b) const;
};