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;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
childItems.removeAt(childIndex);
|
||||
@ -86,6 +97,11 @@ FolderItem *FolderItem::parent()
|
||||
return parentItem;
|
||||
}
|
||||
|
||||
void FolderItem::setData(const QList<QVariant> &data)
|
||||
{
|
||||
itemData = data;
|
||||
}
|
||||
|
||||
int FolderItem::row() const
|
||||
{
|
||||
if (parentItem)
|
||||
|
@ -64,7 +64,10 @@ public:
|
||||
unsigned long long int id;
|
||||
QList<QString> comicNames;
|
||||
FolderItem *originalItem;
|
||||
void setData(const QList<QVariant> &data);
|
||||
void setData(int column, const QVariant &value);
|
||||
void addChild(FolderItem *child, int childIndex);
|
||||
void removeChild(FolderItem *child);
|
||||
void removeChild(int childIndex);
|
||||
void clearChildren();
|
||||
QList<FolderItem *> children();
|
||||
|
Loading…
Reference in New Issue
Block a user