| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
In addition added documentation for the other properties.
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
|
|
|
|
| |
add auto tests for QGraphicsObject
FX items are better off with property notifications on each component
rather than on the position.
Added some basic testing for QGraphicsObject and fixed the failures
exposed.
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
| |
Added a toGraphicsObject() method to QGraphicsItem to allow upcasting.
Expose some of QGraphicsItems setter/getter pairs as real properties
in QGraphicsObject, including NOTIFY signals.
Reviewed-by: Andreas
|
|
|
|
|
|
| |
These are properties of QGraphicsItem. QGraphicsObject should expose these.
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to inherit from it
This changes the inheritance hierarchy of QGraphicsWidget from
multiply inheriting from QObject, QGraphicsItem and QGraphicsLayoutItem
to inherit from QGraphicsObject and QGraphicsLayoutItem. QGraphicsObject
then simply inherits from QObject and QGraphicsItem.
This change is binary compatible as it will leave the vtable layout
unchanged and as the parent class doesn't appear in the C++ name
mangling on any of our platforms. It's also source compatible as
it isn't noticable by existing code.
The restriction we have on QGraphicsObject is that we can not add any
new virtual methods to it, or add data members to the class. We can however
implement a QGraphicsObjectprivate inheriting from QGraphicsItemPrivate
if there is a need to add data members to the class.
This change will allow us to now have one single base for all QGraphicsItems
that inherit from QObject: QGraphicsTextItem, QGraphicsWidget and in the
future QFxItem. Having that single base class will significantly simplify
our work in the qml engine.
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag toggles whether we should send notifications for setPos,
setMatrix, and setTransform. It's off by default. Docs have been updated.
All autotests pass. This change also cleans up a bit so that we both
have readable code, and keeping the optimized path for when we need to
send the notifications.
By enabling this flag by default we are going to trigger regressions in
end-user code.
Reviewed-by: bnilsen
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0fc58ca3220083b9e10f88aab2e39824c2764db3.
Conflicts:
src/gui/graphicsview/qgraphicsitem.cpp
src/gui/graphicsview/qgraphicsitem_p.h
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reapply commit 8ad5020940f10d4ecc5c5e8b3b9656531cb84ef3 and its
dependent change that has been reverted while rebasing the
recursivepaint branch.
With the new properties it is possible to easily animate transformations
Reviewed-by: Andreas
Documentation still need to be reviewed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function allows the user to disable notifications for item changes.
In QSimpleCanvasItem, all notifications are disabled by default, and
you can enable them one at a time. QGraphicsItem's behavior is to by
default enable all notifications.
A side effect of this change is that I've removed one optimization in
favor of another: by not constructing a QVariant at all when there's no
notification we get maximum performance, at the expense of constructing
it twice if there is a notification.
|
|
|
|
|
|
|
|
|
|
|
| |
This flag helps optimize the case where an item is used only as a
transformation node in a scene graph, and where the item itself
doesn't paint anything. This is the default for FxItem (the
subclasses that do paint enable the HasContents flag). This lets
Graphics View know whether there's any point in setting up the
world transform, opacity and other things.
Reviewed-by: Lars
|
|
|
|
|
|
|
|
|
|
|
| |
Removed some experimental code to handle scaling and rotating around
different axis. It cuased setTransform and transform not to behave
symmetrically and caused some performance regressions.
Additionally moved the QTransform out of the (relatively slow) extra
list and made it a pointer in QGraphicsItemPrivate.
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the new properties it is possible to easily animate.
Setting a transform using setTransform is incompatible with thoses
properties. Accessing thoses propeties if you set previously a
transform will give you the default values.
Acknowledged-by: Code made with Andreas. Documentation written with Thierry.
This still need a more in depth code review and documentation review.
But it is urgent to commit now because the Animation API integration depends on it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QStyleOptionGraphicsItem extends QStyleOption with three values:
1) matrix, 2) levelOfDetail, 3) exposedRect, and they all
involve expensive QTranform operations when calculated. We
pass style option(s) to drawItems() and paint(), but the
extended values are usually not in use. We can therefore gain
quite some nice speedup by making them opt-in with the
QGraphicsItem::ItemUsesExtendedStyleOption flag.
Additionally, QStyleOptionGraphicsItem::levelOfDetail has been
obsoleted, and a new function QStyleOptionGraphicsItem::
levelOfDetailFromTransform(const QTransform &) has been added.
Me and Andreas don't consider this change to be too controversial
even though it changes the behavior.
Auto tests still pass.
Reviewed-by: Andreas
|
|
|