summaryrefslogtreecommitdiffstats
path: root/examples/widgets/gestures
Commit message (Collapse)AuthorAgeFilesLines
* Regenerate examplesAlexandru Croitor2020-02-041-1/+5
| | | | | | Change-Id: I04b2adbe370ffea81d7787ad90e4ae69d2c165cb Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-145-25/+21
|\ | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * Cleanup QtWidgets examplesChristian Ehrlicher2019-10-115-25/+21
| | | | | | | | | | | | | | | | | | | | | | Cleanup QtWidgets examples: - use nullptr (clang-tidy) - use member-initialization - adjust the style - fix includes Change-Id: Ic5448606aacc525ea60b615a69227017aa2b821a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-141-1/+1
|\| | | | | | | | | | | | | | | | | | | This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
* | Fix compiling of examples on AndroidSimon Hausmann2019-06-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Simplify add_qt_gui_executable() to not require WIN32/MACOSX_BUNDLE but provide it implicitly. It's redundant :) * When on Android, build a module (shared library), just like qmake. This requires an additional library destination in the install() call, but that's ignored on other platforms. * Fix typos in the android deployment generation settings function * Use the correct cache variable to determine whether we're inside a Qt build or not. Right now this only works inside Qt builds anyway as QtPlatformAndroid.cmake is not publically accessible. Change-Id: If1c763c31a7a83d0e0d854362ba7901657f63eb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | Fix linking of examplesSimon Hausmann2019-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide add_qt_gui_executable() as function in our public API that takes care of automaticWinMain linkage. We can use this in the future to encapsulate similarplatform-specific behavior and adjustments, such as module generation onAndroid. In order for the examples to see the function in Qt5CoreMacros, three more additional fixes were required: * Do the build_repo_end() call _before_ attempting to build the examples, as we need the build_repo_end() to include QtPostProcess and complete the creation of all the target config files. Otherwise the find_package() calls in the examples see something incomplete. * Add more QT_NO_CREATE_TARGET guards * Always call find_dependency on the dependencies, regardless of the target creation mode. This way a find_package(Qt5 COMPONENTS Widgets) will still load Qt5CoreMacros. Change-Id: I03ce856e2f4312a050fe8043b8331cbe8a6c93e6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Allow to build examples as standalone projectKevin Funk2019-06-051-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create CMake config files which can be used from the very same CMake project. These CMake config files simply do not create any targets, controlled via the QT_NO_CREATE_TARGETS. This patch also allows to build qtbase.git:examples as a standalone project, against an already-built Qt. Ran this: ag -s "QT " examples -l -0 | xargs -0 -n 1 .../util/cmake/pro2cmake.py --is-example Task-number: QTBUG-74713 Change-Id: I44cce5a4048618b30f890c5b789592c227a8b47d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-161-1/+1
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Cleanup Widgets examples - foreachChristian Ehrlicher2019-01-231-1/+1
| | | | | | | | | | | | | | | | | | Cleanup the Widgets examples - replace foreach with range-based for loop in the remaining directories Change-Id: I321e6c0f414401a1ae4fb65762b97d894b725afa Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | CMake: Add widgets examplesTobias Hunger2019-03-262-0/+20
|/ | | | | Change-Id: Ib6142b93df066e3658eb189b50ca74c455fe7e56 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Add missing full stops in briefsPaul Wicking2018-06-211-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@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>
* Examples: Replace 'Q_DECL_OVERRIDE' by 'override'hjk2016-06-151-4/+4
| | | | | | | | Examples should demonstrate best practice, and we can use the keyword directly nowadays. Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-071-1/+0
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| * Remove empty first lines of files.Friedemann Kleint2016-04-061-1/+0
| | | | | | | | | | | | | | They might upset licensing related tools. Change-Id: I858d21fc418ba16959c88847b559b11bea29ed6b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Unify license header usage.Jani Heikkinen2016-03-296-20/+70
|/ | | | | | | | | 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>
* Examples/Doc snippets: Fix single-character string literals.Friedemann Kleint2015-10-131-5/+5
| | | | | | | Use character literals where applicable. Change-Id: I79fa5018f05735201ae35ee94ba0d356fcad1056 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Clean up debug code and unused functions from imagegestures exampleJoni Poikelin2015-10-013-4/+0
| | | | | Change-Id: I0dbbb5c6f3227e8cfe3e0f6eb27b2bf16b5d222b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Use QImageReader::setAutoTransform() in examples.Friedemann Kleint2015-07-131-0/+1
| | | | | | Change-Id: If80616d680f1aa6c9d5cd1a4080710e5ad67d603 Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-06-011-0/+3
|\ | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/global/qglobal.h Change-Id: I2c0f7544bf194f2d0f59218fd583c822901487b0
| * Doc: Added the missing \brief and \image for example docsVenugopal Shivashankar2015-05-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | The Qt TestLib examples are just tutorials so updated the qdocconf to use the default thumbnail in the Qt Creator welcome screen. Task-number: QTBUG-41996 Change-Id: Ia04a42a92e414c97a426b6095a62621a348e7de0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | doc: imagegestures example: document the pinch handlerShawn Rutledge2015-03-032-15/+54
| | | | | | | | | | | | | | | | | | | | | | The swipe handler is simple, and also doesn't currently work on every platform. But the pinch handler is the one that needs explanation, because the difference between incremental and absolute values of the rotation and scale properties is tricky. Change-Id: Ie3c7f4941d4a17734c9a920a8dd978f86fb03c4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | imagegestures example: scaleFactor is relative; get values directlyShawn Rutledge2015-02-251-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | QPinchGesture::scaleFactor is relative to the previous zoom factor, so either we need to multiply the total zoom by scaleFactor, or set it based on totalScaleFactor, which is simpler. Pinch-zoom is now working in this example. There's also no reason to use getProperty() when the accessors are directly accessible in QPinchGesture. Task-number: QTBUG-6010 Change-Id: I150dc0b18b4b871a08ec55c0f77463509ab26afe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Updated BSD licensed file headersJani Heikkinen2015-02-155-15/+15
| | | | | | | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-116-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QCommandLineParser: Show usage and errors in message boxes on Windows.Friedemann Kleint2014-11-271-8/+1
| | | | | | | | | | | | | | | | | | | | | | Use the Windows MessageBox API if no console window can be obtained. [ChangeLog][QtCore][QCommandLineParser] Message boxes are used to display errors and usage if no console window can be obtained on Windows. Change-Id: I63ee8e4d8bd78db83e688fd69374779102562aa3 Reviewed-by: David Faure <david.faure@kdab.com>
* | Add debug output for QGestureEvent and QGesture classes.Friedemann Kleint2014-09-301-2/+2
|/ | | | | | | Task-number: QTBUG-15768 Task-number: QTBUG-40461 Change-Id: I3fe29f71ddf39c76efaca02d2b70494378d147dc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-151-4/+4
| | | | | | | | | | | | | | | | | | 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>
* Polish the image gestures example.Friedemann Kleint2014-03-285-34/+138
| | | | | | | | | | | | | | | | | | - Add a command line parser to properly evaluate help option and directory argument, add options to disable gestures. - Add logging category so that the user can actually see what is happening. - Scale large images. - Use qreal instead of float. - Minor polishing: set window title, position file dialog at pictures location. Task-number: QTBUG-37759 Task-number: QTBUG-37203 Change-Id: Ibaf54a13034b150386a8aee476f83a9eba298298 Reviewed-by: Indrajit Tapadar <indrajit.tapadar@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Doc: corrected link/example errorsNico Vertriest2014-01-318-0/+662
Update pro files after move gestures folder Update snippet statements Corrected path in imagegestures.pro Task-number: QTBUG-34749 Change-Id: Icc19908914e36507e412ab63bf0cc2809aa48e17 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>