[PATCH] KFileItemDelegate API change
Fredrik Höglund
fredrik at kde.org
Mon Oct 1 19:28:16 BST 2007
Hi,
This patch changes the KFileItemDelegate API for showing additional
information about file items, from accepting a single item, to a list.
The purpose is to allow more than one line to be shown, which is especially
useful in listviews, where there is plenty of vertical space next to the icon.
In my opinion it's important to have this capability in KDE 4.
The enum and setter/getter functions are also renamed to something I feel
is a bit more descriptive.
Where you would previously use the API like this:
delegate->setAdditionalInformation(KFileItemDelegate::Size);
You would now write:
delegate->setShowInformation(KFileItemDelegate::Size);
Or when setting a list:
KFileItemDelegate::InformationList list;
list << KFileItemDelegate::FriendlyMimeType << KFileItemDelegate::Size;
delegate->setShowInformation(list);
The changes to the internal implementation are unintrusive, since the text
layout and rendering code already supported this.
Peter: The dolphin patch does not attempt to add support for configuring
dolphin to show more than one line, it just does the minimum necessary to
keep it compiling and working as before. I imagine you'll want to make
some changes to it :)
I'd like to commit this change preferably today, or if there's no feedback,
next Monday if no one objects.
Regards,
Fredrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs.patch
Type: text/x-diff
Size: 9678 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071001/134a1fc9/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdebase.patch
Type: text/x-diff
Size: 9024 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071001/134a1fc9/attachment-0001.patch>
More information about the kde-core-devel
mailing list