mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
merged
This commit is contained in:
@ -16,7 +16,7 @@ ComicDB::ComicDB(const ComicDB &comicDB)
|
||||
operator=(comicDB);
|
||||
}
|
||||
|
||||
bool ComicDB::isDir()
|
||||
bool ComicDB::isDir() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ public:
|
||||
ComicDB();
|
||||
ComicDB(const ComicDB & comicDB);
|
||||
|
||||
bool isDir();
|
||||
bool isDir() const;
|
||||
|
||||
bool _hasCover;
|
||||
|
||||
|
@ -1,6 +1,23 @@
|
||||
|
||||
#include "folder.h"
|
||||
|
||||
Folder::Folder()
|
||||
:knownParent(false),
|
||||
knownId(false),
|
||||
numChildren(-1)
|
||||
{}
|
||||
|
||||
Folder::Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath)
|
||||
:knownParent(true),
|
||||
knownId(true),
|
||||
numChildren(-1)
|
||||
{
|
||||
this->id = folderId;
|
||||
this->parentId = parentId;
|
||||
this->name = folderName;
|
||||
this->path = folderPath;
|
||||
}
|
||||
|
||||
|
||||
Folder::Folder(const Folder &folder)
|
||||
{
|
||||
operator=(folder);
|
||||
@ -17,3 +34,11 @@ Folder &Folder::operator =(const Folder &other)
|
||||
|
||||
return *this;
|
||||
}
|
||||
Folder::Folder(const QString & folderName, const QString & folderPath)
|
||||
:knownParent(false),
|
||||
knownId(false),
|
||||
numChildren(-1)
|
||||
{
|
||||
this->name = folderName;
|
||||
this->path = folderPath;
|
||||
}
|
||||
|
@ -11,22 +11,86 @@ public:
|
||||
bool knownParent;
|
||||
bool knownId;
|
||||
|
||||
Folder():knownParent(false), knownId(false){}
|
||||
Folder(qulonglong sid, qulonglong pid,QString fn, QString fp):knownParent(true), knownId(true){id = sid; parentId = pid;name = fn; path = fp;}
|
||||
Folder(QString fn, QString fp):knownParent(false), knownId(false){name = fn; path = fp;}
|
||||
Folder();
|
||||
Folder(qulonglong folderId, qulonglong parentId,const QString & folderName, const QString & folderPath);
|
||||
Folder(const QString & folderName, const QString & folderPath);
|
||||
Folder(const Folder &folder);
|
||||
Folder &operator =(const Folder & other);
|
||||
void setId(qulonglong sid){id = sid;knownId = true;}
|
||||
void setFather(qulonglong pid){parentId = pid;knownParent = true;}
|
||||
bool isDir() {return true;}
|
||||
bool isFinished() const {return finished;}
|
||||
bool isCompleted() const {return completed;}
|
||||
void setFinished(bool b) {finished = b;}
|
||||
void setCompleted(bool b) {completed = b;}
|
||||
|
||||
inline void setId(qulonglong sid)
|
||||
{
|
||||
id = sid;
|
||||
knownId = true;
|
||||
}
|
||||
inline void setFather(qulonglong pid)
|
||||
{
|
||||
parentId = pid;
|
||||
knownParent = true;
|
||||
}
|
||||
|
||||
inline bool isDir() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool isFinished() const
|
||||
{
|
||||
return finished;
|
||||
}
|
||||
|
||||
inline bool isCompleted() const
|
||||
{
|
||||
return completed;
|
||||
}
|
||||
|
||||
inline void setFinished(bool b)
|
||||
{
|
||||
finished = b;
|
||||
}
|
||||
|
||||
inline void setCompleted(bool b)
|
||||
{
|
||||
completed = 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;
|
||||
bool completed;
|
||||
|
||||
qint32 numChildren; //-1 for unknown number of children
|
||||
QString firstChildHash; //empty for unknown first child
|
||||
QString customImage; //empty for none custom image
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -7,7 +7,7 @@ class LibraryItem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual bool isDir() = 0;
|
||||
virtual bool isDir() const = 0;
|
||||
LibraryItem & operator=(const LibraryItem & other);
|
||||
QString name;
|
||||
QString path;
|
||||
|
Reference in New Issue
Block a user