]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.h
Update docs for startup page of configuration
[dolphin.git] / src / dolphincontextmenu.h
index 8ed22dda5c1ae1834365fb7d11b090122d65e707..3f36895ec0b62a09cc19e5ec390c8e089fd80576 100644 (file)
 #ifndef DOLPHINCONTEXTMENU_H
 #define DOLPHINCONTEXTMENU_H
 
+#include <KFileCopyToMenu>
 #include <KFileItem>
-#include <QUrl>
-#include <konq_copytomenu.h>
-#include <QMenu>
-
-
 
+#include <QMenu>
+#include <QUrl>
 
 class QAction;
 class DolphinMainWindow;
@@ -74,7 +72,7 @@ public:
                        const KFileItem& fileInfo,
                        const QUrl& baseUrl);
 
-    virtual ~DolphinContextMenu();
+    ~DolphinContextMenu() override;
 
     void setCustomActions(const QList<QAction*>& actions);
 
@@ -89,8 +87,8 @@ public:
     Command open();
 
 protected:
-    virtual void keyPressEvent(QKeyEvent *ev);
-    virtual void keyReleaseEvent(QKeyEvent *ev);
+    void keyPressEvent(QKeyEvent *ev) override;
+    void keyReleaseEvent(QKeyEvent *ev) override;
 
 private:
     void openTrashContextMenu();
@@ -118,15 +116,9 @@ private:
     KFileItem baseFileItem();
 
     /**
-     * Adds actions that have been installed as service-menu.
-     * (see http://techbase.kde.org/index.php?title=Development/Tutorials/Creating_Konqueror_Service_Menus)
+     * Adds "Open With" actions
      */
-    void addServiceActions(KFileItemActions& fileItemActions);
-
-    /**
-     * Adds actions that are provided by a KFileItemActionPlugin.
-     */
-    void addFileItemPluginActions();
+    void addOpenWithActions(KFileItemActions& fileItemActions);
 
     /**
      * Adds actions that are provided by a KVersionControlPlugin.
@@ -154,7 +146,9 @@ private:
     {
         NoContext = 0,
         ItemContext = 1,
-        TrashContext = 2
+        TrashContext = 2,
+        TimelineContext = 4,
+        SearchContext = 8,
     };
 
     QPoint m_pos;
@@ -169,12 +163,14 @@ private:
     mutable KFileItemListProperties* m_selectedItemsProperties;
 
     int m_context;
-    KonqCopyToMenu m_copyToMenu;
+    KFileCopyToMenu m_copyToMenu;
     QList<QAction*> m_customActions;
 
     Command m_command;
 
     DolphinRemoveAction* m_removeAction; // Action that represents either 'Move To Trash' or 'Delete'
+    void addDirectoryItemContextMenu(KFileItemActions &fileItemActions);
+
 };
 
 #endif