aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/shared
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* QtQuick examples make use of the new pixelDensity propertyShawn Rutledge2013-10-302-3/+3
| | | | | Change-Id: I273fc08405724158fbf7c7d410bfa38fef4600b1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@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>
* Adding QtQuick.Dialogs.MessageDialogShawn Rutledge2013-09-195-0/+84
| | | | | Change-Id: Ifa3de21e6f611c24742118d6d178edbe14f243be Reviewed-by: Liang Qi <liang.qi@digia.com>
* systemdialogs example bug fix: don't allow clicking through tabsShawn Rutledge2013-09-131-1/+3
| | | | | | | | | | | For example on Font Dialogs tab of examples/quick/dialogs/systemdialogs/systemdialogs.qml it was possible to open the color dialog by clicking slightly below the open button, because the color dialog tab was behind the current one. Change-Id: If9917e2baef7cfd49a0d01acd73ffa69dfcee088 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-192-4/+8
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickgridview/qquickgridview.pro tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic54cafbdda1ac22757d2ee65dcc63a1b167c7556
| * Make buttons and tabs larger in QML examples and dialogsShawn Rutledge2013-07-292-4/+8
| | | | | | | | | | | | Task-number: QTBUG-32578 Change-Id: Ic89058abc55e5e079f44862986b2132114456147 Reviewed-by: Liang Qi <liang.qi@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>
* Declarative dialog improvements for the non-Window use caseShawn Rutledge2013-06-261-9/+7
| | | | | | | | | | | | | Platforms like Android and EGL don't support multiple top-level windows, so we have to avoid trying to use widget-based dialogs (because a widget dialog on top of a scene graph will result in a second window), allow the QML dialog to be an Item, and decorate it to look like a window. Task-number: QTBUG-31898 Change-Id: I9af049f3265188e8be677a05a8bc6d1699b4cd00 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Package dialogs examples into a single executableShawn Rutledge2013-05-285-1/+105
| | | | | | | Introduced tabs and added the C++ boilerplate launcher. Change-Id: Ibb49a182e3928aba5dced097d5307eb7d1f4b42d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* window and Screen example: new properties; splash screenShawn Rutledge2013-05-282-0/+2
| | | | | | | | | Demonstrates the new properties, how to make a splash screen, and how to make a standalone app with an icon. Combined the Screen info into this example too. Change-Id: I5b731539b39c55327f4e5b93860a880a35835896 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Doc: Update module "Qt Declarative" -> "Qt Quick"Sze Howe Koh2013-03-301-1/+1
| | | | | | | | Also update examples/README to show the relationship between Qt Quick and Qt QML. Change-Id: I4e50d9f0ddb1ac25ccdfed09f579f76a375b14fe Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Cosmetic changes in common controls for examplesShawn Rutledge2013-03-148-181/+112
| | | | | | | | | Use system palette colors. SimpleLauncherDelegate has its own "button" rather than using the shared one, which really wasn't suitable for any other purpose. So now example apps can use Button, and ToolButton isn't necessary. Change-Id: I632397f36b96a26c32a86301ddacb85d5c3221f0 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* adding QtQuick.Dialogs, with FileDialog implementationShawn Rutledge2013-03-045-0/+201
| | | | | | | | | | This will obsolete the QFileDialogItem in desktop components and be available to all QtQuick applications. The QML FileDialog type is dynamically defined in the plugin by detecting which implementation will work on the current platform. Change-Id: I073c7a84bff6c02cf592dc46822a5a4b9c9bcaea Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Various improvements to Canvas examplesJens Bache-Wiig2013-02-264-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed these examples were rather "aestetically challenged" and decided to make it a test case for our WIP style guidelines. - Use consistent margins (12 px) - Use proposed color palettes - Use proposed fonts and header styles I created a new Slider graphic and moved this into the shared folder as I think it is useful for other examples. I removed a lot of unused files which seem to have been added but never actually used. I also found several bugs in our implementation, including not scaling or rotation around the correct origin. In many cases I simplified the examples, removing variables/sliders where they did not add significantly to the example itself. Change-Id: Ie09da33deaf56a3ec45a2031b87a24a8602e994a Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Add next.png to shared qrc filesAlan Alpert2013-02-062-0/+2
| | | | | | | | | | Otherwise the executable versions of the examples print errors instead of loading it. Change-Id: I7d370ce3ee172491c004668847cdb6d5967f2b24 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Improve the look and feel of our demo launcherJens Bache-Wiig2013-01-175-14/+123
| | | | | | | | | | | The existing demo launcher looks rather ugly. This does some visual tweaks to make it look better, including adding support for proper text wrapping. It was approved by our design lead Diana. Change-Id: I660764575a411f598c53c9c42e290a807e20c0cf Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-104-4/+4
| | | | | | 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-123-25/+17
| | | | | | | | | 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-107-0/+320
follow respective change in qtbase Change-Id: I27502eb7ebea973e19ec5f7c3ec0e2338556f6e0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>