┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.cpp
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2008-01-28 11:33:49 +0000
committerDavid Faure <[email protected]>2008-01-28 11:33:49 +0000
commitcdc40d4398510878e5ff5926be3f87e6ac5108c9 (patch)
tree43f331acaabd4bdf7f61c5c9261d91ba935b352a /src/dolphinview.cpp
parent83f2397774dc110f7e006f450777088810908b12 (diff)
Centralize three more actions so that they are available in DolphinPart: 'Show preview' 'Show hidden files' 'Categorized sorting'
Found a way of sharing the actions with even less code duplication, discussed it with Peter, but this will be for after 4.0.1 svn path=/branches/KDE/4.0/kdebase/apps/; revision=767566
Diffstat (limited to 'src/dolphinview.cpp')
-rw-r--r--src/dolphinview.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 4aeabb265..530508fb7 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -1344,6 +1344,29 @@ KAction* DolphinView::createSortDescendingAction(KActionCollection* collection)
return sortDescending;
}
+KAction* DolphinView::createShowPreviewAction(KActionCollection* collection)
+{
+ KToggleAction* showPreview = collection->add<KToggleAction>("show_preview");
+ showPreview->setText(i18nc("@action:intoolbar", "Preview"));
+ showPreview->setIcon(KIcon("view-preview"));
+ return showPreview;
+}
+
+KAction* DolphinView::createShowInGroupsAction(KActionCollection* collection)
+{
+ KToggleAction* showInGroups = collection->add<KToggleAction>("show_in_groups");
+ showInGroups->setText(i18nc("@action:inmenu View", "Show in Groups"));
+ return showInGroups;
+}
+
+KAction* DolphinView::createShowHiddenFilesAction(KActionCollection* collection)
+{
+ KToggleAction* showHiddenFiles = collection->add<KToggleAction>("show_hidden_files");
+ showHiddenFiles->setText(i18nc("@action:inmenu View", "Show Hidden Files"));
+ showHiddenFiles->setShortcut(Qt::ALT | Qt::Key_Period);
+ return showHiddenFiles;
+}
+
QActionGroup* DolphinView::createAdditionalInformationActionGroup(KActionCollection* collection)
{
QActionGroup* showInformationGroup = new QActionGroup(collection);