Commit Graph

618 Commits

Author SHA1 Message Date
Gunnar Sletta 54ec039a97 Add hint regarding alpha fbo's in the textureinthread example.
Change-Id: I92e6a7c2ca9e9f229b1fc463feea9f657ae18db9
Task-number: QTBUG-42486
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-11-17 07:12:18 +01:00
Shawn Rutledge 05d8ffb4df Revert: use the new form of QTranslator::load() for more flexibility
This reverts commit 427646b8d7.
It seems that it should have been more correct, but we are still not
shipping English translations, and static QString find_translation()
in qtranslator.cpp will return any language which is in
QLocale::uiLanguages() for which the translation file is found.
That is a long list on OSX.

Reverting the patch means find_translation() is not called in
such cases.  This change can be re-done whenever we are more sure
that the attempt to find a translation will succeed in finding a
sensible one, or fall back to not translating, rather than choosing
a language that the user didn't intend.

Task-number: QTBUG-41977
Change-Id: I425946cc71cec96b4f38629eb2b7e80220c5236d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-10-28 12:37:05 +01:00
Jan Arve Saether 8f6436f125 Move action handlers to the Accessible attached object
With this change, instead of writing:

    function accessiblePressAction() { submit() }

You should write:

    Accessible.onPressAction: { submit() }

For the moment, only 4 actions are added:
press, toggle, increase and decrease.

The old style action handlers are deprecated, and removed from the
documentation. New style action handlers will be preferred in case an
item declares both styles.

Change-Id: I11919e631d8476d55540f94252757b911c44ade4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-10-27 14:53:16 +01:00
Shawn Rutledge e2764c7225 Screen attached property: expose devicePixelRatio property
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>
2014-10-23 09:03:16 +02:00
Kari Hautamäki 66a4894e0e examples/quick/positioners: Colors changed and layout obeys screen resolution
Change-Id: I61b6358d6d5dff4cc9a14f8774b1c3597e83b550
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-10-14 09:26:04 +02:00
Venu f5e098e428 Doc: Updated the \brief and detailed description
Just to give a hint to the reader about what the
example does.

Task-number: QTBUG-37203
Change-Id: Ibb377e4adfb25ed4e4da0a41280e4157fae638ba
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-10-09 15:52:51 +02:00
Shawn Rutledge 427646b8d7 use the new form of QTranslator::load() for more flexibility
As the docs explain, the variant of QTranslator::load() taking a
const QLocale& is better because it "uses QLocale::uiLanguages()
and not simply the locale name, which refers to the formatting of
dates and numbers and not necessarily the UI language."  And, using
a default-constructed QLocale permits QLocale::setDefault() to
override the system locale, so for example an application's
main.cpp can do that before constructing a QQmlApplicationEngine.

Task-number: QTBUG-7329
Change-Id: Ia29a4c894087c92b071c0fe484728866f2660fe6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-10-01 15:14:23 +02:00
Topi Reinio f83d12e0c2 Update the Calqltr demo visuals and engine logic
- Add logic for displaying the calculation result in the best
      available precision, determined by the display width
    - Display 'ERROR' when the result cannot be displayed
    - Animate the number pad button colors to react to presses and
      visually disable them when pressing the button has no effect
    - Fix issues in calculator.js logic
    - Update documentation accordingly

Task-number: QTBUG-41253
Change-Id: Ibed7b8218ea4cd074b8f9b90d9bb4e3ea6b25ba2
Reviewed-by: Johanna Äijälä <johanna.aijala@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2014-09-30 12:37:28 +02:00
Topi Reinio fccf0e2912 Doc: Combine the extending QML tutorial chapters into a single example
Combine the six examples associated with each tutorial chapter
into a single, top-level example project 'extending-qml', with
subprojects for each of the tutorial chapters.

Clean up the docs, add links, and a note about a warning that
the user may see when running the code in the first chapter.

Task-number: QTBUG-32947
Change-Id: Idba4e2153817ab29f1afaf1947d1f2e25964e7b3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-09-30 12:33:22 +02:00
Johanna Aijala da217ce941 Updated calqlatr demo
Fixes and finetuning of calqlatr demo:
- fixed text overlapping, changed max length of a number from 14 to 9
- fixed app "freeze" after entering number of maximum length
- implemented +/- operator functionality
- fixed listview scrolling, after multiple operations listview was
scrolling only when entering '=' leaving the active line hidden when
the numbers and operator were typed
- added support for entering numbers and certain operators from keyboard
- removed commented code

Task-number: QTBUG-38818
Change-Id: Ic0ecd2dff68a89007421e95a5bdc3ab7ca2e401d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-25 10:26:26 +02:00
Leena Miettinen 6641214214 Doc: Add docs for Clocks example
Change-Id: I626376ae2a169f7d892e86309754633e9ed6a6e9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-25 10:26:13 +02:00
Alex Blasche d2d0bfe830 Fix disappearing slider during size/orientation change
Now the slider remains at a position that is equivalent to the old
position based on the previous percentage.

This change is most commonly triggered during orientation changes on
mobile device. That is the reason why the app was converted to a
proper Qt project. This way it was possible to test this behavior
on Android.

Task-number: QTBUG-18423
Change-Id: If05e6a1e42249f90a821c4882021d28cf212fc52
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-24 13:24:23 +02:00
Nico Vertriest cce0e1f9c2 Doc: apply title case to all section1 titles
Task-number: QTBUG-41250
Change-Id: I303d989992c9685f73baae50c64accf71b43549f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-24 12:16:44 +02:00
Venu d0138bbd47 Updated the example to accept input on Android
The Android inputMethod doesn't commit the text
until a word is chosen from the suggestions list.
This makes the URL for XMLHTTPRequest invalid. To avoid
the invalid URL, we should either not use predictive text
or explicitly commit the text. I choose to go with the earlier
option.

Task-number: QTBUT-41335
Change-Id: Id03c4dc8cfbd1b32cc2868fe8b78cd039994ff71
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-23 13:13:47 +02:00
Shawn Rutledge 106900b205 Window example: setOrientationUpdateMask to allow all orientations
The purpose of showing both orientation and primaryOrientation is to
see how they both change when the screen is rotated.

Change-Id: I54e51c834c568b1dbd895584b9f80e4b00c8d506
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-22 16:09:40 +02:00
Topi Reinio a5cb3ca5c0 StocQt example: Display trading volume scale for stock charts
Similar to how the example already shows scale of the stock price
on the right-hand side margin, this change adds a scale for the
trading volume.

Large volume values are shortened to a more readable format, using
symbols for units of thousand/million/billion etc.

Task-number: QTBUG-38254
Change-Id: I068bba1622d2a586a5dd14dddd4b832c8b112d2d
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Diana de Sousa <diana.desousa@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-09-22 10:14:27 +02:00
Tarja Sundqvist 0c17d92cda Update used colors on basis of the recommended color palette.
qtdeclarative/examples/quick/animation uses some colors which are not
mentioned on the recommended color palette. They are replaced with
recommended colors.

Task-number: QTBUG-41368
Change-Id: I6f07340735333c5da319fdc59ecf8aa7388ad2a5
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-19 14:43:59 +02:00
Leena Miettinen 2ef09acbf4 Doc: add documentation for Photo Viewer example
Change-Id: Iffedd9361bd0475a53c1a8b9567c9cbf5e5d4867
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-19 12:00:51 +02:00
Tomi Korpipää 941eff6c1c Fixed frame focusing on touch devices
Also fixed the \quotefromfile commands in the doc to
display the changed code correctly.

Task-number: QTBUG-38779
Change-Id: I37d37139459cb9cdee7ec9beaffeab26a1cb4aaf
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-19 05:14:07 +02:00
Laszlo Agocs 72eef1da9e Avoid crashing the rendercontrol example on exit
Task-number: QTBUG-41278
Change-Id: I456467698e66fb28f1bf6a05d85771ac25f454d0
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-18 10:06:57 +02:00
Venu 7ddb567f7c Doc: Added a bit more detail about the example
Task-number: QTBUG-37203
Change-Id: I62664b5dd0041cf8ba210dc3f0375793f7c72a00
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-09-11 12:02:58 +02:00
Laszlo Agocs a02cd6d37b Tune the colors in the rendercontrol example
Change-Id: I904782e6a54c8df63a2e187cdfed5a3193ff2a54
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-09-10 20:20:15 +02:00
Laszlo Agocs d22769c728 Beautify the qquickviewcomparison example
Remove the red rectangle.
Change the background color to a gradient. (taken from rendercontrol)
Disable the transparency checkbox everywhere but Linux since it
usually will not work. (too much hassle with platform specifics like
frameless windows, etc.)

