aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Pass new & old padding to QQuickControl::paddingChange()J-P Nurmi2015-06-144-17/+24
| | | | | | | | | Consistent with geometryChange() and useful for controls that want to resize delegate items in a specific dimension (ie. either the width or height follows the delegate size). Change-Id: Id143b2ef1e7b266ac32d9f3129f88d0fadb036d0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Auto test anchors & attached objectsJ-P Nurmi2015-06-144-20/+107
| | | | | | | | | | | | | | | | | | | Rename the former tst_declarative to tst_sanity and extend it with tests to prevent: a) use of anchors, and b) multiple attached object instances of the same type. Anchors are not allowed for two reasons: - performance (QQuickAnchors is a QObject), and - to let users relayout delegates (x/y/width/height bindings can be overridden, anchors not so easily) Multiple attached object instances (eg. Theme) can easily happen by accident. "Theme.fooColor" can be used in the control root, but in all delegate items, "control.Theme.fooColor" must be used instead. Change-Id: I4045d5bd717fa21db79d1c3bd618fc450e292fa4 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename QQuickTheme -> QQuickThemeAttachedJ-P Nurmi2015-06-143-222/+222
| | | | | | | Follow the QtQuick conventions & make tst_sanity easier. Change-Id: Ic722383ca09de2bd53ee81177297ecafdf6a9cf7 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_declarative: add qtquick.calendarJ-P Nurmi2015-06-141-0/+1
| | | | | Change-Id: Id0d3489c0c047c837bf2aab5bafcd75f9db3b966 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* TabButton: don't create two Theme objectsJ-P Nurmi2015-06-141-1/+1
| | | | | | | | All delegate items should use/share the same Theme object that is attached to the control's root item. Change-Id: I7b02416ddd9d9f75a02c2d9735d6e58dd51ce14f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Move the drawer example under extrasJ-P Nurmi2015-06-1110-3/+6
| | | | | Change-Id: I61827e005c9c7a047e181c8f23baac9a09a865ee Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Slider: add from & to propertiesJ-P Nurmi2015-06-113-24/+191
| | | | | Change-Id: Iee61e89d8519e7e3d27f1bf1c35af210f48bc7c9 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Auto test 100% declarative QML layerJ-P Nurmi2015-06-114-0/+210
| | | | | | | | | | Not allowed: - .js files - signal handlers - function declarations Change-Id: I31247f154b96718ca95835120c9e7326e3c97968 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Tabs example: use TabBar & SwipeViewJ-P Nurmi2015-06-111-13/+20
| | | | | Change-Id: I4733dac4e6947874eaff9d3f0ef6918e5207e892 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Import the new TabBar implementationJ-P Nurmi2015-06-113-27/+208
| | | | | Change-Id: I2c646c07f8310c27f3f03f3cdb27f748c5e6198c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Remove the old TabView implementationJ-P Nurmi2015-06-119-468/+2
| | | | | Change-Id: I8d8aa96f2f37f458577a5a3ec681e3c9174d0918 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add SwipeViewJ-P Nurmi2015-06-117-3/+432
| | | | | | | | | Based on the old TabView prototype, easy to use together with TabBar. The side-swiping feature will be removed from TabView to keep it simple and light-weight. Change-Id: I214b88688b98897962d335fe00008d222e0656a8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* ProgressBar: add from, to & position propertiesJ-P Nurmi2015-06-104-14/+179
| | | | | Change-Id: I1bf29fab227f1f2642994f9167c9a6957abcbb65 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: ProgressBarJ-P Nurmi2015-06-107-6/+55
| | | | | Change-Id: I82e524281c64580f9a910b700f0efbf53a4dabe7 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: SliderJ-P Nurmi2015-06-109-12/+104
| | | | | Change-Id: I9499ab27a74996f43db70ec3ddc49e04b39d2da6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: ToggleButtonJ-P Nurmi2015-06-1010-1/+55
| | | | | Change-Id: Id4db1808a42ee29c030f095f8c87542de1702ce0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: SwitchJ-P Nurmi2015-06-1010-3/+72
| | | | | Change-Id: I1cdac365b12b7c7fb88c10f8a1de9d68ec1b44d8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Docs: Customizing Qt Quick ControlsJ-P Nurmi2015-06-104-81/+107
| | | | | Change-Id: I747e030096a068e20043cdff9dd62775ca77feb6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Container: resize the content automaticallyJ-P Nurmi2015-06-0913-43/+33
| | | | | Change-Id: If7964b64b6f78fc77e1095d69658e27bcb89a6f8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* RadioButton docsJ-P Nurmi2015-06-099-1/+65
| | | | | Change-Id: I158dac84c09172b7c27b227f673653feafb956af Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* CheckBox docsJ-P Nurmi2015-06-0910-4/+65
| | | | | Change-Id: I7476a94fcae656ca11424681363228cfa2b99c6f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Tweak Button docsJ-P Nurmi2015-06-091-17/+11
| | | | | Change-Id: I23ee64fea97718a4688b03887eb2a62ccb464193 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Control docsJ-P Nurmi2015-06-091-12/+72
| | | | | Change-Id: I33a82ce789c649825a7999d8a01c4bc5f42be7cf Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Use Control::availableWidth and availableHeightJ-P Nurmi2015-06-0921-44/+44
| | | | | | | | | The same "w - lp - rp" and "h - tp - bp" patterns were repeated all over the codebase. This is why availableWidth and availableHeight were introduced. Change-Id: I8124e8668b553a409a25aa18d775f1bf0494398d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* tst_objectcount: warmup with Buttons & exclude the test QQmlComponentJ-P Nurmi2015-06-064-12/+7
| | | | | | | This ensures that singletons are excluded from the numbers. Change-Id: I14422b7b15d57273dd11717892ebd11eba650902 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Improve tst_objectcountJ-P Nurmi2015-06-064-5/+22
| | | | | | | | | Add support for VERBOSE=1 to get detailed object list, and improve the warmup by importing both controls and loading an image to avoid plugin loaders and image format plugins showing up in the numbers. Change-Id: I26cfdc6d71fe36b45b706164f696bbb7f055f078 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Update .gitignoreJ-P Nurmi2015-06-061-0/+2
| | | | | Change-Id: I71df0935e69690775a58e868694632be9fbd7f78 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Q_UNUSED() in addition to Q_ASSERT()J-P Nurmi2015-06-062-0/+2
| | | | | Change-Id: Id6509da9434e77349be068a84beb31e1f9edd124 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Control::availableWidth & availableHeightJ-P Nurmi2015-06-038-62/+134
| | | | | | | | | The recently introduced contentWidth/Height was ambiguous. It had even different semantics than in Containers, TextXxx & Flickable etc. Thus, replace with availableWidth/Height. Change-Id: Iaeef25ec82b395c602724d222ca73666460ffd29 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Improve Control::background automatic resizingJ-P Nurmi2015-05-232-2/+48
| | | | | | | | - width follows only if x and width are both not specified - height follows only if y and height are both not specified Change-Id: Ib881daa9da339baac53f7f9d4de6e5bdad7723e2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix Control::mirroredChanged() emissionJ-P Nurmi2015-05-234-3/+40
| | | | | | | | It was emitted only when LayoutMirroring.enabled changed, but it also needs to be emitted when layoutDirection changes... Change-Id: I9424fdf232c11669780c9abace5c162a0df69dbe Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickContainer: omit automatic content size notifiersJ-P Nurmi2015-05-232-0/+14
| | | | | Change-Id: Iaeb851371810283cc272d755f32ffdafaff16118 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickControlPrivate::resizeBackground()J-P Nurmi2015-05-232-11/+21
| | | | | Change-Id: Id686a132fc9e7933c86e5314056f28fc50f6c61f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Button: revert automatic label layoutingJ-P Nurmi2015-05-234-55/+7
| | | | | | | | | | It got ugly and hackish, and broke for QQuickButton subclasses. Instead, use simple and pretty bindings (thanks to newly introduced contentWidth and contentHeight) to give the label a default size and position. Change-Id: I4cd705e86a12e8c9ffa0b7a768b1878bba797036 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add read-only Control::contentWidth and contentHeightJ-P Nurmi2015-05-236-20/+58
| | | | | | | This is the control width and height without padding. Change-Id: Iebee2a0d3fd6b5475fef1dad507c72efba12d903 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Theme: fix int->realJ-P Nurmi2015-05-223-33/+33
| | | | | Change-Id: I9833aee821e4c7d436e0c999dbeefe3e12b34875 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Expose read-only bool Control::mirrored property for convenienceJ-P Nurmi2015-05-2211-38/+37
| | | | | Change-Id: Icbb39aa1c3ac6f4b00adbc59c09a6c79e99bafd3 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Promote layoutDirection & effectiveLayoutDirection to ControlJ-P Nurmi2015-05-2217-313/+141
| | | | | Change-Id: I44df09c17d6d20cfd929af4e331e15f48b19587e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix writable ScrollBar/Indicator position & size propertiesJ-P Nurmi2015-05-222-4/+4
| | | | | | | | | The setters were already exposed as slots, but the properties should be writable to let apps implement eg. "infinite" scrolling using pure declarative bindings. Change-Id: I6c827803559b6d0f1bb97b90345874173ef107e4 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Remove window flags from AbstractApplicationWindow.Friedemann Kleint2015-05-221-1/+0
| | | | | | | | | | | | The default window flags (Qt::Window) should be mapped to the default decoration. The old value Qt.Window | Qt.WindowFullscreenButtonHint caused a small border on Windows. Platforms that support Qt.WindowFullscreenButtonHint should add it to the default decoration. Change-Id: I1fb30073e350d038bcc50433f9c30e384a19fff1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add install targets for examplesJ-P Nurmi2015-05-185-0/+15
| | | | | | | | $$[QT_INSTALL_EXAMPLES]/<module>/<example> Change-Id: I82267c740b5e7750cd0e9149b241a03837aea8e2 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Update .gitignoreJ-P Nurmi2015-05-151-0/+4
| | | | | | | | Ignore non-developer build artifacts and intermediate files to make 'git status' more pleasant to read. Change-Id: Ie587bc31bcaf673db7c33251e92661ac1e5417b0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Update tst_radiobutton to use ControlSpyGabriel de Dietrich2015-05-041-68/+56
| | | | | Change-Id: If10ef6f111b4a91216bbb2d0b52bc182533edaa8 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* ControlSpy: Accept a list of signals to spy onGabriel de Dietrich2015-05-043-32/+54
| | | | | | | | | | | | | | | | | | This API is cleaner than having to connect to each signal handler namually. We solve the 'pressed' signal problem by connecting to the other signal accessor, namely 'onPressed'. And we do so for all signals. We also lay foundation to capture the signal parameters as each signal is emitted. What we may do with those values is not clear yet. Auto-tests updated accordingly. Change-Id: Ieda96a43072ca7dff2b183e07f6f67aa49c8cf5d Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Update tst_checkbox to use ControlSpyGabriel de Dietrich2015-04-302-74/+76
| | | | | | | Also made a few cosmetic changes to the output of ControlSpy. Change-Id: Iec6982b3de3dda3aaa312e29801d0708ef8d739e Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Introducing ControlSpyGabriel de Dietrich2015-04-293-93/+128
| | | | | | | | | | | Allows specifying expected sequences on signals for a control, and optionally test for property values when each signal is emitted. Rewrote Button auto-test suite using ControlSpy. Change-Id: Id27c1b9ca7ee070898bcd008379e06959341ee04 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickButton: Add canceled signalGabriel de Dietrich2015-04-293-12/+49
| | | | | | | | | | | | | | We now support the following pattern: 1. Press the mouse button => emit pressed 2. Move the mouse cursor outside the button => pressed = false 3. Release the mouse button => emit canceled Note that getting the mouse grabbed away by another item, at any stage, will also emit the canceled signal. Change-Id: I97e485327370ea47943dfef75553000cee449a01 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Button docsJ-P Nurmi2015-04-289-9/+84
| | | | | Change-Id: I387ecb0cac328e99645b92371687cfc3678b5c71 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Extras: add documentation skeleton.Mitch Curtis2015-04-285-0/+183
| | | | | Change-Id: I31da59c893681455ab276c6ef3bf8a44bfa27f29 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
* Button: provide a default size for the label delegateJ-P Nurmi2015-04-284-6/+48
| | | | | | | | | | | If the label delegate has no explicit size defined, make it follow the size of the button minus padding. This should be a convenient default behavior that satisfies the most users, and saves a few of QML bindings. Makes also the upcoming "the default delegate implementation looks like this" -snippet nice and short. ;) Change-Id: I574439c1e52c2904746be7d830f9536d4cfd9083 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>