mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-19 00:11:02 +00:00
Add helper to check if RDTreeWidget item is expanded
This commit is contained in:
@@ -759,6 +759,11 @@ RDTreeWidgetItem *RDTreeWidget::itemAt(const QPoint &p) const
|
||||
return m_model->itemForIndex(indexAt(p));
|
||||
}
|
||||
|
||||
bool RDTreeWidget::isItemExpanded(RDTreeWidgetItem *item)
|
||||
{
|
||||
return isExpanded(m_model->indexForItem(item, 0));
|
||||
}
|
||||
|
||||
void RDTreeWidget::expandItem(RDTreeWidgetItem *item)
|
||||
{
|
||||
expand(m_model->indexForItem(item, 0));
|
||||
|
||||
@@ -272,6 +272,7 @@ public:
|
||||
|
||||
RDTreeWidgetItem *itemAt(const QPoint &p) const;
|
||||
RDTreeWidgetItem *itemAt(int x, int y) const { return itemAt(QPoint(x, y)); }
|
||||
bool isItemExpanded(RDTreeWidgetItem *item);
|
||||
void expandItem(RDTreeWidgetItem *item);
|
||||
void expandAllItems(RDTreeWidgetItem *item);
|
||||
void collapseItem(RDTreeWidgetItem *item);
|
||||
|
||||
Reference in New Issue
Block a user