Commit Graph

249 Commits

Author SHA1 Message Date
Kevin Funk fb3e0ab4ef Replace Q_DECL_OVERRIDE with override
Change-Id: Ib7dc6679748dc6c88f7bad3896b2e2e3b048c987
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-09-22 14:31:26 +00:00
Venugopal Shivashankar bc6e79ebab Doc: Edit language
- Fixed pucntuation issues and typos
- Removed redundant text

Task-number: QTBUG-60647
Change-Id: I1ab0e8e62a2e3f4997629653b659f130c13db007
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-09-07 16:49:08 +00:00
J-P Nurmi d2d0e08e58 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	.qmake.conf
	tests/auto/controls/data/tst_scrollindicator.qml

Change-Id: I1f5581ae7814c0d4152e4c9b79a30a8af5a3a17b
2017-07-11 12:57:13 +02:00
Venugopal Shivashankar 815cae4eb4 Example: Replace spaces from the image file name
Updated the corresponding qml files where these images are used.

The spaces in file name stops qdoc from listing the file in the
example page.

Change-Id: I45b24ec88d367fe229fe365eeb611b86de805e0d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-07-10 07:37:11 +00:00
Venugopal Shivashankar 6f5a061b5c Doc: List the corresponding source files and images under each chapter
In a tutorial such as this, listing all the example files and images
at once towards end of it is confusing. Qdoc enables to turn off the
auto-generated list and explicitly list the files wherever necessary.

Change-Id: Ifbb258af5ad35bd2df976eb793a14fd5873ceed9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-07-05 08:09:23 +00:00
J-P Nurmi ace9d50e64 Doc: fix the anchors.fill links in the Chat Tutorial
There was a QDoc warning:

    qtquickcontrols2-chattutorial.qdoc:28: warning: Can't link to 'anchors.fill'

and the anchors.fill links weren't actually linking to the anchors
property but just to the beginning of the QML Item docs.

Change-Id: I66f66765443e5b75af8198309f9f7482e70ea2d3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-07-04 18:05:21 +00:00
J-P Nurmi 89f8e1f54f Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/quicktemplates2/qquickmenu.cpp

Change-Id: I595ed1671fcad6c3b87123be2b825bca09552f0f
2017-06-29 15:23:44 +02:00
Venugopal Shivashankar 037fe9c5c9 Doc: Improve tone at the beginning of the tutorial
The tutorial now sounds like it is leading the reader through a series
of changes to the default code that came with the "Qt Quick" application
template.

Change-Id: I6e46e720df9668dff435541ebd97bdaa6a7c02ad
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-06-28 12:20:26 +00:00
J-P Nurmi d0fdebbc37 Add Overlay attached properties and signals
[ChangeLog][Controls][ApplicationWindow] Deprecated the overlay grouped
property in favor of the newly introduced Overlay attached properties.

[ChangeLog][Controls][Overlay] Introduced Overlay attached properties
and signals that supersede the overlay grouped property in Application
Window. The Overlay attached type allows providing background dimming
for popups without requiring an ApplicationWindow instance.

Task-number: QTBUG-61336
Change-Id: I9df11bcb167e7725014d5f058fe24d70da4a10b3
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-06-26 15:35:25 +00:00
J-P Nurmi 026353c74a Merge remote-tracking branch 'origin/5.9' into dev
Fusion style ComboBox popup height was adjusted according to 90a0d402
to make tst_controls::ComboBox::test_emptyPopupAfterModelCleared pass
with the Fusion style.

Conflicts:
	src/imports/controls/ComboBox.qml
	src/imports/controls/material/ComboBox.qml
	src/imports/controls/universal/ComboBox.qml

Change-Id: I2bad826dc56de9d8952ea2a9ace950c7cf3cbc58
2017-06-06 21:41:33 +02:00
Liang Qi 1e472c6c1a Merge remote-tracking branch 'origin/5.9.0' into 5.9
Change-Id: Iba044084bf82f6b2b8ceba4aa2a80bdcf8fc38e0
2017-05-31 08:13:14 +02:00
J-P Nurmi 7d592bcbfb Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/quicktemplates2/qquickrangeslider.cpp

Change-Id: I7eb990cfdc91173f86552841ba16536b35ea09cf
2017-05-30 19:42:14 +02:00
Oswald Buddenhagen acedf3ade8 remove bogus QTPLUGIN+=qsqlite magic
the code was originally meant to link the plugin if it's not built into
qtsql. this logic did not survive the various build system refactorings,
but it's also entirely pointless, because available static plugins are
now automatically linked.

Change-Id: If4b5bb3387f21aef98aa55257dd5b94f953822c5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-05-29 17:55:11 +00:00
J-P Nurmi 828000334a Gallery: remove unneeded Material-specific icons
ToolButton was changed to tint the icon so that it always follows the
foreground color. Thus, it's no longer necessary to ship white versions
of the icons for the Material style.

