Files
YACReader
YACReaderLibrary
YACReaderLibraryServer
ci
common
gl
bookmarks.cpp
bookmarks.h
check_new_version.cpp
check_new_version.h
comic.cpp
comic.h
comic_db.cpp
comic_db.h
concurrent_queue.cpp
concurrent_queue.h
custom_widgets.cpp
custom_widgets.h
exit_check.cpp
exit_check.h
folder.cpp
folder.h
http_worker.cpp
http_worker.h
library_item.cpp
library_item.h
opengl_checker.cpp
opengl_checker.h
pdf_comic.cpp
pdf_comic.h
pdf_comic.mm
pictureflow.cpp
pictureflow.h
qnaturalsorting.cpp
qnaturalsorting.h
release_acquire_atomic.h
scroll_management.cpp
scroll_management.h
worker_thread.h
yacreader_global.cpp
yacreader_global.h
yacreader_global_gui.cpp
yacreader_global_gui.h
compressed_archive
custom_widgets
dependencies
files
images
release
shortcuts_management
tests
third_party
.clang-format
.editorconfig
.gitattributes
.gitignore
CHANGELOG.md
COPYING.txt
INSTALL.md
README.md
YACReader.1
YACReader.desktop
YACReader.pro
YACReader.svg
YACReaderLibrary.1
YACReaderLibrary.desktop
YACReaderLibrary.svg
azure-pipelines-build-number.yml
azure-pipelines-windows-template-qt6.yml
azure-pipelines-windows-template.yml
azure-pipelines.yml
background.png
background@2x.png
cleanOSX.sh
compileOSX.sh
config.pri
dmg.json
icon.icns
mktarball.sh
signapps.sh
yacreader/common/folder.cpp
2023-05-12 16:59:23 +02:00

86 lines
2.1 KiB
C++

#include "folder.h"
Folder::Folder()
: knownParent(false),
knownId(false),
manga(false),
numChildren(-1)
{
}
Folder::Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath)
: knownParent(true),
knownId(true),
manga(false),
numChildren(-1)
{
this->id = folderId;
this->parentId = parentId;
this->name = folderName;
this->path = folderPath;
}
Folder::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)
: knownParent(true),
knownId(true),
numChildren(-1)
{
this->id = folderId;
this->parentId = parentId;
this->name = folderName;
this->path = folderPath;
this->completed = completed;
this->finished = finished;
this->manga = manga;
this->numChildren = numChildren;
this->firstChildHash = firstChildHash;
this->customImage = customImage;
this->type = type;
this->added = added;
this->updated = updated;
}
Folder::Folder(const Folder &folder)
{
operator=(folder);
}
Folder &Folder::operator=(const Folder &other)
{
LibraryItem::operator=(other);
this->knownParent = other.knownParent;
this->knownId = other.knownId;
this->finished = other.finished;
this->completed = other.completed;
this->manga = other.manga;
this->numChildren = other.numChildren;
this->firstChildHash = other.firstChildHash;
this->customImage = other.customImage;
this->type = other.type;
this->added = other.added;
this->updated = other.updated;
return *this;
}
Folder::Folder(const QString &folderName, const QString &folderPath)
: knownParent(false),
knownId(false),
numChildren(-1)
{
this->name = folderName;
this->path = folderPath;
}