X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/01e4f60a0931aba506b184d384a4e2f926b2233c..cbb35681f51b58eb7fb20b201869138cc5d45b65:/src/dolphincontextmenu.h diff --git a/src/dolphincontextmenu.h b/src/dolphincontextmenu.h index 62dffd074..3f36895ec 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; @@ -76,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); @@ -93,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(); @@ -110,7 +104,7 @@ private: */ void addShowMenuBarAction(); - bool placeExists(const KUrl& url) const; + bool placeExists(const QUrl& url) const; QAction* createPasteAction(); @@ -122,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. @@ -158,7 +146,9 @@ private: { NoContext = 0, ItemContext = 1, - TrashContext = 2 + TrashContext = 2, + TimelineContext = 4, + SearchContext = 8, }; QPoint m_pos; @@ -166,19 +156,21 @@ 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; DolphinRemoveAction* m_removeAction; // Action that represents either 'Move To Trash' or 'Delete' + void addDirectoryItemContextMenu(KFileItemActions &fileItemActions); + }; #endif