Change-Id: Ibe5accc1b39559c9dfc2f94fbf3c9c323b91fe63
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-05-24 12:01:17 +00:00
J-P Nurmi 796fff91ac Wearable Demo: fix fuzzy images on retina screens
Even though retina screens are not the primary target of the wearable
demo, users can try out the demo on desktop. Provide crispy @2x image
assets to give a better impression for those who have retina screens.

Change-Id: If88367e14c586fd9718f43bbae73dee547d54aaf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-05-15 19:46:15 +00:00
J-P Nurmi de6d7e1de7 Gallery: utilize the new icon-support for the tool buttons
Change-Id: I275856925ebf82c0ed8822d45299fd4d5c9218ba
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-04-26 07:34:24 +00:00
J-P Nurmi f8224c9c9e Gallery: handle Menu shortcut on mobile
Change-Id: Ie7ad814b3999791801c60776777c6a736db1c093
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-04-06 13:43:59 +00:00
J-P Nurmi 1414f2fcce Gallery: handle Back shortcut on mobile
Menus, dialogs, and drawers already handle it out of the box,
but for page/stack navigation we need an explicit shortcut.

Change-Id: Iad3e05f0fc31dbd66e3b1aa9286f8ef076fcff0d
Task-number: QTBUG-58105
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-04-06 13:43:56 +00:00
J-P Nurmi 5a7f851cd7 Wearable: prepare the launcher page icons for high DPI and styling
Separate the icon and its background to make the background stylable
and to provide the icons in high DPI versions later. Some icon files
have been renamed to match the sub-app name. When this example reaches
dev, we can use the built-in icon support with named icons.

Change-Id: Id87d1a001476194eb7e803802c90e7089f92b3b1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-29 16:00:34 +00:00
J-P Nurmi 8397d9fc8c Doc: update the Wearable Demo docs
The demo was originally written to become a Qt Quick demo. Focus
on the QQC2 specifics now that it became a QQC2 demo instead. There
were also some outdated references after being refactored a bit
after the initial submission.

Change-Id: I96ef3f4745a295b2d8ab12a30fcbdf41a2c50626
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-28 10:26:09 +00:00
J-P Nurmi 7aef75754a Wearable: get rid of the UIStyle dimensions
Change-Id: Ia4896fd2253cea9bc83bdd59bfdbaace216a9cb9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:50:05 +00:00
J-P Nurmi 8c175fd37c Wearable: cleanup FitnessPage
Change-Id: I0ed565b04236ad4550b278e0a223636794d52bbf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:49:55 +00:00
J-P Nurmi 7615d1cc66 Wearable: cleanup WeatherPage
Change-Id: Iaed6c6370e9a8ec7e6e523ee87802d51531f5bba
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:47:40 +00:00
J-P Nurmi 455b6399b3 Wearable: cleanup NotificationsPage
Change-Id: Idc8376405e113a9837fbe43fbf85681cf9ed8737
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:47:38 +00:00
J-P Nurmi 7bb9e01bec Wearable: cleanup NavigationPage
Change-Id: I3e6a3ffbcca962602d08aa9effce981396cc3cdb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:47:35 +00:00
J-P Nurmi 610e34bcaa Wearable: center align the world clocks
Change-Id: I9389597db13acee93e66ee6979fae5e2dd5a0e90
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:47:33 +00:00
J-P Nurmi e89722d444 Wearable: cleanup AlarmsPage
Change-Id: I918e69a8396cf57dd685cc2116722618a3d7fda4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:47:30 +00:00
J-P Nurmi 95fe95a1de Wearable: tweak the page indicators
Move bottom margin from anchors as bottom padding to define it once.

Change-Id: I2a93f86e2029c38f1d39555a55d969faec716d04
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-13 14:47:27 +00:00
J-P Nurmi f99863a7c9 Wearable: cleanup unnecessary currentIndex & clipping
Change-Id: Ic0071690388871fcbb09af5f3b7255f1a7f81bcd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:47:23 +00:00
J-P Nurmi 1f989828a9 Wearable: remove unnecessary wrapper items
Almost all pages were centering a fixed-size SwipeView. If the window
was larger than assumed, swipes would only work in the center are of
the window. Therefore it's better to stretch the view, and just center
the content instead. This way swipes work consistently in the whole
content area of the page.

Change-Id: Idc2a2bc327a49314cbf1271fa34b74df5f633ed8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 14:47:20 +00:00
J-P Nurmi d1ac6e3dc8 Wearable: move app-specific images into each app's own folder
Change-Id: Ie378f19a1ccfd962528f47263d03cac6bf7dc03f
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-13 14:47:16 +00:00
J-P Nurmi 7e382538fa Wearable: cleanup SettingsPage
Replace the SettingsData (Item) type with QML Settings from
Qt.labs.settings, and get rid of an unnecessary wrapper items
and hard-coded image sizes.

