aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix trailing comma at end of enumerator listEskil Abrahamsen Blomfeldt2015-07-301-1/+1
| | | | | | | | Breaks compilation with gcc. Change-Id: I0e48e37b4e67ae522338b17dfe996f455e0e5027 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Port from Q_ENUMS to new macro Q_ENUM.Friedemann Kleint2015-06-191-1/+1
| | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. QQuickXmlListModel::Status is left unmodified as porting it creates a link error in tst_qquickxmllistmodel. Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add QQuickWindow::TextureIsOpaque as option to createTextureFromImage.Gunnar Sletta2015-06-151-1/+2
| | | | | | | | | | | | | | | | Opaque textures can be a lot faster, so give this option without forcing the user to reimplement her/his own QSGTexture class. The old behavior was that createTextureFromImage() disregarded TextureHasAlphaChannel and looked solely at the image's format. To keep this behavior intact, we introduce a second opt-in flag to switch textures from auto-detect to false, namely TextureIsOpaque. [ChangeLog][QtQuick][QQuickWindow] Add TextureIsOpaque option to createTextureFromImage() Change-Id: I248db4bc5f7920864b6aa8d831ce24d23ad370ef Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Added a new render job stage: NoStageMiikka Heikkinen2015-04-151-1/+2
| | | | | | | | | | | | | NoStage allows scheduling jobs for immediate execution on the renderer thread. [ChangeLog][QtQuick][QQuickWindow] Added a render job stage: NoStage Task-number: QTBUG-44953 Change-Id: I918c79f1d095bc27d911a88d81376d146a04313c Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
* Fix 590 inconsistent override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-131-1/+1
| | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Change-Id: Ieb899a3475b0c36ab20285740b2cec2cd1677a54 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-091-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
| * Make effectiveDevicePixelRatio() return a qreal.Morten Johan Sørvig2014-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | Fractional scale factors are not as broken as previously believed, especially for Qt Quick. Keep the door open for finding a way to support it at some point in the future. Change-Id: Ifeadcc53175ac6c25ea0288d5fe1966e3de408f9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-291-0/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickaccessibleattached_p.h src/quick/items/qquickwindow.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Change-Id: I8bf07487a75f9d1b0d6efa5914dd06875fc9654d
| * Fix disfunctional QQuickRenderControl with multiple screensLaszlo Agocs2014-10-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a retina and non-retina screen connected resulted in getting no output from QQuickRenderControl and QQuickWidget on the non-retina screen. This is caused by the fact that Quick is blindly calling QWindow::devicePixelRatio(). This approach is wrong when using QQuickRenderControl since the QQuickWindow does not have an actual native window and so devicePixelRatio() merely returns some default value which will definitely be wrong for one of the screens. The patch fixes the problem by introducing QQuickWindow::effectiveDevicePixelRatio(), which, via QQuickRenderControl::renderWindowFor, supports the redirected case too. Task-number: QTBUG-42114 Change-Id: I057e01f0a00758dde438fc9b10af3a435b06bb0b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-3/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcanvasitem.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/coreapi/qsgrenderer.cpp src/quick/scenegraph/qsgadaptationlayer.cpp src/quick/scenegraph/qsgrenderloop.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp src/quick/scenegraph/qsgwindowsrenderloop.cpp src/quick/scenegraph/util/qsgatlastexture.cpp src/quick/scenegraph/util/qsgtexture.cpp src/quick/util/qquickprofiler_p.h Change-Id: Ie274c3baf72a8a0711c87d67238d68e2b2887429
| * move QQuickWindowAttached to QQuickWindowQmlImplShawn Rutledge2014-09-241-3/+0
| | | | | | | | | | | | | | | | | | | | It causes problems to do qmlRegisterType on QQuickWindow if the attached property also refers to QQuickWindow. Task-number: QTBUG-40816 Task-number: QTBUG-41047 Change-Id: I7a6f75af52f65e2be022b97128702982bec7cbe8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Add methods for finding out if scene graph context has been initializedUlf Hermann2014-09-171-0/+1
| | | | | | | | | | | | | | | | | | We cannot rely on the OpenGL context for that as there may be non-OpenGL scene graphs. In order for those to announce their readiness QSGRenderContext::isValid() has to be virtual. Change-Id: Ica35d8590e3f06edb54d57d93898d52e753f0407 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-25/+12
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
| * Avoid qmake warnings about wrong includesLaszlo Agocs2014-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | QtQuick: WARNING: qquickwindow.h includes qqml.h when it should include QtQml/qqml.h QtQuick: WARNING: qsgabstractrenderer.h includes qsgnode.h when it should include QtQuick/qsgnode.h Change-Id: I3b9dc20de54ef775c562b2c6b80184a7b3149586 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| * Remove QQuickWindow::glslVersion & glslIsCoreProfileJ-P Nurmi2014-08-131-5/+0
| | | | | | | | | | | | | | | | | | Superceded by the OpenGLInfo attached type => remove the API before it gets released Change-Id: I7511fd28eb375eb3cd3cdd4bda6d82c1883e3094 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge branch 'origin/5.4' into devFrederik Gladhorn2014-08-211-3/+0
|\| | | | | | | | | | | | | | | This merges 0af61d773fc7263573afc6b7a973451783bf7424 since there is a circular dependency introduced with a111b1b108f2d3344cb2b2b677e738fd9dd68945 in qtquickcontrols. Change-Id: Ia4fcad8df69326fba3f6b5927151e9d98206e872
| * Remove setDefaultFormat() from QQuickWindowLaszlo Agocs2014-08-111-3/+0
| | | | | | | | | | | | | | Replaced by QSurfaceFormat::setDefaultFormat(). Change-Id: If4e37b75ccb55d556d80b0079be89e5a521f6dbb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-15/+15
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add Window attached property on ItemShawn Rutledge2014-08-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | An Item sometimes needs to know a few things about the window in which it is being displayed; this attached property can expose them without needing to go up the heirarchy to find the window. Instead of adding the QQuickWindow pointer as a property on Item as in 8f49f50a169db85401eb37daf4fe3a0fc3280603, having an attached property means that it will not be found by introspection; and it solves the problem that Window is in the QtQuick.Window module: you must import the module to use the attached property, instead of having access to a pointer whose type might not be defined if you didn't import it. The Window attached property is created on-demand (so the memory cost adds up if you use it in too many places); the tradeoff is that it can exist even when the item is not yet being shown in a window, so bindings at startup work. The API is purposely incomplete compared to that in QQuickWindow so that we can introduce what is needed in a controlled fasion over time. For now we know of use cases for visibility, active and activeFocusItem. [ChangeLog][QtQuick][Window] Added Item.Window attached property Change-Id: I649404cbd1383326678aa2144f790b2f2542dbbc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Introducing QQuickWindow::scheduleRenderJob()Gunnar Sletta2014-07-291-0/+12
| | | | | | | | | [ChangeLog][QtQuick][QQuickWindow] Added QQuickWindow::scheduleRenderJob(), a convenience alternative to the equivalent signals for one-shot tasks. Change-Id: I5e4f0d67d5223f7fd77bca394e2a85810fadd335 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Make QQuickRenderControl publicLaszlo Agocs2014-06-241-1/+1
| | | | | | | | | | | | QQuickRenderControl allows rendering Qt Quick 2 scenes into framebuffer objects which can then be used in arbitrary ways in Qt-based or 3rd party OpenGL renderers. [ChangeLog][QtQuick] Introduced QQuickRenderControl as a public API. Task-number: QTBUG-37944 Change-Id: I84262243b261b35cefdf67ec6bba8127a0f29275 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-06-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | The merge conflict is about the removal of "d1" from the register set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b was reverted to what it was before, per Laszlo's advice. Conflicts: src/qml/jit/qv4isel_masm.cpp Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
| * Make QQuickRenderControl usable (still private)Paul Olav Tvete2014-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QQuickRenderControl needs a QQuickWindow in order to function. This required the use of a private QQuickWindow constructor, meaning that only friend classes of QQuickWindow could use QQuickRenderControl. This change adds a factory function, QQuickRenderControl::createOffscreenWindow(). Task-number: QTBUG-38996 Change-Id: I92f6f1f60045934f3dd33c300352247852463c73 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Add defaultSurfaceFormat to QQuickWindowLaszlo Agocs2014-03-201-0/+8
|/ | | | | | | | | | | | | | | | | | | | This static function can be used to set a surface format that is then picked up by all QQuickWindows, including the ones instantiated from QML. This introduces the ability to request higher OpenGL versions, core profile and other options also for windows that are created from QML via the ApplicationWindow element in Quick Controls applications. [ChangeLog] Added QQuickWindow::setDefaultSurfaceFormat() to set a surface format that applies to all Quick windows, including the ones created from QML. The OpenGL shading language version is now exposed to QML too in order to allow components to provide the correct shader source so shader effect items. Task-number: QTBUG-36392 Change-Id: I75a4718243d835894461f7ee0b4a383988840f9b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Introduced a few more signals to QQuickWindow.Gunnar Sletta2014-02-251-2/+7
| | | | | | | | | | | | Also marked the new afterAnimation() signal as \since 5.3 and introduced proper revisioning on the new signals. [Changelog][QtQuick] Added QQuickWindow::afterSynchronizing(), openglContextCreated(), sceneGraphAboutToStop(). Useful for deeper integration with the rendering. Change-Id: I5532b310506c2432325595e55ef9307b8934abee Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add an error signal to QQuickWindowLaszlo Agocs2014-02-211-0/+6
| | | | | | | | | | | | | | When nothing is connected to this signal, an error will be printed or, in case of Windows, a message box will be shown. If there is something connected, it is up to the application to handle the error. [ChangeLog] Added a new sceneGraphError() signal to QQuickWindow which applications can use to detect errors like OpenGL context creation failures and react in their own custom ways. Task-number: QTBUG-36138 Change-Id: I33b1e5e0e3f25872af67c5bb5ae937e3470b25f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add a signal for syncing external animation systemsLaszlo Agocs2014-02-201-0/+1
| | | | | | | | | [ChangeLog] QQuickWindow will now emit the afterAnimating() signal from the gui thread before each scenegraph sync request. Change-Id: I4897c82f75066238e781455d4fce4fb6bbe2558e Reviewed-by: Pasi Keränen <pasi.keranen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Introducing QQuickWidgetLars Knoll2014-02-171-0/+4
| | | | | | | | | | | Renders into an FBO, and provides a texture that is composed by the QPA/widget kernel compositor. Also introducing QQuickRenderControl, which is private API for now. Change-Id: I710c16e1506124a17f91e87344496471803a448b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Make QQuickWindow::forcePolish() private.Morten Johan Sørvig2013-11-091-1/+1
| | | | | | | | Adding public API was not the intention when adding this slot. Change-Id: If477917c434b32d5e5cd1fa6c640f1a6b167dd24 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Refactored Animator internalsGunnar Sletta2013-11-061-1/+1
| | | | | | | | | | | | Change the design from posting events for starting and stopping to use the scene graph's existing 'sync' point. This gives much higher predictability and makes both ownership and cleanup cleaner and also reduces intermediate states while events are waiting to be delivered. Task-number: QTBUG-34137 Change-Id: I069ac22acbddaa47925b8172ba98ac340fe9bf8d Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Don't let contentItem be FINAL in order to allow shadowing.Jan Arve Saether2013-10-301-1/+1
| | | | | | | | | | | For subclasses that adds menubars, toolbars etc, the plan is to expose another item (the item excluding the menubars, toolbars) as a contentItem. Task-number: QTBUG-32443 Change-Id: Id12fc50efde3fdf363e4528dd5de17177ddef24f Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Convenience function for resetting the OpenGL state.Gunnar Sletta2013-09-091-0/+2
| | | | | | Change-Id: I222930c74b9153c4d6d2b62afe0cc2906afb61fa Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Polish items on screen change.Morten Johan Sørvig2013-09-091-0/+1
| | | | | | | | The window device pixel ratio may change. Repaint all items. Change-Id: I09b782800c15ec6290bf79cb7c7a5d6e6c08b528 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Public API for creating atlas textures, when available.Gunnar Sletta2013-08-121-1/+3
| | | | | | | | | Atlas textures are currently only used when scenegraph is combined with the customcontext from the playground/scenegraph module. Change-Id: I42f62abdad42e97cc1dcdc05bfb16ecf2839dc0e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Added QQuickWindow::setDefaultAlphaBuffer()Shawn Rutledge2013-05-301-0/+3
| | | | | | | | | | | | | | All QQuickWindows will render using the same OpenGL context, so for a window to support transparency, the OpenGL context needs to be created with support for transparency from the very start. Therefore the application needs to call setDefaultAlphaBuffer() before creating windows. There are some relevant comments in QTBUG-20768 although the bug itself is not the same use case (it was already OK as long as the first window had a translucent color, because of setAlphaBufferSize in QQuickWindow::setColor()). Change-Id: I92e111c1a62c0d510821b646fd334e52254f8f57 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add QQuickWindow::closing signal, and ability to ignore the eventShawn Rutledge2013-05-081-0/+3
| | | | | | | | | | | An application can implement onClosing() and set closeEvent.accepted = false to delay the closing (for example to prompt the user to save changes). Depends on change I9abed47fca02a002b78727f98d678a824854adfc in qtbase. Task-number: QTBUG-31019 Change-Id: Icfd4a03ecef3621bdbbee2e2c3157b897a9b6524 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* a nested Window automatically becomes transient for its parentShawn Rutledge2013-04-101-0/+1
| | | | | | | | | | | | | | | | If you declare Window { Window {}} or Window { Item { Window {}}} the inner window will automatically become transient for the outer one. The transient relationship must be set before the inner window becomes visible though, so declaring visible: true doesn't always work, depending on initialization order. It's OK if you assign visible (or call show()) later on when the user needs to see the transient window for the first time. Also added documentation. Change-Id: I888c3b9da6d44d11516227c085bcc12a5ccb5e81 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QQuickWindow: expose activeFocusItem as a propertyJ-P Nurmi2013-03-151-0/+2
| | | | | Change-Id: Ifd393399f93b04313cd66d7873fb99b505640c8a Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove interim compatibility measuresAlan Alpert2012-10-161-2/+0
| | | | | | | | Also update some variables in qtdeclarative which failed to update rootItem->contentItem. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d3 Reviewed-by: Alan Alpert <416365416c@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QQuickCanvas renamesAlan Alpert2012-07-171-0/+181
QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones <martin.jones@nokia.com>