summaryrefslogtreecommitdiff
path: root/src/gui/graphicsview/qgraphicswidget_p.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change to release licenses for 4.6.3.Jason McDonald2010-05-301-13/+13
| | | | Reviewed-by: Trust Me
* QGraphicsWidget was not working properly when ItemSendsPositionChanges is falseAlexis Menard2010-05-061-0/+12
| | | | | | | | | | | The geometry was not properly set because QGraphicsWidget rely on itemChange to update its own geometry. Now when calling setPos we also ensure that for a widget the geometry will be up to date. Setting the flag ItemSendsPositionChanges to false for a given widget will give a small performance boost. Reviewed-by:janarve Reviewed-by:bnilsen
* Revert "Add a children private property needed for QML to support ↵Alexis Menard2010-03-311-51/+0
| | | | | | | | | | | | QGraphicsObject" This reverts commit 4be83fa7337c5a4eb7b0ce085aa5854af5d33252. Conflicts: src/gui/graphicsview/qgraphicswidget.cpp This drops the support of QML on top of 4.6
* Add a children private property needed for QML to support QGraphicsObjectAlexis Menard2010-03-241-0/+51
| | | | | | | | | | | | | | | | | | | | Commit adds a private property that QML can use to add children for a given item. This is a custom list that calls a callback which actually reparent the item instead of just appending in the list (otherwise it will mess up the state of QGraphicsView). This is needed because childItems() is pretty useless you get a list but if you append something on it then it adds that into a copy. Also the children property is the default property a concept used by QML. Width and Height private properties has been added in order to support better the integration with QGraphicsWidget in QML. The actual implementation is in the private class of QGI and QGraphicsWidget reimplements it to return the geometry. (In 4.7 QDeclarativeItem reimplements it too). This change should be harmless everything is private. Task-number:QT-2757 Reviewed-by:andreas
* Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | | Reviewed-by: Trust Me
* Fix a crash on the focus chain when removing items from the scene.Alexis Menard2009-12-091-2/+2
| | | | | | | | | | | | | | | The crash was because of the dangling pointer set on the tabFocusFirst attribute in QGraphicsScene. A child which was the tabFocusFirst was removed from the scene and fixFocusChainBeforeReparenting was setting the new tabFocusFirst pointer to the parent (since in that example it was the focusNext) but later on the parent was removed also from the scene (due to the recursion of removeItem if you call it with the parent : first children, then the parent itself) and fixFocusChainBeforeReparenting was not called again so if you delete the parent then the scene has the dangling pointer set. Task-number:QTBUG-6544 Reviewed-by:janarve
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Make sure that top-level windows respect hfw/wfh constraint.Jan-Arve Sæther2009-09-041-25/+139
| | | | | | | | | | 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
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Add QGraphicsItem::ItemAutoDetectsFocusProxy and improve subfocus support.Andreas Aardal Hanssen2009-07-271-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you set this flag on an item, and descendant item that gains input focus will become this item's focus proxy. This simplifies how focus proxy items are assigned from QML; instead of binding the possible focusProxy property to a named child widget, this assignment happens automatically as you set the focus property of a descendant to true. As part of this change, QGraphicsWidget::focusWidget behavior has been improved and moved into QGraphicsItem. For example, if you set focus on an item that it's part of a scene, it can gain focus once the parent has been assigned (which is how object trees are built in QML). Autotests are included. Reviewed-by: Michael Brasser
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Add ItemSendsGeometryChanges, replacing itemChangeEnabled().Andreas Aardal Hanssen2009-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Graphics View Optimization: Use a simple style option by default.Bjoern Erik Nilsen2009-05-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Reduced memory footprint of QGraphicsWidget.jasplin2009-05-071-122/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit reduces the memory footprint of QGraphicsWidget by around 40% (from around 663 bytes to around 409 bytes - measured using /proc/<pid>/statm on Linux - see 'man 5 proc'). The technique used is to lazily allocate (on the heap) certain data structures (i.e. not allocate them unless they are needed): - QGraphicsLayoutItemPrivate::userSizeHints => used only if the size, width, or height is explicitly set - QGraphicsWidgetPrivate::margins => used only if the contents margins are accessed - QGraphicsWidgetPrivate::windowFrameMargins => used only if the window frame margins are accessed - QGraphicsWidgetPrivate::windowData => used only if the graphics widget is a window In addition, a few unused data members (and related code) were removed: - QGraphicsWidgetPrivate::contentsRect - QGraphicsWidgetPrivate::mouseDelta - QGraphicsWidgetPrivate::*LayoutItemMargin Reviewed-by: andreas Task-number: 251592
* | Working on QGraphicsProxyWidget's handling of widget flags.Andreas Aardal Hanssen2009-04-201-2/+1
| |
* | Fix two bugs in Graphics View's mouse grab logics + add autotests.Andreas Aardal Hanssen2009-04-171-4/+5
|/ | | | | | | | | | | | | | | | | | | | | | | Change fd4d94df4eb16e9e54f61dd8ee45914e24832ae9 introduced mouse grab and keyboard grab support to Graphics View (this was as part of 4.4). The change was missing a large set of autotests that I wrote to test the behavior of these features. As part of task 245317, which involves investigating modality in Graphics View, I figured it would be a good idea to start off but reconstructing these autotests. So this change is mainly about adding autotests for mouse grabbing. And of course, as it always is, I found two bugs while writing these tests. 1) Calling QGraphicsItem::grabMouse() while the item is holding the implicit mouse grab will now upgrade the implicit grab to an explicit grab. 2) Adding a popup to the scene will automatically grab the mouse. Before, the popup would get the grab on show(), but if it was already visible when added to the scene it would not gain the grab. Task-number: 245317 Reviewed-by: jasplin
* Do not cache the sizeHint() while we're in QGraphicsWidget's constructor.Jan-Arve Sæther2009-03-241-0/+2
| | | | | | | | | Do not send a QFontChange event before the item has been polished. This is because we cannot call a virtual function while we're in the ctor. This is basically the same as how we do it in QWidget. Task-number: 246215 Reviewed-by: alexis
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+740