mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
updated Folder class
This commit is contained in:
@ -10,25 +10,86 @@ class Folder : public LibraryItem
|
||||
public:
|
||||
bool knownParent;
|
||||
bool knownId;
|
||||
|
||||
qint32 numChildren; //-1 for unknown number of children
|
||||
qulonglong firstChildId; //0 for unknown first child
|
||||
QString customImage; //empty for none custom image
|
||||
|
||||
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;};
|
||||
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;};
|
||||
Folder();
|
||||
Folder(qulonglong folderId, qulonglong parentId,const QString & folderName, const QString & folderPath);
|
||||
Folder(const QString & folderName, const QString & folderPath);
|
||||
|
||||
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 qulonglong getFirstChildId() const
|
||||
{
|
||||
return firstChildId;
|
||||
}
|
||||
|
||||
inline void setFirstChildId(const qulonglong v)
|
||||
{
|
||||
firstChildId = v;
|
||||
}
|
||||
|
||||
inline qulonglong getCustomImage() const
|
||||
{
|
||||
return firstChildId;
|
||||
}
|
||||
|
||||
inline void setCustomImage(const QString & s)
|
||||
{
|
||||
customImage = s;
|
||||
}
|
||||
|
||||
private:
|
||||
bool finished;
|
||||
bool completed;
|
||||
|
||||
qint32 numChildren; //-1 for unknown number of children
|
||||
qulonglong firstChildId; //0 for unknown first child
|
||||
QString customImage; //empty for none custom image
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user