┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinviewactionhandler.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-03-14 16:51:21 +0100
committerPeter Penz <[email protected]>2012-03-14 16:53:31 +0100
commitd6e10a5942442f8423385ff1301c9163b334e4ed (patch)
treeffe62eb1c5efbd4278776ebecbe88d18899bf11b /src/views/dolphinviewactionhandler.h
parentd048fe0161cdf4a4c161db660947a167dd18dc80 (diff)
Use sub-menus for the "Sort By"- and "Additional Information"-menu
This allows doing some grouping for the visible roles by e.g. Image, Document, Music or whatever.
Diffstat (limited to 'src/views/dolphinviewactionhandler.h')
-rw-r--r--src/views/dolphinviewactionhandler.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/views/dolphinviewactionhandler.h b/src/views/dolphinviewactionhandler.h
index ff72d9530..edbe41b90 100644
--- a/src/views/dolphinviewactionhandler.h
+++ b/src/views/dolphinviewactionhandler.h
@@ -1,5 +1,6 @@
/***************************************************************************
* Copyright (C) 2008 by David Faure <[email protected]> *
+ * Copyright (C) 2012 by Peter Penz <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -162,7 +163,7 @@ private Q_SLOTS:
* Switches on or off the displaying of additional information
* as specified by \a action.
*/
- void toggleAdditionalInfo(QAction* action);
+ void toggleVisibleRole(QAction* action);
/**
* Changes the sorting of the current view.
@@ -217,16 +218,14 @@ private:
void createActions();
/**
- * Creates an action group with all the "show additional information" actions in it.
- * Helper method for createActions();
- */
- QActionGroup* createAdditionalInformationActionGroup();
-
- /**
- * Creates an action group with all the "sort by" actions in it.
- * Helper method for createActions();
+ * Creates an action-group out of all roles from KFileItemModel.
+ * Dependent on the group-prefix either a radiobutton-group is
+ * created for sorting (prefix is "sort_by_") or a checkbox-group
+ * is created for additional information (prefix is "show_").
+ * The changes of actions are reported to slotSortTriggered() or
+ * toggleAdditionalInfo().
*/
- QActionGroup* createSortByActionGroup();
+ QActionGroup* createFileItemRolesActionGroup(const QString& groupPrefix);
/**
* Returns the "switch to icons mode" action.
@@ -248,6 +247,9 @@ private:
KActionCollection* m_actionCollection;
DolphinView* m_currentView;
+
+ QHash<QByteArray, KToggleAction*> m_sortByActions;
+ QHash<QByteArray, KToggleAction*> m_visibleRoles;
};
#endif /* DOLPHINVIEWACTIONHANDLER_H */