| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The scrolling was broken in other graphics systems than the native,
since _q_scrollPixmap assumed that all QPixmaps were using the X11
backend. We can just use QPixmap::scroll instead, which should also make
it faster with the raster paint engine than creating a temporary painter
and doing a blit. Also, _q_scrollPixmap would do blending instead of
blitting for non-opaque pixmaps.
Reviewed-by: Olivier Goffart
|
|
|
|
| |
Reviewed-by: leo
|
|
|
|
|
|
| |
Small refactoring, since the two code blocks were almost the same.
Reviewed-by: leo
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this commit we introduce initial support for Size Policy.
The size policies supported now are:
* QSizePolicy::Fixed
* QSizePolicy::Minimum
* QSizePolicy::Maximum
* QSizePolicy::Preferred
* QSizePolicy::Ignored
Signed-off-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method, formerly called by the QGraphicsAnchor destructor, to
remove the anchor associated to it, is no longer needed.
That destructor now calls QGALPrivate::removeAnchor(), a method
analagous to addAnchor(), that provides the high level feature
of "anchor removal".
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
|
|
|
|
|
|
|
|
|
|
| |
more anchors
Now the removeAnchor() method has returned and it is ready for being use in the API for ensure
that items are removed from the layout when they have no more external anchors.
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
|
|
|
|
|
|
|
|
| |
All method calls were replaced by calling removeAnchor_helper(), with
internalVertex() calls
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
|
|
|
|
|
|
|
|
|
| |
QGraphicsAnchorLayoutPrivate now has addAnchor() replacing anchor() and
addAnchor_helper() replacing addAnchor(). With this changes we are respecting
the API behavior, where anchor() is a "getter" instead of a "setter".
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The simplex solver cannot handle negative-sized anchors. Those
should be handled by the layout itself. This is done by inverting
such anchors and making their size positive again.
Ie. A --> B with size -10 becomes B --> A with size 10
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixing the case where creating an anchor between the
layout Left edge and an item Right edge (or vice-versa)
would have different behaviors depending on the argument
order.
Now both calls below have the same meaning:
addAnchor(layout, Qt::AnchorLeft, widget, Qt::AnchorRight)
addAnchor(widget, Qt::AnchorRight, layout, Qt::AnchorLeft)
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
|
|
|
|
|
|
|
|
| |
The bug was triggered by setting focus on a parent scope (which then
passes focus to the innermost scope). Subfocus was set up for the
first scope, but not the inner scopes.
Reviewed-by: TrustMe
|
|
|
|
|
|
|
| |
This came in with change c8bf9bd17a4520eefe4306b7b1bb4f93fb296d80, by
accident - it was a leftover after debugging.
Reviewed-by: Martin Smith
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This feature is essential for Declarative UI, but does not add much
value for C++ developers. A FocusScope provides a stack of focused
widgets, and it ensures that the topmost item on the stack has
focus if any of the items in the stack gains focus. When the topmost
loses focus, focus is passed to the "parent" focus scope, and so on.
You can get almost the same behavior using panels (ItemIsPanel),
except panels impose other behavior, like stopping clickfocus
propagation, and stopping event propagation in general. In a QML
world you would typically use FocusScope for controlling focus
locally, and panels when you need to maintain separate focus stacks.
Reviewed-by: akennedy
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure you can't set focus on an inactive scene, allow items
with subfocus to gain focus even if added to a scene that's not
active, and finally ensure that activating a panel in an active,
but unfocused scene, gives focus to the scene.
Also added a test that checks adding normal vs. panel items to an
active vs. inactive scene, and what happens if you initially say
the item should have focus.
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
|
|
| |
This line was added to fix crashes when deleting items that had
a subFocusItem pointing to a child that was already deleted. This
bug was fixed by ebb1162f54a29baeccb71d1e283146892629518f. After
this, subFocusItem is always 0 at this point.
The original change was eb3d5a73148cd7206c6b3b6672ed47b44611f745.
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug appeared only when calling collidingItems right after setPos.
When calling setPos on a parent the sceneTransform is mark as dirty, so
when we paint the parent and its children if the scene transform of the
parent was dirty then we update all children sceneTransform. In our
case here, collidingItems call ensureTransform on one of the children
which go recursively to the top most dirty item and update the
sceneTransform. The problem is that all sibling children are not mark
their sceneTransform dirty so next paint will skip them (since the parent
is not dirty anymore).
Task-number:260711
Reviewed-by:bnilsen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Say hello to QGraphicsAnchor, move the spacing (and removeAnchor)
functionality over to that class.
This also opens up for a cleaner API when we add support for size
policies or min/pref/max sizes for anchors.
Also remove
- addLeftAndRightAnchors()
- addTopAndBottomAnchors()
- addAllAnchors()
in favor of
- addAnchors(itemA, itemB, Qt::Orientations)
API change discussed with Caio and Andreas.
Reviewed-by: Alexis
|
|
|
|
|
|
|
| |
Add a layoutDirection autotest, and sprinkle some of the tests
with checkReverseDirection()
Reviewed-by: Eduardo M. Fleury
|
|
|
|
|
|
|
|
| |
We have to initialize the painter with the 'effected' item's
opacity before calling QGraphicsEffect::draw; otherwise we'll
use the previous rendered item's opacity (which is wrong).
Reviewed-by: Michael Brasser
|
|
|
|
|
|
|
|
| |
Removes dangling subFocusItem pointers when changing focus after
reparenting. This change also includes a mini-optimization when adding
focusable items to an inactive scene.
Reviewed-by: brad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change ensures that only active scenes can have active input
focus items. If you try to set input focus on items that are in an
inactive scene, these items will gain input focus only when the scene
is activated.
For scenes attached to a view, this change should only fix the bug that
you could have a blinking line edit in a scene when the view is inactive,
meaning you couldn't type into the line edit.
For scenes that have no view, you now must activate the scene in order
to give the items active input focus. This will affect those who use
QGraphicsScene with custom key and focus handling.
Reviewed-by: brad
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change partially reverts f68fed388dcdba6ab6dad3af4933bcd3aa123cf8,
which was an attempt at getting FocusRealms working. Turns out this
approach is wrong. The flag behaves badly when reparenting, and the
feature conflicts with plain old setting focus.
Discussed with Aaron; this change was already reverted in the
kinetic-declarativeui branch.
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
| |
Reset the dangling subFocusItem pointer in ~QGraphicsItem,
after all the child items have been deleted.
This replaces commit d724c91a0ae.
Reviewed-by: Thomas Hartmann
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
| |
Do not call clearFocus() for child item in setParentItemHelper() if
called from destructor: At this time, the ~QGraphicsItem destructor
already deleted all its children.
Reviewed-by: Andreas Aardal Hanssen
|
|
|
|
|
|
|
|
|
|
|
| |
This fix prevents crashes in
QGraphicsItem caused by calls to pure virtual functions as an item
tries to access its dying parent. This happens when an item is moved
by an ancestor during this ancestor's destructor.
Autotests included.
Reviewed-by: bnilsen
|
|
|
|
|
|
| |
This also needs to be reviewed by andreas.
Reviewed-by: Michael Brasser
|
|
|
|
|
|
|
|
|
|
| |
Note that the constraint is only enforced when resizing the window
interactively. Calling setGeometry() will not try to enforce the
constraint.
See the graphicsview/flowlayout example for a "manual test".
Task-number: 257455
|
|
|
|
|
| |
Adjust the constraint with the widget margin before passing it on to
d->layout->effectiveSizeHint().
|
|
|
|
|
| |
Task-number: 253733
Reviewed-by: Bjørn Erik Nilsen
|
|
|
|
| |
Reviewed-By: TrustMe
|
|
|
|
|
|
|
|
|
|
|
| |
QGraphicsItem::HasNoContents is documented to not paint anything when
the flag is set on an item, so all the update requests are ignored. However,
we cannot ignore update requests on such items when an effect is
installed on them, because when the effects changes parameters it calls
update on the item. We still don't paint the item, but we processes the
update request such that its children can be painted properly.
Reviewed-by: Andreas
|
|
|
|
| |
Reviewed-by: Bjoern Erik Nilsen
|
|
|
|
|
|
|
|
|
|
|
| |
This could have been amended to 464ee98eee5ce160b497aec6a1163422980dd797,
the idea is that we use QMatrix4x4 only for the QGraphicsTransform
instances and QTransform for the rest. The problem with the last submit
was that adding any (unrelated) QGraphicsTransform would cause the
QGraphicsItem::rotation properties (and friends) to lose precision.
Reviewed-by: Olivier
Reviewed-by: gabi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes failures in tst_QGraphicsItem::setTransformProperties().
Change 9e8ff32d introduced QMatrix4x4 as an internal matrix for
QGraphicsItem. Problem is, QMatrix4x4 is float-based whereas QTransform
is double-based. This change readds the use of QTransform in the case
where there are no QGraphicsTransforms in the list. This by itself also
makes this common case a bit faster.
The workaround is moot if somebody adds any QGraphicsTransform,
including one that doesn't do anything (like rotate by 0 degrees). So
we might have to find a better fix.
Reviewed-by: Olivier
|
|
|
|
| |
(It had to be minimum three anchors.)
|
|
|
|
|
| |
Task-number: 257292
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
| |
In the case of applying an effect to a QGraphicsItem, we have to notify
the scene's BSP that the item's bounding rect has changed. We do this
by calling prepareGeometryChange().
In the case of QWidget, it's sub-optimal that we update its parent, but
there's no other way to solve it at the moment.
|
|
|
|
|
|
|
| |
Signed-off-by: Riccardo Iaconelli <riccardo@kde.org>
Merge-request: 1371
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you show a child panel of an active panel, the child will now be
activated and the parent deactivated. Hiding the child panel will
reactive the parent. If the parent is 0, no other panel is activated.
Reparenting a panel onto an active panel will also activate the (new)
child. Reparenting away does not affect activation in any way.
This change also fixes QGraphicsWidget::isActiveWindow(), which returned
true for all toplevel widgets (not in a panel/window). This is wrong;
either the non-panel items are active, or a panel is active. The
correct behavior is the same as calling QGraphicsItem::isActive(). Fixed
the autotests (which wrongly tested that both a panel and a non-panel
item were active at the same time).
This change causes popups (QGraphics{Proxy,}Widget) to deactivate the
parent widget. On the positive side this activates the popup, and ensures
that the parent regains proper focus when the popup is closed. However
it also means the parent widget is inactive while the popup is open,
which (e.g.) causes editable combobox line edit cursors to stop blinking.
This is to be fixed soon, but the fix is a bit big so we'll do that later.
Autotests included.
Reviewed-by: Brad
|
|
|
|
|
|
|
|
|
| |
Allow delayed activation for more fine grained control over which panels
are activated or left inactive when the scene is created.
Autotests included.
Reviewed-by: Brad
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
| |
Prevent a deep copy of the pixmap by ending the painter before
returning the pixmap.
Reviewed-by: Bjørn Erik Nilsen
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
demos/boxes/glshaders.cpp
demos/boxes/vector.h
demos/embedded/fluidlauncher/pictureflow.cpp
demos/embedded/fluidlauncher/pictureflow.h
doc/src/desktop-integration.qdoc
doc/src/distributingqt.qdoc
doc/src/examples-overview.qdoc
doc/src/examples.qdoc
doc/src/frameworks-technologies/dbus-adaptors.qdoc
doc/src/geometry.qdoc
doc/src/groups.qdoc
doc/src/objecttrees.qdoc
doc/src/platform-notes.qdoc
doc/src/plugins-howto.qdoc
doc/src/qt3support.qdoc
doc/src/qtdbus.qdoc
doc/src/qtdesigner.qdoc
doc/src/qtgui.qdoc
doc/src/qtmain.qdoc
doc/src/qtopengl.qdoc
doc/src/qtsvg.qdoc
doc/src/qtuiloader.qdoc
doc/src/qundo.qdoc
doc/src/richtext.qdoc
doc/src/topics.qdoc
src/corelib/tools/qdumper.cpp
src/gui/embedded/qkbdpc101_qws.cpp
src/gui/embedded/qkbdsl5000_qws.cpp
src/gui/embedded/qkbdusb_qws.cpp
src/gui/embedded/qkbdvr41xx_qws.cpp
src/gui/embedded/qkbdyopy_qws.cpp
src/gui/embedded/qmousebus_qws.cpp
src/gui/embedded/qmousevr41xx_qws.cpp
src/gui/embedded/qmouseyopy_qws.cpp
src/gui/painting/qpaintengine_d3d.cpp
src/gui/painting/qwindowsurface_d3d.cpp
src/opengl/gl2paintengineex/glgc_shader_source.h
src/opengl/gl2paintengineex/qglpexshadermanager.cpp
src/opengl/gl2paintengineex/qglpexshadermanager_p.h
src/opengl/gl2paintengineex/qglshader.cpp
src/opengl/gl2paintengineex/qglshader_p.h
src/opengl/util/fragmentprograms_p.h
src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp
src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp
src/script/parser/qscript.g
src/script/qscriptarray_p.h
src/script/qscriptasm_p.h
src/script/qscriptbuffer_p.h
src/script/qscriptclass.cpp
src/script/qscriptclassdata_p.h
src/script/qscriptcompiler.cpp
src/script/qscriptcompiler_p.h
src/script/qscriptcontext.cpp
src/script/qscriptcontext_p.cpp
src/script/qscriptcontext_p.h
src/script/qscriptcontextfwd_p.h
src/script/qscriptecmaarray.cpp
src/script/qscriptecmaarray_p.h
src/script/qscriptecmaboolean.cpp
src/script/qscriptecmacore.cpp
src/script/qscriptecmadate.cpp
src/script/qscriptecmadate_p.h
src/script/qscriptecmaerror.cpp
src/script/qscriptecmaerror_p.h
src/script/qscriptecmafunction.cpp
src/script/qscriptecmafunction_p.h
src/script/qscriptecmaglobal.cpp
src/script/qscriptecmaglobal_p.h
src/script/qscriptecmamath.cpp
src/script/qscriptecmamath_p.h
src/script/qscriptecmanumber.cpp
src/script/qscriptecmanumber_p.h
src/script/qscriptecmaobject.cpp
src/script/qscriptecmaobject_p.h
src/script/qscriptecmaregexp.cpp
src/script/qscriptecmaregexp_p.h
src/script/qscriptecmastring.cpp
src/script/qscriptecmastring_p.h
src/script/qscriptengine.cpp
src/script/qscriptengine_p.cpp
src/script/qscriptengine_p.h
src/script/qscriptenginefwd_p.h
src/script/qscriptextenumeration.cpp
src/script/qscriptextenumeration_p.h
src/script/qscriptextqobject.cpp
src/script/qscriptextqobject_p.h
src/script/qscriptextvariant.cpp
src/script/qscriptfunction.cpp
src/script/qscriptfunction_p.h
src/script/qscriptgc_p.h
src/script/qscriptmember_p.h
src/script/qscriptobject_p.h
src/script/qscriptprettypretty.cpp
src/script/qscriptprettypretty_p.h
src/script/qscriptvalue.cpp
src/script/qscriptvalueimpl.cpp
src/script/qscriptvalueimpl_p.h
src/script/qscriptvalueimplfwd_p.h
src/script/qscriptvalueiteratorimpl.cpp
src/script/qscriptxmlgenerator.cpp
src/script/qscriptxmlgenerator_p.h
tests/auto/linguist/lupdate/testdata/recursivescan/project.ui
tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp
tests/auto/qkeyevent/tst_qkeyevent.cpp
tools/linguist/shared/cpp.cpp
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| | |
We are only interested in the difference between the original transform
and the transform set on the painter we're about to use.
|
| |
| |
| |
| |
| |
| |
| | |
ungrabKeyboard was called on an item without checking whether it was a
keyboard grabber.
Reviewed-by: bnilsen
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
|