X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/c33b01efb2aed904af9ffaef27fb3b0b4bdda37b..13b2fc55704fbc734cd4f9cbae56cfc2ef3ec0ce:/src/dolphinview.h diff --git a/src/dolphinview.h b/src/dolphinview.h index c058338a8..0936b06a3 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include @@ -52,6 +52,7 @@ class KDirLister; class KFileItemDelegate; class KUrl; class KToggleAction; +class ToolTipManager; class QModelIndex; class ViewProperties; @@ -315,6 +316,15 @@ public: */ QPair pasteInfo() const; + /** + * If \a tabsForFiles is true, the signal tabRequested() will also + * emitted also for files. Per default tabs for files is disabled + * and hence the signal tabRequested() will only be emitted for + * directories. + */ + void setTabsForFilesEnabled(bool tabsForFiles); + bool isTabsForFilesEnabled() const; + public slots: /** * Changes the directory to \a url. If the current directory is equal to @@ -411,10 +421,21 @@ signals: void urlChanged(const KUrl& url); /** - * Is emitted when clicking on an item + * Is emitted if the view requests a changing of the current + * URL to \a url (see DolphinController::triggerUrlChangeRequest()). + */ + void requestUrlChange(const KUrl& url); + + /** + * Is emitted when clicking on an item with the left mouse button. */ void itemTriggered(const KFileItem& item); + /** + * Is emitted if a new tab should be opened for the URL \a url. + */ + void tabRequested(const KUrl& url); + /** * Is emitted if the view mode (IconsView, DetailsView, * PreviewsView) has been changed. @@ -490,7 +511,7 @@ signals: * Is emitted when renaming, copying, moving, linking etc. * Used for feedback in the mainwindow. */ - void doingOperation(KonqFileUndoManager::CommandType type); + void doingOperation(KIO::FileUndoManager::CommandType type); protected: /** @see QWidget::mouseReleaseEvent */ @@ -580,6 +601,24 @@ private slots: */ void slotDeleteFileFinished(KJob* job); + /** + * Called when KDirLister emits redirection. + * Testcase: fish://localhost + */ + void slotRedirection(const KUrl& oldUrl, const KUrl& newUrl); + + /** + * Is emitted if the controller requests a changing of the current + * URL to \a url + */ + void slotRequestUrlChange(const KUrl& url); + + /** + * Restores the current item (= item that has the keyboard focus) + * to m_currentItemUrl. + */ + void restoreCurrentItem(); + private: void loadDirectory(const KUrl& url, bool reload = false); @@ -635,10 +674,13 @@ private: } private: - bool m_active; - bool m_showPreview; - bool m_loadingDirectory; - bool m_storedCategorizedSorting; + bool m_active : 1; + bool m_showPreview : 1; + bool m_loadingDirectory : 1; + bool m_storedCategorizedSorting : 1; + bool m_tabsForFiles : 1; + bool m_isContextMenuOpen : 1; // TODO: workaround for Qt-issue 207192 + Mode m_mode; DolphinMainWindow* m_mainWindow; @@ -656,8 +698,10 @@ private: DolphinSortFilterProxyModel* m_proxyModel; IconManager* m_iconManager; + ToolTipManager* m_toolTipManager; KUrl m_rootUrl; + KUrl m_currentItemUrl; }; /// Allow using DolphinView::Mode in QVariant