mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#378) Added an tree view expansion interface
This commit is contained in:
parent
6244cf98bf
commit
e805c893c6
@ -147,5 +147,13 @@ void PdmUiTreeView::selectAsCurrentItem(PdmUiItem* uiItem)
|
||||
m_treeViewEditor->selectAsCurrentItem(uiItem);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiTreeView::setExpanded(const PdmUiItem* uiItem, bool doExpand) const
|
||||
{
|
||||
m_treeViewEditor->setExpanded(uiItem, doExpand);
|
||||
}
|
||||
|
||||
} //End of namespace caf
|
||||
|
||||
|
@ -71,6 +71,7 @@ public:
|
||||
|
||||
void selectedObjects(std::vector<PdmUiItem*>& objects);
|
||||
void selectAsCurrentItem(PdmUiItem* uiItem);
|
||||
void setExpanded(const PdmUiItem* uiItem, bool doExpand) const ;
|
||||
|
||||
signals:
|
||||
void selectionChanged();
|
||||
|
@ -265,5 +265,14 @@ void PdmUiTreeViewEditor::slotOnSelectionChanged(const QItemSelection & selected
|
||||
emit selectionChanged();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiTreeViewEditor::setExpanded(const PdmUiItem* uiItem, bool doExpand) const
|
||||
{
|
||||
QModelIndex index = m_treeViewModel->findModelIndex(uiItem);
|
||||
m_treeView->setExpanded(index, doExpand);
|
||||
}
|
||||
|
||||
|
||||
} // end namespace caf
|
||||
|
@ -89,7 +89,8 @@ public:
|
||||
|
||||
void selectAsCurrentItem(PdmUiItem* uiItem);
|
||||
void selectedUiItems(std::vector<PdmUiItem*>& objects);
|
||||
|
||||
void setExpanded(const PdmUiItem* uiItem, bool doExpand) const;
|
||||
|
||||
QWidget* createWidget(QWidget* parent);
|
||||
|
||||
signals:
|
||||
|
Loading…
Reference in New Issue
Block a user