aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickscreen_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove QtQuick.Window pluginUlf Hermann2020-06-151-2/+6
| | | | | | | | | | | | | | | | | We move all the types into QtQuick itself and retain QtQuick.Window only as alias to QtQuick. This requires support for qmldirs that consist of only an import statement. [ChangeLog][QtQuick][Important Behavior Changes] The contents of the QtQuick.Window QML module have been moved into the QtQuick module. QtQuick.Window is merely and alias for QtQuick now. An explicit import of QtQuick will override this alias. Therefore, if you import QtQuick with a different version than QtQuick.Window, you will get the QtQuick.Window types of the version given in the QtQuick import now. Task-number: QTBUG-84639 Change-Id: Ia82afab0ac2faba70cfdaf53dc8dfe4261e1113f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Quick: Clean up some includesUlf Hermann2020-06-041-4/+2
| | | | | | | Uniformly use <...> and sort them by modules. Change-Id: I11cd160783dfb141d8824d635bdc56a63aaee50f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Quick: Drop some unnecessary semicolonsUlf Hermann2020-06-031-2/+2
| | | | | Change-Id: I289e92237d9378dbc38597e0e9aac2f8038a7beb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove Screen.orientationUpdateMaskShawn Rutledge2020-05-081-10/+0
| | | | | | | | Now Screen.orientation works by default rather than filtering by default. Task-number: QTBUG-83055 Change-Id: I0f49499ec25ceeebf19bc8ef1adc259023f1bc75 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Export QQuickScreenInfo and QQuickScreenAttached to QMLUlf Hermann2020-04-161-0/+5
| | | | | | | | | They are used as properties and should therefore at least be available as anonymous types. Change-Id: I4f91ff9f499084f4c2b3612237b41baee5604c35 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-091-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4executablecompilationunit.cpp src/qml/jsruntime/qv4executablecompilationunit_p.h src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlpropertycachecreator_p.h src/qml/qml/qqmltypecompiler.cpp src/qml/qml/qqmltypedata.cpp tests/auto/qml/qmlformat/tst_qmlformat.cpp tools/qmllint/scopetree.cpp src/qml/qml/qqmlapplicationengine_p.h Adjusted tools/qmllint/findunqualified.cpp to use newer API Change-Id: Ibfb4678ca39d626d47527265e3c96e43313873d4
| * Remove comments about renaming and removing properties for Qt6Jan Arve Sæther2020-03-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the record, my argument for not acting upon these comments was that they seems to be missing a key issue: OrientationSensor does not offer a superset of the features of QQuickScreen::orientation. Therefore, it cannot just replace QQuickScreen::orientation: An OrientationReading is the output from the sensor itself regardless of any settings that was made in the OS to for instance lock the UI to landscape only. And this seems to be the point of the QScreen::orientation: It's supposed to be the "virtual/locked" orientation we get when we ask the OS (which might not reflect the true physical orientation, since it might be overridden by the OS due to e.g. landscape locking). The original author agreed with this argument, and agreed that the comments can just be removed. Change-Id: I2df0ae9debc6b6177f0e4ee6efb60c03da726e15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Add major version to all Q_REVISIONsUlf Hermann2020-02-191-10/+10
|/ | | | | Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Avoid initializing QFlags with 0 or nullptr in further casesFriedemann Kleint2019-11-251-2/+2
| | | | | | | Amends 744e77b841878fb017c0f2d60607090008f28180. Change-Id: I16e37aaf503eb62f67fca0e48be4c92c4a72ae46 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Move type declarations for QtQuick.Window* into imports/windowUlf Hermann2019-10-151-10/+4
| | | | | | | | | We want only one URI per library or plugin, so that we can centrally register the types. Change-Id: Ibc7305f102503ce672f8751771779102be44e014 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-1/+8
| | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Harmonize meta object revisions and minor versionsUlf Hermann2019-08-261-4/+4
| | | | | | | | | | In order to avoid complexity we want those to match. We can easily "rename" the meta object revisions as those are not public interfaces. Change-Id: I48e063d49758c7bacd9b7816bf5541cf67e07b0d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add screen product informationPier Luigi Fiorini2017-05-231-0/+9
| | | | | | | | | | Add information such as manufacturer, model and serial number that is now available on QScreen to the Screen attached property. [ChangeLog][QtQuick][Screen] Add manufacturer, model and serial number. Change-Id: If8f33dffa5eff33111f93212249424b9092250b8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Rename Window.targetScreen to screen, and pick up changes to the screenTor Arne Vestbø2017-02-111-1/+1
| | | | | | | | | | | The screen property can be used for both setting the initital screen, and for reading out the current screen, so 'targetScreen' was not an ideal name for this property. Change-Id: I1b617085b1e8e0e437355740be5d3cee9379c47f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Enable making window-screen associations from QMLLaszlo Agocs2016-10-101-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick provides a Screen attached property to query information about the screen an item's window belongs to. This is a good start, but has two problems: it lacks some virtual desktop related info (e.g. the position in the virtual desktop) and it cannot be used in combination with the Window element in order to achieve a QML equivalent of QWindow::setScreen(). Therefore add the missing virtualX and virtualY properties and introduce Qt.application.screens. The latter is an equivalent to QGuiApplication::screens() and is a JS array the elements of which can be set as the value of the new Window.targetScreen property. This means that a call like window->setScreen(QGuiApplication::screens()[0]) translates to Window { targetScreen: Qt.application.screens[0]; ... } when using the Window type from QML. Screen addition or removal can be acted upon via onScreensChanged. QQuickScreenAttached has been split into two in order to allow reusing the QScreen wrapping queries for other purposes as well. Task-number: QTBUG-56115 Change-Id: I4b2fbd873315b40d0afe878da2fc50966c00e2e0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QQuickScreen: Use QPointer to guard QScreen referenceGabriel de Dietrich2015-09-091-1/+1
| | | | | | | | | We don't get any notification when the QScreen object is deleted, so the only thing we can do is guard it with a QPointer as it's done in QWindowPrivate. Change-Id: Icf0ba036ec27e70694807f3e66c744910a783185 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-0/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Fix regression where QQuickScreenAttached overwrites QScreen valuesAlbert Astals Cid2015-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | Up to Qt 5.3 it was fine setting the orientationUpdateMask in QScreen in C++, with 5.4 that value is always discarded and overwrote with 0, this change makes it possible to still set the orientationUpdateMask value in C++ and not have it overwritten unless specifically changed from QML Change-Id: I134290ce91be8b91df4e9e8e71120753813f48d7 Reviewed-by: Alex Blasche <alexander.blasche@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>
* Screen attached property: expose devicePixelRatio propertyShawn Rutledge2014-10-231-0/+3
| | | | | | | Change-Id: I08b22766b3e389b7d27ca4c56729f550b0647a08 Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add orientationUpdateMask to QQuickScreenAlex Blasche2014-09-301-1/+9
| | | | | | Task-number: QTBUG-38699 Change-Id: I173b7e53c27dba336351572859f7c9aeafe07ef9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* 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>
* Remove metaobject revisioning for QQuickScreenAttachedAlan Alpert2014-07-291-9/+9
| | | | | | | | | | | | | | | Attached property versioning is not currently fully supported. Initial approach was to add the version tags and not enforce them until you could version attached properties. However the QML engine is currently erroring on this. Specific error example: ""Screen.onNameChanged" is not available due to component versioning " Workaround recommended in the JIRA task is to just not version them, until attached property versioning is fully implemented. Task-number: QTBUG-35569 Change-Id: I5ded7eb223ec00f70d847b3fac09ec240d5d7901 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Version pixelDensity consistentlyAlan Alpert2013-11-061-1/+1
| | | | | | Change-Id: I06bbdc6e6869718058a796ca737668ce69802f2c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Screen attached property: expose pixelDensity propertyShawn Rutledge2013-10-261-0/+3
| | | | | | | | | Because logicalPixelDensity is different than physical density on multiple platforms, having the actual density is critical to be able to design resolution-independent controls. Change-Id: I06bbdc6e6869718058a796ca737668ce69802f2b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-1/+1
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QQuickScreen.name can change at runtimeShawn Rutledge2013-04-301-1/+2
| | | | | | | | | It's generally a constant but the attached property doesn't always have its QScreen at startup, so in practice every property needs a notifier. (Followup to Id777caf6cef1df5bc01757605e3085151170760b ) Change-Id: Ia3a321f98dc49b7e75f6eceb8f16b153c73a3134 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Add more geometry properties to the Screen attached propertyShawn Rutledge2013-04-291-0/+10
| | | | | | | | | desktopAvailableHeight is useful for positioning windows, and logicalPixelDensity is useful for ensuring that touch controls are a reasonable size even on very high-resolution displays. Change-Id: Id777caf6cef1df5bc01757605e3085151170760b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.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>
* QQuickScreen attached obj handles screenChanged and geometryChangedShawn Rutledge2012-10-161-0/+4
| | | | | | | | | | sizeChanged is replaced with geometryChanged. Given a Window, it also needs to connect to the Window's screenChanged signal. The result is that if the screen is changed after the QQuickView is created, the Screen attached object will be updated. Change-Id: I64473dd960376b861eb50e3e5a1a296d0030e766 Reviewed-by: Samuel Rødal <samuel.rodal@digia.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-2/+2
| | | | | | | | | | | | | | | | 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>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-3/+3
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix Screen::AngleBetweenAlan Alpert2012-02-201-1/+2
| | | | | | | | | | | Enum values in invokables don't worry currently, so use ints. Also AngleBetween is no longer static, so it has to be initialized before the function can be used. Change-Id: I4a6748fef6920bab6f08f22ce68911c3af6ce821 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Adapted QQuickScreenAttached to orientation API changes in QScreen.Samuel Rødal2012-01-241-3/+3
| | | | | Change-Id: Ic2cb008b989780e297f03ddd5bdef466bb230c74 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove the use of QT_MODULE()Gunnar Sletta2012-01-201-1/+0
| | | | | Change-Id: I1c07231b0bf412fe490a44b9a060bb2e2ef11154 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add Screen attached objectAlan Alpert2011-12-091-0/+105
Use this to get details of the screen such as size and current orientation. As well as adding its own example, this commit updates Calculator to use Screen instead of Runtime for orientation. Change-Id: I1b73d2ee22a92b1dee827de1bd893eebec9f5817 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>