Change-Id: I21488386cddc5841a2bdc8104e7abb197b075b0d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-09-10 20:20:10 +02:00
Frederik Gladhorn 06c2ddc88c Merge remote-tracking branch 'origin/5.3' into 5.4
Change-Id: I92b91cce499ed4bec64521a581276f397792e218
2014-08-28 16:18:27 +02:00
Laszlo Agocs 04f0d937fe Fix up vao usage in qquickviewcomparison example
The binder calls create() if needed, so drop that call.
In the render function however, drop the binder.
Trying to create() again and again on every frame is a
waste of time.

Change-Id: I1e9cd8e2c97030b96e604256661e65ce75446e9d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-26 12:11:44 +02:00
Simon Hausmann e525c55139 Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-08-26 11:21:16 +02:00
Venu a67aa6abc6 Doc: Added a link to the QML advanced tutorial
This avoids the need to duplicate the example details
that are already covered in the tutorial.

Task-number: QTBUG-37203
Change-Id: If7e762dc1d9a572b83bddffe7982aec9a6363408
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-08-26 11:02:39 +02:00
Simon Hausmann e9e6f70d35 Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
	src/qml/qml/qqmlobjectcreator_p.h
Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
2014-08-26 09:51:56 +02:00
Gunnar Sletta 1075dca1b5 Added an example that shows how to consume texture providers from C++.
And how to use use two textures in the same material.

Change-Id: Idcc618ed359422c2a104eeed105b7c4f5086ee4e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-26 06:10:51 +02:00
Tasuku Suzuki d28a3b7b19 Mark custom node in textureinthread dirty after rendering texture
Change-Id: I4401a6db18b1fcc69403062f3f4775d3b62dfd3e
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-08-26 03:43:52 +02:00
Jani Heikkinen e7ceacda70 Update license headers and add new licenses
- 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>
2014-08-25 11:28:46 +02:00
Venu 1d0d8413de Added the QtSQL dependency info. to the project file
Without this information the app fails to find the plugin
required to load the QtQuick.LocalStorage module on Android.

Task-number: QTBUG-37203
Change-Id: I245012e78ab8d1fe3205e08939f4baec58c20759
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-15 10:29:50 +02:00
Venu 4422be44ae Added a signal handler
Without the onHeightChanged signal handler the transition
of the NumberPad from left to right is incomplete especially
on a mobile device where the window is scaled to fit the view.
So the NumberPad ends up hidden behind the Display.

Task-number: QTBUG-36086
Change-Id: Iab021c9f2572a4ac83bc393dddc24ddd31849cb4
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-14 10:17:49 +02:00
Laszlo Agocs 2b3de73def Add QQuickWidget::setClearColor()
And make qquickviewcomparison able to demonstrate how to create a
partially transparent QQuickWidget.

Avoid also recreating the QQuickView/QQuickWidget multiple times
when switching between the radio buttons.

[ChangeLog] Added QQuickWidget::setClearColor() in order to support
semi-transparent QQuickWidgets.

Change-Id: I319ad4afbe909530274d09f2a7fcff23730d6ebd
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-13 14:34:50 +02:00
Topi Reinio bfce837c3d Doc: Remove duplicated words
Removes duplicated (repeated) words and fixes other minor
documentation issues.

Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-08-12 10:47:35 +02:00
Laszlo Agocs 549f76b521 Finish render() support for QQuickWidget
The enablers are already in. Now we just need to use the virtual in
QQuickWidgetPrivate and test it.

