X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/576a97d8eb9601f4ad74def6528cc90fffe97b1c..50c3be0ca0645d81dd10bde8441dc593b237c0d1:/src/dolphincontextmenu.h diff --git a/src/dolphincontextmenu.h b/src/dolphincontextmenu.h index b93df2b61..e033fca6e 100644 --- a/src/dolphincontextmenu.h +++ b/src/dolphincontextmenu.h @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -57,7 +58,8 @@ public: DolphinContextMenu(DolphinMainWindow* parent, const QPoint& pos, const KFileItem& fileInfo, - const QUrl& baseUrl); + const QUrl& baseUrl, + KFileItemActions *fileItemActions); ~DolphinContextMenu() override; @@ -74,8 +76,7 @@ public: Command open(); protected: - void keyPressEvent(QKeyEvent *ev) override; - void keyReleaseEvent(QKeyEvent *ev) override; + bool eventFilter(QObject* object, QEvent* event) override; private: void openTrashContextMenu(); @@ -105,12 +106,7 @@ private: /** * Adds "Open With" actions */ - void addOpenWithActions(KFileItemActions& fileItemActions); - - /** - * Adds actions that are provided by a KVersionControlPlugin. - */ - void addVersionControlPluginActions(); + void addOpenWithActions(); /** * Adds custom actions e.g. like the "[x] Expandable Folders"-action @@ -119,6 +115,11 @@ private: void addCustomActions(); private: + /** + * Add services, custom actions, plugins and version control items to the menu + */ + void addAdditionalActions(const KFileItemListProperties &props); + struct Entry { int type; @@ -156,7 +157,8 @@ private: Command m_command; DolphinRemoveAction* m_removeAction; // Action that represents either 'Move To Trash' or 'Delete' - void addDirectoryItemContextMenu(KFileItemActions &fileItemActions); + void addDirectoryItemContextMenu(); + KFileItemActions *m_fileItemActions; };