diff options
| author | David Faure <[email protected]> | 2008-02-13 18:45:20 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2008-02-13 18:45:20 +0000 |
| commit | 804a1967002b8d0714a865296fa2360c957284e6 (patch) | |
| tree | edb5ca8ae6f3657c1b518ac142339fad8b9c5165 /src/dolphinviewactionhandler.h | |
| parent | 9a8f75e93cbddca787cbfea8d27ed60009a44512 (diff) | |
Provide the dolphinpart view modes (Icons, Details, Columns) in konqueror's View Modes menu.
(this is done using a Q_PROPERTY in the dolphin part and a signal; the available view modes for creating the menu in the first place are listed in dolphinpart.desktop)
Konqueror: cleaned up the old (complex) handling of view modes as N toolbar buttons from M services grouped by library (240 lines less!).
Dolphin: moved view mode handling to DolphinViewActionHandler, removes duplication between part and mainwindow.
svn path=/trunk/KDE/kdebase/apps/; revision=774646
Diffstat (limited to 'src/dolphinviewactionhandler.h')
| -rw-r--r-- | src/dolphinviewactionhandler.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/dolphinviewactionhandler.h b/src/dolphinviewactionhandler.h index a11d19bb1..d4790a38d 100644 --- a/src/dolphinviewactionhandler.h +++ b/src/dolphinviewactionhandler.h @@ -23,6 +23,7 @@ #include "libdolphin_export.h" #include <QtCore/QObject> +class KToggleAction; class QAction; class QActionGroup; class DolphinView; @@ -55,6 +56,12 @@ public: void setCurrentView(DolphinView* view); /** + * Returns the name of the action for the current viewmode + */ + QString currentViewModeActionName() const; + +public Q_SLOTS: + /** * Update all actions in the 'View' menu, i.e. those that depend on the * settings in the current view. */ @@ -75,6 +82,11 @@ private Q_SLOTS: void slotCreateDir(); /** + * Emitted when the user requested a change of view mode + */ + void slotViewModeActionTriggered(QAction*); + + /** * Let the user input a name for the selected item(s) and trigger * a renaming afterwards. */ @@ -156,10 +168,27 @@ private: */ QActionGroup* createAdditionalInformationActionGroup(); + /** + * Returns the "switch to icons mode" action. + * Helper method for createActions(); + */ + KToggleAction* iconsModeAction(); + + /** + * Returns the "switch to details mode" action. + * Helper method for createActions(); + */ + KToggleAction* detailsModeAction(); + + /** + * Returns the "switch to columns mode" action. + * Helper method for createActions(); + */ + KToggleAction* columnsModeAction(); + + KActionCollection* m_actionCollection; DolphinView* m_currentView; }; - #endif /* DOLPHINVIEWACTIONHANDLER_H */ - |
