]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.h
DolphinView: Conform to global scroll speed
[dolphin.git] / src / dolphincontextmenu.h
index 56ba673143fdf005a1515fd9292f32345b3b6c4b..f60be558e8a087274bcd8ade34ad8c8464801774 100644 (file)
@@ -47,16 +47,16 @@ public:
      * @baseUrl       Base URL of the viewport where the context menu
      *                should be opened.
      */
-    DolphinContextMenu(DolphinMainWindowparent,
-                       const KFileItemfileInfo,
+    DolphinContextMenu(DolphinMainWindow *parent,
+                       const KFileItem &fileInfo,
                        const KFileItemList &selectedItems,
-                       const QUrlbaseUrl,
+                       const QUrl &baseUrl,
                        KFileItemActions *fileItemActions);
 
     ~DolphinContextMenu() override;
 
 protected:
-    bool eventFilter(QObject* object, QEvent* event) override;
+    bool eventFilter(QObject *object, QEvent *event) override;
 
 private:
     /**
@@ -71,13 +71,13 @@ private:
     void addItemContextMenu();
     void addViewportContextMenu();
 
-    void insertDefaultItemActions(const KFileItemListProperties&);
+    void insertDefaultItemActions(const KFileItemListProperties &);
 
-    bool placeExists(const QUrlurl) const;
+    bool placeExists(const QUrl &url) const;
 
-    QActioncreatePasteAction();
+    QAction *createPasteAction();
 
-    KFileItemListPropertiesselectedItemsProperties() const;
+    KFileItemListProperties &selectedItemsProperties() const;
 
     /**
      * Returns the file item for m_baseUrl.
@@ -95,42 +95,42 @@ private:
     void addAdditionalActions(const KFileItemListProperties &props);
 
 private:
-    struct Entry
-    {
+    void addDirectoryItemContextMenu();
+    void addOpenParentFolderActions();
+
+    struct Entry {
         int type;
         QString name;
-        QString filePath;     // empty for separator
+        QString filePath; // empty for separator
         QString templatePath; // same as filePath for template
         QString icon;
         QString comment;
     };
 
-    enum ContextType
-    {
+    enum ContextType {
         NoContext = 0,
         ItemContext = 1,
         TrashContext = 2,
         TimelineContext = 4,
         SearchContext = 8,
+        RecentlyUsedContext = 16,
     };
 
-    DolphinMainWindowm_mainWindow;
+    DolphinMainWindow *m_mainWindow;
 
     KFileItem m_fileInfo;
 
     QUrl m_baseUrl;
-    KFileItem* m_baseFileItem;  /// File item for m_baseUrl
+    KFileItem *m_baseFileItem; /// File item for m_baseUrl
 
     KFileItemList m_selectedItems;
-    mutable KFileItemListPropertiesm_selectedItemsProperties;
+    mutable KFileItemListProperties *m_selectedItemsProperties;
 
     int m_context;
     KFileCopyToMenu m_copyToMenu;
 
-    DolphinRemoveAction* m_removeAction; // Action that represents either 'Move To Trash' or 'Delete'
-    void addDirectoryItemContextMenu();
+    DolphinRemoveAction *m_removeAction; // Action that represents either 'Move To Trash' or 'Delete'
     KFileItemActions *m_fileItemActions;
-
 };
 
 #endif