From 25349096ae7fe344613d35e5548cac1a91b60fd1 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 11 Mar 2007 16:47:12 +0000 Subject: Allow to set the 'AdditionalInformation' property from KFileItemDelegate for each folder. Use case: - Icons view for images: set 'Size' as additional property - Icons view for media: show 'MIME type' as additional property - Default Icons view: don't show any addtional property for a clean layout. TODO: KFileItemDelagate::AdditionalInformation intersects with KDirModel::Columns when used in combination with the details view. Assure that the user does not get confronted with such implementation details in the user interface. svn path=/trunk/KDE/kdebase/apps/; revision=641525 --- src/dolphinview.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/dolphinview.h') diff --git a/src/dolphinview.h b/src/dolphinview.h index 8ca4a1ac3..8a7637656 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -38,6 +39,7 @@ class DolphinController; class FilterBar; +class KFileItemDelegate; class KUrl; class KDirModel; class UrlNavigator; @@ -301,6 +303,12 @@ public: /** Returns the current used sort order (Qt::Ascending or Qt::Descending). */ Qt::SortOrder sortOrder() const; + /** Sets the additional information which should be shown for the items. */ + void setAdditionalInfo(KFileItemDelegate::AdditionalInformation info); + + /** Returns the additional information which should be shown for the items. */ + KFileItemDelegate::AdditionalInformation additionalInfo() const; + /** Refreshs the view settings by reading out the stored settings. */ void refreshSettings(); @@ -371,6 +379,9 @@ signals: /** Is emitted if the sort order (ascending or descending) has been changed. */ void sortOrderChanged(Qt::SortOrder order); + /** Is emitted if the addtional information for an item has been changed. */ + void additionalInfoChanged(KFileItemDelegate::AdditionalInformation info); + /** * Is emitted if information of an item is requested to be shown e. g. in the sidebar. * It the URL is empty, no item information request is pending. @@ -546,6 +557,7 @@ private: DolphinController* m_controller; DolphinIconsView* m_iconsView; DolphinDetailsView* m_detailsView; + KFileItemDelegate* m_fileItemDelegate; FilterBar* m_filterBar; DolphinStatusBar* m_statusBar; -- cgit v1.3