mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Add methods to FolderItem
This commit is contained in:
parent
f7d47103a2
commit
a60e11d93a
@ -65,6 +65,17 @@ void FolderItem::setData(int column, const QVariant &value)
|
|||||||
itemData[column] = value;
|
itemData[column] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FolderItem::addChild(FolderItem *child, int childIndex)
|
||||||
|
{
|
||||||
|
child->parentItem = this;
|
||||||
|
childItems.insert(childIndex, child);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FolderItem::removeChild(FolderItem *child)
|
||||||
|
{
|
||||||
|
childItems.removeOne(child);
|
||||||
|
}
|
||||||
|
|
||||||
void FolderItem::removeChild(int childIndex)
|
void FolderItem::removeChild(int childIndex)
|
||||||
{
|
{
|
||||||
childItems.removeAt(childIndex);
|
childItems.removeAt(childIndex);
|
||||||
@ -86,6 +97,11 @@ FolderItem *FolderItem::parent()
|
|||||||
return parentItem;
|
return parentItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FolderItem::setData(const QList<QVariant> &data)
|
||||||
|
{
|
||||||
|
itemData = data;
|
||||||
|
}
|
||||||
|
|
||||||
int FolderItem::row() const
|
int FolderItem::row() const
|
||||||
{
|
{
|
||||||
if (parentItem)
|
if (parentItem)
|
||||||
|
@ -64,7 +64,10 @@ public:
|
|||||||
unsigned long long int id;
|
unsigned long long int id;
|
||||||
QList<QString> comicNames;
|
QList<QString> comicNames;
|
||||||
FolderItem *originalItem;
|
FolderItem *originalItem;
|
||||||
|
void setData(const QList<QVariant> &data);
|
||||||
void setData(int column, const QVariant &value);
|
void setData(int column, const QVariant &value);
|
||||||
|
void addChild(FolderItem *child, int childIndex);
|
||||||
|
void removeChild(FolderItem *child);
|
||||||
void removeChild(int childIndex);
|
void removeChild(int childIndex);
|
||||||
void clearChildren();
|
void clearChildren();
|
||||||
QList<FolderItem *> children();
|
QList<FolderItem *> children();
|
||||||
|
Loading…
Reference in New Issue
Block a user