summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qscreen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Introduce QScreen::grabWindow(), deprecate QPixmap::grabWindow().Friedemann Kleint2012-02-091-0/+48
| | | | | | | WId can be local to a screen. Change-Id: I09ca71313836a34dbf33289b254c80207a956bb1 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: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Made QWindow::currentOrientation() a property.Samuel Rødal2012-01-261-0/+2
| | | | | | | | | | | | | | To match the previous QWindow::orientation() property which can be useful to access from QML. Also, removed the automatic translation of Qt::PrimaryOrientation to QScreen::primaryOrientation() on the QWindow level, as it leads to a lot of complexity regarding the QWindow::contentOrientationChanged() signal, and makes it hard to distinguish between the case where the window's orientation follows that of the screen, and the case where the orientation just happens to be set to that of the screen. Change-Id: I6950d1337b7f929815eff1328181855090d8066b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Made window orientation API more flexible.Samuel Rødal2012-01-241-25/+86
| | | | | | | | | | | | | | | Previously we only had QWindow::setOrientation() which was a hint about the orientation the window's contents were rendered in. However, it's necessary to separate between the orientation corresponding to the window buffer layout and orientation of the contents. A game for example might typically want to use a landscape buffer even on a portrait device. Thus, we replace QWindow::orientation() with QWindow::reportContentOrientationChange() and QWindow::requestWindowOrientation(). Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Made it possible to report screen changes through QWindowSystemInterface.Samuel Rødal2012-01-121-25/+13
| | | | | | | | | | This makes it possible for platform plugin independent code (such as generic plugins) to report changes to screen properties. An example would be an accelerometer plugin that reports orientation changes without knowing anything about the windowing system. Change-Id: I984984b6d064327772c264bc942269422451da37 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Made more QScreen properties NOTIFY and added average DPI properties.Samuel Rødal2011-11-301-2/+42
| | | | | | | | | The physicalDotsPerInch() is the average of the horizontal and vertical physical dots per inch, and likewise logicalDotsPerInch() is the average of the horizontal and vertical logical dots per inch. Change-Id: I18aa610dc9a63efe062f78c823ba29f90b2712f4 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add a note in the QScreen documentation about logical vs physical DPI.Samuel Rødal2011-11-241-0/+11
| | | | | Change-Id: I1d536711cbbc0ea8a21c6917e5e0066c1ad4ccae Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fixed regression in tst_qscreen.Samuel Rødal2011-11-231-1/+18
| | | | | | | | | The ScreenOrientation enum was changed so that the values are power of twos, angleBetween() needed to be fixed in order to reflect this. Task-number: QTBUG-22554 Change-Id: Ia45dd6643b40b14204abf967b00c0d04834736a3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add Q_PROPERTY declarations to QScreen.Samuel Rødal2011-11-011-19/+46
| | | | | | | | This means we can expose the API to QML in a simple way. Change-Id: Ibc36711071d288ed78ce833a64d6be2f22fc4b62 Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove stale documentation.Casper van Donderen2011-10-181-1/+1
| | | | | Change-Id: I85139e0334b648bee0d18129cef9387dcc6c3222 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Added Orientation API to QScreen and QWindow.Samuel Rødal2011-10-071-0/+118
| | | | | | | | | | | | QScreen now has a primary and current orientation, and a QWindow can set its orientation as well. The current screen orientation is just a hint to the application. Change-Id: I4635982cfac2d16634d4edd5c6ab78e9d0ac55a4 Reviewed-on: http://codereview.qt-project.org/5988 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com> Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Improved logical and physical DPI APIs.Samuel Rødal2011-10-061-0/+69
| | | | | | | | | | | | | | Made physicalSize() return QSizeF instead, to prevent rounding errors. Added logicalSize() as the base to compute font pixel sizes instead, and added convenience functions in QScreen to access the logical and physical sizes and DPI metrics. Task-number: QTBUG-21736 Task-number: QTBUG-21737 Change-Id: Ic705dc98eb3632617659e65a0c9a552673dc0c65 Reviewed-on: http://codereview.qt-project.org/5888 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix stale license headers from refactor branchJason McDonald2011-09-151-17/+17
| | | | | | Change-Id: I38cd941202641f50bf632af35165a944d03a20e3 Reviewed-on: http://codereview.qt-project.org/4848 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Compile fix.Samuel Rødal2011-07-251-0/+212
Added missing qscreen.cpp. Change-Id: Id79a6a12aca0758fdb1a168d63969940111f03dd Reviewed-on: http://codereview.qt.nokia.com/2119 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>