show child list on click
This commit is contained in:
parent
99a2d118c8
commit
0b9e8fa067
4 changed files with 29 additions and 4 deletions
|
|
@ -55,11 +55,21 @@ void NavigationItemModel::setCircleDelegate(bool value)
|
|||
}
|
||||
}
|
||||
|
||||
bool NavigationItemModel::isRoot() const
|
||||
{
|
||||
return mParentItem;
|
||||
}
|
||||
|
||||
NavigationItemModel *NavigationItemModel::getParentItem()
|
||||
{
|
||||
return mParentItem;
|
||||
}
|
||||
|
||||
bool NavigationItemModel::hasChildren() const
|
||||
{
|
||||
return !mChildren.isEmpty();
|
||||
}
|
||||
|
||||
QList<NavigationItemModel *> NavigationItemModel::getChildren()
|
||||
{
|
||||
return mChildren;
|
||||
|
|
|
|||
|
|
@ -26,8 +26,11 @@ public:
|
|||
bool isCircleDelegate() const;
|
||||
void setCircleDelegate(bool value);
|
||||
|
||||
bool isRoot() const;
|
||||
NavigationItemModel* getParentItem();
|
||||
QList<NavigationItemModel*> getChildren();
|
||||
|
||||
bool hasChildren() const;
|
||||
QList<NavigationItemModel *> getChildren();
|
||||
|
||||
void appendChild(NavigationItemModel* item);
|
||||
void clearChildren();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue