aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* texteditor/touch: highlight the floating editor buttonJ-P Nurmi2016-08-271-2/+1
| | | | | | | A style-independent way to get light foreground color. Change-Id: Idf43020d0724af993723143d74a2b1f8ab467c1e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor/touch: elide the title when it doesn't fitJ-P Nurmi2016-08-261-3/+1
| | | | | Change-Id: Ib1e9de9d23b708e5ddfc131dce8da5570a61d17a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor/touch: simplify the toolbarJ-P Nurmi2016-08-261-72/+66
| | | | | | | A single Row positioner is sufficient. Change-Id: Ib244ddf875e40df341cb99172995d1717cb6439f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: remove outdated todo-commentsJ-P Nurmi2016-08-262-4/+0
| | | | | | | | | | The comments refer to the original code that was setting a declarative source property in the Component.onCompleted signal handler, but this does not really apply anymore now that we have an imperative method to load document contents. Change-Id: I9054cbc6ecec2c66d65251c49a5b1de2ad0623dc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: add touch UIMitch Curtis2016-08-249-18/+351
| | | | | | Task-number: QTBUG-54952 Change-Id: I14fe95608c4393b928edc80fc93ebaa843ce478f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* texteditor: cleanup the commented out universal importJ-P Nurmi2016-08-161-1/+0
| | | | | Change-Id: I99c5b79d80987216be7b680de91ec6c66cf127e0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* FileDialog: add missing selectedNameFilter-propertyJ-P Nurmi2016-08-141-0/+2
| | | | | Change-Id: If31d657e29a9cc3049af5cd3cf39d68979ff2db0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* FileDialog: replace file(s)Selected() with declarative propertiesJ-P Nurmi2016-08-141-2/+2
| | | | | | | Follow the same convention that ColorDialog, FontDialog and FolderDialog. Change-Id: I960d4fc1ba275ab997f2a079a799d2b90796eca3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* FontDialog: replace fontSelected() with a declarative propertyJ-P Nurmi2016-08-141-1/+1
| | | | | | | This is consistent with the QML FontDialog from QtQuick Dialogs 1. Change-Id: I14a5a313be5ba9a9e0fb1645fe272cf9c2cdd389 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* ColorDialog: replace colorSelected() with a declarative propertyJ-P Nurmi2016-08-141-1/+1
| | | | | | | This is consistent with the QML ColorDialog from QtQuick Dialogs 1. Change-Id: I4068a98156494eb36b2d9ecf4c1af90ad173bb97 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* texteditor: enable persistent selectionJ-P Nurmi2016-08-131-0/+1
| | | | | | | | | | We want to keep the selection even if the editor loses focus when a color or font dialog is opened. The selected color or font should naturally apply to the whole text selection that was there before the dialog was opened. Change-Id: I76e6b95f979a090533b028be76e7b2cf1fd53e99 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* texteditor: use "brush" icon for text color and "A" for fontMitch Curtis2016-08-122-15/+15
| | | | | | | | | | "F" looks a bit silly. Even though most word processing applications seem to use the "A" icon with a bar underneath it for the text color, we want to use it to represent the button that opens the font dialog, since we don't use comboboxes for that. Change-Id: I3cc60ffbe388644cdcbd9e8ec0dcffbc041aa124 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* texteditor: use a wrapping Flow for the toolbarJ-P Nurmi2016-08-121-35/+36
| | | | | | | | | | | | | | A proper toolbar extension would be better, but this is a workaround to make the window scalable/resizable until we have a better solution available. The font button was moved together with the other formatting buttons, because it looked a bit awkward when it was wrapping alone on the second row, and in general it caused things looking somehow mis-aligned when actions were wrapped on multiple rows. Change-Id: I0c1f432e81d5fde6aa763c13ea9efbb8af68ad50 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Platform: add MenuSeparator for convenience and consistencyJ-P Nurmi2016-08-121-3/+1
| | | | | Change-Id: I0c0aae219c81b9248a5a8a0fd0e78521cbe86360 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: replace setFileUrl() with load()J-P Nurmi2016-08-123-29/+10
| | | | | | | | This allows to remove the text property to avoid storing the whole document's initial content for no real purpose. Change-Id: Iad59576b5304be9739c1dfb0a7d4c263323b0edb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: add fileName & fileTypeJ-P Nurmi2016-08-123-22/+22
| | | | | | | | | 'document.fileName' reads better than 'document.documentTitle', and 'document.fileType' can be set as the default suffix for the file save dialog. Change-Id: I935586296c91d3efdd5edea03d81c685e7edcab2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: cosmetic cleanupJ-P Nurmi2016-08-123-6/+5
| | | | | Change-Id: Id1d5f0f8c1e7851ea33241fa09af5c0029b74db3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: fix, unify and cleanup the settersJ-P Nurmi2016-08-121-9/+1
| | | | | | | | | - setCursorPosition() was missing cursorPositionChanged() - setAlignment() does not need to check for doc, it's done in textCursor() - remove the unnecessary cursor.isNull() checks to gain shorter code Change-Id: I4448224ab02fc22f43ef10749200aca80eed537c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: remove uninitialized/duplicate pointer memberJ-P Nurmi2016-08-122-20/+25
| | | | | | | | Use textDocument() similarly than textCursor() is already used, to access the underlying document and cursors. Change-Id: I1f90f95420132251792f4f9dda302c0509fbad0c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: re-order the property accessorsJ-P Nurmi2016-08-122-172/+189
| | | | | | | | | | There's no reason to register all setters as slots. Properties are fine for QML usage. Re-order them also in the .cpp file in the same order than they are in the header. It's a bit easier to follow when logical pairs are next to each other. Change-Id: Ib8097ecafe10f2c785b05b045694c338977860ef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: simplify saveAs() - let FileDialog handle the suffixJ-P Nurmi2016-08-123-26/+12
| | | | | Change-Id: Id1b415ebcbe12a9eeff9b54dcfa2cec67054a8d6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: fix the file dialog name filtersJ-P Nurmi2016-08-121-1/+1
| | | | | | | OS X interpreted the suffix literally ".html," Change-Id: Icdf889592e4457db5dd4ffd420501b890cbcfd27 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add Text Editor exampleMitch Curtis2016-08-1113-1/+1213
| | | | | | | | A follow up commit will contain the touch UI. Change-Id: I26275fdd31294506821fa3e3e4a4bb63329665b9 Task-number: QTBUG-54952 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-031-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Also update expected line numbers in tst_swipedelegate. Conflicts: .qmake.conf src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextarea_p.h tests/auto/controls/data/tst_swipedelegate.qml Change-Id: I36323e3a633c1c750d23014e56a7c881963a1a30
| * Example: Made the SpinBox editableVenugopal Shivashankar2016-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | The text on the SpinBoxPage mentions that the control value can be changed using the keyboard, which is possible only if the control is 'editable'. Task-number: QTBUG-55033 Change-Id: I5a01321d4677a298608f7fb88960301eb8bf1518 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Gallery: use the new .pro syntax for RESOURCESJ-P Nurmi2016-07-212-66/+4
| | | | | | | | | | | | | | | | | | A .qrc file is no longer mandatory. One can list resources directly in the RESOURCES variable. This results to a flatter Resources-tree in Qt Creator's project tree. Change-Id: If272e4a7974f433552cb848ddc83827dd09669d6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add DialogJ-P Nurmi2016-07-181-14/+12
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added Dialog to provide convenience for handling dialog popups. Dialog integrates with DialogButtonBox, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I776516738b82c0e5726769c054d6f2a956fb616d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Gallery: round settings dialog's coordinates and sizeJ-P Nurmi2016-07-181-3/+3
| | | | | | | | | | | | | | | | Make sure it doesn't land between the pixels, which may look awkward with antialiased rectangles and graphical effects / shaders. Change-Id: If4919dd97670437ffe40a060fd8e1e72b5a982a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: add swipe.pressed and swipe.clicked()Mitch Curtis2016-07-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | These allow users to detect when non-interactive left/right/behind items are being pressed and clicked. [ChangeLog][SwipeDelegate] Added swipe.pressed and swipe.clicked() for detecting when non-interactive left/right/behind items are pressed and clicked. Change-Id: I858f0a8e4f85b3f80f93eb4f1680d8e121acdd41 Task-number: QTBUG-54651 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-092-2/+2
|\| | | | | | | Change-Id: Ifff470774347041d1638fb1da277a8cc11a00db6
| * Improve gallery example for Qt Quick DesignerThomas Hartmann2016-07-012-2/+2
| | | | | | | | | | | | | | | | | | The Qt Quick Designer does not support the usage of unqualified properties of the root item. I guess there is no reason to not fully qualify them in examples. Change-Id: I962833bbc051551f2f0518975713c906f343337d Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* | Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-0842-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Gallery: fix PopupPageJ-P Nurmi2016-06-291-1/+1
| | | | | | | | | | | | | | The id was changed from settingsPopup to settingsDialog in bfb0a9e. Change-Id: I1bb61832883a0b85721cd732522d4b3a46754f43 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Tumbler: change default visibleItemCount to 5Mitch Curtis2016-06-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This looks much better than 3; it looks more like an actual Tumbler, partly because the displacement shading is made more visible. This should make it less confusing to interact with for first-time users. In addition, we were previously setting it to 5 in several places. [ChangeLog][Important Behavior Changes][Tumbler] Changed the default value of visibleItemCount to 5 to make it visually clearer that it's a Tumbler. Change-Id: I7c16e05aa73f58e3405caa1826453cb824efae11 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-06-201-1/+1
|\| | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickcontainer.cpp Change-Id: I7c41619a81b4fdd0d8ccaa4f0bb489a9b84e3865
| * Gallery: fix the default style settingJ-P Nurmi2016-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A problem noticed in release testing: Run the Gallery example without explicitly specifying any style. The Gallery runs with the Default style, but the settings dialog wrongly claims that it's running with the Universal style. The situation is easy to emulate by removing ~/.config/QtProject/Gallery.conf (to clear the previously stored style setting). => Fix the wrong default value (it was wrong because back in the days the Universal style was used by default). Change-Id: I7eb7565cb78e68cf5e85527e53724af217973584 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Add DialogButtonBoxJ-P Nurmi2016-06-151-34/+11
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Added DialogButtonBox to provide convenience for handling dialog buttons. DialogButtonBox is able to create a set of standard buttons with a single line of QML code, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I9b3c6ba1b2836dadf9a2ac9086be1eba214e7c4d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-0127-7/+17
|\| | | | | | | | | | | | | | | | | | | | | Comparing colors in tst_material.qml works fine now. Conflicts: examples/quickcontrols2/gallery/qtquickcontrols2.conf tests/auto/material/data/tst_material.qml Task-number: QTBUG-53556 Change-Id: I59970442a09bd72bf0ce53fe838c560ca8daf325
| * Gallery: update logos, icons, colors & screenshotsJ-P Nurmi2016-05-2426-3/+13
| | | | | | | | | | Change-Id: I4b1bec349b3141cabd1882ae28a5ad53ae2cb029 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * SwipeDelegate: rename exposure to swipe, active to completeMitch Curtis2016-05-231-4/+4
| | | | | | | | | | | | | | | | | | "swipe" is both shorter and easier to understand. "complete" is easier to understand. Task-number: QTBUG-53519 Change-Id: I87ecba4ac878f033111ee56fa618b80b227858a7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Introduce a 'System' theme to the styles.Friedemann Kleint2016-05-261-2/+2
|/ | | | | | | | | | | | | | | | Setting the theme to System chooses either the light or dark theme based on the system theme colors. However, when reading the value of the theme property, the value is never System, but the actual theme. [ChangeLog][Controls][Material] Added Material.System theme enum value, that can be used to let the Material style choose either the light or dark theme based on the system theme colors. [ChangeLog][Controls][Universal] Added Universal.System theme enum value, that can be used to let the Universal style choose either the light or dark theme based on the system theme colors. Change-Id: Ibfc9f01953cb8322b64d59413cfbaef9d4bb28fd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gallery: fix main page label text colorNikita Krupenko2016-05-061-1/+0
| | | | | Change-Id: Id822c3f80ef488ce08fd4ffe70eee103a92a4ecc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: Add proper elevation supportMichael Spencer2016-05-041-0/+9
| | | | | | | | | | | | - Added an ElevationEffect component based on elevation shadows from Angular Material - Use it on Button, ToolBar, ComboBox, Drawer, Pane, Popup, Menu, and Switch - Add an elevation property to the Material attached object - Update the button colors based on the elevation property Change-Id: I5152e1a56bdcb1016cc4f945a16ef510e0cdece6 Task-number: QTBUG-51276 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Remove TODO from Chat Tutorial documentationMitch Curtis2016-04-291-3/+0
| | | | | | | The image doesn't need to be regenerated. Change-Id: I47e089c0474b819308465e35dd1b0d1dc306d384 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Hide SwipeDelegate text when removingMitch Curtis2016-04-261-0/+1
| | | | | | | | | This avoids the issue where the delegate's height is animated to 0, but the text within the delegate goes outside the bounds of the delegate. Change-Id: Ic7ec64bfb6801dc23a3f65972a9acf18c0dbce1f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-2142-46/+46
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Chat Tutorial: update the install pathJ-P Nurmi2016-04-215-5/+5
| | | | | Change-Id: Ib4bd465d6c5d2f81f7dcce2f3eb547fe1cdc2360 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename qtquickcontrols.conf to qtquickcontrols2.confJ-P Nurmi2016-04-215-3/+3
| | | | | | | | Use the 2-suffix consistently everywhere to avoid any potential confusion with the old controls. Change-Id: I83aa212a15ed78b8694fb7d3db80fc8430aea969 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-04-20129-2/+2
|\ | | | | | | Change-Id: Ia8879787703c32db44119b25be10adc83adc40bb
| * Flatten and rename example install path and directory structureMitch Curtis2016-04-1952-2/+2
| | | | | | | | | | | | | | Change-Id: Ib04e79d72c37fa4507517da2d3b1c28ccd73eaed Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>