]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinpart.h
Allow compiling Dolphin with KF5
[dolphin.git] / src / dolphinpart.h
index 92ee71d2cd8ea9074d395a4b3ef0ae3f161b6cc0..8e3ea58de7542e8df0224989e014e6232f4baeaa 100644 (file)
 #ifndef DOLPHINPART_H
 #define DOLPHINPART_H
 
-#include <kparts/part.h>
-#include <kparts/browserextension.h>
-#include <kparts/fileinfoextension.h>
+#include <KParts/ReadOnlyPart>
+#include <KUrl>
 
 #include <QItemSelectionModel>
 
-class KNewFileMenu;
+class DolphinNewFileMenu;
 class DolphinViewActionHandler;
 class QActionGroup;
-class KAction;
 class KFileItemList;
 class KFileItem;
 class DolphinPartBrowserExtension;
@@ -39,6 +37,7 @@ class DolphinModel;
 class KDirLister;
 class DolphinView;
 class KAboutData;
+class DolphinRemoveAction;
 
 class DolphinPart : public KParts::ReadOnlyPart
 {
@@ -117,7 +116,6 @@ Q_SIGNALS:
     void aboutToOpenURL();
 
 private Q_SLOTS:
-    void slotCompleted(const KUrl& url);
     void slotMessage(const QString& msg);
     void slotErrorMessage(const QString& msg);
     /**
@@ -129,6 +127,10 @@ private Q_SLOTS:
      * Handles clicking on an item
      */
     void slotItemActivated(const KFileItem& item);
+    /**
+     * Handles activation of multiple items
+     */
+    void slotItemsActivated(const KFileItemList& items);
     /**
      * Creates a new window showing the content of \a url.
      */
@@ -153,7 +155,7 @@ private Q_SLOTS:
      * Testcase 1: fish://localhost
      * Testcase 2: showing a directory that is being renamed by another window (#180156)
      */
-    void slotRedirection(const KUrl& oldUrl, const KUrl& newUrl);
+    void slotDirectoryRedirection(const KUrl& oldUrl, const KUrl& newUrl);
 
     /**
      * Updates the state of the 'Edit' menu actions and emits
@@ -224,6 +226,8 @@ private Q_SLOTS:
     void setFilesToSelect(const KUrl::List& files);
     KUrl::List filesToSelect() const { return KUrl::List(); } // silence moc
 
+    virtual bool eventFilter(QObject*, QEvent*);
+
 private:
     void createActions();
     void createGoAction(const char* name, const char* iconName,
@@ -238,46 +242,12 @@ private:
     DolphinViewActionHandler* m_actionHandler;
     DolphinRemoteEncoding* m_remoteEncoding;
     DolphinPartBrowserExtension* m_extension;
-    KNewFileMenu* m_newFileMenu;
+    DolphinNewFileMenu* m_newFileMenu;
+    QAction* m_findFileAction;
+    QAction* m_openTerminalAction;
     QString m_nameFilter;
+    DolphinRemoveAction* m_removeAction;
     Q_DISABLE_COPY(DolphinPart)
 };
 
-class DolphinPartBrowserExtension : public KParts::BrowserExtension
-{
-    Q_OBJECT
-public:
-    DolphinPartBrowserExtension( DolphinPart* part )
-        : KParts::BrowserExtension( part ), m_part(part) {}
-
-    virtual void restoreState(QDataStream &stream);
-    virtual void saveState(QDataStream &stream);
-
-public Q_SLOTS:
-    void cut();
-    void copy();
-    void paste();
-    void pasteTo(const KUrl&);
-    void reparseConfiguration();
-
-private:
-    DolphinPart* m_part;
-};
-
-
-class DolphinPartFileInfoExtension : public KParts::FileInfoExtension
-{
-    Q_OBJECT
-
-public:
-    DolphinPartFileInfoExtension(DolphinPart* part);
-
-    virtual QueryModes supportedQueryModes() const;
-    virtual bool hasSelection() const;
-
-    virtual KFileItemList queryFor(QueryMode mode) const;
-protected:
-    DolphinPart* part() const;
-};
-
 #endif /* DOLPHINPART_H */