┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.h
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2007-10-10 23:01:35 +0000
committerDavid Faure <[email protected]>2007-10-10 23:01:35 +0000
commit8d4fb3608927960d9e45e672ce1cbe1fa3a548f9 (patch)
treefe8691ccdb83ece1bcfc6b9beabf218b5d7607c5 /src/dolphinview.h
parent3b8c3c1b1e2d05d09aca2de0b0bf922fb9530b0d (diff)
DolphinPart: provide a way to switch between view modes in konqueror.
Factorized those actions between dolphinmainwindow and dolphinpart (see new methods in dolphinview), and simplified mainwindow code by using the signal from the action group and the QVariant data of the actions (standard Qt4 solution for a group of actions). svn path=/trunk/KDE/kdebase/apps/; revision=723871
Diffstat (limited to 'src/dolphinview.h')
-rw-r--r--src/dolphinview.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/dolphinview.h b/src/dolphinview.h
index 4e76c87c2..aef541a89 100644
--- a/src/dolphinview.h
+++ b/src/dolphinview.h
@@ -37,6 +37,7 @@
#include <QListView>
#include <QWidget>
+class KToggleAction;
class DolphinController;
class KDirLister;
class KFileItemDelegate;
@@ -319,6 +320,29 @@ public:
*/
void calculateItemCount(int& fileCount, int& folderCount);
+ /**
+ * Returns the "switch to icons mode" action.
+ * This code is here to share it between the mainwindow and the part
+ */
+ static KToggleAction* iconsModeAction(KActionCollection* collection);
+
+ /**
+ * Returns the "switch to details mode" action.
+ * This code is here to share it between the mainwindow and the part
+ */
+ static KToggleAction* detailsModeAction(KActionCollection* collection);
+
+ /**
+ * Returns the "switch to columns mode" action.
+ * This code is here to share it between the mainwindow and the part
+ */
+ static KToggleAction* columnsModeAction(KActionCollection* collection);
+
+ /**
+ * Returns the action name corresponding to the current view mode
+ */
+ QString currentViewModeActionName() const;
+
public slots:
/**
* Changes the directory to \a url. If the current directory is equal to
@@ -603,4 +627,7 @@ private:
KUrl m_rootUrl;
};
+/// Allow using DolphinView::Mode in QVariant
+Q_DECLARE_METATYPE(DolphinView::Mode)
+
#endif // DOLPHINVIEW_H