aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/shared/shared.h
Commit message (Collapse)AuthorAgeFilesLines
* Let platform decide what the default show action isTor Arne Vestbø2017-12-191-6/+1
| | | | | | | | | | | The platform handles this through the ShowIsMaximized and ShowIsFullScreen platform integration style-hints, as well as QPlatformIntegration::defaultWindowState(), which was added specifically so that we wouldn't have to hard-code the behavior in user code. Change-Id: Ic019ccc2edd871a78bf94fd5fe572b9659416582 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix outdated BSD license headerKai Koehne2017-10-171-3/+13
| | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Example: Enable auto scaling on HighDPI screensVenugopal Shivashankar2016-10-281-0/+1
| | | | | | Task-number: QTBUG-56425 Change-Id: I2246245216fb8cd0d4dc4b15a0687edfc64ccad1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix shared example header.Friedemann Kleint2015-08-031-1/+3
| | | | | | | | | Use new connection syntax and return -1 on load failures, which avoids hanging processes and empty windows in case some module is not installed. Change-Id: I4966c9657b752eee8612fa893a0489bc8a64ccfc Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-171-3/+3
| | | | | Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Update copyright headersJani Heikkinen2015-02-121-5/+5
| | | | | | | | | 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>
* Tools and examples: consistently use organization name QtProjectShawn Rutledge2014-07-021-1/+1
| | | | | | | | | | | | This affects the location of the QSettings files or registry entries. Other parts of Qt are using this organization name so it's good to have all the settings in the same place. [ChangeLog][QtQuick] tools and examples consistently use the QtProject organization name Change-Id: I1fae4eaed0248411fe95dda9572d38006648b162 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Adapt Qt Quick 2 renderer to work with OpenGL Core ProfileSean Harmer2013-11-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic approach is to have the batched renderer create and bind a vertex array object if it detects we are using an OpenGL Core profile context. The VAO is bound for the duration of the QQ2 renderer's work cycle and unbound at the end so as to not interfere with any other VAO's a user may wish to use. All shaders have been copied and ported to be compliant with the GLSL 150 core specification which is the minimum for a Core profile context (OpenGL 3.2 Core). We are not using any newer features as yet so this will work anywhere we can get a Core profile context. The QSGShaderSourceBuilder class has been extended to resolve any requests for shaders to the same basefilename with "_core" appended prior to any file extension. This could be extended in the future to allow version, or GPU or platform specific shaders. The QSGShaderSourceBuilder has also been extended to allow it to insert #define definitions in the prologue of a shader. Any such definition is inserted: * After the last #extension directive (if any are found) * Otherwise after the #version directive (if found) * Otherwise at the start of the shader source This is required by the custom particle shaders which make extensive use of such #defines. In addition the mechanism used by the distance field glyph cache to extend the cache with new glyphs has been modified to work (and work more efficiently) when using a Core profile context. Rather than using a shader program and a buffer filling quad to blit the old texture into the new cache texture, we instead use the technique of framebuffer blitting. The existing fallback implementation using glTexSubImage2D() is still available if needed. The DECLARATIVE_EXAMPLE_MAIN macro has been extended to allow easy testing of any of the QtDeclarative examples with a core profile context. Just run the example with QT_QUICK_CORE_PROFILE=1 ./text for e.g. The only ones that may not work out of the box are those that provide GLSL shader source e.g. the customparticles or shader effect examples. These work fine if the shader source is adapted to GLSL 150 core. In the future it may be a good idea to expose some context property to QML that the user can use to determine what shader source variation to provide to Qt Quick. Along these lines it would also be very nice to allow the provision of shader source to ShaderEffect or CustomParticle from a separate source file just as we now do within Qt Quick. Task-number: QTBUG-32050 Change-Id: Ia6e9f06dbb8508af9ae03c6b60fb418b4cc9e41f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Polish up QQmlFileSelectorAlan Alpert2013-11-131-1/+1
| | | | | | | | Incorporate beta feedback, and hide QQmlAbstractUrlInterceptor as the implementation (instead of making that "the API"). Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2aaaa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Apply file selectors to QQmlApplicationEngine appsAlan Alpert2013-09-201-1/+3
| | | | | | | | | You can also manually apply them to a QQmlEngine using setUrlInterceptor(new QQmlFileSelector(parent)), or using your own QQmlAbstractUrlInterceptor subclass. Change-Id: I0c0ff8b080c138686b3c03e0bc3b9f25bcd11a85 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* examples: set application name and organization for QSettingsShawn Rutledge2013-08-151-0/+3
| | | | | | | | With the Qt.labs.settings module available, it makes sense for each example to have its own settings file. Change-Id: I8257f04ec13c7caf9995e03626e5453c653cfb92 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Package dialogs examples into a single executableShawn Rutledge2013-05-281-1/+1
| | | | | | | Introduced tabs and added the C++ boilerplate launcher. Change-Id: Ibb49a182e3928aba5dced097d5307eb7d1f4b42d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.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>
* Use resource files for most examplesKai Koehne2012-12-121-25/+1
| | | | | | | | | Make examples shadow-build-friendly by using resource files instead of trying to derive the qml path from applicationDirPath(). Change-Id: I669424554c772d9b261249b366247190f5fbd8b1 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* centralize and fixup example sources install targetsOswald Buddenhagen2012-12-101-0/+82
follow respective change in qtbase Change-Id: I27502eb7ebea973e19ec5f7c3ec0e2338556f6e0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>