summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* doc: Fixed several qdoc error reports.Martin Smith2009-06-301-6/+10
|
* 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
* | doc: Fixed several qdoc warnings.Martin Smith2009-06-121-1/+34
| |
* | Add some meat to QGraphicsObjectLars Knoll2009-06-111-81/+0
| | | | | | | | | | | | | | | | 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
* | add a QGraphicsObject class and change QGraphicsWidget and QGraphicsTextItem ↵Lars Knoll2009-06-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add ItemSendsGeometryChanges, replacing itemChangeEnabled().Andreas Aardal Hanssen2009-06-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-06-021-2/+4
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tests/auto/selftests/expected_skip.txt tests/auto/selftests/tst_selftests.cpp
| * Fix a ASSERT/Crash when adding two times the same QAction to a QGW.Alexis Menard2009-05-281-2/+4
| | | | | | | | | | | | | | | | | | We were adding two times in the QActionPrivate list the entry for the current QGraphicsWidget if the action was existing before. Task-number:KDE Reviewed-by:bnilsen BT:yes
* | doc updateThierry Bastian2009-05-261-1/+49
| | | | | | | | no more warnings while generating the docs
* | Fixed 'crazy' warnings about using a string instead of a characterThierry Bastian2009-05-251-1/+1
| | | | | | | | | | | | | | Wherever I found that we were using a string instead of a single char I fixed the code. Reviewed-by: olivier
* | Reduced memory footprint of QGraphicsWidget.jasplin2009-05-071-36/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+1
| |
* | Disable mouse tracking in QGraphicsView if possible.Bjoern Erik Nilsen2009-04-071-0/+5
|/ | | | | | | | | | | | | | | | | | | | We don't need mouse tracking unless there are items in the scene that either accept hover events or have a cursor set. This cut-off is extremely efficient in the common case since all items ignore hover events and use the standard cursor by default. We no longer dig for items and do lots of intersection and calculating just for fun :-) We even get rid of the overhead of 2 x QCoreApplication::sendEvent! The next step is to optimize the items(*) functions to simply check for hasCursor()/acceptsHoverEvents() before we do complex checks like intersects/collidesWithPath() etc. Auto test included. Reviewed-by: Andreas
* Fixes: Be a bit more smarter when calling setGeometry from itemChangeAlexis Menard2009-04-061-25/+33
| | | | | | | | RevBy: bnilsen AutoTest: Bench Details : if we come from setPosHelper (so itemChange) we don't need to do all the stuff regarding the size in setGeometry because the size doesn't change. I remove two calls to fullUpdateHelper and update() because prepareGeometryChange already call updateHelper and setPosHelper call fullUpdaterHelper too so we don't need to call them inside setGeometry. We can only call prepareGeometryChange only if we don't come from setPos.
* 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/+2273