mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Added model classes for reading lists and labels.
This commit is contained in:
@ -146,7 +146,8 @@ HEADERS += comic_flow.h \
|
||||
yacreader_comics_views_manager.h \
|
||||
info_comics_view.h \
|
||||
yacreader_comics_selection_helper.h \
|
||||
yacreader_comic_info_helper.h
|
||||
yacreader_comic_info_helper.h \
|
||||
db/reading_list.cpp
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
CONFIG(legacy_gl_widget) {
|
||||
@ -220,7 +221,8 @@ SOURCES += comic_flow.cpp \
|
||||
yacreader_comics_views_manager.cpp \
|
||||
info_comics_view.cpp \
|
||||
yacreader_comics_selection_helper.cpp \
|
||||
yacreader_comic_info_helper.cpp
|
||||
yacreader_comic_info_helper.cpp \
|
||||
db/reading_list.cpp
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
CONFIG(legacy_gl_widget) {
|
||||
|
44
YACReaderLibrary/db/reading_list.cpp
Normal file
44
YACReaderLibrary/db/reading_list.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "reading_list.h"
|
||||
|
||||
ReadingList::ReadingList(const QString &name, qulonglong id, int ordering)
|
||||
:name(name), id(id), ordering(ordering)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
qulonglong ReadingList::getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
QString ReadingList::getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
int ReadingList::getOrdering() const
|
||||
{
|
||||
return ordering;
|
||||
}
|
||||
|
||||
|
||||
Label::Label(const QString &name, qulonglong id, YACReader::LabelColors colorid)
|
||||
:name(name), id(id), colorid(colorid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
YACReader::LabelColors Label::getColorID() const
|
||||
{
|
||||
return colorid;
|
||||
}
|
||||
|
||||
QString Label::getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
qulonglong Label::getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
36
YACReaderLibrary/db/reading_list.h
Normal file
36
YACReaderLibrary/db/reading_list.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef READING_LIST_H
|
||||
#define READING_LIST_H
|
||||
|
||||
#include "yacreader_global.h"
|
||||
|
||||
class ReadingList
|
||||
{
|
||||
public:
|
||||
ReadingList(const QString &name, qulonglong id, int ordering);
|
||||
|
||||
qulonglong getId() const;
|
||||
QString getName() const;
|
||||
int getOrdering() const;
|
||||
private:
|
||||
QString name;
|
||||
qulonglong id;
|
||||
int ordering;
|
||||
};
|
||||
|
||||
class Label
|
||||
{
|
||||
public:
|
||||
Label(const QString &name, qulonglong id, YACReader::LabelColors colorid);
|
||||
|
||||
YACReader::LabelColors getColorID() const;
|
||||
QString getName() const;
|
||||
qulonglong getId() const;
|
||||
|
||||
private:
|
||||
QString name;
|
||||
qulonglong id;
|
||||
YACReader::LabelColors colorid;
|
||||
|
||||
};
|
||||
|
||||
#endif // READING_LIST_H
|
Reference in New Issue
Block a user