| 4043 | } |
| 4044 | |
| 4045 | void UBDocumentController::collapseAll() |
| 4046 | { |
| 4047 | //disable the animations because the view port will be in a invalid state |
| 4048 | mDocumentUI->documentTreeView->setAnimated(false); |
| 4049 | |
| 4050 | mDocumentUI->documentTreeView->collapseAll(); |
| 4051 | |
| 4052 | QPersistentModelIndex untiltedDocumentIndex = UBPersistenceManager::persistenceManager()->mDocumentTreeStructureModel->untitledDocumentsIndex(); |
| 4053 | QPersistentModelIndex myDocumentIndex = UBPersistenceManager::persistenceManager()->mDocumentTreeStructureModel->myDocumentsIndex(); |
| 4054 | |
| 4055 | UBSortFilterProxyModel *proxy = dynamic_cast<UBSortFilterProxyModel*>(mDocumentUI->documentTreeView->model()); |
| 4056 | |
| 4057 | if(proxy){ |
| 4058 | mDocumentUI->documentTreeView->setExpanded(proxy->mapFromSource(myDocumentIndex), true); |
| 4059 | mDocumentUI->documentTreeView->setExpanded(proxy->mapFromSource(untiltedDocumentIndex), true); |
| 4060 | }else{ |
| 4061 | mDocumentUI->documentTreeView->setExpanded(myDocumentIndex, true); |
| 4062 | mDocumentUI->documentTreeView->setExpanded(untiltedDocumentIndex, true); |
| 4063 | } |
| 4064 | |
| 4065 | mDocumentUI->documentTreeView->setAnimated(true); |
| 4066 | } |
| 4067 | |
| 4068 | //N/C - NNE - 20140513 |
| 4069 | void UBDocumentController::expandAll() |
no test coverage detected