From c91365ab8d7582255aa0de8f403ec0787446a74f Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 14 Feb 2007 21:54:24 +0000 Subject: Step one for having DolphinParts for the icons and details view, which can be used by Konqueror. TODO: currently dropping of items is deactivated, as I want to wait for Davids feedback whether the direction is ok. svn path=/trunk/KDE/kdebase/apps/; revision=633703 --- src/dolphinview.h | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'src/dolphinview.h') diff --git a/src/dolphinview.h b/src/dolphinview.h index 4b740e655..5a9d4eb24 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -36,6 +36,7 @@ #include #include +class DolphinController; class FilterBar; class KUrl; class KDirModel; @@ -120,7 +121,10 @@ public: /** Returns the current active URL. */ const KUrl& url() const; - void requestActivation(); + /** + * Returns true if the view is active and hence all actions are + * applied to this view. + */ bool isActive() const; /** @@ -237,13 +241,6 @@ public: */ KFileItem* fileItem(const QModelIndex index) const; - /** - * Opens the context menu for the item indicated by \a fileInfo - * on the position \a pos. If 0 is passed for the file info, a context - * menu for the viewport is opened. - */ - void openContextMenu(KFileItem* fileInfo, const QPoint& pos); - /** * Renames the filename of the source URL by the new file name. * If the new file name already exists, a dialog is opened which @@ -348,6 +345,12 @@ public slots: */ void updateStatusBar(); + /** + * Requests the main window to set this view as active view, which + * means that all actions are applied to this view. + */ + void requestActivation(); + signals: /** Is emitted if URL of the view has been changed to \a url. */ void urlChanged(const KUrl& url); @@ -427,6 +430,20 @@ private slots: */ void changeNameFilter(const QString& nameFilter); + void openContextMenu(const QPoint& pos, const QPoint& globalPos); + + /** + * Updates the view properties of the current URL to the + * sorting given by \a sorting. + */ + void updateSorting(DolphinView::Sorting sorting); + + /** + * Updates the view properties of the current URL to the + * sort order given by \a order. + */ + void updateSortOrder(Qt::SortOrder order); + private: void startDirLister(const KUrl& url, bool reload = false); @@ -477,6 +494,7 @@ private: QVBoxLayout* m_topLayout; UrlNavigator* m_urlNavigator; + DolphinController* m_controller; DolphinIconsView* m_iconsView; DolphinDetailsView* m_detailsView; -- cgit v1.3.1