Change-Id: If41fbef5247c1648b881a97cbb94d4378b334f85
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 10:19:30 +00:00
J-P Nurmi f722caec66 Wearable: add style for PageIndicator
Change-Id: Id8f4948372f394ec5dbb4c2268f453724f65b594
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 10:19:28 +00:00
J-P Nurmi 2f8e91e37d Wearable: rename WatchFace to WorldClock
To be consistent how the pages/apps are called in the UI vs. code.

Change-Id: I721d3ebb8631aa97a1ab43e6924cd0e4d0f39d24
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-13 10:19:25 +00:00
J-P Nurmi 809df2c258 Wearable: cleanup and make LauncherPage scalable
Change-Id: I2c9bf50b1519976643bebe87198c02fcdca45a64
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 10:19:20 +00:00
J-P Nurmi 1360d0b093 Wearable: use AbstractButton for the PathView delegate
Move the app title outside the delegate. Its position is static,
and its visible in one place only, so one instance is enough.

Change-Id: If5a9f4cb7893980cef6a08fdc8adde929f187460
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 10:19:16 +00:00
J-P Nurmi c99397d751 Wearable: rename the pages
Even the code and the documentation talks about "pages", so call the
types pages too.

Change-Id: Ie0151be1b2344af6f7122ed22da6cc3b1ea634e4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 09:31:56 +00:00
J-P Nurmi 97b282732a Wearable: merge MainContainer.qml into wearable.qml
Utilize the header-content-footer layout of AppWindow.

Change-Id: I50a53fd5c372161af738e5d53085c669cf2614b8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 09:31:51 +00:00
J-P Nurmi 77cbcb9641 Wearable: add NaviButton
Replace the hand-made home/back buttons with an AbstractButton-based
custom type.

Change-Id: Icc2555e9ef67ae7461a072caf2dae780aaeafba2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 09:31:49 +00:00
J-P Nurmi d99dea884a Wearable: remove unused imports
qmlimportscanner would detect these as dependencies and deploy them
for nothing, which would be wasteful on a wearable device.

Change-Id: I687a9f7e136210d1213eb6575429102bcb472d78
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 09:31:46 +00:00
J-P Nurmi 70f43db915 Wearable: set the application background in the window
ApplicationWindow comes with built-in support for custom backgrounds.

Change-Id: I524d346a39f28e916d87bef738ad0492ee686c0c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 09:31:43 +00:00
J-P Nurmi b2f0c3ff02 Wearable: utilize the styling system
Change-Id: I6b7068c0416cdd16a98752241f6c3105652c9c08
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 09:31:41 +00:00
J-P Nurmi bb66378c0d Wearable: replace translucent borderless Rectangles with plain Items
Change-Id: Ie27fe1f7181dd7aad49062d2a37eb3a4a7db3781
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 09:31:39 +00:00
J-P Nurmi ef42989c25 Wearable: remove PageContainer
The init() function and done() signal were both unused.

Change-Id: I302e196ad6b0da423f0efb3394e307f6c3ed8c8b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-13 09:31:36 +00:00
Shrikant Dhumal 7d0a2a1e55 Add Wearable demo
Change-Id: I3e287b85517c04803964c068e32bf8b6bcae5cb6
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-13 07:29:41 +00:00
J-P Nurmi 732c519dc6 Add missing includes
Found while doing a -no-accessibility build.

Change-Id: I9772316eed3d544b21926970371a590ef2c15bef
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-02-24 13:05:07 +00:00
J-P Nurmi 51240b75cc Update license headers to silence qtqa/tst_license warnings
Sync with the qtbase/header.XXX. The license headers were matching
qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings:

   Old license being used for foo.qdoc

Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-02-24 13:04:52 +00:00
J-P Nurmi f0508c7275 Doc: be consistent about the dot at the end of example descriptions
Change-Id: Ie20ad311623020a439ecb701b0360fd72640fcb7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-01-11 15:11:15 +00:00
J-P Nurmi 0b6bf36e24 Update the remaining copyright years
Already done in 5.8 (00a0626) - these files are new in dev.

Change-Id: I534c7512a69d4c24ed9ce8191325556beb0fb1f7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-01-11 13:45:47 +00:00
J-P Nurmi 4264061a20 Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
2017-01-11 10:48:42 +01:00
J-P Nurmi 00a062649b Welcome to 2017
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-01-09 17:29:40 +00:00
J-P Nurmi 463e462455 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	examples/quickcontrols2/quickcontrols2.pro

Change-Id: If2f5e40487ba6515ba322f92380573727bdd6bc0
2017-01-05 16:48:06 +01:00
Thomas Hartmann 4f7ec6143a Flat Style example
This example shows how to integrate custom styled
components with tooling. The example uses states in the styling items,
so they can be easily edited and checked in the designer.

