mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
merge develop
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;
|
||||
}
|
||||
@ -235,6 +235,11 @@ ComicInfo & ComicInfo::operator=(const ComicInfo & comicInfo)
|
||||
notes = comicInfo.notes;
|
||||
comicVineID = comicInfo.comicVineID;
|
||||
|
||||
lastTimeOpened = comicInfo.lastTimeOpened;
|
||||
|
||||
coverSizeRatio = comicInfo.coverSizeRatio;
|
||||
originalCoverSize = comicInfo.originalCoverSize;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -547,6 +552,11 @@ QDataStream &operator<<(QDataStream & stream, const ComicInfo & comicInfo)
|
||||
|
||||
stream << comicInfo.comicVineID;
|
||||
|
||||
stream << comicInfo.lastTimeOpened;
|
||||
|
||||
stream << comicInfo.coverSizeRatio;
|
||||
stream << comicInfo.originalCoverSize;
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
@ -602,6 +612,11 @@ QDataStream &operator>>(QDataStream & stream, ComicInfo & comicInfo)
|
||||
stream >> comicInfo.notes;
|
||||
|
||||
stream >> comicInfo.comicVineID;
|
||||
|
||||
stream >> comicInfo.lastTimeOpened;
|
||||
|
||||
stream >> comicInfo.coverSizeRatio;
|
||||
stream >> comicInfo.originalCoverSize;
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
@ -83,6 +83,10 @@ public:
|
||||
|
||||
QImage cover;
|
||||
|
||||
QVariant lastTimeOpened;//integer/date
|
||||
QVariant coverSizeRatio;//h/w
|
||||
QVariant originalCoverSize; //string "WxH"
|
||||
|
||||
/*void setTitle(QVariant value);
|
||||
|
||||
void setCoverPage(QVariant value);
|
||||
@ -186,6 +190,11 @@ public:
|
||||
|
||||
Q_PROPERTY(QImage cover MEMBER cover CONSTANT)
|
||||
|
||||
Q_PROPERTY(QVariant lastTimeOpened MEMBER lastTimeOpened CONSTANT)
|
||||
|
||||
Q_PROPERTY(QVariant coverSizeRatio MEMBER coverSizeRatio CONSTANT)
|
||||
Q_PROPERTY(QVariant originalCoverSize MEMBER originalCoverSize CONSTANT)
|
||||
|
||||
//-new properties, not loaded from the DB automatically
|
||||
bool isFavorite;
|
||||
Q_PROPERTY(bool isFavorite MEMBER isFavorite WRITE setFavorite NOTIFY favoriteChanged)
|
||||
@ -210,7 +219,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;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <QFileInfo>
|
||||
#include "library_item.h"
|
||||
|
||||
int naturalCompare(const QString &s1, const QString &s2, Qt::CaseSensitivity caseSensitivity);
|
||||
bool naturalSortLessThanCS( const QString &left, const QString &right );
|
||||
bool naturalSortLessThanCI( const QString &left, const QString &right );
|
||||
bool naturalSortLessThanCIFileInfo(const QFileInfo & left,const QFileInfo & right);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QStandardPaths>
|
||||
|
||||
#define VERSION "9.0.0"
|
||||
#define VERSION "9.5.0"
|
||||
|
||||
#define USE_BACKGROUND_IMAGE_IN_GRID_VIEW "USE_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
#define OPACITY_BACKGROUND_IMAGE_IN_GRID_VIEW "OPACITY_BACKGROUND_IMAGE_IN_GRID_VIEW"
|
||||
|
Reference in New Issue
Block a user