Review Request 122413: Add paintedWidth and paintedHeight to QPixmapItem
Luca Beltrame
lbeltrame at kde.org
Tue Feb 3 22:18:02 UTC 2015
> On Feb. 3, 2015, 8:43 p.m., David Edmundson wrote:
> > Next set of bugs:
> > - what about if the paintedWidth is requested before the item's source has first been set?
> > - or if the item is currently invisible? (what should that return? I'm not sure what Image does)
> >
> >
> > Other thought:
> > I don't really like that we won't update until after we paint which only happens once all previous binding finishes. So we'll always be one frame out.
> > I think we might have to move lines 115-150 to a separate method and call it from setSource, setFillMode and geomtryChanged then cache the destRect instead of these paintedWidth/Heights as a member variable.
>
> Marco Martin wrote:
> the whole destrect calculation could perhaps move out of paint, right in the resize event, that would remove a bit of weight from paint() and not have the signal emitted after it's too late
Any suggestions on where I should look for those? How can I check for the item's source? Also, for notmart's question: any example where I should look at?
Sorry for all the questions but I'm fairly inexperienced at c++ and even less so at QML.
- Luca
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122413/#review75334
-----------------------------------------------------------
On Feb. 3, 2015, 8:33 p.m., Luca Beltrame wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122413/
> -----------------------------------------------------------
>
> (Updated Feb. 3, 2015, 8:33 p.m.)
>
>
> Review request for KDE Frameworks and Plasma.
>
>
> Repository: kdeclarative
>
>
> Description
> -------
>
> Like the corresponding properties in QML's Image, this patch introduces paintedWidth and paintedHeight to QPixmapItem, to get information on the size of the pixmap that's actually shown (depending on fillMode), as compared to its actual size.
>
> This brings QPixmapItem closer to the mode of usage of Image.
>
> CHANGELOG: New properties paintedWidth and paintedHeight added to QPixmapItem
>
>
> Diffs
> -----
>
> src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp 6c9e3a2
> src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.h 485d6f7
>
> Diff: https://git.reviewboard.kde.org/r/122413/diff/
>
>
> Testing
> -------
>
> Builds.
>
>
> Thanks,
>
> Luca Beltrame
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150203/e30444cd/attachment.html>
More information about the Kde-frameworks-devel
mailing list