Change-Id: Ie665bb3938cdb1b135dbbd4163e1b901e61a6be0
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-01-05 14:17:35 +00:00
J-P Nurmi f15468cf9e Add DelayButton
[ChangeLog][Controls][DelayButton] Added DelayButton.

Change-Id: I94820dfb41ba9b90f0a29cda01ac476b54cf3de8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-01-02 15:33:34 +00:00
J-P Nurmi 2071c1b059 Add "Swipe to Remove" example
Change-Id: Ibab960ddd073ddcdfbf2b6e4492882662c7021b5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-12-20 12:53:21 +00:00
J-P Nurmi 15fab6e8f8 Side Panel example
Task-number: QTBUG-53169
Change-Id: I1d84d2fc9cbfce0fa71703f469bb6d5030e41d67
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-12-01 16:14:00 +00:00
J-P Nurmi b0fd258cbb Add Drawer::interactive
[ChangeLog][Controls][Drawer] Added interactive property that specifies
whether the drawer reacts to swipes. This can be used to make drawer a
non-closable persistent side-bar.

Task-number: QTBUG-53169
Change-Id: I00a794b5ce47b86fcb28e0db784ca0488cd13a7d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-25 21:30:18 +00:00
J-P Nurmi 22769ac6a7 Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: If528b9f4e502c50e0cd76df75404e257232f0d18
2016-11-25 14:26:37 +01:00
J-P Nurmi eba5b547e7 Add ComboBox::editable
[ChangeLog][Controls][ComboBox] Added editable property

Task-number: QTBUG-53876
Change-Id: I1cb035b3bb4c63f7935f08298814005fad51b5eb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-24 09:18:02 +00:00
J-P Nurmi 2c6553fa5e Overhaul the Contact List example - part II
Move the Edit and Remove buttons from the delegate to a context menu
that is triggered on press-and-hold. Get rid of a lot of custom font
sizes and hardcoded geometries. This ensures that the example looks
sensible on all platforms, styles, scale factors, system fonts...

Change-Id: If03f917c98b71c93be9292117116e9fa48e3e6fe
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-22 08:05:52 +00:00
J-P Nurmi 88edd02b2b Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: If96a7e488b7964e56c06c9e367ff9c91f1bba526
2016-11-21 12:30:11 +01:00
J-P Nurmi de4ff95cd1 Whitespace fixes
Change-Id: I4eab43944ec03b79d713db1c6756e76cbfa38b30
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-20 06:44:38 +00:00
J-P Nurmi f915d0529e qtquickcontrols2-contactlist.qdoc: remove stray image-tag
Change-Id: I7c88bfbe8e7d3738302d859e4dafc2d0b5fdfee3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-20 06:44:29 +00:00
J-P Nurmi 1eeeca9d20 Overhaul the Contact List example
Some renames, API tweaks, and structural changes. Glue the pieces
(view/model/dialog) together in contactlist.qml.

Change-Id: Id3a31248b391838c6d39f2f0f355e1c35456ccf5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-18 17:04:40 +00:00
J-P Nurmi 0cfadeb6de Contact List: tweak the section header
Replace the old-fashioned gradient with a ToolBar. It stands out more
than well enough, and is fully style-agnostic. Also, give descriptive
IDs for better designer integration/preview.

Change-Id: Ib2d4404e3c0fa769ac661645046a25e578f62d37
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-18 10:40:46 +00:00
J-P Nurmi 82a7941020 Contact List: give the contact dialog focus
Change-Id: Id8d48a42e283e262c44a9f2c64268459a4a11050
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 21:55:49 +00:00
J-P Nurmi 4c2625b199 Contact List: add dialog titles
Change-Id: Ia842791e28380fd672d3edfe0e6acad0613a64ae
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 21:55:40 +00:00
J-P Nurmi bc45c43ab7 Contact List: cleanup the list view
No clipping, current index, or x-coordinates needed.

Change-Id: Ibfb4a8e1159072a84ee229607b28e7f4010eb925
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 21:55:32 +00:00
J-P Nurmi 24135738e4 Contact List: fix model insertion
New contacts must be inserted in alphabetical order so the sections
stay sane.

Change-Id: I39279bbeb429198b38a2b4da1d76eb50bfab723c
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 21:55:22 +00:00
J-P Nurmi bd3cb53079 Contact List: simplify the ContactModel getters
QList::value() does the boundary checking for us.

Change-Id: I6965e6be861da86d35e6f30f74c94ba39e4ad2ea
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 21:55:13 +00:00
J-P Nurmi efc119e2d5 Contact List: rename AddressModel to ContactModel
Change-Id: I2da41a5d108b5da23dc969d30c50138ef7e42cc3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 21:54:39 +00:00
J-P Nurmi 0779dc2ad0 Contact List: cosmetic cleanup
Change-Id: I5782451235269cac8c4e6aaf319a30151cb599ef
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 21:54:27 +00:00
J-P Nurmi 4f2bb3e5a1 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/quickcontrols2/qquickstyle.cpp
	src/quicktemplates2/qquickslider.cpp

