From dc555b8e56162bb908ad398341c5d7828d443bf3 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 6 Apr 2012 23:06:05 +0200 Subject: Allow to specify whether an upscaling of images should be done The option is currently hidden as up to now only Nuno requested it, but it seems to be urgent: "my icon making productivity has drop subtantialy" ((c) 2012 Nuno) As I don't want to get blamed for an outdated Oxygen-icon-set I have no other choice ;-) CCMAIL: nuno.pinheiro@kdab.com --- src/kitemviews/kfileitemmodelrolesupdater.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'src/kitemviews/kfileitemmodelrolesupdater.h') diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h index d22867511..e5e105e04 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.h +++ b/src/kitemviews/kfileitemmodelrolesupdater.h @@ -81,8 +81,16 @@ public: * of the file. If \a show is false the MIME type icon will be used for the "iconPixmap" * role. */ - void setPreviewShown(bool show); - bool isPreviewShown() const; + void setPreviewsShown(bool show); + bool previewsShown() const; + + /** + * If enabled a small preview gets upscaled to the icon size in case where + * the icon size is larger than the preview. Per default enlarging is + * enabled. + */ + void setEnlargeSmallPreviews(bool enlarge); + bool enlargeSmallPreviews() const; /** * If \a paused is set to true the asynchronous resolving of roles will be paused. @@ -187,6 +195,12 @@ private: */ int subItemsCount(const QString& path) const; + /** + * Must be invoked if a property has been changed that affects + * the look of the preview. Takes care to update all previews. + */ + void updateAllPreviews(); + private: // Property for setPaused()/isPaused(). bool m_paused; @@ -197,9 +211,12 @@ private: bool m_iconSizeChangedDuringPausing; bool m_rolesChangedDuringPausing; - // Property for setPreviewShown()/previewShown(). + // Property for setPreviewsShown()/previewsShown(). bool m_previewShown; + // Property for setEnlargeSmallPreviews()/enlargeSmallPreviews() + bool m_enlargeSmallPreviews; + // True if the role "iconPixmap" should be cleared when resolving the next // role with resolveRole(). Is necessary if the preview gets disabled // during the roles-updater has been paused by setPaused(). -- cgit v1.3.1