TableView: fix a performance issue with row delegate instantiation

To avoid accidentally instantiating all rows at construction time, make
sure the rows have a valid (but arbitrary) height meanwhile the row
delegates haven't yet been loaded.

Change-Id: I1afc6bfa920886260717b3cb172fa0d858c0a8d5
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Introduce support for movable tabs

Change-Id: I87a6a582824363197f66f6b7f6f29aa603123458
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
TableView: Fix rowAt function

Task-number: QTBUG-31160

Change-Id: Ife5837645636be1b2b2ee5cf9b0aa27ac04c2dc0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Doc: Small fixes

Change-Id: I1ee810dfcd57fd9ff7ddf65c87208c8b457f755e
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Fix various issues with slider

- Fixed missing press appearance of slider handle
- Removed drag threshold when pulling handle
- Ensure handle stays connected to mouse cursor by giving the fake handle size

Task-number: QTBUG-31042

Change-Id: I289a48b5fa67dde2792590645b8630a7ae6518d9
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Hidden items were not added to the ignore list.

The initialization of ignoreItem was simply wrong.

Task-number: QTBUG-31128
Change-Id: I67b41bc30099222d64aa6efb3c28e87a0ce043ca
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Fixed a few typos in TabViewStyle.qml.

Change-Id: Ie47788f95d2ebfb0143bbccc77aa37efe155958d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Slider: pressing the handle should not change the slider position

We have to maintain the handle offset until the drag operation
has ended. If the user clicks outside the handle, we center
on the cursor position as before.

Task-number: QTBUG-31042
Change-Id: I8f23d998774278c6353d31b6fffea54596f7158e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
TextFieldStyle: Fix margins

Change-Id: I5386e2b4af37c1dbad50740c748e953c81c85d22
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Fix rendering of bottom tab position with desktop style

We changed the TabView api from int to string so now we need
to translate to the style.

Change-Id: I9dafd9166a552a38eec06f46f4c6d4697b10eff6
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Fix a wrong behavior when mouse click tab in TabView

When nextItemInFocusChain is out of the TabView, the tabitem in TabBar
will get focused.

Autotest is included.

Change-Id: If5701afa1aeed16383b8d96483342a4629293997
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
ToolButton: Fix checkable behavior

Add autotests.

Task-number: QTBUG-31033
Task-number: QTBUG-30971

Change-Id: If82d5a9b6200e62d358ffc83e55137bab9b242c5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Made sure items with preferred width of 0 could also stretch

If no stretch factors were specified, we used the preferred size as a
stretch factor. Obviously, that didn't work if the preferred size was
actually 0.

This patch works around this by actually setting the stretch factor to
1.0 if this is the case.
This should work fine in most cases, except for the case where there
are also other items with a preferred size close to 0.
In this case, the item with preferred size 0 will just grow
faster than an item with e.g. preferred size 0.1.

Task-number: QTBUG-31217

Change-Id: Id5a3e19c9cd756860fc4052daee3eb5582f39d0c
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Don't implicit cast the enum to a bool

Casting a QLayoutPolicy::Fixed to bool was fine since that would return
false.
However, casting a QLayoutPolicy::Shrink to bool would return true,
which would give wrong results. (The conditions only want to check if
the item can grow).

There were no bugs because of this, simply because the Qt Quick Layouts
API does not allow setting *only* the shrink flag.
However, it would become a bug if we ever added such a feature.

Change-Id: I781aec85117f45e12e49ba27f7ed8f5724f71bd9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Update GroupBox to support contentItem

- Removed contentWidth and contentHeight since it is not needed
- Exposed contentItem so that it can be designable.
- Respect the implicit width or height of the contentItem if it is the
only item of the GroupBox. Otherwise childrenRect is used.
- Modified the style so that the style takes care of only the
padding size and not the entire size of the group box.
- Fixed flat and checkable appearance for custom style

Change-Id: I2c7ec4cb7d5e6f96863847e8d8d6d6f52428364e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
TableView: optimize bindings

Change-Id: I11096da2efdebf2a3a2e003c90e48e120f8ba5fd
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Move the QML Base style within Styles/Base

Change-Id: I1a247656b957c87ef728fb42b2b212e02b5e5cd9
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
TextArea: fix word wrap layout

Since scrollbars affect the document/viewport size and vice versa, we
must allow the layout loop to recurse twice until the sizes stabilize.
Furthermore, avoid nasty content size binding loops (from ScrollView)
by providing a specialized Flickable item that TextArea has full
control over.

Task-number: QTBUG-30832
Change-Id: I74fe6c5017e75aa411fdbb64087afa18e1221ce9
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
TabViewStyle: add support for left and right corner items

Empty corner items may be used as padding, so TabViewStyle::left/rightCorner
effectively replaces TabViewStyle::left/rightPadding.

Change-Id: I01f3a1552c3395352e8953456d3956f4f8c29aed
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
ComboBox: Fix warning when model not ready

Task-number: QTBUG-31135

Change-Id: I0d9b0a3cf9d1036e6940e10944c711cdd23d858a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>