Task-number: QTBUG-39562
Change-Id: I1faf5a0a244ba4169fb8f9b0dae657304038b60e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-11 13:19:47 +02:00
Jocelyn Turcotte 7892390208 Expose the scene graph publically through a QSGEngine class
This change wraps QSGRenderContext and QSGContext in a new QSGEngine
class, and expose a public interface of QSGRenderer through a
QSGAbstractRenderer to make it usable on a standalone window or FBO.

Change-Id: I2d41187472424f5ea64650a006bcd61f2711f6b9
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-01 13:49:46 +02:00
Simon Hausmann 75d8ebb3e6 Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	src/qml/compiler/qv4ssa.cpp
	src/qml/jsruntime/qv4arrayobject.cpp
	src/qml/jsruntime/qv4engine.cpp

Change-Id: Ie3ef6202b6a3a8521971e1be10c40c6a2db6989c
2014-07-26 13:21:16 +02:00
Leena Miettinen 63154d88d2 Doc: add documentation for the RSS News example
Change-Id: I87d7e43c19c897be3b98b219dacaf0f2bd30c1dd
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-07-18 15:28:50 +02:00
Martin Jones 112efda64b Add containsPress property to MouseArea
It is very common to use pressed and containsMouse properties
together to highlight a pressed item, e.g.

    property bool highlighted: pressed && containsMouse

The containsPress property allows simplification and optimization of
user code.

[ChangeLog][QtQuick] Add containsPress property to MouseArea

Task-number: QTBUG-40130
Change-Id: Ie286d431154eb37a99e57e4cf881d68d7cbbe31d
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
2014-07-16 07:54:58 +02:00
Frederik Gladhorn 427bee6cb6 Merge remote-tracking branch 'origin/5.3' into dev
Change-Id: Iba61035910c46627e5e1c3824757da7b3d573657
2014-07-10 10:12:13 +02:00
Laszlo Agocs e1fbfc0156 Change default to QQuickWidget in the comparison example
This way the example will run on embedded devices (eglfs)out of the
box and will only abort when switching to QQuickView.

Change-Id: I07855ac1a9d112f868adf6fcab8db888ba0888ec
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-07-09 12:41:51 +02:00
Niels Weber f35bda5717 Calqlatr demo: Remove unused files
There were a few images etc that were never used. Remove them.

Change-Id: I606241903cf098cb495aa06ac4c595fb175cd9fc
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-07-07 17:50:15 +02:00
Topi Reinio 217f07d2f2 Remove usage of external dependencies from the RSS News demo
Examples in qtdeclarative shouldn't depend on Qt Quick Controls,
Layouts, or add on modules like Qt Graphical Effects.

Change-Id: Ic069ed3223a4cfebde5263e846ae394aebed0b33
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
2014-07-07 11:02:48 +02:00
Nico Vertriest 2dcad8f5c8 Doc: correct link/compilation errors in Qt Declarative
Task-number: QTBUG-34749
Change-Id: I507d54b0568d77c6099a0bd99f5c369b8667032a
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-02 14:52:54 +02:00
Frederik Gladhorn 7238de11c5 Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev 2014-07-02 14:52:52 +02:00
Frederik Gladhorn 41e924eb6e Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	.qmake.conf
	examples/quick/scenegraph/openglunderqml/squircle.h
	src/quick/doc/src/qmltypereference.qdoc
	src/quick/scenegraph/qsgthreadedrenderloop.cpp

Change-Id: Ife4f4b897044a7ffcd0710493c6aed1d87cf1ef9
2014-07-02 10:32:33 +02:00
Shawn Rutledge 6622b87482 Tools and examples: consistently use organization name QtProject
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>
2014-07-02 09:08:06 +02:00
Laszlo Agocs 87a5889029 Skip rssnews demo if xmlpatterns is not present
Otherwise builds without the QtXmlPatterns module will fail.

Change-Id: I11d0b84653f8d59787b09cd9c12977d18be92729
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-07-01 15:02:58 +02:00
Laszlo Agocs 08f9b552c3 Avoid direct GL calls in Qt Quick examples and tests
Change-Id: I204a5513708aeff5cae00d06d4f0c27c20a13ace
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-07-01 14:20:49 +02:00