summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation
Commit message (Collapse)AuthorAgeFilesLines
...
* | Modernize the "animation" featureLiang Qi2018-10-122-10/+0
|/ | | | | | Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* sub-attaq example: Fix crash with software Open GLFriedemann Kleint2018-03-141-2/+7
| | | | | | | | | Check whether an Open GL context could be created, else fall back to raster. Task-number: QTBUG-64797 Change-Id: I91bba41b0efca85293a1a4af054842b9f309b126 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: revamp Animated Tiles exampleNico Vertriest2018-01-161-7/+7
| | | | | | Task-number: QTBUG-60635 Change-Id: Iceb53e7c0df88bb51589a1cc86e905dbc60a856e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* qtlite: Skip building examples when configured with no-feature-itemviewsRainer Keller2018-01-121-0/+1
| | | | | | | | | Compiling the default examples should be possible without compile errors. Task-number: QTBUG-53141 Change-Id: I73d8787241291ae6230861a89b38e91d900fede0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: complete Easing Curve ExampleNico Vertriest2017-12-181-0/+0
| | | | | | | | | | | | - updated logo - updated screenshot - add link to easing.qdoc Task-number: QTBUG-60635 Change-Id: I9389dfbbe66cfa5f4e8641bee2f8fd63f5c95f99 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: drop Application Chooser ExampleNico Vertriest2017-11-208-200/+0
| | | | | | | | | There are plenty of other examples showing how to use QStateMachine Task-number: QTBUG-60635 Change-Id: I82300b2a0f4e7733f08579a2aa9b548cb7d87efa Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-086-14/+12
| | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-07-051-8/+2
| | | | | | | | | | | | | | | | Especially in examples, where we should show off our convenience functions, prefer calling these functions over doing arithmetic with M_PI (or approximations thereto) and 180 (give or take simple factors). This incidentally documents what's going on, just by the name of the function used (and reveals at least one place where variables were misnamed; the return from atan is in radians, *not* degrees). Task-number: QTBUG-58083 Change-Id: I6e5d66721cafab423378f970af525400423e971e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* examples: remove some unneeded QStringRef::toString() callsMarc Mutz2017-04-071-4/+5
| | | | | | | | | | - when appending to another string - when just comparing - when just calling toInt() Change-Id: I6960784569b83bfd3e3640a8c04f2f909c293449 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Examples: Remove a redundant virtual specifier for overridersAlexander Volkov2016-11-2511-25/+25
| | | | | | | | It's a good practice to use override without virtual: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override Change-Id: I5c2d73600e6c706424589c0487133c03a4ef3629 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix/adapt the uses of {to,set,from}Time_t in the qtbase source codeThiago Macieira2016-07-061-1/+1
| | | | | | | | | Move those to the equivalent {to,set,from}SecsSinceEpoch(), except for the cases that did QDateTime::currentDateTime{,Utc}().toTime_t. Those are best implemented with QDateTime::currentSecsSinceEpoch(). Change-Id: Ib57b52598e2f452985e9fffd145a366c92cfda20 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Examples: Replace 'Q_DECL_OVERRIDE' by 'override'hjk2016-06-1517-66/+66
| | | | | | | | Examples should demonstrate best practice, and we can use the keyword directly nowadays. Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Unify license header usage.Jani Heikkinen2016-03-2921-63/+273
| | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-2127-450/+909
| | | | | | | | | | | | From Qt 5.7 -> examples are lisenced under BSD license, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new BSD header instead of LGPL21 one (in those files which will be under BSD) Change-Id: I3ad61caaf07802eb9da7d29eca3fe49d8a51b6a8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Use C++ <cmath> instead of <math.h>Allan Sandfeld Jensen2015-02-161-4/+5
| | | | | | | | | | | | | | Including math.h can pollute the default namespace, and break some compilers if cmath versions of the method are declared as using. Switching to C++ math functions also greatly simplifies handling of float qreal as C++ automatically chooses the right method. [ChangeLog][QtCore][QtMath] qmath.h no longer includes math.h, so any sources depending on that indirect inclusion may fail to build. Change-Id: I4d0e331dafba354ec05dc5052e61ef4ff8d387fe Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-1521-63/+63
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1148-294/+294
| | | | | | | | | | | | | | | | | | 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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* New Qt logoAlessandro Portale2014-11-052-0/+0
| | | | | | | | | | | | | This patch replaces the old Qt logo with the new, flatter one. The PNGs were optimized via: optipng -o7 -strip "all" Task-number: QTBUG-41685 Change-Id: I51983a45144373bf7aee31a32990ecbb2582f488 Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-2427-513/+297
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-1517-66/+66
| | | | | | | | | | | | | | | | | | Q_DECL_OVERRIDE (which expands to 'override' for supported compiler) helps to declare the intent (that it is an overridden function) and force compilation error when there is no such virtual function in the base class. The examples should show the best practice of having it, as it may save the programmer quite some time in case of change of API or typo in the function name or arguments. This change was done automatically with clang-modernize -add-override -override-macros And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix warning about unused memberJędrzej Nowacki2014-03-061-2/+1
| | | | | | | sub-attaq/boat_p.h:134:9: warning: private field 'key' is not used [-Wunused-private-field] Change-Id: I3f4cb1325aaac71d2bf0e7807381742937d173f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* stickman example: fix header include guardMarc Mutz2013-09-161-1/+1
| | | | | Change-Id: I65f2187b309f075035ad6c8beab40bf2a177140c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-166-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix warnings about unused variables in sub-attaq-example (CLANG).Friedemann Kleint2013-03-063-10/+4
| | | | | Change-Id: Icad46a03a8d5875c128bd1f1bc97127e0ee05622 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1848-48/+48
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* add and use qtHaveModule() functionOswald Buddenhagen2012-12-211-1/+1
| | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* clean up example project files, mostly wrt QT+=widgetsOswald Buddenhagen2012-12-176-13/+12
| | | | | | | | | move QT+=widgets (and printsupport) statements before the install statements, and de-duplicate some cases. also move some TARGET assignments to a more conventional place. Change-Id: I6140d8611680f66c24490e5894e4eb90cae95635 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove QT+=widgets from SUBDIRS projectsOswald Buddenhagen2012-12-171-2/+0
| | | | | | | it makes no sense whatsoever Change-Id: Ica7c764575079a12512ee2eb62a995ebbefa09a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* centralize and fixup example sources install targetsOswald Buddenhagen2012-11-298-33/+7
| | | | | | | | | | | | | it's confusing for the users if the examples' project files contain code to install their own sources. also, this constitutes an enormous code duplication, and lots of mistakes. consequently, automate it. more or less as a side effect, this also removes the entirely meaningless target installs in subdirs projects. Task-number: QTBUG-28184 Change-Id: I9fc1367a06db9e2c46aeb67d68729a4f67163ef9 Reviewed-by: hjk <qthjk@ovi.com>
* delete .desktop files of examplesOswald Buddenhagen2012-11-286-66/+0
| | | | | | | | | they were added without an explanation, and they can't be particularly useful (because they contain hard-coded paths and refer to non-existing icons). Change-Id: I27e2c35375e28645b0c03449ddc7ac7017da5943 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Examples: Install to $$[QT_INSTALL_EXAMPLES]/$submodule/$examplehjk2012-11-268-16/+16
| | | | | | | | This makes the structure of the examples after an 'make install' similar to the one in a 'developer build'. Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Prevent easing example warnings.Thomas Hartmann2012-11-231-2/+19
| | | | | | | | | | | | | | examples/widgets/animation/easing was spitting out a lot of "QEasingCurve: Invalid tcb curve" warnings. The reason was that in case of the TCP curve we do not provide defaults. The function createEasingCurve() now provides reasonable values for the custom curves to show what is possible and how to use them. Change-Id: I880d8d0f0ce2872ce2019f7d2e000f4c4ce136e2 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Fix building of examples.Friedemann Kleint2012-11-218-20/+21
| | | | | | | | | | | - Correct install path of widget examples to contain widgets directory in target tree. - Add missing resources. Task-number: QTBUG-27977 Change-Id: If4cb117998892b0b165d7678367553d3a7553b91 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Delete the QVariant ctors taking global Qt enum values.Stephen Kelly2012-10-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They have unexpected results in Qt 5 (the Qt::GlobalColor one works as expected in Qt 4, but was removed in Qt 5): QVariant v = QVariant(Qt::red); qDebug() << v; // QVariant(int, 7) v = Qt::red; qDebug() << v; // QVariant(int, 7) The correct way is to use: QVariant v = QVariant::fromValue(QColor(Qt::red)); The deleted constructors are the ones for which there is a class with an implicit constructor taking the enum, and that class is a built-in metatype. QLocale::Language and QKeySequence::StandardKey would also fit the description, but I can't include the header for QKeySequence as it is in QtGui, and I don't want to include the qlocale header in qvariant.h. Putting a QLocale::Language is probably very uncommon anyway. The QTextFormat test is doing the wrong thing, but the result isn't being tested. Added new tests which fail before the patch. Change-Id: Ia38a0784990f4d40ff7457a86daf58aabd4964eb Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2248-780/+780
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* examples: Mark ctor's as explicitSergio Ahumada2012-09-174-10/+10
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: Ida9f9c2f0c8608c35b0137b2512a6747afd69515 Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Moving .qdoc files under examples/widgets/docGabriel de Dietrich2012-08-20134-0/+9677
Updated those .qdoc files to refer to the new relative examples emplacement. Images and snippets to be moved later. Also grouped all widgets related examples under widgets. Change-Id: Ib29696e2d8948524537f53e8dda88f9ee26a597f Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>