diff options
| author | Peter Penz <[email protected]> | 2011-10-15 22:55:01 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-10-15 22:55:01 +0200 |
| commit | 283f97ac27c3cfe5c72682b0843503e31643a612 (patch) | |
| tree | 35325115a5e5c001e1e307acc580af572bad0ac1 /src/views/dolphinviewactionhandler.cpp | |
| parent | a49109b09a191b73f3fda8b65c29e9c6c9bd33d8 (diff) | |
Interface cleanups to prepare the return of "grouped sorting"
- Rename setCategorizedSorting() to setGroupedSorting()
- Change the model interface to allow enabling/disabling grouping
without the need to declare a role (the sort role will be taken).
- Add dummy group role implementation in KFileItemModel
The grouping code itself requires some cleanups and might crash
at the moment or lead to weird layouts.
Diffstat (limited to 'src/views/dolphinviewactionhandler.cpp')
| -rw-r--r-- | src/views/dolphinviewactionhandler.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index cdc9646c6..f765b4a09 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -70,7 +70,7 @@ void DolphinViewActionHandler::setCurrentView(DolphinView* view) this, SLOT(slotAdditionalInfoListChanged(QList<DolphinView::AdditionalInfo>, QList<DolphinView::AdditionalInfo>))); connect(view, SIGNAL(categorizedSortingChanged(bool)), - this, SLOT(slotCategorizedSortingChanged(bool))); + this, SLOT(slotGroupedSortingChanged(bool))); connect(view, SIGNAL(hiddenFilesShownChanged(bool)), this, SLOT(slotHiddenFilesShownChanged(bool))); connect(view, SIGNAL(sortingChanged(DolphinView::Sorting)), @@ -196,7 +196,7 @@ void DolphinViewActionHandler::createActions() KToggleAction* showInGroups = m_actionCollection->add<KToggleAction>("show_in_groups"); showInGroups->setText(i18nc("@action:inmenu View", "Show in Groups")); - connect(showInGroups, SIGNAL(triggered(bool)), this, SLOT(toggleSortCategorization(bool))); + connect(showInGroups, SIGNAL(triggered(bool)), this, SLOT(toggleGroupedSorting(bool))); KToggleAction* showHiddenFiles = m_actionCollection->add<KToggleAction>("show_hidden_files"); showHiddenFiles->setText(i18nc("@action:inmenu View", "Show Hidden Files")); @@ -339,7 +339,7 @@ void DolphinViewActionHandler::updateViewActions() slotSortOrderChanged(m_currentView->sortOrder()); slotSortFoldersFirstChanged(m_currentView->sortFoldersFirst()); slotAdditionalInfoListChanged(m_currentView->additionalInfoList(), QList<DolphinView::AdditionalInfo>()); - slotCategorizedSortingChanged(m_currentView->categorizedSorting()); + slotGroupedSortingChanged(m_currentView->groupedSorting()); slotSortingChanged(m_currentView->sorting()); slotZoomLevelChanged(m_currentView->zoomLevel(), -1); @@ -428,15 +428,15 @@ void DolphinViewActionHandler::slotAdditionalInfoListChanged(const QList<Dolphin } } -void DolphinViewActionHandler::toggleSortCategorization(bool categorizedSorting) +void DolphinViewActionHandler::toggleGroupedSorting(bool grouped) { - m_currentView->setCategorizedSorting(categorizedSorting); + m_currentView->setGroupedSorting(grouped); } -void DolphinViewActionHandler::slotCategorizedSortingChanged(bool sortCategorized) +void DolphinViewActionHandler::slotGroupedSortingChanged(bool groupedSorting) { QAction* showInGroupsAction = m_actionCollection->action("show_in_groups"); - showInGroupsAction->setChecked(sortCategorized); + showInGroupsAction->setChecked(groupedSorting); } void DolphinViewActionHandler::toggleShowHiddenFiles(bool show) @@ -451,7 +451,6 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown) showHiddenFilesAction->setChecked(shown); } - KToggleAction* DolphinViewActionHandler::iconsModeAction() { KToggleAction* iconsView = m_actionCollection->add<KToggleAction>("icons"); |
