summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Made QMacStyle internalJ-P Nurmi2012-11-231-1/+1
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QMacStyle directly. Change-Id: I44a2f5ee3fe08ecc837b593a2a2737eb90e8c267 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add a QEnterEvent containing the mouse position.Friedemann Kleint2012-11-101-4/+4
| | | | | | | | | | | | | Enter handling requires knowledge of the mouse position. Extend the enter handling of QWindowSystemInterface to receive the position (implemented for Windows, XCB and Mac), passing it on to QEnterEvent. Dispatch QEnterEvent from widgets code. Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix sentences in QGraphicsItem documentation.Mitch Curtis2012-11-071-10/+10
| | | | | Change-Id: I5f86cdca53be103976017c83123e1ac80fcb8aa8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* De-inline some destructors in QtWidgetsMarc Mutz2012-11-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | Destructors should be out-of-line so that the compiler doesn't generate one per translation unit. Apart from creating more work for the compiler, it can also lead to duplicated vtables if the dtor is the first virtual function (reimplementation), and all other virtuals are inline, too. Duplicate vtables then break RTTI. In addition, having virtual dtors de-inlined allows us to add code to them in a BC way. As a final argument, this change may lead to less code app-side, since a sequence of cross-DLL calls (to member variable dtors) is replaced by a single cross-DLL call to the new out-of-line dtor. Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QtWidgets: add some explicitMarc Mutz2012-11-051-24/+24
| | | | | | | Change-Id: I0650db3d47b506c67074c526ab9857f8159fd599 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make QPen default to 1-width non-cosmetic.Samuel Rødal2012-10-223-16/+5
| | | | | | | | | | | Use the Qt4CompatiblePainting render hint when painting with QPainter to treat default constructed QPens as cosmetic still. The NonCosmeticDefaultPen render hint gets documented as obsolete, since it was in any case not respected by the raster nor OpenGL paint engine. Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QGraphicsObject: handle QEvent::StyleAnimationUpdateJ-P Nurmi2012-10-172-0/+15
| | | | | Change-Id: I8545d6f26e2c2398e750b0b85ba87892a2e376ae Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Clarify ownership of scene in QGraphicsView::setScene() docs.Mitch Curtis2012-10-161-0/+2
| | | | | Change-Id: I550a02bce0633884ee1ffe2321c6462a34194f89 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Mac: Bring back "Text boxes and list only" tab navigationGabriel de Dietrich2012-10-101-2/+2
| | | | | | | | | | | | | Added ThemeHint::TabAllWidgets as a mean to access that platform specific bool. The default implementation returns always true when querying QPlatformTheme::themeHint(). Several auto-tests had to be updated to reflect for qt_tab_all_widgets' type change. One XFAIL removed from tst_QApplication::focusChanged(). Task-number: QTBUG-24372 Change-Id: Ie1f0486c19898fe54c53aa4a27e378485075e512 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add QEvent::StyleAnimationUpdate: style animation target should updateJ-P Nurmi2012-10-091-0/+1
| | | | | | | | | The event will be sent from the upcoming style animations. This change merely introduces the new event type and makes both QWidget and QGraphicsWidget call update() upon receiving the event. Change-Id: I69bb4d05bacb22f7e3a2512cae68848801e4f4d7 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove duplicate words and punctuation from documentation.Mitch Curtis2012-09-261-1/+1
| | | | | Change-Id: I5550c62d412510bc2c5acceb2cae7d2f2ef6a8d3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2251-1224/+1224
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Remove references to the deprecated QGraphicsItemAnimationGeir Vattekar2012-09-112-6/+8
| | | | | | | | | Task-number: QTBUG-23711 Change-Id: I1c1ce049016d0bea03d43631493ed8d248162eee Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Jason Barron <jason.barron@nokia.com>
* Document how opacity affects QGraphicsScene item queries.Mitch Curtis2012-09-072-18/+51
| | | | | | | | | | | | | | | Currently, QGraphicsScene::items() and related functions only return items that are visible. The definition of visible effectively means any item for whom isVisible() returns false or opacity() returns 0.0. However, this is not documented anywhere. Also fixed some typos/grammatical errors. Change-Id: Ia6d1f7d63024dc9412438fe97748d7a69ee8225b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* graphicsview: use std::sort instead of qSortRobin Burchell2012-09-045-15/+15
| | | | | | | | | | | | In almost all cases, std::sort is wildly faster than qSort - but especially in the case where the input data is already sorted. in some stress tests which ran through the index with a lot of items, this commit provides huge speedup (684ms down to 10ms for painting 15001 empty items on the provided benchmark), for me. Task-number: QTBUG-11022 Change-Id: I5551f8e320c33ba13d464bf22047a665c81f3b74 Reviewed-by: Peter Kümmel <syntheticpp@gmx.net> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Make QGraphicsView respect scrollbar policiesJeremy Lainé2012-08-311-6/+8
| | | | | | | | | | | | | | | | | When calculating the maximum height / width which a QGraphicsView can display, make sure we only take the scrollbars' dimensions into account if their policy is set to Qt::ScrollBarAsNeeded: - if the policy is set to Qt::ScrollBarAlwaysOff, the scrollbar will not be displayed at all - if the policy is set to Qt::ScrollBarAlwaysOn, the scrollbar's dimensions have already been substracted from the available space by QAbstractScrollArea::maximumViewportSize() Task-number: QTBUG-14711 Change-Id: If5d24b41dbe7b089abca2bf61ccbd370d4de79a1 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Document how to remove a QGraphicsEffect.Richard Moore2012-08-291-1/+2
| | | | | | | You can remove an effect by setting 0, but this wasn't documented. Change-Id: I2d86875d8554cb26b4d88b8ce04b4daa9792c5d5 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Ensure child items are updated even if the parent item has no contentAndy Shaw2012-08-291-1/+2
| | | | | | | | | | | | When a parent item had its visiblity toggled, then the child item would not update if the parent item had ItemHasNoContents and ItemClipsChildrenToShape set. This is a common use case in declarative as the root item has ItemHasNoContents set. Task-number: QTBUG-26846 Change-Id: Id6592ebc4ba2caa4331a4a71f7247e40993131b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Clean up docs for graphicsview.Jan-Arve Saether2012-08-174-10/+11
| | | | | | | | | | | | * doc/snippets/graphicsview.cpp is moved from the qtdoc repo * doc/images/graphicsview-parentchild.png is taken from 4.8 There are still some problems with references to examples, but Casper meant that Jerome was working on that, so I'll leave those fixes out. Change-Id: Ieac8e6564344851fe8e77f2b346b152e57f8485c Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtWidgets: use new qEnvironmentVariableIs{Empty,Set}()Marc Mutz2012-08-101-1/+1
| | | | | | | | | Incidentally, this patch shows that Qt isn't consistent in how it treats empty environment variables used as flags, but that is something for a separate commit. This patch aims to be behaviour-preserving. Change-Id: I5390cda314858762b76384291373a6f0167d323a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the obsolete scene argument for constructors of graphics itemsLars Knoll2012-08-035-322/+80
| | | | | | | | | The argument has been obsoleted and not documented since 2007. Get rid of it now before Qt 5.0 Task-number: QTBUG-25089 Change-Id: I91a5508a5e1606f5b5c289501295c67be4abe6a0 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-012-5/+5
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove Qt5 to-do remarkGatis Paeglis2012-07-251-1/+1
| | | | | | | | | Removing Qt5 to-do remark since GraphicsView is considered done and this change is not performance critical. Task-number: QTBUG-25089 Change-Id: Ib6e59290a628d27d7e623d221e7100f2e11d13f9 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove obsolete or commented use of Q_DECLARE_METATYPE.Stephen Kelly2012-07-241-2/+0
| | | | | Change-Id: I15bc845801b9f84a9252a0092fbd69f0e1b3f4ea Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove #ifdef Q_WS_ / include / #endif conditionals.Friedemann Kleint2012-07-163-13/+0
| | | | | Change-Id: I734490ddcb5501e620370e50ef06180ab5e23393 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Move the QDataStream operator<< for QPair to qdatastream.hThiago Macieira2012-06-281-0/+1
| | | | | | | | | | QPair is small and is no problem to include from qdatastream.h. However, including QDataStream from qpair.h means including QIODevice and QObject too. Change-Id: I344321e9f68438008ec329a165135c3a346c6058 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add const & to foreach 'iterators'Albert Astals Cid2012-06-271-1/+1
| | | | | | | Change-Id: I8c0600dfd919f45d14a0011f2da9b9fe0b9a0df3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove .values() call in foreachAlbert Astals Cid2012-06-271-1/+1
| | | | | | | | foreach already knows how to iterate over the values without the need to create an intermediate qlist Change-Id: I4622a36fbdbf536a75f26b42e32488a77d078f02 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove references to Q_WS_QWSGirish Ramakrishnan2012-06-201-1/+1
| | | | | | | | | | | | | Affected code includes: src/widgets/dialogs/qmessagebox.cpp src/widgets/graphicsview/qgraphicsitem.cpp src/widgets/kernel/qapplication_p.h src/widgets/kernel/qwhatsthis.cpp src/widgets/kernel/qwidget.h src/widgets/widgets/qdockwidget.cpp Change-Id: Ib9e920b3cc1253b39e4e00d7137c21321ecc0399 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QtWidgets: Fix warnings about deprecated QGraphicsView functions.Friedemann Kleint2012-06-144-5/+5
| | | | | | | | Warnings introduced by d76de69b4b60e7e13d5b0602768702e4bf219804 . Change-Id: I613500074a2318a617f18d5b887840ecc3408237 Reviewed-by: Gatis Paeglis <gatis.paeglis@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix Qt5 To-Do's in QGraphicsItemGatis Paeglis2012-06-122-59/+21
| | | | | | | | | - Merge isObscured() - Deprecate and inline obsolete methods - Correct outdated documentation Change-Id: I4eb29df78785794c6d134bf9c2f5e0f3c3d6a29f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-051-2/+2
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtWidgets: remove \link usagesGiuseppe D'Angelo2012-05-291-5/+5
| | | | | Change-Id: I9887a24485233f29d07054b3110d4db9e499b9f4 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix compiler warnings when simply including qgraphicsscene.hSimon Hausmann2012-05-271-1/+2
| | | | | | | | | | | | | | Commit 02b80ebb52b957ae65cc23f5c9464633d9de868d marked itemAt(x, y) and itemAt(point) as deprecated, causing a warning when code calls the function. Unfortunately the itemAt(x, y) overload calls the itemAt(point) overload, causing a compiler warning even when not using any functions from qgraphicsscene.h at all. This commit fixes itemAt(x, y) to not call itemAt(point) but use the non-deprecated items() function directly. Change-Id: I9c4d3a070d65f3406cdab00345c56d4fc62e76c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix To-Do's in QGraphicsScene.Gatis Paeglis2012-05-262-154/+22
| | | | | | | | | Mark obsolete functions with QT_DEPRECATED. Task-number: QTBUG-25092 Change-Id: I89d9e508479b75ad2d8bf131c69f6158b71fcda8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix Qt 5 to-do's in QGraphicsProxyWidgetGatis Paeglis2012-05-265-74/+50
| | | | | | | | Task-number: QTBUG-25091 Change-Id: Ic4160f90f69167d40ee1e569562d25eb009615aa Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Gestures & events: compile with QT_STRICT_ITERATORS.Thiago Macieira2012-05-251-4/+4
| | | | | | | | | | | There are a few mixed up iterators that needed cleaning up. We're missing a constUpperBound and constLowerBound function, though... This commit sneaks in one change to qtextformat related to QT_STRICT_ITERATORS but not to gestures and events. Change-Id: I8c7c840fb5f46c790adbf52952c6009c5b5f2f43 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Restore the QEvent::d pointer to null after we're done using itThiago Macieira2012-05-151-1/+4
| | | | | | | Change-Id: I2fd6ebd80bf47456d74e939d49bff4ac9f199e8b Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-112-5/+5
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Doc: Modularize QtWidgets documentation.Casper van Donderen2012-05-0910-55/+55
| | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Idec1afb9db7ea6add1ca4cf25ec4019d8bce0c4d Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]Thiago Macieira2012-05-037-34/+34
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-162-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * Remove Qt 5 to-do comment that will not be addressed.Jason McDonald2012-04-121-1/+0
| | | | | | | | | | | | Task-number: QTBUG-25093 Change-Id: Ib78cffe06f721371ff5c16e24db3abae6dcd4984 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Remove Qt 5 to-do comments from qgraphicslayoutitem.h.Jason McDonald2012-04-111-2/+1
| | | | | | | | | | | | | | | | | | | | Neither of these comments will be actioned for Qt 5: the first because would be source-incompatible with Qt 4, the second becuase it would be a significant behavioural change. Task-number: QTBUG-25090 Change-Id: I5f8f7cce3007c3188b2f0184138fa8e55a165654 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-4/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Reverted use of tentative commit use in QWidget editorsPekka Vuorela2012-03-271-4/+3
| | | | | | | | | | | | | | | | | | Feature to be reimplemented simplified. Cases when input method needs to be reset with possibility to commit use QInputMethod::commit() again. Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* | Merge "Merge master into api_changes" into refs/staging/api_changesKent Hansen2012-03-231-1/+1
|\|
| * Remove QAccessibleEvent child parameter.Frederik Gladhorn2012-03-191-1/+1
| | | | | | | | | | | | | | | | | | This makes the api cleaner and generally the child should not be there. It is only sometimes more convenient not to create a QAccessibleInterface instance, so the functionallity is kept. Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Remove QWorkspace.Debao Zhang2012-03-232-2/+2
|/ | | | | | | | | | QWorkspace had been called Q3Workspace before Qt4.0 finally released. In a sense, it is a Qt3 support Widget. And QWorkspace has been deprecated and replaced by QMdiArea at Qt4.3. Change-Id: Iea1bf831c9960c23c2b21d51fdc7c13b303642ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use pointers for QAccessibleEvent.Frederik Gladhorn2012-03-151-1/+2
| | | | | | | | | At least on mac g++ badly wants to copy the event and cannot use the copy ctor. The sensible solution is thus to use pointers. This is in line with QCoreApplication::sendEvent. Change-Id: Icb58852be351ab04ffa17069989d7a07d4b377da Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>