]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.h
port Konqueror from KUrl to QUrl
[dolphin.git] / src / views / dolphinview.h
index 06c09edc32583123bcfa1ec93d607b118408215b..9435206d90a477c26c794972ad236fec3c2192fa 100644 (file)
 
 #include <kparts/part.h>
 #include <KFileItem>
-#include <KFileItemDelegate>
 #include <kio/fileundomanager.h>
 #include <KIO/Job>
+#include <KUrl>
 
-#include <QBoxLayout>
-#include <QKeyEvent>
-#include <QLinkedList>
 #include <QWidget>
 
 typedef KIO::FileUndoManager::CommandType CommandType;
-
+class QVBoxLayout;
 class DolphinItemListView;
-class KAction;
-class KActionCollection;
 class KFileItemModel;
 class KItemListContainer;
 class KItemModelBase;
@@ -97,7 +92,7 @@ public:
      * @param url              Specifies the content which should be shown.
      * @param parent           Parent widget of the view.
      */
-    DolphinView(const KUrl& url, QWidget* parent);
+    DolphinView(const QUrl& url, QWidget* parent);
 
     virtual ~DolphinView();
 
@@ -105,7 +100,7 @@ public:
      * Returns the current active URL, where all actions are applied.
      * The URL navigator is synchronized with this URL.
      */
-    KUrl url() const;
+    QUrl url() const;
 
     /**
      * If \a active is true, the view will marked as active. The active
@@ -178,13 +173,13 @@ public:
      * gets selected if no loading of a directory has been triggered
      * by DolphinView::setUrl() or DolphinView::reload().
      */
-    void markUrlsAsSelected(const QList<KUrl>& urls);
+    void markUrlsAsSelected(const QList<QUrl> &urls);
 
     /**
      * Marks the item indicated by \p url to be scrolled to and as the
      * current item after directory DolphinView::url() has been loaded.
      */
-    void markUrlAsCurrent(const KUrl& url);
+    void markUrlAsCurrent(const QUrl& url);
 
     /**
      * All items that match to the pattern \a pattern will get selected
@@ -578,7 +573,7 @@ private slots:
     /*
      * Is called when new items get pasted or dropped.
      */
-    void slotAboutToCreate(const KUrl::List& urls);
+    void slotAboutToCreate(const QList<QUrl> &urls);
 
     /**
      * Emits the signal \a selectionChanged() with a small delay. This is
@@ -619,7 +614,16 @@ private slots:
      */
     void slotDeleteFileFinished(KJob* job);
 
-    void slotRenamingFailed(const KUrl& oldUrl, const KUrl& newUrl);
+    /**
+     * Indicates in the status bar that the trash operation
+     * of the job \a job has been finished.
+     */
+    void slotTrashFileFinished(KJob* job);
+
+    /**
+     * Invoked when the rename job is done, for error handling.
+     */
+    void slotRenamingResult(KJob* job);
 
     /**
      * Invoked when the file item model has started the loading
@@ -665,13 +669,13 @@ private slots:
      * model indicates that the item is available, the item will
      * get selected and it is assured that the item stays visible.
      */
-    void observeCreatedItem(const KUrl& url);
+    void observeCreatedItem(const QUrl &url);
 
     /**
      * Called when a redirection happens.
      * Testcase: fish://localhost
      */
-    void slotDirectoryRedirection(const KUrl& oldUrl, const KUrl& newUrl);
+    void slotDirectoryRedirection(const QUrl& oldUrl, const QUrl& newUrl);
 
     /**
      * Applies the state that has been restored by restoreViewState()
@@ -768,11 +772,11 @@ private:
 
     QTimer* m_selectionChangedTimer;
 
-    KUrl m_currentItemUrl; // Used for making the view to remember the current URL after F5
+    QUrl m_currentItemUrl; // Used for making the view to remember the current URL after F5
     bool m_scrollToCurrentItem; // Used for marking we need to scroll to current item or not
     QPoint m_restoredContentsPosition;
 
-    QList<KUrl> m_selectedUrls; // Used for making the view to remember selections after F5
+    QList<QUrl> m_selectedUrls; // Used for making the view to remember selections after F5
     bool m_clearSelectionBeforeSelectingNewItems;
     bool m_markFirstNewlySelectedItemAsCurrent;