Upgrade to Qt 6.10.3, refactor AppState for LibraryModel integration, add ChunkMeasurer tests, and update CI/docker configurations.
This commit is contained in:
53 files changed
+2095
-880
No files matched your search
@@ -0,0 +1,59 @@
|
||||
#ifndef LIBRARYBOOKMODEL_H
|
||||
#define LIBRARYBOOKMODEL_H
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
#include <QFuture>
|
||||
|
||||
class FormatReader;
|
||||
|
||||
class LibraryBookModel : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString filePath READ filePath CONSTANT)
|
||||
Q_PROPERTY(double progress READ progress WRITE setProgress NOTIFY progressChanged)
|
||||
Q_PROPERTY(QString lastOpened READ lastOpened WRITE setLastOpened NOTIFY lastOpenedChanged)
|
||||
Q_PROPERTY(QString title READ title NOTIFY metadataLoaded)
|
||||
Q_PROPERTY(QString author READ author NOTIFY metadataLoaded)
|
||||
Q_PROPERTY(QString coverImageUrl READ coverImageUrl NOTIFY coverImageLoaded)
|
||||
|
||||
public:
|
||||
explicit LibraryBookModel(QObject *parent = nullptr);
|
||||
explicit LibraryBookModel(const QString &filePath, double progress = 0.0, const QString &lastOpened = QString(), QObject *parent = nullptr);
|
||||
~LibraryBookModel() override;
|
||||
|
||||
QString filePath() const;
|
||||
double progress() const;
|
||||
void setProgress(double progress);
|
||||
|
||||
QString lastOpened() const;
|
||||
void setLastOpened(const QString &lastOpened);
|
||||
|
||||
QString title() const;
|
||||
QString author() const;
|
||||
QString coverImageUrl() const;
|
||||
|
||||
void loadMetadata();
|
||||
void loadCoverImage(const QString &epubBasePath);
|
||||
|
||||
public slots:
|
||||
void onMetadataLoaded();
|
||||
|
||||
signals:
|
||||
void progressChanged();
|
||||
void lastOpenedChanged();
|
||||
void metadataLoaded();
|
||||
void coverImageLoaded();
|
||||
|
||||
private:
|
||||
QString m_filePath;
|
||||
double m_progress = 0.0;
|
||||
QString m_lastOpened;
|
||||
QString m_title;
|
||||
QString m_author;
|
||||
QString m_coverImageUrl;
|
||||
bool m_metadataLoaded = false;
|
||||
QFuture<void> m_metadataFuture;
|
||||
};
|
||||
|
||||
#endif // LIBRARYBOOKMODEL_H
|
||||
Reference in new issue
Block a user