Added featured images model, paginator and cache

This commit is contained in:
Digital Artifex
2026-06-17 14:52:15 -04:00
parent ac71b74ed0
commit 8a9417a5e5
9 changed files with 793 additions and 72 deletions
+48
View File
@@ -0,0 +1,48 @@
#ifndef IMAGECACHE_H
#define IMAGECACHE_H
#include "komplex_global.h"
#include <QObject>
#include <QMap>
#include <QString>
struct KOMPLEX_EXPORT ImageCache
{
QString altText;
QByteArray averageColor;
qsizetype height;
qsizetype width;
qint64 id;
bool liked; //probably not needed
QString photographer;
QString photographerUrl;
qint64 photographerId;
QMap<QString, QString> sources;
QString url;
auto operator == (const ImageCache &other) const -> bool
{
return (
other.altText == altText &&
other.averageColor == averageColor &&
other.height == height &&
other.width == width &&
other.id == id &&
other.liked == liked &&
other.photographer == photographer &&
other.photographerUrl == photographerUrl &&
other.photographerId == photographerId &&
other.sources == sources &&
other.url == url
);
}
auto operator != (const ImageCache &other) const -> bool
{
return !(other == *this);
}
};
Q_DECLARE_METATYPE(ImageCache)
#endif // IMAGECACHE_H