mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Add new fields to the DB and make then available to be used in the apps
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#define __FOLDER_H
|
||||
|
||||
#include "library_item.h"
|
||||
#include "yacreader_global.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
@ -11,9 +12,33 @@ public:
|
||||
bool knownParent;
|
||||
bool knownId;
|
||||
|
||||
bool finished; // finished means read, the user has read all the content in this folder
|
||||
bool completed; // completed means the folder has all the content, e.g. a series got its final issue and the user has collected all of them
|
||||
[[deprecated("use type instead")]] bool manga;
|
||||
|
||||
qint32 numChildren; //-1 for unknown number of children
|
||||
QString firstChildHash; // empty for unknown first child
|
||||
QString customImage; // empty for none custom image
|
||||
|
||||
YACReader::FileType type;
|
||||
qint64 added; // epoch in seconds
|
||||
qint64 updated; // epoch in seconds
|
||||
|
||||
Folder();
|
||||
Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath);
|
||||
Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath, bool completed, bool finished, bool manga);
|
||||
Folder(qulonglong folderId,
|
||||
qulonglong parentId,
|
||||
const QString &folderName,
|
||||
const QString &folderPath,
|
||||
bool completed,
|
||||
bool finished,
|
||||
bool manga,
|
||||
int numChildren,
|
||||
const QString &firstChildHash,
|
||||
const QString &customImage,
|
||||
YACReader::FileType type,
|
||||
qint64 added,
|
||||
qint64 updated);
|
||||
Folder(const QString &folderName, const QString &folderPath);
|
||||
Folder(const Folder &folder);
|
||||
Folder &operator=(const Folder &other);
|
||||
@ -33,75 +58,6 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool isFinished() const
|
||||
{
|
||||
return finished;
|
||||
}
|
||||
|
||||
inline bool isCompleted() const
|
||||
{
|
||||
return completed;
|
||||
}
|
||||
|
||||
inline bool isManga() const
|
||||
{
|
||||
return manga;
|
||||
}
|
||||
|
||||
inline void setFinished(bool b)
|
||||
{
|
||||
finished = b;
|
||||
}
|
||||
|
||||
inline void setCompleted(bool b)
|
||||
{
|
||||
completed = b;
|
||||
}
|
||||
|
||||
inline void setManga(bool b)
|
||||
{
|
||||
manga = b;
|
||||
}
|
||||
|
||||
inline qint32 getNumChildren() const
|
||||
{
|
||||
return numChildren;
|
||||
}
|
||||
|
||||
inline void setNumChildren(const qint32 v)
|
||||
{
|
||||
numChildren = v;
|
||||
}
|
||||
|
||||
inline QString getFirstChildHash() const
|
||||
{
|
||||
return firstChildHash;
|
||||
}
|
||||
|
||||
inline void setFirstChildHash(const QString &v)
|
||||
{
|
||||
firstChildHash = v;
|
||||
}
|
||||
|
||||
inline QString getCustomImage() const
|
||||
{
|
||||
return customImage;
|
||||
}
|
||||
|
||||
inline void setCustomImage(const QString &s)
|
||||
{
|
||||
customImage = s;
|
||||
}
|
||||
|
||||
private:
|
||||
bool finished; // finished means read, the user has read all the content in this folder
|
||||
bool completed; // completed means the folder has all the content, e.g. a series got its final issue and the user has collected all of them
|
||||
bool manga;
|
||||
|
||||
qint32 numChildren; //-1 for unknown number of children
|
||||
QString firstChildHash; // empty for unknown first child
|
||||
QString customImage; // empty for none custom image
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user