Change-Id: Ie12132690680706def6f516334a6ef0ba27336b3
2016-11-17 18:35:24 +01:00
J-P Nurmi af9729ecf4 Contact List example: replace Qt Quick primitives with Controls
This ensures that we get the correct colors when running with different
styles.

Change-Id: If249f9704fbe157aab1b121cf7d09ee05ab85c14
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-17 10:24:30 +00:00
J-P Nurmi fe34af03e3 Contact List example: make ContactDelegate.ui.qml designable
Replace the MouseArea and its onClicked signal handler with a checkable
AbstractButton to achieve declarative bindings and that way make it
possible to open ContactDelegate.ui.qml in Qt Quick Designer.

Change-Id: I764e0adc23d4a0d44dd6660ed14e224a4e0e30c7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-17 10:24:27 +00:00
J-P Nurmi 6a86efd939 Gallery: improve designer compatibility
Get rid of some unnecessary Math.min/max() calculations, and let the
controls just stay at their implicit size. As for the buttons, we can
use ColumnLayout + Layout.fillWidth to ensure that they all have the
same size.

Change-Id: Iaed29b330d7edc1f5d2c05d8815a559d52d52bcc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-17 10:24:21 +00:00
J-P Nurmi 884a754ab4 Gallery: kill some useless pages
The pages for drawer, menu, and popup were pretty useless, because they
did not really illustrate how the respective controls are used. They
were just opening the side drawer, options menu, and settings dialog
from elsewhere in the app. Coincidentally, these pages also contained
some imperative signal handlers, which prevents them from being opened
in Qt Quick Designer.

Change-Id: Iad606c05a1289d22e2f25c28a16581b979a58da6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-17 10:24:18 +00:00
Thomas Hartmann a4c3f074a6 Adding new example Contact List
This example shows how to integrate a C++ backend without
disrupting the tooling.
A custom list model is implemented in C++ and registered as
a QML type.

Change-Id: I958bc38797ef353cdb5ea23ec69ada67e132ced7
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 07:43:20 +00:00
J-P Nurmi 7b33addb8d Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev 2016-11-11 10:24:46 +00:00
J-P Nurmi f5467114b7 QQuickStyle::availableStyles()
This allows us to introduce platform-specific styles, such as the iOS
style, and make them appear correctly in the Gallery example so that we
don't have to hard-code the lists separately for different platforms.

[ChangeLog][Controls][QQuickStyle] Added availableStyles() method that
returns the list of available built-in styles.

Change-Id: Ieea88577f402cbc52a844d6777e64c6bd55c5ab9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-10 11:28:10 +00:00
J-P Nurmi 7decf1ee51 Gallery: add a page for dialogs
Change-Id: Ib29a41d9d3fc4940e94ee59be109aefbb35db043
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-02 10:12:31 +00:00
J-P Nurmi 10972ca272 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/imports/controls/CheckIndicator.qml
	src/imports/controls/RadioIndicator.qml
	src/imports/controls/RangeSlider.qml
	src/imports/controls/Slider.qml
	src/imports/controls/SwitchIndicator.qml

Change-Id: I32612d2f905ffa02dbaedbb1f84c8237fbd66db3
2016-10-31 13:08:12 +01:00
J-P Nurmi e711ce99c8 Gallery: make the drawer usable with keyboard
Give it focus, and remove the check for the current index. It's a
leftover from the days when Gallery used to replace the current page
instead of doing a push. It looked silly to replace a page with the
same page. This can no longer happen, because the drawer is not even
accessible when navigated to a control page. And when navigating the
drawer with keyboard, it is exactly the current item that must be
triggered when you hit the spacebar. :)

Change-Id: I00b48fbe4dd61b06041cb0c3370dfa9c12505dcf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-10-26 18:34:44 +00:00
J-P Nurmi 1b7ac95bc0 Gallery: add Escape shortcut
This does not work very well, yet. The purpose is to demonstrate the
lack of co-operation between of QML Shortcuts vs. QQC2 Popups. For
example, the back navigation shortcut activates in the background
when the modal settings dialog is open. The consequent commits are
going to fix these issues step by step.

Task-number: QTBUG-56562
Change-Id: Iceafc175f4da8054b65d664a3e0faf0087d0dec5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-10-26 16:43:43 +00:00
J-P Nurmi 52e933ce2b Add QQuickDialog::title
Dialog is incomplete without built-in support for title. All dialogs in
the examples, screenshots, webinars, and blog posts have had a custom
title. The Material and Universal designs both have specs for dialog
titles. This commit adds support for dialog titles with appropriate
looks (padding & font) out of the box.

