Review Request: Show wallpaper resolution if possible in selection dialog

Beat Wolf asraniel at fryx.ch
Mon Jan 19 15:04:10 CET 2009



> On 2009-01-18 10:28:02, Aaron Seigo wrote:
> > trunk/KDE/kdebase/workspace/plasma/wallpapers/image/backgroundpackage.cpp, line 417
> > <http://reviewboard.vidsolbach.de/r/332/diff/4/?file=1814#file1814line417>
> >
> >     still reading in the image here (slow). try:
> >     
> >     KFileMetaInfo info(m_file, QString(), KFileMetaInfo::TechnicalInfo);
> >     m_sizeCache = QSize(info.item("width").value().toInt(),
> >                         info.item("height").value().toInt());
> >     
> >     
> >     i *think* the keys are width and height; you may need to do a run through info.keys() to check what is there if i'm wrong. =) you may also need ContentInfo instead of TechnicalInfo. i'm not overly familiar with the details of the kde4 changes to KFileMetaInfo =) but yes, that's the general idea at least ;)

I wanted to do something like that at first. But the outpout of keys() was the following:
PNG:
"http://freedesktop.org/standards/xesam/1.0/core#sourceModified", "http://freedesktop.org/standards/xesam/1.0/core#name", "http://freedesktop.org/standards/xesam/1.0/core#url", "http://strigi.sf.net/ontologies/0.9#parentUrl", "http://freedesktop.org/standards/xesam/1.0/core#mimeType", "http://strigi.sf.net/ontologies/0.9#depth", "http://freedesktop.org/standards/xesam/1.0/core#fileExtension"

SVG:
"maxLineLength", "http://freedesktop.org/standards/xesam/1.0/core#wordCount", "http://freedesktop.org/standards/xesam/1.0/core#mimeType", "translation.total", "http://freedesktop.org/standards/xesam/1.0/core#usesNamespace", "translation.translated", "translation.untranslated", "http://freedesktop.org/standards/xesam/1.0/core#url", "line ending format", "http://freedesktop.org/standards/xesam/1.0/core#size", "http://strigi.sf.net/ontologies/0.9#depth", "translation.obsolete", "http://freedesktop.org/standards/xesam/1.0/core#sourceModified", "http://freedesktop.org/standards/xesam/1.0/core#lineCount", "http://strigi.sf.net/ontologies/0.9#parentUrl", "http://freedesktop.org/standards/xesam/1.0/core#characterCount", "http://freedesktop.org/standards/xesam/1.0/core#name", "http://freedesktop.org/standards/xesam/1.0/core#fileExtension"

Because of that, i obted for the cached qsize method.

But i found out now that probably my strigi is not correctly working (but it seems to work halfway? since a few keys from strigi are here, others not..). But i found out that the correct key is (probably) image.width and image.height.
So localy i have the patch which first tries to get the information from KFileMetaInfo, and if this does not work, gets it from QImage.


- Beat


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.vidsolbach.de/r/332/#review322
-----------------------------------------------------------


On 2009-01-18 01:21:31, Beat Wolf wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.vidsolbach.de/r/332/
> -----------------------------------------------------------
> 
> (Updated 2009-01-18 01:21:31)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> Partially solves the wish: http://bugs.kde.org/show_bug.cgi?id=177087
> If possible, shows the resolution of a wallpaper. For wallpaper packages, the best resolution the package can provide will be shown
> 
> In the screenshot, only the last wallpaper is a single image where the resolution can be shown.
> 
> Update:
> updated diff with the suggestion, don't have time to take a screenshot, but all the resolutions are shown
> 
> Update2:
> added correct screenshot
> 
> Update3:
> implemented the proposed updates. The patch is now much faster indeed.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdebase/workspace/plasma/wallpapers/image/backgrounddelegate.h
>   trunk/KDE/kdebase/workspace/plasma/wallpapers/image/backgrounddelegate.cpp
>   trunk/KDE/kdebase/workspace/plasma/wallpapers/image/backgroundlistmodel.h
>   trunk/KDE/kdebase/workspace/plasma/wallpapers/image/backgroundlistmodel.cpp
>   trunk/KDE/kdebase/workspace/plasma/wallpapers/image/backgroundpackage.h
>   trunk/KDE/kdebase/workspace/plasma/wallpapers/image/backgroundpackage.cpp
>   trunk/KDE/kdebase/workspace/plasma/wallpapers/image/image.cpp
> 
> Diff: http://reviewboard.vidsolbach.de/r/332/diff
> 
> 
> Testing
> -------
> 
> 
> Screenshots
> -----------
> 
> 
>   http://reviewboard.vidsolbach.de/r/332/s/106/
> 
> 
> Thanks,
> 
> Beat
> 
>



More information about the Plasma-devel mailing list