mirror of
https://github.com/YACReader/yacreader
synced 2025-07-17 20:44:32 -04:00
Add new fields to the DB and make then available to be used in the apps
This commit is contained in:
@ -66,13 +66,10 @@ public:
|
||||
void setupModelData(QString path);
|
||||
QString getDatabase();
|
||||
QString getFolderPath(const QModelIndex &folder);
|
||||
// QModelIndex indexFromItem(FolderItem * item, int column);
|
||||
|
||||
// bool isFilterEnabled(){return filterEnabled;};
|
||||
|
||||
void updateFolderCompletedStatus(const QModelIndexList &list, bool status);
|
||||
void updateFolderFinishedStatus(const QModelIndexList &list, bool status);
|
||||
void updateFolderManga(const QModelIndexList &list, bool manga);
|
||||
void updateFolderType(const QModelIndexList &list, YACReader::FileType type);
|
||||
|
||||
QStringList getSubfoldersNames(const QModelIndex &mi);
|
||||
FolderModel *getSubfoldersModel(const QModelIndex &mi);
|
||||
@ -80,28 +77,35 @@ public:
|
||||
Folder getFolder(const QModelIndex &mi);
|
||||
QModelIndex getIndexFromFolder(const Folder &folder, const QModelIndex &parent = QModelIndex());
|
||||
|
||||
void fetchMoreFromDB(const QModelIndex &parent);
|
||||
|
||||
QModelIndex addFolderAtParent(const QString &folderName, const QModelIndex &parent);
|
||||
|
||||
Q_INVOKABLE QUrl getCoverUrlPathForComicHash(const QString &hash) const;
|
||||
|
||||
enum Columns {
|
||||
Name = 0,
|
||||
Path = 1,
|
||||
Finished = 2,
|
||||
Completed = 3,
|
||||
Manga = 4,
|
||||
FirstChildHash = 5
|
||||
}; // id INTEGER PRIMARY KEY, parentId INTEGER NOT NULL, name TEXT NOT NULL, path TEXT NOT NULL
|
||||
Path,
|
||||
Finished,
|
||||
Completed,
|
||||
Manga, // deprecated
|
||||
NumChildren,
|
||||
FirstChildHash,
|
||||
CustomImage,
|
||||
Type, // FileType
|
||||
Added,
|
||||
Updated,
|
||||
};
|
||||
|
||||
enum Roles {
|
||||
FinishedRole = Qt::UserRole + 1,
|
||||
CompletedRole,
|
||||
IdRole,
|
||||
MangaRole,
|
||||
MangaRole, // deprecated
|
||||
CoverPathRole,
|
||||
FolderName,
|
||||
FolderNameRole,
|
||||
NumChildrenRole,
|
||||
TypeRole,
|
||||
AddedRole,
|
||||
UpdatedRole,
|
||||
};
|
||||
|
||||
bool isSubfolder;
|
||||
@ -112,9 +116,7 @@ public slots:
|
||||
|
||||
private:
|
||||
void fullSetup(QSqlQuery &sqlquery, FolderItem *parent);
|
||||
|
||||
void setupModelData(QSqlQuery &sqlquery, FolderItem *parent);
|
||||
void updateFolderModelData(QSqlQuery &sqlquery, FolderItem *parent);
|
||||
|
||||
FolderItem *rootItem; // el árbol
|
||||
QMap<unsigned long long int, FolderItem *> items; // relación entre folders
|
||||
|
Reference in New Issue
Block a user