summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Make gui/math3d classes use float rather than qrealSean Harmer2012-09-073-51/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects the mismatch between using floats for internal storage and qreal in the API of QVector*D which leads to lots of implicit casts between double and float. This change also stops users from being surprised by the loss of precision when using these classes on desktop platforms and removes the need for the private constructors taking a dummy int as the final argument. The QMatrix4x4 and QQuaternion classes have been changed to use float for their internal storage since these are meant to be used in conjunction with the QVector*D classes. This is to prevent unexpected loss of precision and to improve performance. The on-disk format has also been changed from double to float thereby reducing the storage required when streaming vectors and matrices. This is potentially a large saving when working with complex 3D meshes etc. This also has a significant performance improvement when passing matrices to QOpenGLShaderProgram (and QGLShaderProgram) as we no longer have to iterate and convert the data to floats. This is an operation that could easily be needed many times per frame. This change also opens the door for further optimisations of these classes to be implemented by using SIMD intrinsics. This needs to be applied in conjunction with https://codereview.qt-project.org/#change,33548 Task-number: QTBUG-21035 Task-number: QTBUG-20661 Change-Id: I9321b06040ffb93ae1cbd72fd2013267ac901b2e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Command-line-only examples should not build as .app bundles on OSXShawn Rutledge2012-09-038-0/+8
| | | | | | | | It's confusing when you double-click it and nothing happens. Task-number: QTBUG-26976 Change-Id: I50c5625a41881bdbcbf29001197ed15da4ee0a28 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Properly reflect format changes in calendarwidget example.Mitch Curtis2012-09-032-14/+30
| | | | | | | | | | This patch ensures that May 1st and the first Friday of each month also have their formats updated when the corresponding checkboxes are unchecked instead of just checked. Task-number: QTBUG-26936 Change-Id: Ib5f77daf8d9000eeb18663b2e07e4842a70d22b6 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Don't reference widgets/widgets in example doc.Frederik Gladhorn2012-09-0124-571/+571
| | | | | Change-Id: Ie1fe516f75ca8c1b2233dc6bb2b887b55593e730 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Moved gui example documentation to the proper location.Samuel Rødal2012-09-014-0/+456
| | | | | | | Gui example documentation should be in examples/gui/doc/ Change-Id: I3cd196a2bb5d76b6e275f336b29a2ad1811159dd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Added OpenGL example and documentation.Samuel Rødal2012-08-297-1/+443
| | | | | Change-Id: I2d9d4e52caf0a39fef9648d8a9e83a0c1328f650 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Move address book example images to proper location.Frederik Gladhorn2012-08-286-0/+0
| | | | | Change-Id: Ib106445c7a68fb1a1fd2d2c6d568681d83b712c9 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Add missing examples from doc repo.Frederik Gladhorn2012-08-282-0/+85
| | | | | Change-Id: I145ae05a5e7348740f858bd2bdcb8d21d7a90d22 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* doc: fix linksFrederik Gladhorn2012-08-282-3/+3
| | | | | Change-Id: Ifb6363e35c5317b6b1d9fd5e53079b30753f0666 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* doc: key -> uicontrolFrederik Gladhorn2012-08-271-1/+1
| | | | | Change-Id: I42e5e2dc2d7cf7030ee9bc7dfa97ddaa66958370 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove mentioning of Phonon.Frederik Gladhorn2012-08-271-4/+3
| | | | | Change-Id: I78ce6d42ee043a35b520bf8567a1874cf8e2e43e Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Doc: replace occurrence of \starslash in widget docsAndy Nichols2012-08-231-1/+1
| | | | | Change-Id: I93c370e3d53b955057741bc3bf503e781fbb6244 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* change http example default URL to http[s]://qt-project.orgJeremy Katz2012-08-231-2/+2
| | | | | | | This example used to refer by default to qt.nokia.com. Change-Id: Iecb682d0deb6270da91baf26897d44b16b39d09e Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Doc: Fix snippet and example referencing widget examplesAndy Nichols2012-08-23101-1498/+1498
| | | | | | | | Widget examples were moved into a widgets subfolder, but qdoc references were not updated. Change-Id: Id2a4573e723745b9827c664c852807d6116f8f6d Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Doc: change \menu to \uicontrol in application example docsAndy Nichols2012-08-221-10/+10
| | | | | | | \menu command has been replaced by \uicontrol in qdoc Change-Id: Ib105df58c565c96b34579720acb62fe64e7806c4 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Making trivial snippets inlineGabriel de Dietrich2012-08-215-13/+47
| | | | | | | Change-Id: I8d8b5586579d3ee460b234b5a09462586ac1cfd0 Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Moved a bunch of widgets example images from qtdoc to qtwidgetsJ-P Nurmi2012-08-2033-0/+0
| | | | | Change-Id: I46363e19051cca6f088f0ed6df1c9fd113b95fe7 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Moving .qdoc files under examples/widgets/docGabriel de Dietrich2012-08-201300-57/+18815
| | | | | | | | | | 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>
* Doc: Add FOV to rogue example.Geir Vattekar2012-08-181-0/+49
| | | | | Change-Id: Ib0f4caad9bc828a94616466f303d879fc967970d Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Clean up QScreen::grabWindow()aavit2012-08-181-1/+3
| | | | | | | | | | | Handle 0 WId parameter as meaning "desktop window"/whole screen. Also, re-add the default values for the grab area, both for convenience and compatibility with QPixmap::grabWindow() in Qt4. Update the screenshot example so it doesn't comlain about usage of deprecated QPixmap::grabWindow(). Change-Id: I2ad229113ddb8ded0388f2ebc0e8c703c6657f1f Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Doc: Fix broken return codes for a few examplesGeir Vattekar2012-08-155-5/+5
| | | | | | | | This reverts remnants of 79747d38987ce42adc510be0c5bb1565f55fd3d6. Task-number: QTBUG-25571 Change-Id: I1dbf64cfcba889fb0c70ceaeeeffad8334a8aab1 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Call clear() instead of empty() in addressbook/part6 tutorial.Mitch Curtis2012-08-091-1/+1
| | | | | | | | | empty() doesn't remove elements, it just returns whether it is empty. Task-number: QTBUG-8849 Change-Id: I9bb8e855d96cecd2a0df336cb46e308ddedf0d07 Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid potential crash.Gunnar Sletta2012-08-081-1/+1
| | | | | | | | The setGeometry call triggers a resizeEvent() so make sure the backing store is created before that. Change-Id: I26aa3ef6c0515311e3ca21f938a92ca1a20d0030 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* let qmake auto-generate d-bus adaptors and interfacesOswald Buddenhagen2012-08-0711-703/+10
| | | | | Change-Id: If721dc2d75e382bde6bf9bcda921170186406c7f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix class and file names in the d-bus examplesOswald Buddenhagen2012-08-078-22/+22
| | | | | | | some omissions from the com.trolltech => org.example replacement. Change-Id: I078c272fc3729fc7b9e9cd3e6ede7c21f0386b62 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove some dead code wrapped in Q_WS_QWS.Stephen Kelly2012-08-031-5/+0
| | | | | Change-Id: Ie1ee8c4af603b924abe40145041357981d174445 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Remove the obsolete scene argument for constructors of graphics itemsLars Knoll2012-08-0310-20/+15
| | | | | | | | | The argument has been obsoleted and not documented since 2007. Get rid of it now before Qt 5.0 Task-number: QTBUG-25089 Change-Id: I91a5508a5e1606f5b5c289501295c67be4abe6a0 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* examples: fixed compile with -no-widgetsRohan McGovern2012-07-272-2/+10
| | | | | | | | Disable a few examples depending on widgets which had previously been missed. Change-Id: Ic9c7cda94f690ee9d541c742997b7db9ace40fe0 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Correct status tips for Menus example.Mitch Curtis2012-07-251-1/+1
| | | | | | | | | | Line spacing's status tip is incorrectly set to paragraph spacing's, and paragraph spacing's status tip is not set at all. Task-number: QTBUG-22736 Change-Id: I2c3ff2fa45221f1cf4af8e4323c383c998adb650 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com> Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
* statemachine: Move RestorePolicy enum to QState classKent Hansen2012-07-161-1/+1
| | | | | | | | | | This makes it possible to add API for setting the restore policy per state, or even per property assignment (QTBUG-17861). This change is fully source compatible with Qt4. Change-Id: I53628546b070f6fc84891f86e7ad7bd8ef5ba285 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Analog clock and raster window examplesGunnar Sletta2012-07-138-0/+426
| | | | | Change-Id: I36586fbaa7da25208bbc1964d2708f094d0d5c98 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make it clear that stickman example animations are binary files.Jason McDonald2012-07-136-9/+9
| | | | | | | | Add a .bin extension to the filenames to ensure that packaging scripts treat these files as binary instead of text. Change-Id: Ib49e2bdb93a43ddb7590cb8fc0b542a251a786f8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* qtbase: Add missing example installs and files.Friedemann Kleint2012-07-107-3/+34
| | | | | Change-Id: I071fd862e001b766c9fb13106242edf23a608663 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Change deprecated use of CONFIG+=qdbus to QT+=dbusSergio Ahumada2012-07-098-11/+8
| | | | | | | | qdbus.prf was deprecated by 812adb58ba714c69eea9249584da2efd4fedecbc Change-Id: I5ceb65c1c671734491fe12e2174e6d8ecc14147d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QCalendarWidget use its locale's firstDayOfWeek.Mitch Curtis2012-06-281-1/+4
| | | | | | | | | | | QCalendarWidget currently uses Qt::Sunday as the default first day of the week. It has been suggested that a better user experience would see the calendar's locale be used instead. Task-number: QTBUG-19811 Change-Id: I4441bf9ffd52213ef622a4a7f498530b7cc9e110 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* QGraphicsItem::setAcceptsHoverEvents is deprecated, replace itThiago Macieira2012-06-262-2/+2
| | | | | | | | | It is replaced by setAcceptHoverEvents (note the lack of s), even though the original name made more sense -- "set (if this item) accepts hover events". Change-Id: Ia6137c0e37b0a5932836f1d08fb8fa436f736eed Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Replace the QGraphicsItem deprecated transforming functionsThiago Macieira2012-06-267-12/+12
| | | | | | | | | The scale(), rotate() and translate() functions are replaced with QGraphicsItem::setTransform. Change-Id: Icb81c71b1513c049e2fd607995ca3a868108ee30 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Andreas Aardal Hanssen <andrhans@cisco.com>
* Update calendarwidget exampleGatis Paeglis2012-06-201-4/+4
| | | | | | | | Due to API changes introduced by ff55d64f6788563a6ef9da2b6d0b6dc23bb936aa Task-number: QTBUG-26130 Change-Id: I4e5bdf3dd81d75308a3e565239b9d7a95452cd43 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Fix building of qtbase examples when printsupport module is disabled.Janne Anttila2012-06-1822-15/+49
| | | | | | | | | | | Printsupport module is not that interesting in embedded environments, and it also does not compile at the moment for WEC7. Fixed qtbase examples to obey the availability of printsupport module. Change-Id: I960d1b628b9ca82450aa3b0df8dd101b2544ee12 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix encoding of non-ASCII stringsThiago Macieira2012-06-144-10/+10
| | | | | | | | | tr() only takes UTF-8 as input, so we must recode to UTF-8. But we can use QLatin1String elsewhere. Task-number: QTBUG-26086 Change-Id: I5932ddc96fb817dbe01106e5f6f2b10f58472d6b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Change path for 'mousebuttons' widgets exampleGatis Paeglis2012-06-141-2/+2
| | | | | | | Task-number: QTBUG-26121 Change-Id: Icaeb6038d166fb0ffadf1657ddef21c18b3d3be6 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Add install path for qpa windows exampleGatis Paeglis2012-06-141-0/+6
| | | | | | Task-number: QTBUG-26150 Change-Id: I8e981318e05cca6628160aea31281f8e3baaa50f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Use a QVector<int> instead of a QSet<int> in itemviews/models.Stephen Kelly2012-06-122-2/+2
| | | | | | | | | | | | | | The QSet<int> is a more expensive container to use and create, so it should be avoided. This is source incompatible compared to earlier Qt 5 for QAbstractItemView subclasses which reimplement dataChanged, but this patch changes nothing compared to already-present SiC compared to Qt 4. Change-Id: Id95391dfd62a0a7f487a8765790b007badefb937 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Replace deprecated QGraphicsScene::itemAt() with items()Thiago Macieira2012-06-091-1/+2
| | | | | Change-Id: I33ee03db775d3cf6807372e0963748cf6a4e07db Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix assert in painting demos when switching to OpenGL.Friedemann Kleint2012-06-091-3/+6
| | | | | | | | | | Fix creation order. The ArthurFrame receives a paint event with OpenGL set to true when the glw-member is still 0. Task-number: QTBUG-26084 Change-Id: Ib4b568d22ae925542e3a775403e4c983ea0b4de5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix compilation of examples with -no-widgetsKent Hansen2012-06-075-5/+5
| | | | | | Change-Id: Ie0e19daf6c6476b5c5130f4930dfa3df92917384 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove widgets dependency from xmlstreamlint exampleKent Hansen2012-06-071-1/+1
| | | | | Change-Id: I2c7609077bd18864ffd9b2ba5086eb590aff3df0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove widgets dependency from qtconcurrent/map autotestKent Hansen2012-06-072-3/+3
| | | | | Change-Id: I734ae73a530ab6eb27271586040ef910e6ad0e2c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove useless "QT += widgets"Kent Hansen2012-06-0513-22/+0
| | | | | | | | These .pro files have TEMPLATE=subdirs, so there's no reason to be adding libraries here. Change-Id: I0fb0a44107710ee746d354106d0c46006958ee62 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix digiflip example build.Janne Anttila2012-05-311-0/+2
| | | | | | | digiflip examples depends on qtwidgets, let's link to it also. Change-Id: I4f4434c747d143942909797491153a4f358e6fef Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>