Task-number: QTBUG-56711
Change-Id: I248150313f1ce629a7105fdbe1c70c8fcd69e1cc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-10-26 09:17:20 +00:00
Thomas Hartmann 613813500f Use relative paths for images
This is easier to handle for tooling.

Change-Id: Ib6b20f06426324bc5d1bd4b66f72d9b0e9a0da87
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-10-22 06:01:13 +00:00
J-P Nurmi a6e55c907e Gallery: fix the height of the settings dialog
The settings dialog used to be a plain Popup, which does not provide
buttons. There were manually created Ok and Cancel buttons in a column
together with the other contents, and the height of the column was used
to calculate the total height of the dialog. Now that the new Dialog
type with support for standard buttons is used, the height of the
column is no longer sufficient since the dialog buttons are not part of
it. Just let the dialog calculate the appropriate height based on its
width and content.

Change-Id: Ib4edf6e525214429887ad4ec6371ac0b5624c2e9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-10-13 08:21:43 +00:00
J-P Nurmi a908a2d25c texteditor: fix selectedNameFilter usage
texteditor.qml:165 Invalid property assignment: "selectedNameFilter"
                   is a read-only property

Change-Id: I691142ea0d3ed62a4041fb13916c251446ccea0d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-10-04 12:08:30 +00:00
J-P Nurmi b13bafec9c Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	examples/quickcontrols2/gallery/gallery.qrc
	src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml
	src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml
	src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml
	src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml
	src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml
	src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml
	src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml
	src/imports/controls/doc/qtquickcontrols2.qdocconf
	src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml
	src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml
	src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml
	src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml
	src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml
	src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml
	src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml
	src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml
	src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml
	src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml
	src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml
	src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml
	src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml
	src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml
	src/imports/controls/qtquickcontrols2plugin.cpp
	src/quicktemplates2/qquicktooltip.cpp
	src/quicktemplates2/qquicktooltip_p.h
	src/quicktemplates2/qquicktumbler.cpp
	tests/auto/controls/data/tst_spinbox.qml
	tests/auto/controls/data/tst_tumbler.qml
	tests/auto/qquickmaterialstyle/data/tst_material.qml

Change-Id: I25b7473b47739043b6f768603bece30b18021318
2016-10-03 13:31:32 +00:00
J-P Nurmi 5d2c242d2d Gallery: make most pages scrollable
Add a ScrollablePage type, which provides the scrolling behavior. The
available space can be quite limited, especially in landscape on low
resolution devices.

Change-Id: I4d2911aa6bfa6d8573a1385b5a06ef2cf3e2e548
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-09-29 13:15:09 +00:00
Topi Reinio 1ba9feea60 Doc: Add drop shadow for tutorial images
...Using the new \borderedimage macro.

Change-Id: I6a15944e898cd9b70bd8fd0999399d405dde9e59
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-09-27 07:10:13 +00:00
J-P Nurmi 11b066beb4 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	examples/quickcontrols2/gallery/gallery.qrc
	src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
	src/quicktemplates2/qquickstackview_p.cpp
	src/quicktemplates2/qquickstackview_p_p.h
	tests/auto/controls/data/tst_stackview.qml

Change-Id: If451fe0e5653572d305b4de90a6d5cb878463e8d
2016-09-26 14:13:35 +02:00
J-P Nurmi d1efdcd2be Gallery: allow navigating back to the home page
Instead of replacing the home page and throwing it away for good, push
control specific introduction pages on top. Change the drawer button to
a back button to allow navigating back. Also, disable the drawer while
not on the home page to keep the navigation simple.

Thanks to Wolfgang Schneider for bringing up the idea in QTBUG-54300.

Change-Id: Ie0501332e27d7edab59eef32e59a27973b59ebf3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-09-26 09:32:32 +00:00
Venugopal Shivashankar c5a44092c8 Doc: Update the image and example's description
Replaced the png image with two jpeg images, one for desktop and touch.

Change-Id: I5073244fdf82c70309e4412a51af02bbe0469c36
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-09-15 13:52:22 +00:00
J-P Nurmi 658b0f610a Platform: add experimental StandardPaths
This complements the File/FolderDialog offering.

Change-Id: I44a105724321092a6efc4126c8fb25f7d31b77e2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-09-13 09:37:56 +00:00
J-P Nurmi fbbe0b6e0d texteditor: add mnemonics
Change-Id: Id11f2ab1ec9b11962e5ca3c5c5982709d9b2dac2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-09-12 14:05:45 +00:00
Lars Knoll c49b1ff158 Fix sqlite detection
There is now a sql-sqlite feature in qtbase that should get used.

