X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/51b978f7fd7ed02b509f34f2579bf016f78bc5e0..f729f6f5b1d1bbc1b4fab2f925f16f2c2c7128d5:/src/dolphincontextmenu.h diff --git a/src/dolphincontextmenu.h b/src/dolphincontextmenu.h index 160f08804..bf0cf2c97 100644 --- a/src/dolphincontextmenu.h +++ b/src/dolphincontextmenu.h @@ -20,17 +20,11 @@ #ifndef DOLPHINCONTEXTMENU_H #define DOLPHINCONTEXTMENU_H +#include #include -#include -#include -#include -#include -#include - -#include - -#include +#include +#include class QAction; class DolphinMainWindow; @@ -50,7 +44,7 @@ class DolphinRemoveAction; * - 'Actions': Contains all actions which can be applied to the * given item. */ -class DolphinContextMenu : public KMenu +class DolphinContextMenu : public QMenu { Q_OBJECT @@ -58,6 +52,7 @@ public: enum Command { None, + OpenParentFolder, OpenParentFolderInNewWindow, OpenParentFolderInNewTab }; @@ -75,9 +70,9 @@ public: DolphinContextMenu(DolphinMainWindow* parent, const QPoint& pos, const KFileItem& fileInfo, - const KUrl& baseUrl); + const QUrl& baseUrl); - virtual ~DolphinContextMenu(); + ~DolphinContextMenu() override; void setCustomActions(const QList& actions); @@ -92,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(); @@ -101,7 +96,7 @@ private: void openItemContextMenu(); void openViewportContextMenu(); - void insertDefaultItemActions(); + void insertDefaultItemActions(const KFileItemListProperties&); /** * Adds the "Show menubar" action to the menu if the @@ -109,7 +104,7 @@ private: */ void addShowMenuBarAction(); - bool placeExists(const KUrl& url) const; + bool placeExists(const QUrl& url) const; QAction* createPasteAction(); @@ -121,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) - */ - void addServiceActions(KFileItemActions& fileItemActions); - - /** - * Adds actions that are provided by a KFileItemActionPlugin. + * Adds "Open With" actions */ - void addFileItemPluginActions(); + void addOpenWithActions(KFileItemActions& fileItemActions); /** * Adds actions that are provided by a KVersionControlPlugin. @@ -165,14 +154,14 @@ private: KFileItem m_fileInfo; - KUrl m_baseUrl; + QUrl m_baseUrl; KFileItem* m_baseFileItem; /// File item for m_baseUrl KFileItemList m_selectedItems; mutable KFileItemListProperties* m_selectedItemsProperties; int m_context; - KonqCopyToMenu m_copyToMenu; + KFileCopyToMenu m_copyToMenu; QList m_customActions; Command m_command;