diff options
| author | David Faure <[email protected]> | 2008-02-13 18:07:34 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2008-02-13 18:07:34 +0000 |
| commit | 905277aac40f2a55daa5bb2925acb6d4046dacfd (patch) | |
| tree | 0e71fb7f7a5ba6ab7f0d88edf5fdf01dbb5bd499 /src/dolphinviewactionhandler.h | |
| parent | 35654aa44d35fb238ed2f045617917fa87a7f468 (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.
Dolphin: moved view mode handling to DolphinViewActionHandler, removes duplication between part and mainwindow.
BUG: 157424
svn path=/branches/KDE/4.0/kdebase/apps/; revision=774632
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 */ - |
