From cb9669d71cf10e73305c6a60fe0d832f4eb0ac7a Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 13 May 2010 22:06:10 +0000 Subject: If an information entry will be added to KFileItemDelegate (like done recently), adjusting the corresponding code in Dolphin is a real pain, as the new information will be shown in Dolphin the following way: - As additional columns in the details view - As additional lines in the icons view - As menu entries in the "Sort By" and "Additional Information" groups - As popup menu entries in the details view header popup - As checkable entries in the View Properties dialog To prevent similar painful transitions in future, the class AdditionalInfoManager has been introduced. All parts in Dolphin that access/show/store additional information, use the AdditionalInfoManager now. If a new information entry will be added in KFileItemDelegate in future, only a small adjustment in AdditionalInfoManager will be required. Still open currently: - AdditionalInfoDialog does not use AdditionalInfoManager yet - DolphinView::Sorting should be replaced by KFileItemDelegate::Information, so that the sorting can also be done in a generic way. - The data for KFileItemDelegate::PathOrUrl is not determined The open issues will get fixed during the next days. Kudos to the brave warriors Sebastian and Frank, that tried to add a new information ;-) CCMAIL: sebastian@trueg.de CCMAIL: frank78ac@googlemail.com svn path=/trunk/KDE/kdebase/apps/; revision=1126410 --- src/viewproperties.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/viewproperties.h') diff --git a/src/viewproperties.h b/src/viewproperties.h index 696358726..c1fa19162 100644 --- a/src/viewproperties.h +++ b/src/viewproperties.h @@ -79,7 +79,7 @@ public: * Note that the additional-info property is the only property where * the value is dependent from another property (in this case the view-mode). */ - void setAdditionalInfo(KFileItemDelegate::InformationList info); + void setAdditionalInfo(const KFileItemDelegate::InformationList& info); /** * Returns the additional information for the current set view-mode. @@ -154,18 +154,6 @@ private: Q_DISABLE_COPY(ViewProperties) private: - enum AdditionalInfoValues - { - NoInfo = 0, - SizeInfo = 1, - DateInfo = 2, - PermissionsInfo = 4, - OwnerInfo = 8, - GroupInfo = 16, - TypeInfo = 32, - PathOrUrlInfo = 64 - }; - bool m_changedProps; bool m_autoSave; QString m_filepath; -- cgit v1.3