Change-Id: I92eb47c292b13ca639fd808b397e25f8358d2e96
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-09-12 11:52:51 +00:00
J-P Nurmi 9a55b34e29 texteditor: use RoundButton
Change-Id: I4cb9b2151698e30deec969868ffdb0100b7d98a3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-09-05 08:12:51 +00:00
J-P Nurmi 850f6e2f2f texteditor: allow passing -touch as a command line argument
It was already possible to specify QT_FILE_SELECTORS=touch, but in
Qt Creator, it's more convenient to specify a command line argument
than an environment variable.

Change-Id: I83a86aa88fb0c229d9bcedb6646351f0675db199
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-09-05 08:12:48 +00:00
J-P Nurmi b588ad9e45 texteditor/touch: highlight the floating editor button
A style-independent way to get light foreground color.

Change-Id: Idf43020d0724af993723143d74a2b1f8ab467c1e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-08-27 11:56:07 +00:00
J-P Nurmi 6d2f05a8e2 texteditor/touch: elide the title when it doesn't fit
Change-Id: Ib1e9de9d23b708e5ddfc131dce8da5570a61d17a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-08-26 15:23:42 +00:00
J-P Nurmi 7bc619bd07 texteditor/touch: simplify the toolbar
A single Row positioner is sufficient.

Change-Id: Ib244ddf875e40df341cb99172995d1717cb6439f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-08-26 15:23:39 +00:00
J-P Nurmi c3097c1688 texteditor: remove outdated todo-comments
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>
2016-08-26 15:23:37 +00:00
Mitch Curtis a80f50ab9b texteditor: add touch UI
Task-number: QTBUG-54952
Change-Id: I14fe95608c4393b928edc80fc93ebaa843ce478f
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-24 08:09:24 +00:00
J-P Nurmi 14ee7d5b94 texteditor: cleanup the commented out universal import
Change-Id: I99c5b79d80987216be7b680de91ec6c66cf127e0
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-16 18:24:57 +00:00
J-P Nurmi 6f5477369d FileDialog: add missing selectedNameFilter-property
Change-Id: If31d657e29a9cc3049af5cd3cf39d68979ff2db0
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-14 10:09:17 +00:00
J-P Nurmi 51192e8ef5 FileDialog: replace file(s)Selected() with declarative properties
Follow the same convention that ColorDialog, FontDialog and FolderDialog.

Change-Id: I960d4fc1ba275ab997f2a079a799d2b90796eca3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-14 09:26:14 +00:00
J-P Nurmi 877ac7226c FontDialog: replace fontSelected() with a declarative property
This is consistent with the QML FontDialog from QtQuick Dialogs 1.

Change-Id: I14a5a313be5ba9a9e0fb1645fe272cf9c2cdd389
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-14 09:26:00 +00:00
J-P Nurmi fb05eafac5 ColorDialog: replace colorSelected() with a declarative property
This is consistent with the QML ColorDialog from QtQuick Dialogs 1.

Change-Id: I4068a98156494eb36b2d9ecf4c1af90ad173bb97
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-14 09:25:52 +00:00
J-P Nurmi eecfe10207 texteditor: enable persistent selection
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>
2016-08-13 22:39:31 +00:00
Mitch Curtis 5f324ed201 texteditor: use "brush" icon for text color and "A" for font
"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>
2016-08-12 13:11:01 +00:00
J-P Nurmi 9f6005d967 texteditor: use a wrapping Flow for the toolbar
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>
2016-08-12 13:10:47 +00:00
J-P Nurmi bd0f52bc16 Platform: add MenuSeparator for convenience and consistency
Change-Id: I0c0aae219c81b9248a5a8a0fd0e78521cbe86360
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-08-12 10:51:43 +00:00
J-P Nurmi 9a6bdf52a3 texteditor: replace setFileUrl() with load()
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>
2016-08-12 10:51:30 +00:00
J-P Nurmi 90842fdc86 texteditor: add fileName & fileType
'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>
2016-08-12 10:51:27 +00:00
J-P Nurmi bb3453aead texteditor: cosmetic cleanup
Change-Id: Id1d5f0f8c1e7851ea33241fa09af5c0029b74db3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-08-12 10:51:21 +00:00
J-P Nurmi b36652f906 texteditor: fix, unify and cleanup the setters
- 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>
2016-08-12 10:51:18 +00:00
J-P Nurmi 14f46dc101 texteditor: remove uninitialized/duplicate pointer member
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>
2016-08-12 07:56:13 +00:00
J-P Nurmi 01eda3fa22 texteditor: re-order the property accessors
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>
2016-08-12 07:56:08 +00:00
J-P Nurmi 0d8e87d7f6 texteditor: simplify saveAs() - let FileDialog handle the suffix
Change-Id: Id1b415ebcbe12a9eeff9b54dcfa2cec67054a8d6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-08-12 07:56:03 +00:00
J-P Nurmi 4a98152712 texteditor: fix the file dialog name filters
OS X interpreted the suffix literally ".html,"

