ProjectExplorer: Add 'Collapse All' to tree widget.

Which is handy when dealing with multiple projects.

Use a global action and reconnect.

Change-Id: I101275ffe09515a9598791e8a4fa610661ecaa04
Reviewed-on: http://codereview.qt.nokia.com/1577
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Friedemann Kleint
2011-07-13 11:52:14 +02:00
parent ab8713d792
commit 379f03b8bd
5 changed files with 39 additions and 4 deletions

View File

@@ -270,6 +270,11 @@ void ProjectTreeWidget::setAutoSynchronization(bool sync, bool syncNow)
}
}
void ProjectTreeWidget::collapseAll()
{
m_view->collapseAll();
}
void ProjectTreeWidget::editCurrentItem()
{
if (m_view->selectionModel()->currentIndex().isValid())
@@ -313,7 +318,7 @@ void ProjectTreeWidget::showContextMenu(const QPoint &pos)
{
QModelIndex index = m_view->indexAt(pos);
Node *node = m_model->nodeForIndex(index);
m_explorer->showContextMenu(m_view->mapToGlobal(pos), node);
m_explorer->showContextMenu(this, m_view->mapToGlobal(pos), node);
}
void ProjectTreeWidget::handleProjectAdded(ProjectExplorer::Project *project)