Change-Id: Icdf889592e4457db5dd4ffd420501b890cbcfd27
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-08-12 07:55:59 +00:00
Mitch Curtis fcf4a1ed81 Add Text Editor example
A follow up commit will contain the touch UI.

Change-Id: I26275fdd31294506821fa3e3e4a4bb63329665b9
Task-number: QTBUG-54952
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-11 16:47:48 +00:00
Liang Qi e9855d8ac8 Merge remote-tracking branch 'origin/5.7' into dev
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
2016-08-03 10:23:11 +02:00
Venugopal Shivashankar e336afdb67 Example: Made the SpinBox editable
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>
2016-08-02 12:16:20 +00:00
J-P Nurmi 5690e86326 Gallery: use the new .pro syntax for RESOURCES
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>
2016-07-21 10:06:23 +00:00
J-P Nurmi 7a835a4b4e Add Dialog
[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>
2016-07-18 20:37:12 +00:00
J-P Nurmi 11d0214ed6 Gallery: round settings dialog's coordinates and size
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>
2016-07-18 20:02:12 +00:00
Mitch Curtis 4ac9693ef8 SwipeDelegate: add swipe.pressed and swipe.clicked()
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>
2016-07-14 14:43:04 +00:00
J-P Nurmi 1db5df5a73 Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: Ifff470774347041d1638fb1da277a8cc11a00db6
2016-07-09 08:26:10 +02:00
J-P Nurmi 7af626e08c Bump up all controls and templates imports to version 2.1
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>
2016-07-08 07:37:33 +00:00
Thomas Hartmann 72d37ca466 Improve gallery example for Qt Quick Designer
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>
2016-07-01 13:26:34 +00:00
J-P Nurmi 0ae7112d9a Gallery: fix PopupPage
The id was changed from settingsPopup to settingsDialog in bfb0a9e.

Change-Id: I1bb61832883a0b85721cd732522d4b3a46754f43
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-06-29 11:27:53 +00:00
Mitch Curtis fa8cccf479 Tumbler: change default visibleItemCount to 5
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>
2016-06-28 18:18:09 +00:00
J-P Nurmi f5bee820ae Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/quicktemplates2/qquickcontainer.cpp

Change-Id: I7c41619a81b4fdd0d8ccaa4f0bb489a9b84e3865
2016-06-20 21:32:29 +02:00
J-P Nurmi 2ab34c99f5 Gallery: fix the default style setting
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>
2016-06-15 14:22:04 +00:00
J-P Nurmi bfb0a9ebe3 Add DialogButtonBox
[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>
2016-06-15 13:25:16 +00:00
Liang Qi 14e08bafc8 Merge remote-tracking branch 'origin/5.7' into dev
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
2016-06-01 13:19:21 +02:00
Friedemann Kleint 9ca63fbd0b Introduce a 'System' theme to the styles.
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>
2016-05-26 10:00:21 +00:00
J-P Nurmi cfc839a589 Gallery: update logos, icons, colors & screenshots
Change-Id: I4b1bec349b3141cabd1882ae28a5ad53ae2cb029
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-05-24 14:28:46 +00:00
Mitch Curtis 11d5a011e8 SwipeDelegate: rename exposure to swipe, active to complete
"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>
2016-05-23 09:49:04 +00:00
Nikita Krupenko d5828dbb97 Gallery: fix main page label text color
Change-Id: Id822c3f80ef488ce08fd4ffe70eee103a92a4ecc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-05-06 09:15:56 +00:00
Michael Spencer 251afe3eaa Material: Add proper elevation support
- 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>
2016-05-04 19:49:46 +00:00
Mitch Curtis bb34d8491c Remove TODO from Chat Tutorial documentation
The image doesn't need to be regenerated.

Change-Id: I47e089c0474b819308465e35dd1b0d1dc306d384
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-04-29 07:04:29 +00:00
Mitch Curtis 138399e7e9 Hide SwipeDelegate text when removing
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>
2016-04-26 13:26:24 +00:00
J-P Nurmi 1ef2c051ec import Qt.labs.controls 1.0 => QtQuick.Controls 2.0
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>
2016-04-21 15:48:05 +00:00
J-P Nurmi 0cf1038aa7 Chat Tutorial: update the install path
Change-Id: Ib4bd465d6c5d2f81f7dcce2f3eb547fe1cdc2360
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2016-04-21 05:43:27 +00:00
J-P Nurmi e358a033d4 Rename qtquickcontrols.conf to qtquickcontrols2.conf
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>
2016-04-21 05:43:19 +00:00
J-P Nurmi e8cd9c0458 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ia8879787703c32db44119b25be10adc83adc40bb
2016-04-20 16:23:33 +02:00
Mitch Curtis 1cb0faf788 Flatten and rename example install path and directory structure
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>
2016-04-19 12:27:35 +00:00