summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.3.0107
-rw-r--r--examples/quick/controls/texteditor/qml/main.qml17
-rw-r--r--src/controls/ComboBox.qml4
-rw-r--r--src/controls/Private/CalendarUtils.js36
-rw-r--r--src/controls/Private/TabBar.qml4
-rw-r--r--src/controls/ScrollView.qml2
-rw-r--r--src/controls/Styles/Base/BusyIndicatorStyle.qml2
-rw-r--r--src/controls/Styles/Base/CalendarStyle.qml479
-rw-r--r--src/controls/Styles/Base/ComboBoxStyle.qml23
-rw-r--r--src/controls/Styles/Base/ScrollViewStyle.qml6
-rw-r--r--src/controls/Styles/Base/TabViewStyle.qml2
-rw-r--r--src/controls/Styles/Base/TableViewStyle.qml2
-rw-r--r--src/controls/Styles/Desktop/ComboBoxStyle.qml13
-rw-r--r--src/controls/Styles/Desktop/TabViewStyle.qml2
-rw-r--r--src/controls/TabView.qml25
-rw-r--r--src/controls/TableView.qml7
-rw-r--r--src/controls/doc/src/qtquickcontrols-examples.qdoc14
-rw-r--r--src/controls/doc/src/qtquickcontrolsstyles-index.qdoc6
-rw-r--r--src/controls/plugins.qmltypes869
-rw-r--r--src/controls/qquickmenu.cpp3
-rw-r--r--src/controls/qquickmenupopupwindow.cpp7
-rw-r--r--src/controls/qquickpopupwindow.cpp24
-rw-r--r--src/dialogs/DefaultDialogWrapper.qml32
-rw-r--r--src/dialogs/DefaultFileDialog.qml3
-rw-r--r--src/dialogs/plugins.qmltypes351
-rw-r--r--src/dialogs/qquickabstractdialog.cpp130
-rw-r--r--src/dialogs/qquickabstractdialog_p.h7
-rw-r--r--src/dialogs/qquickcolordialog_p.h4
-rw-r--r--src/dialogs/qquickdialog.cpp4
-rw-r--r--src/dialogs/qquickdialog_p.h10
-rw-r--r--src/dialogs/qquickfiledialog_p.h4
-rw-r--r--src/dialogs/qquickfontdialog_p.h4
-rw-r--r--src/dialogs/qquickmessagedialog_p.h4
-rw-r--r--src/dialogs/qquickplatformfiledialog.cpp2
-rw-r--r--src/layouts/qquicklinearlayout.cpp4
-rw-r--r--src/widgets/plugins.qmltypes124
-rw-r--r--tests/auto/controls/controls.pro5
-rw-r--r--tests/auto/controls/data/tst_calendar.qml113
-rw-r--r--tests/auto/controls/data/tst_combobox.qml14
-rw-r--r--tests/auto/controls/data/tst_keys.qml167
-rw-r--r--tests/auto/controls/data/tst_tableview.qml18
-rw-r--r--tests/auto/controls/data/tst_tabview.qml35
42 files changed, 1839 insertions, 850 deletions
diff --git a/dist/changes-5.3.0 b/dist/changes-5.3.0
new file mode 100644
index 00000000..ff6df0d2
--- /dev/null
+++ b/dist/changes-5.3.0
@@ -0,0 +1,107 @@
+Qt 5.3 introduces many new features and improvements as well as bugfixes
+over the 5.2.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+ http://qt-project.org/doc/qt-5.3
+
+The Qt version 5.3 series is binary compatible with the 5.2.x series.
+Applications compiled for 5.2 will continue to run with 5.3.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ http://bugreports.qt-project.org/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+- TableView:
+ * [QTBUG-33107] The "model" property exposed to row and item delegates is
+ now consistent with the one exposed to ListView.
+ * TableView row and item delegates are now implicitly re-cycled for
+ improved scrolling performance. Note that this behavior change
+ can impact delegates that rely on "onCompleted" for initialization.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtQuickControls
+---------------
+
+ - [QTBUG-33493][QTBUG-34101][QTBUG-35763] Fixed support
+ for Keys attached property on controls allowing text input,
+ by forwarding key events from the internal control.
+
+ - [QTBUG-29948] A new Calendar control was added. Calendar
+ allows selection of dates from a grid of days, similar
+ to QCalendarWidget.
+
+ - Accessibility:
+ * ComboBox is labeled properly.
+ * CheckBox and RadioButton report their state correctly.
+ * TextField and TextArea now report password and readonly
+ states.
+
+ - CheckBox:
+ * [QTBUG-31627] Fixed a problem incorrectly causing bindings
+ to the checked state to break.
+
+ - Menu
+ * Added sloppy submenu navigation.
+
+ - ScrollView:
+ * [QTBUG-37387] Scrollbars are now non-interactive on
+ mobile/touch devices.
+
+ - Slider:
+ * Sliders no longer prevent stealing in flickables until
+ drag threshold is exceeded.
+
+ - SpinBox:
+ * [QTBUG-37619] SpinBox now only shows the numerical keys
+ in onscreen keyboards where possible.
+ * [QTBUG-36283] Fixed implicit width for SpinBox.
+
+ - Styles:
+ * Introduced MenuBarStyle to style MenuBar.
+ * Introduced MenuStyle to style Menu.
+ * [QTBUG-37021] Added styleData.totalWidth property for
+ TabViewStyle::tab component.
+
+ - TabView:
+ * [QTBUG-36356] Added support for enabling and disabling tabs.
+ * [QTBUG-38157] Fixed a graphics issue when initializing currentIndex to
+ a non-zero value.
+
+ - TableView:
+ * [QTBUG-33072] TableView headers now respect
+ TableViewColumn::textAlignment.
+ * [QTBUG-37180] Fixed an issue with the header overlay offset while
+ re-arranging TableViewColumns.
+ * [QTBUG-37941] Allow TableView headers to be resized in a flickable.
+
+QtQuickDialogs
+--------------
+ - [QTBUG-37860] When a modal dialog is shown on a display that doesn't
+ support windows, you can't dismiss it by tapping outside.
+
+ - Dialog is a new control for creating dialogs with standard buttons
+ and custom content.
+
+ - FileDialog:
+ * The File fallback QML implementation now uses QtQuick.Controls,
+ and has added features including a ComboBox for file extension
+ filters, and a sidebar with common paths, drives/volumes and favorite
+ paths.
+
+ - FontDialog:
+ * The FontDialog fallback QML implementation now uses QtQuick.Controls
+ and QtQuick.Layouts.
+ * [QTBUG-36574] Added currentFont property.
+
+
diff --git a/examples/quick/controls/texteditor/qml/main.qml b/examples/quick/controls/texteditor/qml/main.qml
index 1a66afa5..26e22e98 100644
--- a/examples/quick/controls/texteditor/qml/main.qml
+++ b/examples/quick/controls/texteditor/qml/main.qml
@@ -272,16 +272,19 @@ ApplicationWindow {
implicitWidth: 150
model: Qt.fontFamilies()
property bool special : false
- onCurrentTextChanged: {
- if (special == false || currentIndex != 0)
- document.fontFamily = currentText
+ onActivated: {
+ if (special == false || index != 0) {
+ document.fontFamily = textAt(index)
+ }
}
}
SpinBox {
id: fontSizeSpinBox
+ activeFocusOnPress: false
implicitWidth: 50
value: 0
- onValueChanged: document.fontSize = value
+ property bool valueGuard: true
+ onValueChanged: if (valueGuard) document.fontSize = value
}
Item { Layout.fillWidth: true }
}
@@ -307,7 +310,11 @@ ApplicationWindow {
selectionStart: textArea.selectionStart
selectionEnd: textArea.selectionEnd
Component.onCompleted: document.fileUrl = "qrc:/example.html"
- onFontSizeChanged: fontSizeSpinBox.value = document.fontSize
+ onFontSizeChanged: {
+ fontSizeSpinBox.valueGuard = false
+ fontSizeSpinBox.value = document.fontSize
+ fontSizeSpinBox.valueGuard = true
+ }
onFontFamilyChanged: {
var index = Qt.fontFamilies().indexOf(document.fontFamily)
if (index == -1) {
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml
index c9f24b52..7a101969 100644
--- a/src/controls/ComboBox.qml
+++ b/src/controls/ComboBox.qml
@@ -354,7 +354,7 @@ Control {
anchors.fill: parent
anchors.leftMargin: 8
- anchors.rightMargin: __style.dropDownButtonWidth
+ anchors.rightMargin: __style.dropDownButtonWidth + __style.padding.right
verticalAlignment: Text.AlignVCenter
@@ -587,6 +587,8 @@ Control {
if (__selectedIndex !== -1 && (selectedItem = items[__selectedIndex])) {
input.editTextMatches = true
selectedText = selectedItem.text
+ if (currentText !== selectedText) // __selectedIndex went form -1 to 0
+ selectedTextChanged()
}
}
}
diff --git a/src/controls/Private/CalendarUtils.js b/src/controls/Private/CalendarUtils.js
index 75f3b6c1..fce2a677 100644
--- a/src/controls/Private/CalendarUtils.js
+++ b/src/controls/Private/CalendarUtils.js
@@ -75,14 +75,37 @@ function setMonth(date, month) {
return newDate;
}
-function cellRectAt(index, columns, rows, availableWidth, availableHeight) {
+/*!
+ Returns the cell rectangle for the cell at the given \a index, assuming
+ that the grid has a number of columns equal to \a columns and rows
+ equal to \a rows, with an available width of \a availableWidth and height
+ of \a availableHeight.
+
+ If \a gridLineWidth is greater than \c 0, the cell rectangle will be
+ calculated under the assumption that there is a grid between the cells:
+
+ 31 | 1 | 2 | 3 | 4 | 5 | 6
+ --------------------------------
+ 7 | 8 | 9 | 10 | 11 | 12 | 13
+ --------------------------------
+ 14 | 15 | 16 | 17 | 18 | 19 | 20
+ --------------------------------
+ 21 | 22 | 23 | 24 | 25 | 26 | 27
+ --------------------------------
+ 28 | 29 | 30 | 31 | 1 | 2 | 3
+ --------------------------------
+ 4 | 5 | 6 | 7 | 8 | 9 | 10
+*/
+function cellRectAt(index, columns, rows, availableWidth, availableHeight, gridLineWidth) {
var col = Math.floor(index % columns);
var row = Math.floor(index / columns);
- var remainingHorizontalSpace = Math.floor(availableWidth % columns);
- var remainingVerticalSpace = Math.floor(availableHeight % rows);
- var baseCellWidth = Math.floor(availableWidth / columns);
- var baseCellHeight = Math.floor(availableHeight / rows);
+ var availableWidthMinusGridLines = availableWidth - ((columns - 1) * gridLineWidth);
+ var availableHeightMinusGridLines = availableHeight - ((rows - 1) * gridLineWidth);
+ var remainingHorizontalSpace = Math.floor(availableWidthMinusGridLines % columns);
+ var remainingVerticalSpace = Math.floor(availableHeightMinusGridLines % rows);
+ var baseCellWidth = Math.floor(availableWidthMinusGridLines / columns);
+ var baseCellHeight = Math.floor(availableHeightMinusGridLines / rows);
var rect = Qt.rect(0, 0, 0, 0);
@@ -108,5 +131,8 @@ function cellRectAt(index, columns, rows, availableWidth, availableHeight) {
rect.y += Math.min(remainingVerticalSpace, row);
}
+ rect.x += col * gridLineWidth;
+ rect.y += row * gridLineWidth;
+
return rect;
}
diff --git a/src/controls/Private/TabBar.qml b/src/controls/Private/TabBar.qml
index f2010197..0d289e05 100644
--- a/src/controls/Private/TabBar.qml
+++ b/src/controls/Private/TabBar.qml
@@ -233,11 +233,11 @@ FocusScope {
readonly property alias selected: tabitem.selected
readonly property alias title: tabitem.title
readonly property alias nextSelected: tabitem.nextSelected
- readonly property alias previsousSelected: tabitem.previousSelected
+ readonly property alias previousSelected: tabitem.previousSelected
readonly property alias pressed: tabitem.effectivePressed
readonly property alias hovered: tabitem.containsMouse
readonly property alias enabled: tabitem.enabled
- readonly property bool activeFocus: tabbar.activeFocus
+ readonly property bool activeFocus: tabitem.activeFocus
readonly property real availableWidth: tabbar.availableWidth
readonly property real totalWidth: tabrow.contentWidth
}
diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml
index b18ebee7..431fadd1 100644
--- a/src/controls/ScrollView.qml
+++ b/src/controls/ScrollView.qml
@@ -231,7 +231,7 @@ FocusScope {
WheelArea {
id: wheelArea
parent: flickableItem
-
+ z: -1
// ### Note this is needed due to broken mousewheel behavior in Flickable.
anchors.fill: parent
diff --git a/src/controls/Styles/Base/BusyIndicatorStyle.qml b/src/controls/Styles/Base/BusyIndicatorStyle.qml
index 03c3812e..ce8550db 100644
--- a/src/controls/Styles/Base/BusyIndicatorStyle.qml
+++ b/src/controls/Styles/Base/BusyIndicatorStyle.qml
@@ -58,7 +58,7 @@ import QtQuick.Controls.Private 1.0
indicator: Image {
visible: control.running
source: "spinner.png"
- NumberAnimation on rotation {
+ RotationAnimator on rotation {
running: control.running
loops: Animation.Infinite
duration: 2000
diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml
index 34f6eb05..5f391b37 100644
--- a/src/controls/Styles/Base/CalendarStyle.qml
+++ b/src/controls/Styles/Base/CalendarStyle.qml
@@ -150,7 +150,7 @@ Style {
function __cellRectAt(index) {
return CalendarUtils.cellRectAt(index, control.__panel.columns, control.__panel.rows,
- control.__panel.availableWidth, control.__panel.availableHeight);
+ control.__panel.availableWidth, control.__panel.availableHeight, gridVisible ? __gridLineWidth : 0);
}
function __isValidDate(date) {
@@ -248,8 +248,13 @@ Style {
*/
property Component dayDelegate: Rectangle {
anchors.fill: parent
- anchors.margins: styleData.selected ? -1 : 0
+ anchors.leftMargin: (!addExtraMargin || control.weekNumbersVisible) && styleData.index % CalendarUtils.daysInAWeek === 0 ? 0 : -1
+ anchors.rightMargin: !addExtraMargin && styleData.index % CalendarUtils.daysInAWeek === CalendarUtils.daysInAWeek - 1 ? 0 : -1
+ anchors.bottomMargin: !addExtraMargin && styleData.index >= CalendarUtils.daysInAWeek * (CalendarUtils.weeksOnACalendarMonth - 1) ? 0 : -1
+ anchors.topMargin: styleData.selected ? -1 : 0
color: styleData.date !== undefined && styleData.selected ? selectedDateColor : "transparent"
+
+ readonly property bool addExtraMargin: control.frameVisible && styleData.selected
readonly property color sameMonthDateTextColor: "#444"
readonly property color selectedDateColor: Qt.platform.os === "osx" ? "#3778d0" : __syspal.highlight
readonly property color selectedDateTextColor: "white"
@@ -312,306 +317,318 @@ Style {
readonly property int columns: CalendarUtils.daysInAWeek
// The combined available width and height to be shared amongst each cell.
- readonly property real availableWidth: (viewContainer.width - (control.frameVisible ? 2 * __gridLineWidth : 0))
- readonly property real availableHeight: (viewContainer.height - (control.frameVisible ? 2 * __gridLineWidth : 0))
+ readonly property real availableWidth: viewContainer.width
+ readonly property real availableHeight: viewContainer.height
property int hoveredCellIndex: -1
property int pressedCellIndex: -1
- Loader {
- id: backgroundLoader
+ Rectangle {
anchors.fill: parent
- sourceComponent: background
+ color: "transparent"
+ border.color: gridColor
+ visible: control.frameVisible
}
- Loader {
- id: navigationBarLoader
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
+ Item {
+ id: container
+ anchors.fill: parent
anchors.margins: control.frameVisible ? 1 : 0
- sourceComponent: navigationBar
- property QtObject styleData: QtObject {
- readonly property string title: control.__locale.standaloneMonthName(control.visibleMonth)
- + new Date(control.visibleYear, control.visibleMonth, 1).toLocaleDateString(control.__locale, " yyyy")
+ Loader {
+ id: backgroundLoader
+ anchors.fill: parent
+ sourceComponent: background
}
- }
- Row {
- id: dayOfWeekHeaderRow
- anchors.top: navigationBarLoader.bottom
- anchors.left: parent.left
- anchors.leftMargin: (control.weekNumbersVisible ? weekNumbersItem.width : 0)
- anchors.right: parent.right
- height: dayOfWeekHeaderRowHeight
+ Loader {
+ id: navigationBarLoader
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ sourceComponent: navigationBar
- Repeater {
- id: repeater
- model: CalendarHeaderModel {
- locale: control.__locale
- }
- Loader {
- id: dayOfWeekDelegateLoader
- sourceComponent: dayOfWeekDelegate
- width: __cellRectAt(index).width
- height: dayOfWeekHeaderRow.height
-
- readonly property var __dayOfWeek: dayOfWeek
-
- property QtObject styleData: QtObject {
- readonly property alias dayOfWeek: dayOfWeekDelegateLoader.__dayOfWeek
- }
+ property QtObject styleData: QtObject {
+ readonly property string title: control.__locale.standaloneMonthName(control.visibleMonth)
+ + new Date(control.visibleYear, control.visibleMonth, 1).toLocaleDateString(control.__locale, " yyyy")
}
}
- }
- Row {
- id: gridRow
- width: weekNumbersItem.width + viewContainer.width
- height: viewContainer.height
- anchors.top: dayOfWeekHeaderRow.bottom
+ Row {
+ id: dayOfWeekHeaderRow
+ anchors.top: navigationBarLoader.bottom
+ anchors.left: parent.left
+ anchors.leftMargin: (control.weekNumbersVisible ? weekNumbersItem.width : 0)
+ anchors.right: parent.right
+ height: dayOfWeekHeaderRowHeight
- Item {
- id: weekNumbersItem
- visible: control.weekNumbersVisible
- width: 30
- height: viewContainer.height
Repeater {
- id: weekNumberRepeater
- model: panelItem.weeksToShow
-
+ id: repeater
+ model: CalendarHeaderModel {
+ locale: control.__locale
+ }
Loader {
- id: weekNumberDelegateLoader
- y: __cellRectAt(index * panelItem.columns).y + (gridVisible ? __gridLineWidth : 0)
- width: weekNumbersItem.width
- height: __cellRectAt(index * panelItem.columns).height - (control.frameVisible ? __gridLineWidth : 0)
- sourceComponent: weekNumberDelegate
-
- readonly property int __index: index
- property int __weekNumber: control.__model.weekNumberAt(index)
-
- Connections {
- target: control
- onVisibleMonthChanged: __weekNumber = control.__model.weekNumberAt(index)
- onVisibleYearChanged: __weekNumber = control.__model.weekNumberAt(index)
- }
+ id: dayOfWeekDelegateLoader
+ sourceComponent: dayOfWeekDelegate
+ width: __cellRectAt(index).width
+ height: dayOfWeekHeaderRow.height
- Connections {
- target: control.__model
- onCountChanged: __weekNumber = control.__model.weekNumberAt(index)
- }
+ readonly property var __dayOfWeek: dayOfWeek
property QtObject styleData: QtObject {
- readonly property alias index: weekNumberDelegateLoader.__index
- readonly property int weekNumber: weekNumberDelegateLoader.__weekNumber
+ readonly property alias dayOfWeek: dayOfWeekDelegateLoader.__dayOfWeek
}
}
}
- Rectangle {
- anchors.topMargin: - navigationBarLoader.height
- anchors.top: parent.top
- anchors.bottom: parent.bottom
-
- width: 1
- anchors.rightMargin: -1
- anchors.right: parent.right
- color: gridColor
- }
+ }
+ Rectangle {
+ id: topGridLine
+ color: gridColor
+ width: parent.width
+ height: __gridLineWidth
+ visible: gridVisible
+ anchors.top: dayOfWeekHeaderRow.bottom
}
- // Contains the grid lines and the grid itself.
- Item {
- id: viewContainer
- width: panelItem.width - (control.weekNumbersVisible ? weekNumbersItem.width : 0)
- height: panelItem.height - navigationBarLoader.height - dayOfWeekHeaderRow.height
+ Row {
+ id: gridRow
+ width: weekNumbersItem.width + viewContainer.width
+ height: viewContainer.height
+ anchors.top: topGridLine.bottom
+
+ Item {
+ id: weekNumbersItem
+ visible: control.weekNumbersVisible
+ width: 30
+ height: viewContainer.height
+ Repeater {
+ id: weekNumberRepeater
+ model: panelItem.weeksToShow
+
+ Loader {
+ id: weekNumberDelegateLoader
+ y: __cellRectAt(index * panelItem.columns).y
+ width: weekNumbersItem.width
+ height: __cellRectAt(index * panelItem.columns).height
+ sourceComponent: weekNumberDelegate
+
+ readonly property int __index: index
+ property int __weekNumber: control.__model.weekNumberAt(index)
+
+ Connections {
+ target: control
+ onVisibleMonthChanged: __weekNumber = control.__model.weekNumberAt(index)
+ onVisibleYearChanged: __weekNumber = control.__model.weekNumberAt(index)
+ }
+
+ Connections {
+ target: control.__model
+ onCountChanged: __weekNumber = control.__model.weekNumberAt(index)
+ }
+
+ property QtObject styleData: QtObject {
+ readonly property alias index: weekNumberDelegateLoader.__index
+ readonly property int weekNumber: weekNumberDelegateLoader.__weekNumber
+ }
+ }
+ }
+ Rectangle {
+ anchors.topMargin: - navigationBarLoader.height
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
- Repeater {
- id: verticalGridLineRepeater
- model: panelItem.columns - 1
- delegate: Rectangle {
- // The last line will be an invalid index, so we must handle it
- x: index < panelItem.columns
- ? __cellRectAt(index + 1).x
- : __cellRectAt(panelItem.columns).x + __cellRectAt(panelItem.columns).width
- y: 0
width: __gridLineWidth
- height: viewContainer.height
+ anchors.rightMargin: -__gridLineWidth
+ anchors.right: parent.right
color: gridColor
- visible: gridVisible
}
+
}
- Repeater {
- id: horizontalGridLineRepeater
- model: panelItem.rows
- delegate: Rectangle {
- x: 0
- // The last line will be an invalid index, so we must handle it
- y: index < panelItem.columns - 1
- ? __cellRectAt(index * panelItem.columns).y
- : __cellRectAt((panelItem.rows - 1) * panelItem.columns).y + __cellRectAt((panelItem.rows - 1) * panelItem.columns).height
- width: viewContainer.width
- height: __gridLineWidth
- color: gridColor
- visible: gridVisible
+ // Contains the grid lines and the grid itself.
+ Item {
+ id: viewContainer
+ width: container.width - (control.weekNumbersVisible ? weekNumbersItem.width : 0)
+ height: container.height - navigationBarLoader.height - dayOfWeekHeaderRow.height - topGridLine.height
+
+ Repeater {
+ id: verticalGridLineRepeater
+ model: panelItem.columns - 1
+ delegate: Rectangle {
+ x: __cellRectAt(index + 1).x - __gridLineWidth
+ y: 0
+ width: __gridLineWidth
+ height: viewContainer.height
+ color: gridColor
+ visible: gridVisible
+ }
}
- }
- MouseArea {
- id: mouseArea
- anchors.fill: parent
+ Repeater {
+ id: horizontalGridLineRepeater
+ model: panelItem.rows - 1
+ delegate: Rectangle {
+ x: 0
+ y: __cellRectAt((index + 1) * panelItem.columns).y - __gridLineWidth
+ width: viewContainer.width
+ height: __gridLineWidth
+ color: gridColor
+ visible: gridVisible
+ }
+ }
- hoverEnabled: true
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
- function cellIndexAt(mouseX, mouseY) {
- var viewContainerPos = viewContainer.mapFromItem(mouseArea, mouseX, mouseY);
- var child = viewContainer.childAt(viewContainerPos.x, viewContainerPos.y);
- // In the tests, the mouseArea sometimes gets picked instead of the cells,
- // probably because stuff is still loading. To be safe, we check for that here.
- return child && child !== mouseArea ? child.__index : -1;
- }
+ hoverEnabled: true
- onEntered: {
- hoveredCellIndex = cellIndexAt(mouseX, mouseY);
- if (hoveredCellIndex === undefined) {
- hoveredCellIndex = cellIndexAt(mouseX, mouseY);
+ function cellIndexAt(mouseX, mouseY) {
+ var viewContainerPos = viewContainer.mapFromItem(mouseArea, mouseX, mouseY);
+ var child = viewContainer.childAt(viewContainerPos.x, viewContainerPos.y);
+ // In the tests, the mouseArea sometimes gets picked instead of the cells,
+ // probably because stuff is still loading. To be safe, we check for that here.
+ return child && child !== mouseArea ? child.__index : -1;
}
- var date = view.model.dateAt(hoveredCellIndex);
- if (__isValidDate(date)) {
- control.hovered(date);
+ onEntered: {
+ hoveredCellIndex = cellIndexAt(mouseX, mouseY);
+ if (hoveredCellIndex === undefined) {
+ hoveredCellIndex = cellIndexAt(mouseX, mouseY);
+ }
+
+ var date = view.model.dateAt(hoveredCellIndex);
+ if (__isValidDate(date)) {
+ control.hovered(date);
+ }
}
- }
- onExited: {
- hoveredCellIndex = -1;
- }
+ onExited: {
+ hoveredCellIndex = -1;
+ }
- onPositionChanged: {
- var indexOfCell = cellIndexAt(mouse.x, mouse.y);
- var previousHoveredCellIndex = hoveredCellIndex;
- hoveredCellIndex = indexOfCell;
- if (indexOfCell !== -1) {
- var date = view.model.dateAt(indexOfCell);
- if (__isValidDate(date)) {
- if (hoveredCellIndex !== previousHoveredCellIndex)
- control.hovered(date);
+ onPositionChanged: {
+ var indexOfCell = cellIndexAt(mouse.x, mouse.y);
+ var previousHoveredCellIndex = hoveredCellIndex;
+ hoveredCellIndex = indexOfCell;
+ if (indexOfCell !== -1) {
+ var date = view.model.dateAt(indexOfCell);
+ if (__isValidDate(date)) {
+ if (hoveredCellIndex !== previousHoveredCellIndex)
+ control.hovered(date);
+
+ // The date must be different for the pressed signal to be emitted.
+ if (pressed && date.getTime() !== control.selectedDate.getTime()) {
+ control.pressed(date);
+
+ // You can't select dates in a different month while dragging.
+ if (date.getMonth() === control.selectedDate.getMonth()) {
+ control.selectedDate = date;
+ pressedCellIndex = indexOfCell;
+ }
+ }
+ }
+ }
+ }
- if (pressed && date.getTime() !== control.selectedDate.getTime()) {
+ onPressed: {
+ var indexOfCell = cellIndexAt(mouse.x, mouse.y);
+ if (indexOfCell !== -1) {
+ var date = view.model.dateAt(indexOfCell);
+ pressedCellIndex = indexOfCell;
+ if (__isValidDate(date)) {
control.selectedDate = date;
- pressedCellIndex = indexOfCell;
control.pressed(date);
}
}
}
- }
- onPressed: {
- var indexOfCell = cellIndexAt(mouse.x, mouse.y);
- if (indexOfCell !== -1) {
- var date = view.model.dateAt(indexOfCell);
- pressedCellIndex = indexOfCell;
- if (__isValidDate(date)) {
- control.selectedDate = date;
- control.pressed(date);
+ onReleased: {
+ var indexOfCell = cellIndexAt(mouse.x, mouse.y);
+ if (indexOfCell !== -1) {
+ // The cell index might be valid, but the date has to be too. We could let the
+ // selected date validation take care of this, but then the selected date would
+ // change to the earliest day if a day before the minimum date is clicked, for example.
+ var date = view.model.dateAt(indexOfCell);
+ if (__isValidDate(date)) {
+ control.released(date);
+ }
}
+ pressedCellIndex = -1;
}
- }
- onReleased: {
- var indexOfCell = cellIndexAt(mouse.x, mouse.y);
- if (indexOfCell !== -1) {
- // The cell index might be valid, but the date has to be too. We could let the
- // selected date validation take care of this, but then the selected date would
- // change to the earliest day if a day before the minimum date is clicked, for example.
- var date = view.model.dateAt(indexOfCell);
- if (__isValidDate(date)) {
- control.released(date);
+ onClicked: {
+ var indexOfCell = cellIndexAt(mouse.x, mouse.y);
+ if (indexOfCell !== -1) {
+ var date = view.model.dateAt(indexOfCell);
+ if (__isValidDate(date))
+ control.clicked(date);
}
}
- pressedCellIndex = -1;
- }
- onClicked: {
- var indexOfCell = cellIndexAt(mouse.x, mouse.y);
- if (indexOfCell !== -1) {
- var date = view.model.dateAt(indexOfCell);
- if (__isValidDate(date))
- control.clicked(date);
+ onDoubleClicked: {
+ var indexOfCell = cellIndexAt(mouse.x, mouse.y);
+ if (indexOfCell !== -1) {
+ var date = view.model.dateAt(indexOfCell);
+ if (__isValidDate(date))
+ control.doubleClicked(date);
+ }
}
}
- onDoubleClicked: {
- var indexOfCell = cellIndexAt(mouse.x, mouse.y);
- if (indexOfCell !== -1) {
- var date = view.model.dateAt(indexOfCell);
- if (__isValidDate(date))
- control.doubleClicked(date);
- }
+ Connections {
+ target: control
+ onSelectedDateChanged: view.selectedDateChanged()
}
- }
- Connections {
- target: control
- onSelectedDateChanged: view.selectedDateChanged()
- }
+ Repeater {
+ id: view
- Repeater {
- id: view
+ property int currentIndex: -1
- property int currentIndex: -1
+ model: control.__model
- model: control.__model
+ Component.onCompleted: selectedDateChanged()
- Component.onCompleted: selectedDateChanged()
-
- function selectedDateChanged() {
- if (model !== undefined && model.locale !== undefined) {
- currentIndex = model.indexAt(control.selectedDate);
+ function selectedDateChanged() {
+ if (model !== undefined && model.locale !== undefined) {
+ currentIndex = model.indexAt(control.selectedDate);
+ }
}
- }
-
- delegate: Loader {
- id: delegateLoader
-
- x: __cellRectAt(index).x + (gridVisible ? __gridLineWidth : 0)
- y: __cellRectAt(index).y + (gridVisible ? __gridLineWidth : 0)
- width: __cellRectAt(index).width - (gridVisible ? __gridLineWidth : 0)
- height: __cellRectAt(index).height - (gridVisible ? __gridLineWidth : 0)
- z: styleData.selected ? 1 : 0
- sourceComponent: dayDelegate
- readonly property int __index: index
- readonly property date __date: date
- // We rely on the fact that an invalid QDate will be converted to a Date
- // whose year is -4713, which is always an invalid date since our
- // earliest minimum date is the year 1.
- readonly property bool valid: __isValidDate(date)
-
- property QtObject styleData: QtObject {
- readonly property alias index: delegateLoader.__index
- readonly property bool selected: control.selectedDate.getTime() === date.getTime()
- readonly property alias date: delegateLoader.__date
- readonly property bool valid: delegateLoader.valid
- // TODO: this will not be correct if the app is running when a new day begins.
- readonly property bool today: date.getTime() === new Date().setHours(0, 0, 0, 0)
- readonly property bool visibleMonth: date.getMonth() === control.visibleMonth
- readonly property bool hovered: panelItem.hoveredCellIndex == index
- readonly property bool pressed: panelItem.pressedCellIndex == index
- // todo: pressed property here, clicked and doubleClicked in the control itself
+ delegate: Loader {
+ id: delegateLoader
+
+ x: __cellRectAt(index).x
+ y: __cellRectAt(index).y
+ width: __cellRectAt(index).width
+ height: __cellRectAt(index).height
+ sourceComponent: dayDelegate
+
+ readonly property int __index: index
+ readonly property date __date: date
+ // We rely on the fact that an invalid QDate will be converted to a Date
+ // whose year is -4713, which is always an invalid date since our
+ // earliest minimum date is the year 1.
+ readonly property bool valid: __isValidDate(date)
+
+ property QtObject styleData: QtObject {
+ readonly property alias index: delegateLoader.__index
+ readonly property bool selected: control.selectedDate.getTime() === date.getTime()
+ readonly property alias date: delegateLoader.__date
+ readonly property bool valid: delegateLoader.valid
+ // TODO: this will not be correct if the app is running when a new day begins.
+ readonly property bool today: date.getTime() === new Date().setHours(0, 0, 0, 0)
+ readonly property bool visibleMonth: date.getMonth() === control.visibleMonth
+ readonly property bool hovered: panelItem.hoveredCellIndex == index
+ readonly property bool pressed: panelItem.pressedCellIndex == index
+ // todo: pressed property here, clicked and doubleClicked in the control itself
+ }
}
}
}
}
}
- Rectangle {
- anchors.fill: parent
- color: "transparent"
- border.color: gridColor
- visible: control.frameVisible
- }
-
}
}
diff --git a/src/controls/Styles/Base/ComboBoxStyle.qml b/src/controls/Styles/Base/ComboBoxStyle.qml
index 824430ff..eed7e7f4 100644
--- a/src/controls/Styles/Base/ComboBoxStyle.qml
+++ b/src/controls/Styles/Base/ComboBoxStyle.qml
@@ -224,22 +224,25 @@ Style {
property Component __popupStyle: Style {
property int __maxPopupHeight: 400
property int submenuOverlap: 0
+ property int submenuPopupDelay: 100
property Component frame: Rectangle {
- width: (parent ? parent.contentWidth : 0)
- height: (parent ? parent.contentHeight : 0) + 2
+ id: popupFrame
border.color: "white"
- property real maxHeight: 500
- property int margin: 1
+ Text {
+ text: "NOT IMPLEMENTED"
+ color: "red"
+ font {
+ pixelSize: 10
+ bold: true
+ }
+ anchors.centerIn: parent
+ rotation: -Math.atan2(popupFrame.height, popupFrame.width) * 180 / Math.PI
+ }
}
property Component menuItemPanel: Text {
- text: "NOT IMPLEMENTED"
- color: "red"
- font {
- pixelSize: 14
- bold: true
- }
+ text: styleData.text
}
property Component __scrollerStyle: null
diff --git a/src/controls/Styles/Base/ScrollViewStyle.qml b/src/controls/Styles/Base/ScrollViewStyle.qml
index 073a2e3f..d072f82e 100644
--- a/src/controls/Styles/Base/ScrollViewStyle.qml
+++ b/src/controls/Styles/Base/ScrollViewStyle.qml
@@ -372,6 +372,8 @@ Style {
property int extent: Math.max(minimumHandleLength, __styleData.horizontal ?
(flickableItem ? flickableItem.width/flickableItem.contentWidth : 0 ) * bg.width :
(flickableItem ? flickableItem.height/flickableItem.contentHeight : 0) * bg.height)
+ readonly property real range: __control.maximumValue - __control.minimumValue
+ readonly property real begin: __control.value - __control.minimumValue
Loader {
id: handleControl
@@ -379,8 +381,8 @@ Style {
width: __styleData.horizontal ? extent : implicitWidth
anchors.top: bg.top
anchors.left: bg.left
- anchors.topMargin: __styleData.horizontal ? 0 : -handleOverlap + (__control.value / __control.maximumValue) * (bg.height + 2 * handleOverlap- height)
- anchors.leftMargin: __styleData.horizontal ? -handleOverlap + (__control.value / __control.maximumValue) * (bg.width + 2 * handleOverlap - width) : 0
+ anchors.topMargin: __styleData.horizontal ? 0 : -handleOverlap + (2 * begin * (bg.height + (2 * handleOverlap) - extent) + range) / (2 * range)
+ anchors.leftMargin: __styleData.horizontal ? -handleOverlap + (2 * begin * (bg.width + (2 * handleOverlap) - extent) + range) / (2 * range) : 0
sourceComponent: handle
property QtObject styleData: QtObject {
readonly property bool hovered: activeControl === "handle"
diff --git a/src/controls/Styles/Base/TabViewStyle.qml b/src/controls/Styles/Base/TabViewStyle.qml
index acc46cf0..f13787ad 100644
--- a/src/controls/Styles/Base/TabViewStyle.qml
+++ b/src/controls/Styles/Base/TabViewStyle.qml
@@ -140,7 +140,7 @@ Style {
scale: control.tabPosition === Qt.TopEdge ? 1 : -1
property int totalOverlap: tabOverlap * (control.count - 1)
- property real maxTabWidth: (styleData.availableWidth + totalOverlap) / control.count
+ property real maxTabWidth: control.count > 0 ? (styleData.availableWidth + totalOverlap) / control.count : 0
implicitWidth: Math.round(Math.min(maxTabWidth, textitem.implicitWidth + 20))
implicitHeight: Math.round(textitem.implicitHeight + 10)
diff --git a/src/controls/Styles/Base/TableViewStyle.qml b/src/controls/Styles/Base/TableViewStyle.qml
index 667841bb..5dca6631 100644
--- a/src/controls/Styles/Base/TableViewStyle.qml
+++ b/src/controls/Styles/Base/TableViewStyle.qml
@@ -106,7 +106,7 @@ ScrollViewStyle {
}
/*! \qmlproperty Component TableViewStyle::rowDelegate
- Delegate for header. This delegate is described in \l {TableView::rowDelegate}
+ Delegate for row. This delegate is described in \l {TableView::rowDelegate}
*/
property Component rowDelegate: Rectangle {
height: Math.round(TextSingleton.implicitHeight * 1.2)
diff --git a/src/controls/Styles/Desktop/ComboBoxStyle.qml b/src/controls/Styles/Desktop/ComboBoxStyle.qml
index facc8223..9c8bf608 100644
--- a/src/controls/Styles/Desktop/ComboBoxStyle.qml
+++ b/src/controls/Styles/Desktop/ComboBoxStyle.qml
@@ -85,23 +85,26 @@ Style {
}
property Component __dropDownStyle: Style {
+ id: dropDownStyleRoot
property int __maxPopupHeight: 600
property int submenuOverlap: 0
property int submenuPopupDelay: 0
property Component frame: StyleItem {
elementType: "frame"
- width: (parent ? parent.contentWidth : 0)
- height: (parent ? parent.contentHeight : 0) + 2 * pixelMetric("defaultframewidth")
+ Component.onCompleted: {
+ var defaultFrameWidth = pixelMetric("defaultframewidth")
+ dropDownStyleRoot.padding.left = defaultFrameWidth
+ dropDownStyleRoot.padding.right = defaultFrameWidth
+ dropDownStyleRoot.padding.top = defaultFrameWidth
+ dropDownStyleRoot.padding.bottom = defaultFrameWidth
+ }
}
property Component menuItemPanel: StyleItem {
elementType: "itemrow"
selected: styleData.selected
- x: pixelMetric("defaultframewidth")
- y: pixelMetric("defaultframewidth")
-
implicitWidth: textItem.contentWidth
implicitHeight: textItem.contentHeight
diff --git a/src/controls/Styles/Desktop/TabViewStyle.qml b/src/controls/Styles/Desktop/TabViewStyle.qml
index 9244c7d8..f39046b2 100644
--- a/src/controls/Styles/Desktop/TabViewStyle.qml
+++ b/src/controls/Styles/Desktop/TabViewStyle.qml
@@ -85,7 +85,7 @@ Style {
property int tabHSpace: __barstyle.pixelMetric("tabhspace");
property int tabVSpace: __barstyle.pixelMetric("tabvspace");
property int totalOverlap: tabOverlap * (control.count - 1)
- property real maxTabWidth: (control.width + totalOverlap) / control.count
+ property real maxTabWidth: control.count > 0 ? (control.width + totalOverlap) / control.count : 0
implicitWidth: Math.min(maxTabWidth, Math.max(50, styleitem.textWidth(styleData.title)) + tabHSpace + 2)
implicitHeight: Math.max(styleitem.font.pixelSize + tabVSpace + 6, 0)
diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml
index 2377b7a2..5787e3c4 100644
--- a/src/controls/TabView.qml
+++ b/src/controls/TabView.qml
@@ -63,7 +63,7 @@ FocusScope {
property int currentIndex: 0
/*! The current tab count */
- property int count: 0
+ readonly property int count: __tabs.count
/*! The visibility of the tab frame around contents */
property bool frameVisible: true
@@ -113,6 +113,7 @@ FocusScope {
__tabs.insert(index, {tab: tab})
tab.__inserted = true
tab.parent = stack
+ __didInsertIndex(index)
__setOpacities()
return tab
}
@@ -120,10 +121,9 @@ FocusScope {
/*! Removes and destroys a tab at the given \a index. */
function removeTab(index) {
var tab = __tabs.get(index).tab
+ __willRemoveIndex(index)
__tabs.remove(index, 1)
tab.destroy()
- if (currentIndex > 0)
- currentIndex--
__setOpacities()
}
@@ -147,7 +147,8 @@ FocusScope {
/*! Returns the \l Tab item at \a index. */
function getTab(index) {
- return __tabs.get(index).tab
+ var data = __tabs.get(index)
+ return data && data.tab
}
/*! \internal */
@@ -162,12 +163,24 @@ FocusScope {
onCurrentIndexChanged: __setOpacities()
/*! \internal */
+ function __willRemoveIndex(index) {
+ // Make sure currentIndex will points to the same tab after the removal.
+ // Also activate the next index if the current index is being removed,
+ // except when it's both the current and last index.
+ if (count > 1 && (currentIndex > index || currentIndex == count -1))
+ --currentIndex
+ }
+ function __didInsertIndex(index) {
+ // Make sure currentIndex points to the same tab as before the insertion.
+ if (count > 1 && currentIndex >= index)
+ currentIndex++
+ }
+
function __setOpacities() {
for (var i = 0; i < __tabs.count; ++i) {
var child = __tabs.get(i).tab
child.visible = (i == currentIndex ? true : false)
}
- count = __tabs.count
}
activeFocusOnTab: false
@@ -239,6 +252,7 @@ FocusScope {
if (completed)
tab.Component.onDestruction.connect(stack.onDynamicTabDestroyed.bind(tab))
__tabs.append({tab: tab})
+ __didInsertIndex(__tabs.count - 1)
tabAdded = true
}
}
@@ -249,6 +263,7 @@ FocusScope {
function onDynamicTabDestroyed() {
for (var i = 0; i < __tabs.count; ++i) {
if (__tabs.get(i).tab === this) {
+ __willRemoveIndex(i)
__tabs.remove(i, 1)
__setOpacities()
break
diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml
index 84046138..75e1b4e1 100644
--- a/src/controls/TableView.qml
+++ b/src/controls/TableView.qml
@@ -819,7 +819,7 @@ ScrollView {
rowItemContainer.height = Qt.binding( function() { return rowItem.height });
// Reassign row-specific bindings
- rowItem.rowIndex = model.index;
+ rowItem.rowIndex = Qt.binding( function() { return model.index });
rowItem.itemModelData = Qt.binding( function() { return typeof modelData === "undefined" ? null : modelData });
rowItem.itemModel = Qt.binding( function() { return model });
rowItem.parent = rowItemContainer;
@@ -861,7 +861,7 @@ ScrollView {
Loader {
id: rowstyle
// row delegate
- sourceComponent: root.rowDelegate
+ sourceComponent: rowitem.itemModel !== undefined ? root.rowDelegate : null
// Row fills the view width regardless of item size
// But scrollbar should not adjust to it
height: item ? item.height : 16
@@ -891,7 +891,8 @@ ScrollView {
width: columnItem.width
height: parent ? parent.height : 0
visible: columnItem.visible
- sourceComponent: columnItem.delegate ? columnItem.delegate : itemDelegate
+ sourceComponent: rowitem.itemModel !== undefined ? // delays construction until model is initialized
+ (columnItem.delegate ? columnItem.delegate : itemDelegate) : null
// these properties are exposed to the item delegate
readonly property var model: itemModel
diff --git a/src/controls/doc/src/qtquickcontrols-examples.qdoc b/src/controls/doc/src/qtquickcontrols-examples.qdoc
index 45b61598..205720c8 100644
--- a/src/controls/doc/src/qtquickcontrols-examples.qdoc
+++ b/src/controls/doc/src/qtquickcontrols-examples.qdoc
@@ -44,6 +44,8 @@
This example project demonstrates the various UI components provided by
\l{Qt Quick Controls}.
+
+ \include examples-run.qdocinc
*/
/*!
@@ -56,6 +58,8 @@
This example shows how to easily arrange UI components into
\l{Qt Quick Layouts}{layouts} with \l{GridLayout}, \l{RowLayout}, and
\l{ColumnLayout}.
+
+ \include examples-run.qdocinc
*/
/*!
@@ -68,6 +72,8 @@
This example project demonstrates the usage of \l {SplitView} from
\l{Qt Quick Controls} - a control that lays out items horizontally or
vertically with a draggable splitter between each item.
+
+ \include examples-run.qdocinc
*/
/*!
@@ -81,6 +87,8 @@
can be used together with different types of data models to display
lists of information with support for scroll bars, selections and
resizable header sections.
+
+ \include examples-run.qdocinc
*/
/*!
@@ -92,6 +100,8 @@
This example implements a text editor using \l{Qt Quick Controls},
complete with text formatting options, copy-paste and undo/redo.
+
+ \include examples-run.qdocinc
*/
/*!
@@ -103,6 +113,8 @@
This example shows how to implement a UI suitable
for touch input using \l{Qt Quick Controls}.
+
+ \include examples-run.qdocinc
*/
/*!
@@ -114,4 +126,6 @@
This example shows how Calendar can be used to view events retrieved from
an SQL database.
+
+ \include examples-run.qdocinc
*/
diff --git a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
index 61c33cd6..25603541 100644
--- a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
+++ b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
@@ -64,7 +64,7 @@
The QML types can be imported into your application using the following import statement in your \c {.qml} file.
\code
- import QtQuick.Controls.Styles 1.1
+ import QtQuick.Controls.Styles 1.2
\endcode
\section1 Styling Views
@@ -95,7 +95,7 @@
*/
/*!
- \qmlmodule QtQuick.Controls.Styles 1.1
+ \qmlmodule QtQuick.Controls.Styles 1.2
\title Qt Quick Controls Styles QML Types
\ingroup qmlmodules
\brief Provides QML types for Qt Quick Controls styles.
@@ -108,6 +108,6 @@
that can be replaced with custom QML snippets.
\code
- import QtQuick.Controls.Styles 1.1
+ import QtQuick.Controls.Styles 1.2
\endcode
*/
diff --git a/src/controls/plugins.qmltypes b/src/controls/plugins.qmltypes
index eadb72ef..a9d6e527 100644
--- a/src/controls/plugins.qmltypes
+++ b/src/controls/plugins.qmltypes
@@ -3,7 +3,8 @@ import QtQuick.tooling 1.1
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
-// This file was auto-generated with the command 'qmlplugindump -nonrelocatable QtQuick.Controls 1.1'.
+// This file was auto-generated by:
+// 'qmlplugindump -nonrelocatable QtQuick.Controls 1.2'
Module {
Component {
@@ -30,6 +31,10 @@ Module {
Property { name: "checked"; type: "bool" }
Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
Property { name: "shortcut"; type: "QVariant" }
+ Signal {
+ name: "triggered"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
Signal { name: "triggered" }
Signal {
name: "toggled"
@@ -44,17 +49,61 @@ Module {
name: "tooltipChanged"
Parameter { name: "arg"; type: "string" }
}
+ Method {
+ name: "trigger"
+ Parameter { name: "source"; type: "QObject"; isPointer: true }
+ }
Method { name: "trigger" }
}
Component {
+ name: "QQuickCalendarModel"
+ prototype: "QAbstractListModel"
+ exports: ["QtQuick.Controls.Private/CalendarModel 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "visibleDate"; type: "QDate" }
+ Property { name: "locale"; type: "QLocale" }
+ Property { name: "count"; type: "int"; isReadonly: true }
+ Signal {
+ name: "visibleDateChanged"
+ Parameter { name: "visibleDate"; type: "QDate" }
+ }
+ Signal {
+ name: "localeChanged"
+ Parameter { name: "locale"; type: "QLocale" }
+ }
+ Signal {
+ name: "countChanged"
+ Parameter { name: "count"; type: "int" }
+ }
+ Method {
+ name: "dateAt"
+ type: "QDate"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method {
+ name: "indexAt"
+ type: "int"
+ Parameter { name: "visibleDate"; type: "QDate" }
+ }
+ Method {
+ name: "weekNumberAt"
+ type: "int"
+ Parameter { name: "row"; type: "int" }
+ }
+ }
+ Component {
name: "QQuickControlSettings"
prototype: "QObject"
exports: ["QtQuick.Controls.Private/Settings 1.0"]
+ isCreatable: false
+ isSingleton: true
exportMetaObjectRevisions: [0]
Property { name: "style"; type: "QUrl"; isReadonly: true }
Property { name: "styleName"; type: "string" }
Property { name: "stylePath"; type: "string" }
Property { name: "dpiScaleFactor"; type: "double"; isReadonly: true }
+ Property { name: "dragThreshold"; type: "double"; isReadonly: true }
+ Property { name: "hasTouchScreen"; type: "bool"; isReadonly: true }
}
Component {
name: "QQuickExclusiveGroup"
@@ -77,7 +126,7 @@ Module {
name: "QQuickMenu"
defaultProperty: "items"
prototype: "QQuickMenuText"
- exports: ["QtQuick.Controls/MenuPrivate 1.0"]
+ exports: ["QtQuick.Controls.Private/MenuPrivate 1.0"]
exportMetaObjectRevisions: [0]
Property { name: "title"; type: "string" }
Property { name: "items"; type: "QObject"; isList: true; isReadonly: true }
@@ -88,8 +137,12 @@ Module {
Property { name: "__font"; type: "QFont" }
Property { name: "__xOffset"; type: "double" }
Property { name: "__yOffset"; type: "double" }
+ Property { name: "__action"; type: "QQuickAction"; isReadonly: true; isPointer: true }
+ Property { name: "__popupGeometry"; type: "QRect"; isReadonly: true }
Signal { name: "__menuClosed" }
Signal { name: "popupVisibleChanged" }
+ Signal { name: "menuContentItemChanged" }
+ Signal { name: "minimumWidthChanged" }
Method { name: "__closeMenu" }
Method { name: "__dismissMenu" }
Method { name: "popup" }
@@ -135,7 +188,7 @@ Module {
name: "QQuickMenuBar"
defaultProperty: "menus"
prototype: "QObject"
- exports: ["QtQuick.Controls/MenuBarPrivate 1.0"]
+ exports: ["QtQuick.Controls.Private/MenuBarPrivate 1.0"]
exportMetaObjectRevisions: [0]
Property { name: "menus"; type: "QQuickMenu"; isList: true; isReadonly: true }
Property { name: "__contentItem"; type: "QQuickItem"; isPointer: true }
@@ -147,10 +200,11 @@ Module {
name: "QQuickMenuBase"
prototype: "QObject"
exports: ["QtQuick.Controls/MenuBase 1.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
Property { name: "visible"; type: "bool" }
Property { name: "type"; type: "QQuickMenuItemType::MenuItemType"; isReadonly: true }
- Property { name: "__parentMenu"; type: "QQuickMenu"; isReadonly: true; isPointer: true }
+ Property { name: "__parentMenu"; type: "QObject"; isReadonly: true; isPointer: true }
Property { name: "__isNative"; type: "bool"; isReadonly: true }
Property { name: "__visualItem"; type: "QQuickItem"; isPointer: true }
}
@@ -175,13 +229,15 @@ Module {
Component {
name: "QQuickMenuItemType"
exports: ["QtQuick.Controls/MenuItemType 1.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
Enum {
name: "MenuItemType"
values: {
"Separator": 0,
"Item": 1,
- "Menu": 2
+ "Menu": 2,
+ "ScrollIndicator": 3
}
}
}
@@ -225,6 +281,19 @@ Module {
}
}
Component {
+ name: "QQuickPopupWindow"
+ defaultProperty: "popupContentItem"
+ prototype: "QQuickWindow"
+ exports: ["QtQuick.Controls.Private/PopupWindow 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "popupContentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "parentItem"; type: "QQuickItem"; isPointer: true }
+ Signal { name: "popupDismissed" }
+ Signal { name: "geometryChanged" }
+ Method { name: "show" }
+ Method { name: "dismissPopup" }
+ }
+ Component {
name: "QQuickRangeModel"
prototype: "QObject"
exports: ["QtQuick.Controls.Private/RangeModel 1.0"]
@@ -291,6 +360,44 @@ Module {
}
}
Component {
+ name: "QQuickRangedDate"
+ prototype: "QObject"
+ exports: ["QtQuick.Controls.Private/RangedDate 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "date"; type: "QDate" }
+ Property { name: "minimumDate"; type: "QDate" }
+ Property { name: "maximumDate"; type: "QDate" }
+ }
+ Component {
+ name: "QQuickRootItem"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ Method {
+ name: "setWidth"
+ Parameter { name: "w"; type: "int" }
+ }
+ Method {
+ name: "setHeight"
+ Parameter { name: "h"; type: "int" }
+ }
+ }
+ Component {
+ name: "QQuickSelectionMode"
+ exports: ["QtQuick.Controls/SelectionMode 1.1"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "SelectionMode"
+ values: {
+ "NoSelection": 0,
+ "SingleSelection": 1,
+ "ExtendedSelection": 2,
+ "MultiSelection": 3,
+ "ContiguousSelection": 4
+ }
+ }
+ }
+ Component {
name: "QQuickSpinBoxValidator"
prototype: "QValidator"
exports: ["QtQuick.Controls.Private/SpinBoxValidator 1.0"]
@@ -310,6 +417,7 @@ Module {
name: "QQuickStack"
prototype: "QObject"
exports: ["QtQuick.Controls/Stack 1.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
Enum {
name: "Status"
@@ -333,6 +441,7 @@ Module {
prototype: "QQuickItem"
exports: ["QtQuick.Controls.Private/StyleItem 1.0"]
exportMetaObjectRevisions: [0]
+ Property { name: "border"; type: "QQuickPadding"; isReadonly: true; isPointer: true }
Property { name: "sunken"; type: "bool" }
Property { name: "raised"; type: "bool" }
Property { name: "active"; type: "bool" }
@@ -341,7 +450,7 @@ Module {
Property { name: "on"; type: "bool" }
Property { name: "hover"; type: "bool" }
Property { name: "horizontal"; type: "bool" }
- Property { name: "transient"; type: "bool" }
+ Property { name: "isTransient"; type: "bool" }
Property { name: "elementType"; type: "string" }
Property { name: "text"; type: "string" }
Property { name: "activeControl"; type: "string" }
@@ -356,6 +465,9 @@ Module {
Property { name: "paintMargins"; type: "int" }
Property { name: "contentWidth"; type: "int" }
Property { name: "contentHeight"; type: "int" }
+ Property { name: "textureWidth"; type: "int" }
+ Property { name: "textureHeight"; type: "int" }
+ Signal { name: "transientChanged" }
Signal { name: "infoChanged" }
Signal { name: "hintChanged" }
Signal {
@@ -366,6 +478,14 @@ Module {
name: "contentHeightChanged"
Parameter { name: "arg"; type: "int" }
}
+ Signal {
+ name: "textureWidthChanged"
+ Parameter { name: "w"; type: "int" }
+ }
+ Signal {
+ name: "textureHeightChanged"
+ Parameter { name: "h"; type: "int" }
+ }
Method {
name: "pixelMetric"
type: "int"
@@ -378,6 +498,7 @@ Module {
}
Method { name: "updateSizeHint" }
Method { name: "updateRect" }
+ Method { name: "updateBaselineOffset" }
Method { name: "updateItem" }
Method {
name: "hitTest"
@@ -417,6 +538,8 @@ Module {
name: "QQuickTooltip"
prototype: "QObject"
exports: ["QtQuick.Controls.Private/Tooltip 1.0"]
+ isCreatable: false
+ isSingleton: true
exportMetaObjectRevisions: [0]
Method {
name: "showText"
@@ -449,8 +572,12 @@ Module {
name: "QQuickWindow"
defaultProperty: "data"
prototype: "QWindow"
- exports: ["QtQuick.Window/Window 2.0", "QtQuick.Window/Window 2.1"]
- exportMetaObjectRevisions: [0, 1]
+ Enum {
+ name: "SceneGraphError"
+ values: {
+ "ContextNotAvailable": 1
+ }
+ }
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "color"; type: "QColor" }
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -462,11 +589,19 @@ Module {
isPointer: true
}
Signal { name: "frameSwapped" }
+ Signal {
+ name: "openglContextCreated"
+ revision: 2
+ Parameter { name: "context"; type: "QOpenGLContext"; isPointer: true }
+ }
Signal { name: "sceneGraphInitialized" }
Signal { name: "sceneGraphInvalidated" }
Signal { name: "beforeSynchronizing" }
+ Signal { name: "afterSynchronizing"; revision: 2 }
Signal { name: "beforeRendering" }
Signal { name: "afterRendering" }
+ Signal { name: "afterAnimating"; revision: 2 }
+ Signal { name: "sceneGraphAboutToStop"; revision: 2 }
Signal {
name: "closing"
revision: 1
@@ -477,6 +612,12 @@ Module {
Parameter { type: "QColor" }
}
Signal { name: "activeFocusItemChanged"; revision: 1 }
+ Signal {
+ name: "sceneGraphError"
+ revision: 2
+ Parameter { name: "error"; type: "QQuickWindow::SceneGraphError" }
+ Parameter { name: "message"; type: "string" }
+ }
Method { name: "update" }
Method { name: "releaseResources" }
}
@@ -501,14 +642,14 @@ Module {
Property { name: "y"; type: "int" }
Property { name: "width"; type: "int" }
Property { name: "height"; type: "int" }
- Property { name: "minimumWidth"; revision: 1; type: "int" }
- Property { name: "minimumHeight"; revision: 1; type: "int" }
- Property { name: "maximumWidth"; revision: 1; type: "int" }
- Property { name: "maximumHeight"; revision: 1; type: "int" }
+ Property { name: "minimumWidth"; type: "int" }
+ Property { name: "minimumHeight"; type: "int" }
+ Property { name: "maximumWidth"; type: "int" }
+ Property { name: "maximumHeight"; type: "int" }
Property { name: "visible"; type: "bool" }
Property { name: "active"; revision: 1; type: "bool"; isReadonly: true }
Property { name: "visibility"; revision: 1; type: "Visibility" }
- Property { name: "contentOrientation"; revision: 1; type: "Qt::ScreenOrientation" }
+ Property { name: "contentOrientation"; type: "Qt::ScreenOrientation" }
Property { name: "opacity"; revision: 1; type: "double" }
Signal {
name: "screenChanged"
@@ -523,6 +664,10 @@ Module {
Parameter { name: "windowState"; type: "Qt::WindowState" }
}
Signal {
+ name: "windowTitleChanged"
+ Parameter { name: "title"; type: "string" }
+ }
+ Signal {
name: "xChanged"
Parameter { name: "arg"; type: "int" }
}
@@ -540,22 +685,18 @@ Module {
}
Signal {
name: "minimumWidthChanged"
- revision: 1
Parameter { name: "arg"; type: "int" }
}
Signal {
name: "minimumHeightChanged"
- revision: 1
Parameter { name: "arg"; type: "int" }
}
Signal {
name: "maximumWidthChanged"
- revision: 1
Parameter { name: "arg"; type: "int" }
}
Signal {
name: "maximumHeightChanged"
- revision: 1
Parameter { name: "arg"; type: "int" }
}
Signal {
@@ -570,7 +711,6 @@ Module {
Signal { name: "activeChanged"; revision: 1 }
Signal {
name: "contentOrientationChanged"
- revision: 1
Parameter { name: "orientation"; type: "Qt::ScreenOrientation" }
}
Signal {
@@ -618,39 +758,32 @@ Module {
}
Method {
name: "setMinimumWidth"
- revision: 1
Parameter { name: "w"; type: "int" }
}
Method {
name: "setMinimumHeight"
- revision: 1
Parameter { name: "h"; type: "int" }
}
Method {
name: "setMaximumWidth"
- revision: 1
Parameter { name: "w"; type: "int" }
}
Method {
name: "setMaximumHeight"
- revision: 1
Parameter { name: "h"; type: "int" }
}
Method {
name: "alert"
+ revision: 1
Parameter { name: "msec"; type: "int" }
}
}
Component {
- prototype: "QQuickWindow"
- name: "QtQuick.Controls/ApplicationWindow"
- exports: ["QtQuick.Controls/ApplicationWindow 1.0"]
- exportMetaObjectRevisions: [0]
+ name: "QQuickWindow"
defaultProperty: "data"
- Property { name: "menuBar"; type: "MenuBar_QMLTYPE_1"; isPointer: true }
- Property { name: "toolBar"; type: "QQuickItem"; isPointer: true }
- Property { name: "statusBar"; type: "QQuickItem"; isPointer: true }
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ prototype: "QWindow"
+ exports: ["QtQuick.Window/Window 2.0"]
+ exportMetaObjectRevisions: [0]
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "color"; type: "QColor" }
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -678,8 +811,29 @@ Module {
}
Signal { name: "activeFocusItemChanged"; revision: 1 }
Method { name: "update" }
- Method { name: "forcePolish" }
Method { name: "releaseResources" }
+ }
+ Component {
+ name: "QQuickWindowQmlImpl"
+ defaultProperty: "data"
+ prototype: "QQuickWindow"
+ exports: ["QtQuick.Window/Window 2.1"]
+ exportMetaObjectRevisions: [0]
+ }
+ Component {
+ name: "QWindow"
+ prototype: "QObject"
+ Enum {
+ name: "Visibility"
+ values: {
+ "Hidden": 0,
+ "AutomaticVisibility": 1,
+ "Windowed": 2,
+ "Minimized": 3,
+ "Maximized": 4,
+ "FullScreen": 5
+ }
+ }
Property { name: "title"; type: "string" }
Property { name: "modality"; type: "Qt::WindowModality" }
Property { name: "flags"; type: "Qt::WindowFlags" }
@@ -820,10 +974,207 @@ Module {
}
}
Component {
+ prototype: "QQuickWindow"
+ name: "QtQuick.Controls/ApplicationWindow"
+ exports: ["QtQuick.Controls/ApplicationWindow 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "menuBar"; type: "MenuBar_QMLTYPE_1"; isPointer: true }
+ Property { name: "toolBar"; type: "QQuickItem"; isPointer: true }
+ Property { name: "statusBar"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__topBottomMargins"; type: "double" }
+ Property { name: "__qwindowsize_max"; type: "double"; isReadonly: true }
+ Property { name: "__width"; type: "double" }
+ Property { name: "__height"; type: "double" }
+ Property { name: "contentItem"; type: "ContentItem_QMLTYPE_9"; isReadonly: true; isPointer: true }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "visibility"; type: "Visibility" }
+ Signal {
+ name: "visibleChanged"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Signal {
+ name: "visibilityChanged"
+ Parameter { name: "visibility"; type: "QWindow::Visibility" }
+ }
+ Property { name: "color"; type: "QColor" }
+ Property {
+ name: "activeFocusItem"
+ revision: 1
+ type: "QQuickItem"
+ isReadonly: true
+ isPointer: true
+ }
+ Signal { name: "frameSwapped" }
+ Signal {
+ name: "openglContextCreated"
+ revision: 2
+ Parameter { name: "context"; type: "QOpenGLContext"; isPointer: true }
+ }
+ Signal { name: "sceneGraphInitialized" }
+ Signal { name: "sceneGraphInvalidated" }
+ Signal { name: "beforeSynchronizing" }
+ Signal { name: "afterSynchronizing"; revision: 2 }
+ Signal { name: "beforeRendering" }
+ Signal { name: "afterRendering" }
+ Signal { name: "afterAnimating"; revision: 2 }
+ Signal { name: "sceneGraphAboutToStop"; revision: 2 }
+ Signal {
+ name: "closing"
+ revision: 1
+ Parameter { name: "close"; type: "QQuickCloseEvent"; isPointer: true }
+ }
+ Signal {
+ name: "colorChanged"
+ Parameter { type: "QColor" }
+ }
+ Signal {
+ name: "sceneGraphError"
+ revision: 2
+ Parameter { name: "error"; type: "QQuickWindow::SceneGraphError" }
+ Parameter { name: "message"; type: "string" }
+ }
+ Method { name: "update" }
+ Method { name: "releaseResources" }
+ Property { name: "title"; type: "string" }
+ Property { name: "modality"; type: "Qt::WindowModality" }
+ Property { name: "flags"; type: "Qt::WindowFlags" }
+ Property { name: "x"; type: "int" }
+ Property { name: "y"; type: "int" }
+ Property { name: "width"; type: "int" }
+ Property { name: "height"; type: "int" }
+ Property { name: "minimumWidth"; type: "int" }
+ Property { name: "minimumHeight"; type: "int" }
+ Property { name: "maximumWidth"; type: "int" }
+ Property { name: "maximumHeight"; type: "int" }
+ Property { name: "active"; revision: 1; type: "bool"; isReadonly: true }
+ Property { name: "contentOrientation"; type: "Qt::ScreenOrientation" }
+ Property { name: "opacity"; revision: 1; type: "double" }
+ Signal {
+ name: "screenChanged"
+ Parameter { name: "screen"; type: "QScreen"; isPointer: true }
+ }
+ Signal {
+ name: "modalityChanged"
+ Parameter { name: "modality"; type: "Qt::WindowModality" }
+ }
+ Signal {
+ name: "windowStateChanged"
+ Parameter { name: "windowState"; type: "Qt::WindowState" }
+ }
+ Signal {
+ name: "windowTitleChanged"
+ Parameter { name: "title"; type: "string" }
+ }
+ Signal {
+ name: "xChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "yChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "widthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "heightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "minimumWidthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "minimumHeightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "maximumWidthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "maximumHeightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "contentOrientationChanged"
+ Parameter { name: "orientation"; type: "Qt::ScreenOrientation" }
+ }
+ Signal {
+ name: "focusObjectChanged"
+ Parameter { name: "object"; type: "QObject"; isPointer: true }
+ }
+ Signal {
+ name: "opacityChanged"
+ revision: 1
+ Parameter { name: "opacity"; type: "double" }
+ }
+ Method { name: "requestActivate"; revision: 1 }
+ Method {
+ name: "setVisible"
+ Parameter { name: "visible"; type: "bool" }
+ }
+ Method { name: "show" }
+ Method { name: "hide" }
+ Method { name: "showMinimized" }
+ Method { name: "showMaximized" }
+ Method { name: "showFullScreen" }
+ Method { name: "showNormal" }
+ Method { name: "close"; type: "bool" }
+ Method { name: "raise" }
+ Method { name: "lower" }
+ Method {
+ name: "setTitle"
+ Parameter { type: "string" }
+ }
+ Method {
+ name: "setX"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setY"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setWidth"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setHeight"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setMinimumWidth"
+ Parameter { name: "w"; type: "int" }
+ }
+ Method {
+ name: "setMinimumHeight"
+ Parameter { name: "h"; type: "int" }
+ }
+ Method {
+ name: "setMaximumWidth"
+ Parameter { name: "w"; type: "int" }
+ }
+ Method {
+ name: "setMaximumHeight"
+ Parameter { name: "h"; type: "int" }
+ }
+ Method {
+ name: "alert"
+ revision: 1
+ Parameter { name: "msec"; type: "int" }
+ }
+ }
+ Component {
prototype: "QQuickFocusScope"
name: "QtQuick.Controls/BusyIndicator"
exports: ["QtQuick.Controls/BusyIndicator 1.1"]
exportMetaObjectRevisions: [1]
+ isComposite: true
defaultProperty: "data"
Property { name: "running"; type: "bool" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
@@ -837,7 +1188,10 @@ Module {
name: "QtQuick.Controls/Button"
exports: ["QtQuick.Controls/Button 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
+ Property { name: "isDefault"; type: "bool" }
+ Property { name: "menu"; type: "Menu_QMLTYPE_43"; isPointer: true }
Property { name: "checkable"; type: "bool" }
Property { name: "checked"; type: "bool" }
Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
@@ -858,8 +1212,61 @@ Module {
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
Method { name: "accessiblePressAction"; type: "QVariant" }
- Property { name: "isDefault"; type: "bool" }
- Property { name: "menu"; type: "Menu_QMLTYPE_16"; isPointer: true }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/Calendar"
+ exports: ["QtQuick.Controls/Calendar 1.2"]
+ exportMetaObjectRevisions: [2]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "visibleMonth"; type: "int" }
+ Property { name: "visibleYear"; type: "int" }
+ Property { name: "frameVisible"; type: "bool" }
+ Property { name: "weekNumbersVisible"; type: "bool" }
+ Property { name: "dayOfWeekFormat"; type: "int" }
+ Property { name: "__model"; type: "QQuickCalendarModel"; isPointer: true }
+ Property { name: "__locale"; type: "QVariant" }
+ Property { name: "selectedDate"; type: "QDate" }
+ Property { name: "minimumDate"; type: "QDate" }
+ Property { name: "maximumDate"; type: "QDate" }
+ Signal {
+ name: "hovered"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "pressed"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "released"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "clicked"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Signal {
+ name: "doubleClicked"
+ Parameter { name: "date"; type: "QDateTime" }
+ }
+ Method { name: "showPreviousMonth"; type: "QVariant" }
+ Method { name: "showNextMonth"; type: "QVariant" }
+ Method { name: "showPreviousYear"; type: "QVariant" }
+ Method { name: "showNextYear"; type: "QVariant" }
+ Method { name: "__selectPreviousMonth"; type: "QVariant" }
+ Method { name: "__selectNextMonth"; type: "QVariant" }
+ Method { name: "__selectPreviousWeek"; type: "QVariant" }
+ Method { name: "__selectNextWeek"; type: "QVariant" }
+ Method { name: "__selectFirstDayOfMonth"; type: "QVariant" }
+ Method { name: "__selectLastDayOfMonth"; type: "QVariant" }
+ Method { name: "__selectPreviousDay"; type: "QVariant" }
+ Method { name: "__selectNextDay"; type: "QVariant" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
Property { name: "__style"; type: "QObject"; isPointer: true }
Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
@@ -871,7 +1278,13 @@ Module {
name: "QtQuick.Controls/CheckBox"
exports: ["QtQuick.Controls/CheckBox 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
+ Property { name: "checkedState"; type: "int" }
+ Property { name: "partiallyCheckedEnabled"; type: "bool" }
+ Property { name: "__ignoreChecked"; type: "bool" }
+ Property { name: "__ignoreCheckedState"; type: "bool" }
+ Method { name: "__cycleCheckBoxStates"; type: "QVariant" }
Property { name: "checked"; type: "bool" }
Property { name: "activeFocusOnPress"; type: "bool" }
Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
@@ -880,10 +1293,6 @@ Module {
Property { name: "pressed"; type: "bool" }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
- Property { name: "checkedState"; type: "int" }
- Property { name: "partiallyCheckedEnabled"; type: "bool" }
- Property { name: "__ignoreChecked"; type: "bool" }
- Method { name: "__cycleCheckBoxStates"; type: "QVariant" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
Property { name: "__style"; type: "QObject"; isPointer: true }
Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
@@ -895,6 +1304,7 @@ Module {
name: "QtQuick.Controls/ComboBox"
exports: ["QtQuick.Controls/ComboBox 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
Property { name: "textRole"; type: "string" }
Property { name: "editable"; type: "bool" }
@@ -925,6 +1335,8 @@ Module {
Parameter { name: "text"; type: "QVariant" }
}
Method { name: "selectAll"; type: "QVariant" }
+ Method { name: "__selectPrevItem"; type: "QVariant" }
+ Method { name: "__selectNextItem"; type: "QVariant" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
Property { name: "__style"; type: "QObject"; isPointer: true }
Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
@@ -936,6 +1348,7 @@ Module {
name: "QtQuick.Controls/GroupBox"
exports: ["QtQuick.Controls/GroupBox 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "__content"
Property { name: "title"; type: "string" }
Property { name: "flat"; type: "bool" }
@@ -944,184 +1357,29 @@ Module {
Property { name: "checked"; type: "bool" }
Property { name: "__content"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property { name: "__checkbox"; type: "CheckBox_QMLTYPE_25"; isReadonly: true; isPointer: true }
+ Property { name: "__checkbox"; type: "CheckBox_QMLTYPE_69"; isReadonly: true; isPointer: true }
Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
}
Component {
- name: "QQuickText"
- defaultProperty: "data"
- prototype: "QQuickImplicitSizeItem"
- exports: ["QtQuick/Text 2.0"]
- exportMetaObjectRevisions: [0]
- Enum {
- name: "HAlignment"
- values: {
- "AlignLeft": 1,
- "AlignRight": 2,
- "AlignHCenter": 4,
- "AlignJustify": 8
- }
- }
- Enum {
- name: "VAlignment"
- values: {
- "AlignTop": 32,
- "AlignBottom": 64,
- "AlignVCenter": 128
- }
- }
- Enum {
- name: "TextStyle"
- values: {
- "Normal": 0,
- "Outline": 1,
- "Raised": 2,
- "Sunken": 3
- }
- }
- Enum {
- name: "TextFormat"
- values: {
- "PlainText": 0,
- "RichText": 1,
- "AutoText": 2,
- "StyledText": 4
- }
- }
- Enum {
- name: "TextElideMode"
- values: {
- "ElideLeft": 0,
- "ElideRight": 1,
- "ElideMiddle": 2,
- "ElideNone": 3
- }
- }
- Enum {
- name: "WrapMode"
- values: {
- "NoWrap": 0,
- "WordWrap": 1,
- "WrapAnywhere": 3,
- "WrapAtWordBoundaryOrAnywhere": 4,
- "Wrap": 4
- }
- }
- Enum {
- name: "RenderType"
- values: {
- "QtRendering": 0,
- "NativeRendering": 1
- }
- }
- Enum {
- name: "LineHeightMode"
- values: {
- "ProportionalHeight": 0,
- "FixedHeight": 1
- }
- }
- Enum {
- name: "FontSizeMode"
- values: {
- "FixedSize": 0,
- "HorizontalFit": 1,
- "VerticalFit": 2,
- "Fit": 3
- }
- }
- Property { name: "text"; type: "string" }
- Property { name: "font"; type: "QFont" }
- Property { name: "color"; type: "QColor" }
- Property { name: "linkColor"; type: "QColor" }
- Property { name: "style"; type: "TextStyle" }
- Property { name: "styleColor"; type: "QColor" }
- Property { name: "horizontalAlignment"; type: "HAlignment" }
- Property { name: "effectiveHorizontalAlignment"; type: "HAlignment"; isReadonly: true }
- Property { name: "verticalAlignment"; type: "VAlignment" }
- Property { name: "wrapMode"; type: "WrapMode" }
- Property { name: "lineCount"; type: "int"; isReadonly: true }
- Property { name: "truncated"; type: "bool"; isReadonly: true }
- Property { name: "maximumLineCount"; type: "int" }
- Property { name: "textFormat"; type: "TextFormat" }
- Property { name: "elide"; type: "TextElideMode" }
- Property { name: "contentWidth"; type: "double"; isReadonly: true }
- Property { name: "contentHeight"; type: "double"; isReadonly: true }
- Property { name: "paintedWidth"; type: "double"; isReadonly: true }
- Property { name: "paintedHeight"; type: "double"; isReadonly: true }
- Property { name: "lineHeight"; type: "double" }
- Property { name: "lineHeightMode"; type: "LineHeightMode" }
- Property { name: "baseUrl"; type: "QUrl" }
- Property { name: "minimumPixelSize"; type: "int" }
- Property { name: "minimumPointSize"; type: "int" }
- Property { name: "fontSizeMode"; type: "FontSizeMode" }
- Property { name: "renderType"; type: "RenderType" }
- Signal {
- name: "textChanged"
- Parameter { name: "text"; type: "string" }
- }
- Signal {
- name: "linkActivated"
- Parameter { name: "link"; type: "string" }
- }
- Signal {
- name: "fontChanged"
- Parameter { name: "font"; type: "QFont" }
- }
- Signal {
- name: "styleChanged"
- Parameter { name: "style"; type: "TextStyle" }
- }
- Signal {
- name: "horizontalAlignmentChanged"
- Parameter { name: "alignment"; type: "HAlignment" }
- }
- Signal {
- name: "verticalAlignmentChanged"
- Parameter { name: "alignment"; type: "VAlignment" }
- }
- Signal {
- name: "textFormatChanged"
- Parameter { name: "textFormat"; type: "TextFormat" }
- }
- Signal {
- name: "elideModeChanged"
- Parameter { name: "mode"; type: "TextElideMode" }
- }
- Signal { name: "contentSizeChanged" }
- Signal {
- name: "lineHeightChanged"
- Parameter { name: "lineHeight"; type: "double" }
- }
- Signal {
- name: "lineHeightModeChanged"
- Parameter { name: "mode"; type: "LineHeightMode" }
- }
- Signal {
- name: "lineLaidOut"
- Parameter { name: "line"; type: "QQuickTextLine"; isPointer: true }
- }
- Method { name: "doLayout" }
- }
-
- Component {
prototype: "QQuickText"
name: "QtQuick.Controls/Label"
exports: ["QtQuick.Controls/Label 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
}
Component {
- prototype: "QQuickMenu"
+ prototype: "QObject"
name: "QtQuick.Controls/Menu"
exports: ["QtQuick.Controls/Menu 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "items"
Property { name: "__selfComponent"; type: "QQmlComponent"; isPointer: true }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__usingDefaultStyle"; type: "bool" }
Property { name: "__currentIndex"; type: "int" }
- Property { name: "__menuComponent"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__menuBar"; type: "QVariant" }
+ Property { name: "__parentContentItem"; type: "QVariant" }
Method {
name: "addMenu"
type: "QVariant"
@@ -1142,8 +1400,12 @@ Module {
Property { name: "__font"; type: "QFont" }
Property { name: "__xOffset"; type: "double" }
Property { name: "__yOffset"; type: "double" }
+ Property { name: "__action"; type: "QQuickAction"; isReadonly: true; isPointer: true }
+ Property { name: "__popupGeometry"; type: "QRect"; isReadonly: true }
Signal { name: "__menuClosed" }
Signal { name: "popupVisibleChanged" }
+ Signal { name: "menuContentItemChanged" }
+ Signal { name: "minimumWidthChanged" }
Method { name: "__closeMenu" }
Method { name: "__dismissMenu" }
Method { name: "popup" }
@@ -1164,11 +1426,6 @@ Module {
Parameter { type: "int" }
}
Method {
- name: "insertItem"
- Parameter { type: "int" }
- Parameter { type: "QQuickMenuBase"; isPointer: true }
- }
- Method {
name: "removeItem"
Parameter { type: "QQuickMenuBase"; isPointer: true }
}
@@ -1184,22 +1441,23 @@ Module {
Parameter { name: "x"; type: "double" }
Parameter { name: "y"; type: "double" }
}
- Property { name: "visible"; type: "bool" }
- Property { name: "type"; type: "QQuickMenuItemType::MenuItemType"; isReadonly: true }
- Property { name: "__parentMenu"; type: "QQuickMenu"; isReadonly: true; isPointer: true }
- Property { name: "__isNative"; type: "bool"; isReadonly: true }
- Property { name: "__visualItem"; type: "QQuickItem"; isPointer: true }
Property { name: "enabled"; type: "bool" }
Property { name: "iconSource"; type: "QUrl" }
Property { name: "iconName"; type: "string" }
Property { name: "__icon"; type: "QVariant"; isReadonly: true }
Signal { name: "__textChanged" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "type"; type: "QQuickMenuItemType::MenuItemType"; isReadonly: true }
+ Property { name: "__parentMenu"; type: "QObject"; isReadonly: true; isPointer: true }
+ Property { name: "__isNative"; type: "bool"; isReadonly: true }
+ Property { name: "__visualItem"; type: "QQuickItem"; isPointer: true }
}
Component {
- prototype: "QQuickMenuBar"
+ prototype: "QObject"
name: "QtQuick.Controls/MenuBar"
exports: ["QtQuick.Controls/MenuBar 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "menus"
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
Property { name: "__menuBarComponent"; type: "QQmlComponent"; isPointer: true }
@@ -1214,12 +1472,8 @@ Module {
name: "QtQuick.Controls/ProgressBar"
exports: ["QtQuick.Controls/ProgressBar 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
- Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "QObject"; isPointer: true }
- Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
- Property { name: "styleHints"; type: "QVariant" }
- Property { name: "__styleData"; type: "QObject"; isPointer: true }
Property { name: "value"; type: "double" }
Property { name: "minimumValue"; type: "double" }
Property { name: "maximumValue"; type: "double" }
@@ -1232,12 +1486,18 @@ Module {
type: "QVariant"
Parameter { name: "v"; type: "QVariant" }
}
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
}
Component {
prototype: "QQuickFocusScope"
name: "QtQuick.Controls/RadioButton"
exports: ["QtQuick.Controls/RadioButton 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
Property { name: "checked"; type: "bool" }
Property { name: "activeFocusOnPress"; type: "bool" }
@@ -1258,6 +1518,7 @@ Module {
name: "QtQuick.Controls/ScrollView"
exports: ["QtQuick.Controls/ScrollView 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "contentItem"
Property { name: "frameVisible"; type: "bool" }
Property { name: "highlightOnFocus"; type: "bool" }
@@ -1269,15 +1530,16 @@ Module {
Property { name: "__style"; type: "Style_QMLTYPE_0"; isPointer: true }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
+ Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_51"
+ type: "ScrollBar_QMLTYPE_17"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_51"
+ type: "ScrollBar_QMLTYPE_17"
isReadonly: true
isPointer: true
}
@@ -1287,12 +1549,8 @@ Module {
name: "QtQuick.Controls/Slider"
exports: ["QtQuick.Controls/Slider 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
- Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "QObject"; isPointer: true }
- Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
- Property { name: "styleHints"; type: "QVariant" }
- Property { name: "__styleData"; type: "QObject"; isPointer: true }
Property { name: "orientation"; type: "int" }
Property { name: "updateValueWhileDragging"; type: "bool" }
Property { name: "activeFocusOnPress"; type: "bool" }
@@ -1305,19 +1563,21 @@ Module {
Property { name: "hovered"; type: "bool"; isReadonly: true }
Property { name: "stepSize"; type: "double" }
Property { name: "value"; type: "double" }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
}
Component {
prototype: "QQuickFocusScope"
name: "QtQuick.Controls/SpinBox"
exports: ["QtQuick.Controls/SpinBox 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
- Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "QObject"; isPointer: true }
- Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
- Property { name: "styleHints"; type: "QVariant" }
- Property { name: "__styleData"; type: "QObject"; isPointer: true }
Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "horizontalAlignment"; type: "int" }
Property { name: "value"; type: "double" }
Property { name: "minimumValue"; type: "double" }
Property { name: "maximumValue"; type: "double" }
@@ -1328,14 +1588,22 @@ Module {
Property { name: "font"; type: "QFont" }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Property { name: "__text"; type: "string" }
+ Property { name: "__baselineOffset"; type: "double" }
+ Signal { name: "editingFinished" }
Method { name: "__increment"; type: "QVariant" }
Method { name: "__decrement"; type: "QVariant" }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
}
Component {
prototype: "QQuickItem"
name: "QtQuick.Controls/SplitView"
exports: ["QtQuick.Controls/SplitView 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "__contents"
Property { name: "orientation"; type: "int" }
Property { name: "handleDelegate"; type: "QQmlComponent"; isPointer: true }
@@ -1349,9 +1617,10 @@ Module {
name: "QtQuick.Controls/StackView"
exports: ["QtQuick.Controls/StackView 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
Property { name: "busy"; type: "bool"; isReadonly: true }
- Property { name: "delegate"; type: "StackViewDelegate_QMLTYPE_97"; isPointer: true }
+ Property { name: "delegate"; type: "StackViewDelegate_QMLTYPE_153"; isPointer: true }
Property { name: "__currentItem"; type: "QQuickItem"; isPointer: true }
Property { name: "__depth"; type: "int" }
Property { name: "__guard"; type: "bool" }
@@ -1430,6 +1699,7 @@ Module {
name: "QtQuick.Controls/StackViewDelegate"
exports: ["QtQuick.Controls/StackViewDelegate 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
Property { name: "pushTransition"; type: "QQmlComponent"; isPointer: true }
Property { name: "popTransition"; type: "QQmlComponent"; isPointer: true }
Property { name: "replaceTransition"; type: "QQmlComponent"; isPointer: true }
@@ -1449,6 +1719,7 @@ Module {
name: "QtQuick.Controls/StackViewTransition"
exports: ["QtQuick.Controls/StackViewTransition 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "animations"
Property { name: "name"; type: "string" }
Property { name: "enterItem"; type: "QQuickItem"; isPointer: true }
@@ -1456,10 +1727,11 @@ Module {
Property { name: "immediate"; type: "bool" }
}
Component {
- prototype: "QQuickItem"
+ prototype: "QQuickFocusScope"
name: "QtQuick.Controls/StatusBar"
exports: ["QtQuick.Controls/StatusBar 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "__content"
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
@@ -1467,10 +1739,27 @@ Module {
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
}
Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/Switch"
+ exports: ["QtQuick.Controls/Switch 1.1"]
+ exportMetaObjectRevisions: [1]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "checked"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
+ }
+ Component {
prototype: "QQuickLoader"
name: "QtQuick.Controls/Tab"
exports: ["QtQuick.Controls/Tab 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "component"
Property { name: "title"; type: "string" }
Property { name: "__inserted"; type: "bool" }
@@ -1481,6 +1770,7 @@ Module {
name: "QtQuick.Controls/TabView"
exports: ["QtQuick.Controls/TabView 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
Property { name: "currentIndex"; type: "int" }
Property { name: "count"; type: "int" }
@@ -1527,29 +1817,8 @@ Module {
name: "QtQuick.Controls/TableView"
exports: ["QtQuick.Controls/TableView 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "__columns"
- Property { name: "frameVisible"; type: "bool" }
- Property { name: "highlightOnFocus"; type: "bool" }
- Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
- Property { name: "__scroller"; type: "QQuickItem"; isPointer: true }
- Property { name: "__scrollBarTopMargin"; type: "int" }
- Property { name: "__viewTopMargin"; type: "int" }
- Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_0"; isPointer: true }
- Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
- Property {
- name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_51"
- isReadonly: true
- isPointer: true
- }
- Property {
- name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_51"
- isReadonly: true
- isPointer: true
- }
Property { name: "alternatingRowColors"; type: "bool" }
Property { name: "headerVisible"; type: "bool" }
Property { name: "itemDelegate"; type: "QQmlComponent"; isPointer: true }
@@ -1558,6 +1827,7 @@ Module {
Property { name: "sortIndicatorColumn"; type: "int" }
Property { name: "sortIndicatorVisible"; type: "bool" }
Property { name: "sortIndicatorOrder"; type: "int" }
+ Property { name: "selectionMode"; type: "int" }
Property { name: "__activateItemOnSingleClick"; type: "bool" }
Property { name: "model"; type: "QVariant" }
Property { name: "backgroundVisible"; type: "bool" }
@@ -1569,6 +1839,13 @@ Module {
Property { name: "section"; type: "QQuickViewSection"; isReadonly: true; isPointer: true }
Property { name: "currentRow"; type: "int" }
Property { name: "__currentRowItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "__listView"; type: "QQuickListView"; isReadonly: true; isPointer: true }
+ Property {
+ name: "selection"
+ type: "TableViewSelection_QMLTYPE_183"
+ isReadonly: true
+ isPointer: true
+ }
Signal {
name: "activated"
Parameter { name: "row"; type: "int" }
@@ -1620,15 +1897,41 @@ Module {
type: "QVariant"
Parameter { name: "index"; type: "QVariant" }
}
+ Method { name: "resizeColumnsToContents"; type: "QVariant" }
Method { name: "__decrementCurrentIndex"; type: "QVariant" }
Method { name: "__incrementCurrentIndex"; type: "QVariant" }
+ Property { name: "frameVisible"; type: "bool" }
+ Property { name: "highlightOnFocus"; type: "bool" }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__scroller"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__scrollBarTopMargin"; type: "int" }
+ Property { name: "__viewTopMargin"; type: "int" }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_0"; isPointer: true }
+ Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
+ Property { name: "__wheelAreaScrollSpeed"; type: "double" }
+ Property {
+ name: "__horizontalScrollBar"
+ type: "ScrollBar_QMLTYPE_17"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_17"
+ isReadonly: true
+ isPointer: true
+ }
}
Component {
prototype: "QObject"
name: "QtQuick.Controls/TableViewColumn"
exports: ["QtQuick.Controls/TableViewColumn 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
Property { name: "__view"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__index"; type: "int" }
Property { name: "title"; type: "string" }
Property { name: "role"; type: "string" }
Property { name: "width"; type: "int" }
@@ -1638,35 +1941,15 @@ Module {
Property { name: "elideMode"; type: "int" }
Property { name: "horizontalAlignment"; type: "int" }
Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
+ Method { name: "resizeToContents"; type: "QVariant" }
}
Component {
prototype: "QQuickFocusScope"
name: "QtQuick.Controls/TextArea"
exports: ["QtQuick.Controls/TextArea 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
- Property { name: "frameVisible"; type: "bool" }
- Property { name: "highlightOnFocus"; type: "bool" }
- Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
- Property { name: "__scroller"; type: "QQuickItem"; isPointer: true }
- Property { name: "__scrollBarTopMargin"; type: "int" }
- Property { name: "__viewTopMargin"; type: "int" }
- Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_0"; isPointer: true }
- Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
- Property {
- name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_51"
- isReadonly: true
- isPointer: true
- }
- Property {
- name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_51"
- isReadonly: true
- isPointer: true
- }
Property { name: "tabChangesFocus"; type: "bool" }
Property { name: "activeFocusOnPress"; type: "bool" }
Property { name: "baseUrl"; type: "QUrl" }
@@ -1770,18 +2053,37 @@ Module {
Method { name: "selectAll"; type: "QVariant" }
Method { name: "selectWord"; type: "QVariant" }
Method { name: "undo"; type: "QVariant" }
+ Property { name: "frameVisible"; type: "bool" }
+ Property { name: "highlightOnFocus"; type: "bool" }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__scroller"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__scrollBarTopMargin"; type: "int" }
+ Property { name: "__viewTopMargin"; type: "int" }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_0"; isPointer: true }
+ Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "flickableItem"; type: "QQuickFlickable"; isReadonly: true; isPointer: true }
+ Property { name: "__wheelAreaScrollSpeed"; type: "double" }
+ Property {
+ name: "__horizontalScrollBar"
+ type: "ScrollBar_QMLTYPE_17"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_17"
+ isReadonly: true
+ isPointer: true
+ }
}
Component {
prototype: "QQuickFocusScope"
name: "QtQuick.Controls/TextField"
exports: ["QtQuick.Controls/TextField 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
- Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "QObject"; isPointer: true }
- Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
- Property { name: "styleHints"; type: "QVariant" }
- Property { name: "__styleData"; type: "QObject"; isPointer: true }
Property { name: "acceptableInput"; type: "bool"; isReadonly: true }
Property { name: "activeFocusOnPress"; type: "bool" }
Property { name: "canPaste"; type: "bool"; isReadonly: true }
@@ -1809,7 +2111,9 @@ Module {
Property { name: "hovered"; type: "bool"; isReadonly: true }
Property { name: "__contentHeight"; type: "double"; isReadonly: true }
Property { name: "__contentWidth"; type: "double"; isReadonly: true }
+ Property { name: "__baselineOffset"; type: "double" }
Signal { name: "accepted" }
+ Signal { name: "editingFinished" }
Method { name: "copy"; type: "QVariant" }
Method { name: "cut"; type: "QVariant" }
Method { name: "deselect"; type: "QVariant" }
@@ -1842,12 +2146,18 @@ Module {
Method { name: "selectAll"; type: "QVariant" }
Method { name: "selectWord"; type: "QVariant" }
Method { name: "undo"; type: "QVariant" }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
}
Component {
- prototype: "QQuickItem"
+ prototype: "QQuickFocusScope"
name: "QtQuick.Controls/ToolBar"
exports: ["QtQuick.Controls/ToolBar 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "__content"
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
@@ -1859,7 +2169,10 @@ Module {
name: "QtQuick.Controls/ToolButton"
exports: ["QtQuick.Controls/ToolButton 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
defaultProperty: "data"
+ Property { name: "isDefault"; type: "bool" }
+ Property { name: "menu"; type: "Menu_QMLTYPE_43"; isPointer: true }
Property { name: "checkable"; type: "bool" }
Property { name: "checked"; type: "bool" }
Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
diff --git a/src/controls/qquickmenu.cpp b/src/controls/qquickmenu.cpp
index bb4c79b6..8982b46c 100644
--- a/src/controls/qquickmenu.cpp
+++ b/src/controls/qquickmenu.cpp
@@ -268,6 +268,9 @@ QQuickMenu::~QQuickMenu()
item->setParentMenu(0);
}
+ if (platformItem())
+ platformItem()->setMenu(0);
+
delete m_platformMenu;
m_platformMenu = 0;
}
diff --git a/src/controls/qquickmenupopupwindow.cpp b/src/controls/qquickmenupopupwindow.cpp
index ec33b0c1..6a2a03bc 100644
--- a/src/controls/qquickmenupopupwindow.cpp
+++ b/src/controls/qquickmenupopupwindow.cpp
@@ -45,6 +45,7 @@
#include <qpa/qwindowsysteminterface.h>
#include <qquickitem.h>
#include <QtGui/QScreen>
+#include <QtQuick/private/qquickrendercontrol_p.h>
QT_BEGIN_NAMESPACE
@@ -84,8 +85,10 @@ void QQuickMenuPopupWindow::setItemAt(QQuickItem *menuItem)
void QQuickMenuPopupWindow::setParentWindow(QQuickWindow *parentWindow)
{
- if (transientParent() != parentWindow)
- setTransientParent(parentWindow);
+ QWindow *proxyWindow = QQuickRenderControl::renderWindowFor(parentWindow);
+ QWindow *renderWindow = proxyWindow ? proxyWindow : parentWindow;
+ if (transientParent() != renderWindow)
+ setTransientParent(renderWindow);
if (parentWindow) {
connect(parentWindow, SIGNAL(destroyed()), this, SLOT(dismissPopup()));
if (QQuickMenuPopupWindow *pw = qobject_cast<QQuickMenuPopupWindow *>(parentWindow))
diff --git a/src/controls/qquickpopupwindow.cpp b/src/controls/qquickpopupwindow.cpp
index a9e85ff3..56f4c351 100644
--- a/src/controls/qquickpopupwindow.cpp
+++ b/src/controls/qquickpopupwindow.cpp
@@ -44,6 +44,7 @@
#include <qguiapplication.h>
#include <qpa/qwindowsysteminterface.h>
#include <QtQuick/qquickitem.h>
+#include <QtQuick/private/qquickrendercontrol_p.h>
QT_BEGIN_NAMESPACE
@@ -84,6 +85,19 @@ void QQuickPopupWindow::show()
posx += parentWindow->geometry().left();
posy += parentWindow->geometry().top();
}
+ } else if (m_parentItem && m_parentItem->window()) {
+ QPoint offset;
+ QQuickWindow *quickWindow = m_parentItem->window();
+ QWindow *renderWindow = QQuickRenderControl::renderWindowFor(quickWindow, &offset);
+
+ QPointF pos = m_parentItem->mapToItem(quickWindow->contentItem(), QPointF(posx, posy));
+ posx = pos.x();
+ posy = pos.y();
+ if (renderWindow) {
+ QPoint parentWindowOffset = renderWindow->mapToGlobal(QPoint());
+ posx += offset.x() + parentWindowOffset.x();
+ posy += offset.y() + parentWindowOffset.y();
+ }
}
if (m_contentItem) {
@@ -95,11 +109,15 @@ void QQuickPopupWindow::show()
}
emit geometryChanged();
- if (!qobject_cast<QQuickPopupWindow *>(transientParent())) // No need for parent menu windows
- if (QQuickWindow *w = qobject_cast<QQuickWindow *>(transientParent()))
+ if (!qobject_cast<QQuickPopupWindow *>(transientParent())) { // No need for parent menu windows
+ if (QQuickWindow *w = qobject_cast<QQuickWindow *>(transientParent())) {
if (QQuickItem *mg = w->mouseGrabberItem())
mg->ungrabMouse();
-
+ } else if (m_parentItem && m_parentItem->window()) {
+ if (QQuickItem *mg = m_parentItem->window()->mouseGrabberItem())
+ mg->ungrabMouse();
+ }
+ }
QQuickWindow::show();
setMouseGrabEnabled(true); // Needs to be done after calling show()
setKeyboardGrabEnabled(true);
diff --git a/src/dialogs/DefaultDialogWrapper.qml b/src/dialogs/DefaultDialogWrapper.qml
index 0771bdb9..9f295914 100644
--- a/src/dialogs/DefaultDialogWrapper.qml
+++ b/src/dialogs/DefaultDialogWrapper.qml
@@ -47,19 +47,19 @@ import "qml"
AbstractDialog {
id: root
- default property alias data: contentItem.data
+ default property alias data: defaultContentItem.data
Rectangle {
id: content
property real spacing: 6
property real outerSpacing: 12
property real buttonsRowImplicitWidth: minimumWidth
- property bool buttonsInSingleRow: contentItem.width >= buttonsRowImplicitWidth
+ property bool buttonsInSingleRow: defaultContentItem.width >= buttonsRowImplicitWidth
property real minimumHeight: implicitHeight
property real minimumWidth: Screen.pixelDensity * 50
- implicitHeight: contentItem.implicitHeight + spacing + outerSpacing * 2 + buttonsRight.implicitHeight
+ implicitHeight: defaultContentItem.implicitHeight + spacing + outerSpacing * 2 + buttonsRight.implicitHeight
implicitWidth: Math.min(Screen.desktopAvailableWidth * 0.9, Math.max(
- contentItem.implicitWidth, buttonsRowImplicitWidth, Screen.pixelDensity * 50) + outerSpacing * 2);
+ defaultContentItem.implicitWidth, buttonsRowImplicitWidth, Screen.pixelDensity * 50) + outerSpacing * 2);
color: palette.window
focus: root.visible
Keys.onPressed: {
@@ -81,7 +81,7 @@ AbstractDialog {
SystemPalette { id: palette }
Item {
- id: contentItem
+ id: defaultContentItem
anchors {
left: parent.left
right: parent.right
@@ -101,10 +101,10 @@ AbstractDialog {
}
Repeater {
- model: standardButtonsLeftModel
+ id: buttonsLeftRepeater
Button {
- text: standardButtonsLeftModel[index].text
- onClicked: root.click(standardButtonsLeftModel[index].standardButton)
+ text: (buttonsLeftRepeater.model && buttonsLeftRepeater.model[index] ? buttonsLeftRepeater.model[index].text : index)
+ onClicked: root.click(buttonsLeftRepeater.model[index].standardButton)
}
}
@@ -127,17 +127,19 @@ AbstractDialog {
}
Repeater {
- model: standardButtonsRightModel
+ id: buttonsRightRepeater
// TODO maybe: insert gaps if the button requires it (destructive buttons only)
Button {
- text: standardButtonsRightModel[index].text
- onClicked: root.click(standardButtonsRightModel[index].standardButton)
+ text: (buttonsRightRepeater.model && buttonsRightRepeater.model[index] ? buttonsRightRepeater.model[index].text : index)
+ onClicked: root.click(buttonsRightRepeater.model[index].standardButton)
}
}
}
}
- function calculateImplicitWidth() {
- if (standardButtonsRightModel.length < 2)
+ function setupButtons() {
+ buttonsLeftRepeater.model = root.__standardButtonsLeftModel()
+ buttonsRightRepeater.model = root.__standardButtonsRightModel()
+ if (!buttonsRightRepeater.model || buttonsRightRepeater.model.length < 2)
return;
var calcWidth = 0;
@@ -157,6 +159,6 @@ AbstractDialog {
calculateForButton(i, buttonsLeft.visibleChildren[i])
content.buttonsRowImplicitWidth = calcWidth + content.spacing
}
- onStandardButtonsChanged: calculateImplicitWidth()
- Component.onCompleted: calculateImplicitWidth()
+ onStandardButtonsChanged: setupButtons()
+ Component.onCompleted: setupButtons()
}
diff --git a/src/dialogs/DefaultFileDialog.qml b/src/dialogs/DefaultFileDialog.qml
index af5d7b0b..7ebd443a 100644
--- a/src/dialogs/DefaultFileDialog.qml
+++ b/src/dialogs/DefaultFileDialog.qml
@@ -316,12 +316,11 @@ AbstractFileDialog {
x: 4
height: parent.height - 2
source: "images/folder.png"
- property var isDir: view.model.get(styleData.row, "fileIsDir")
- visible: isDir !== undefined && isDir
}
Text {
id: pathText
text: styleData.value
+ onTextChanged: fileIcon.visible = view.model.isFolder(styleData.row)
anchors {
left: parent.left
right: parent.right
diff --git a/src/dialogs/plugins.qmltypes b/src/dialogs/plugins.qmltypes
index d5db4b93..1bcebdc3 100644
--- a/src/dialogs/plugins.qmltypes
+++ b/src/dialogs/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.1
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -omit-prefix=__ QtQuick.Dialogs 1.1'
+// 'qmlplugindump -nonrelocatable QtQuick.Dialogs 1.2'
Module {
Component {
@@ -46,6 +46,56 @@ Module {
Component {
name: "QQuickAbstractDialog"
prototype: "QObject"
+ Enum {
+ name: "StandardButton"
+ values: {
+ "NoButton": 0,
+ "Ok": 1024,
+ "Save": 2048,
+ "SaveAll": 4096,
+ "Open": 8192,
+ "Yes": 16384,
+ "YesToAll": 32768,
+ "No": 65536,
+ "NoToAll": 131072,
+ "Abort": 262144,
+ "Retry": 524288,
+ "Ignore": 1048576,
+ "Close": 2097152,
+ "Cancel": 4194304,
+ "Discard": 8388608,
+ "Help": 16777216,
+ "Apply": 33554432,
+ "Reset": 67108864,
+ "RestoreDefaults": 134217728,
+ "NButtons": 134217729
+ }
+ }
+ Enum {
+ name: "StandardButtons"
+ values: {
+ "NoButton": 0,
+ "Ok": 1024,
+ "Save": 2048,
+ "SaveAll": 4096,
+ "Open": 8192,
+ "Yes": 16384,
+ "YesToAll": 32768,
+ "No": 65536,
+ "NoToAll": 131072,
+ "Abort": 262144,
+ "Retry": 524288,
+ "Ignore": 1048576,
+ "Close": 2097152,
+ "Cancel": 4194304,
+ "Discard": 8388608,
+ "Help": 16777216,
+ "Apply": 33554432,
+ "Reset": 67108864,
+ "RestoreDefaults": 134217728,
+ "NButtons": 134217729
+ }
+ }
Property { name: "visible"; type: "bool" }
Property { name: "modality"; type: "Qt::WindowModality" }
Property { name: "title"; type: "string" }
@@ -86,6 +136,8 @@ Module {
Property { name: "folder"; type: "QUrl" }
Property { name: "nameFilters"; type: "QStringList" }
Property { name: "selectedNameFilter"; type: "string" }
+ Property { name: "selectedNameFilterExtensions"; type: "QStringList"; isReadonly: true }
+ Property { name: "selectedNameFilterIndex"; type: "int" }
Property { name: "fileUrl"; type: "QUrl"; isReadonly: true }
Property { name: "fileUrls"; type: "QList<QUrl>"; isReadonly: true }
Signal { name: "filterSelected" }
@@ -123,6 +175,10 @@ Module {
name: "selectNameFilter"
Parameter { name: "f"; type: "string" }
}
+ Method {
+ name: "setSelectedNameFilterIndex"
+ Parameter { name: "idx"; type: "int" }
+ }
}
Component {
name: "QQuickAbstractFontDialog"
@@ -132,6 +188,7 @@ Module {
Property { name: "monospacedFonts"; type: "bool" }
Property { name: "proportionalFonts"; type: "bool" }
Property { name: "font"; type: "QFont" }
+ Property { name: "currentFont"; type: "QFont" }
Signal { name: "selectionAccepted" }
Method {
name: "setVisible"
@@ -150,6 +207,10 @@ Module {
Parameter { name: "arg"; type: "QFont" }
}
Method {
+ name: "setCurrentFont"
+ Parameter { name: "arg"; type: "QFont" }
+ }
+ Method {
name: "setScalableFonts"
Parameter { name: "arg"; type: "bool" }
}
@@ -179,61 +240,17 @@ Module {
"Question": 4
}
}
- Enum {
- name: "StandardButton"
- values: {
- "NoButton": 0,
- "Ok": 1024,
- "Save": 2048,
- "SaveAll": 4096,
- "Open": 8192,
- "Yes": 16384,
- "YesToAll": 32768,
- "No": 65536,
- "NoToAll": 131072,
- "Abort": 262144,
- "Retry": 524288,
- "Ignore": 1048576,
- "Close": 2097152,
- "Cancel": 4194304,
- "Discard": 8388608,
- "Help": 16777216,
- "Apply": 33554432,
- "Reset": 67108864,
- "RestoreDefaults": 134217728
- }
- }
- Enum {
- name: "StandardButtons"
- values: {
- "NoButton": 0,
- "Ok": 1024,
- "Save": 2048,
- "SaveAll": 4096,
- "Open": 8192,
- "Yes": 16384,
- "YesToAll": 32768,
- "No": 65536,
- "NoToAll": 131072,
- "Abort": 262144,
- "Retry": 524288,
- "Ignore": 1048576,
- "Close": 2097152,
- "Cancel": 4194304,
- "Discard": 8388608,
- "Help": 16777216,
- "Apply": 33554432,
- "Reset": 67108864,
- "RestoreDefaults": 134217728
- }
- }
Property { name: "text"; type: "string" }
Property { name: "informativeText"; type: "string" }
Property { name: "detailedText"; type: "string" }
Property { name: "icon"; type: "Icon" }
Property { name: "standardIconSource"; type: "QUrl"; isReadonly: true }
- Property { name: "standardButtons"; type: "StandardButtons" }
- Property { name: "clickedButton"; type: "StandardButton"; isReadonly: true }
+ Property { name: "standardButtons"; type: "QQuickAbstractDialog::StandardButtons" }
+ Property {
+ name: "clickedButton"
+ type: "QQuickAbstractDialog::StandardButton"
+ isReadonly: true
+ }
Signal { name: "buttonClicked" }
Signal { name: "discard" }
Signal { name: "help" }
@@ -271,29 +288,61 @@ Module {
}
Method {
name: "click"
- Parameter { name: "button"; type: "QMessageDialogOptions::StandardButton" }
- Parameter { type: "QMessageDialogOptions::ButtonRole" }
- }
- Method {
- name: "click"
- Parameter { name: "button"; type: "QQuickAbstractMessageDialog::StandardButton" }
+ Parameter { name: "button"; type: "QQuickAbstractDialog::StandardButton" }
}
}
Component {
name: "QQuickColorDialog"
- defaultProperty: "implementation"
+ defaultProperty: "contentItem"
prototype: "QQuickAbstractColorDialog"
exports: ["QtQuick.Dialogs/AbstractColorDialog 1.0"]
exportMetaObjectRevisions: [0]
- Property { name: "implementation"; type: "QObject"; isPointer: true }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ }
+ Component {
+ name: "QQuickDialog"
+ defaultProperty: "contentItem"
+ prototype: "QQuickAbstractDialog"
+ exports: ["QtQuick.Dialogs/AbstractDialog 1.2"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "title"; type: "string" }
+ Property { name: "standardButtons"; type: "QQuickAbstractDialog::StandardButtons" }
+ Property {
+ name: "clickedButton"
+ type: "QQuickAbstractDialog::StandardButton"
+ isReadonly: true
+ }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Signal { name: "buttonClicked" }
+ Signal { name: "discard" }
+ Signal { name: "help" }
+ Signal { name: "yes" }
+ Signal { name: "no" }
+ Signal { name: "apply" }
+ Signal { name: "reset" }
+ Method {
+ name: "setTitle"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setStandardButtons"
+ Parameter { name: "buttons"; type: "StandardButtons" }
+ }
+ Method {
+ name: "click"
+ Parameter { name: "button"; type: "QQuickAbstractDialog::StandardButton" }
+ }
+ Method { name: "__standardButtonsLeftModel"; type: "QJSValue" }
+ Method { name: "__standardButtonsRightModel"; type: "QJSValue" }
}
Component {
name: "QQuickFileDialog"
- defaultProperty: "implementation"
+ defaultProperty: "contentItem"
prototype: "QQuickAbstractFileDialog"
exports: ["QtQuick.Dialogs/AbstractFileDialog 1.0"]
exportMetaObjectRevisions: [0]
- Property { name: "implementation"; type: "QObject"; isPointer: true }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "shortcuts"; type: "QJSValue"; isReadonly: true }
Method { name: "clearSelection" }
Method {
name: "addSelection"
@@ -303,28 +352,30 @@ Module {
}
Component {
name: "QQuickFontDialog"
- defaultProperty: "implementation"
+ defaultProperty: "contentItem"
prototype: "QQuickAbstractFontDialog"
exports: ["QtQuick.Dialogs/AbstractFontDialog 1.1"]
exportMetaObjectRevisions: [0]
- Property { name: "implementation"; type: "QObject"; isPointer: true }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
}
Component {
name: "QQuickMessageDialog"
- defaultProperty: "implementation"
+ defaultProperty: "contentItem"
prototype: "QQuickAbstractMessageDialog"
exports: ["QtQuick.Dialogs/AbstractMessageDialog 1.1"]
exportMetaObjectRevisions: [0]
- Property { name: "implementation"; type: "QObject"; isPointer: true }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
}
Component {
name: "QQuickStandardButton"
exports: ["QtQuick.Dialogs/StandardButton 1.1"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
}
Component {
name: "QQuickStandardIcon"
exports: ["QtQuick.Dialogs/StandardIcon 1.1"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
}
Component {
@@ -332,7 +383,11 @@ Module {
name: "QtQuick.Dialogs/ColorDialog"
exports: ["QtQuick.Dialogs/ColorDialog 1.0"]
exportMetaObjectRevisions: [0]
- defaultProperty: "implementation"
+ isComposite: true
+ defaultProperty: "contentItem"
+ Property { name: "__valueSet"; type: "bool" }
+ Method { name: "__setControlsFromColor"; type: "QVariant" }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
Property { name: "showAlphaChannel"; type: "bool" }
Property { name: "color"; type: "QColor" }
Property { name: "currentColor"; type: "QColor" }
@@ -395,17 +450,47 @@ Module {
name: "setHeight"
Parameter { name: "arg"; type: "int" }
}
- Property { name: "implementation"; type: "QObject"; isPointer: true }
}
Component {
prototype: "QObject"
- name: "QtQuick.Dialogs/FileDialog"
- exports: ["QtQuick.Dialogs/FileDialog 1.0"]
- exportMetaObjectRevisions: [0]
- defaultProperty: "implementation"
+ name: "QtQuick.Dialogs/Dialog"
+ exports: ["QtQuick.Dialogs/Dialog 1.2"]
+ exportMetaObjectRevisions: [2]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Method { name: "setupButtons"; type: "QVariant" }
+ Property { name: "title"; type: "string" }
+ Property { name: "standardButtons"; type: "QQuickAbstractDialog::StandardButtons" }
+ Property {
+ name: "clickedButton"
+ type: "QQuickAbstractDialog::StandardButton"
+ isReadonly: true
+ }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Signal { name: "buttonClicked" }
+ Signal { name: "discard" }
+ Signal { name: "help" }
+ Signal { name: "yes" }
+ Signal { name: "no" }
+ Signal { name: "apply" }
+ Signal { name: "reset" }
+ Method {
+ name: "setTitle"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setStandardButtons"
+ Parameter { name: "buttons"; type: "StandardButtons" }
+ }
+ Method {
+ name: "click"
+ Parameter { name: "button"; type: "QQuickAbstractDialog::StandardButton" }
+ }
+ Method { name: "__standardButtonsLeftModel"; type: "QJSValue" }
+ Method { name: "__standardButtonsRightModel"; type: "QJSValue" }
Property { name: "visible"; type: "bool" }
Property { name: "modality"; type: "Qt::WindowModality" }
- Property { name: "title"; type: "string" }
Property { name: "isWindow"; type: "bool"; isReadonly: true }
Property { name: "x"; type: "int" }
Property { name: "y"; type: "int" }
@@ -433,12 +518,42 @@ Module {
name: "setHeight"
Parameter { name: "arg"; type: "int" }
}
+ }
+ Component {
+ prototype: "QObject"
+ name: "QtQuick.Dialogs/FileDialog"
+ exports: ["QtQuick.Dialogs/FileDialog 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentItem"
+ Property { name: "settings"; type: "QQmlSettings"; isPointer: true }
+ Property { name: "showFocusHighlight"; type: "bool" }
+ Property { name: "palette"; type: "QQuickSystemPalette"; isPointer: true }
+ Property { name: "dirUpAction"; type: "QQuickAction"; isPointer: true }
+ Property { name: "favoriteFolders"; type: "QVariant" }
+ Method {
+ name: "dirDown"
+ type: "QVariant"
+ Parameter { name: "path"; type: "QVariant" }
+ }
+ Method { name: "dirUp"; type: "QVariant" }
+ Method { name: "acceptSelection"; type: "QVariant" }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "shortcuts"; type: "QJSValue"; isReadonly: true }
+ Method { name: "clearSelection" }
+ Method {
+ name: "addSelection"
+ type: "bool"
+ Parameter { name: "path"; type: "QUrl" }
+ }
Property { name: "selectExisting"; type: "bool" }
Property { name: "selectMultiple"; type: "bool" }
Property { name: "selectFolder"; type: "bool" }
Property { name: "folder"; type: "QUrl" }
Property { name: "nameFilters"; type: "QStringList" }
Property { name: "selectedNameFilter"; type: "string" }
+ Property { name: "selectedNameFilterExtensions"; type: "QStringList"; isReadonly: true }
+ Property { name: "selectedNameFilterIndex"; type: "int" }
Property { name: "fileUrl"; type: "QUrl"; isReadonly: true }
Property { name: "fileUrls"; type: "QList<QUrl>"; isReadonly: true }
Signal { name: "filterSelected" }
@@ -476,21 +591,10 @@ Module {
name: "selectNameFilter"
Parameter { name: "f"; type: "string" }
}
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- Method { name: "clearSelection" }
Method {
- name: "addSelection"
- type: "bool"
- Parameter { name: "path"; type: "QUrl" }
+ name: "setSelectedNameFilterIndex"
+ Parameter { name: "idx"; type: "int" }
}
- }
- Component {
- prototype: "QObject"
- name: "QtQuick.Dialogs/FontDialog"
- exports: ["QtQuick.Dialogs/FontDialog 1.1"]
- exportMetaObjectRevisions: [1]
- defaultProperty: "implementation"
- Property { name: "font"; type: "QFont" }
Property { name: "visible"; type: "bool" }
Property { name: "modality"; type: "Qt::WindowModality" }
Property { name: "title"; type: "string" }
@@ -521,11 +625,21 @@ Module {
name: "setHeight"
Parameter { name: "arg"; type: "int" }
}
+ }
+ Component {
+ prototype: "QObject"
+ name: "QtQuick.Dialogs/FontDialog"
+ exports: ["QtQuick.Dialogs/FontDialog 1.1"]
+ exportMetaObjectRevisions: [1]
+ isComposite: true
+ defaultProperty: "contentItem"
+ Property { name: "font"; type: "QFont" }
+ Property { name: "currentFont"; type: "QFont" }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
Property { name: "scalableFonts"; type: "bool" }
Property { name: "nonScalableFonts"; type: "bool" }
Property { name: "monospacedFonts"; type: "bool" }
Property { name: "proportionalFonts"; type: "bool" }
- Property { name: "font"; type: "QFont" }
Signal { name: "selectionAccepted" }
Method {
name: "setVisible"
@@ -544,6 +658,10 @@ Module {
Parameter { name: "arg"; type: "QFont" }
}
Method {
+ name: "setCurrentFont"
+ Parameter { name: "arg"; type: "QFont" }
+ }
+ Method {
name: "setScalableFonts"
Parameter { name: "arg"; type: "bool" }
}
@@ -559,15 +677,6 @@ Module {
name: "setProportionalFonts"
Parameter { name: "arg"; type: "bool" }
}
- Property { name: "implementation"; type: "QObject"; isPointer: true }
- }
- Component {
- prototype: "QObject"
- name: "QtQuick.Dialogs/MessageDialog"
- exports: ["QtQuick.Dialogs/MessageDialog 1.1"]
- exportMetaObjectRevisions: [1]
- defaultProperty: "implementation"
- Method { name: "calculateImplicitWidth"; type: "QVariant" }
Property { name: "visible"; type: "bool" }
Property { name: "modality"; type: "Qt::WindowModality" }
Property { name: "title"; type: "string" }
@@ -598,13 +707,27 @@ Module {
name: "setHeight"
Parameter { name: "arg"; type: "int" }
}
+ }
+ Component {
+ prototype: "QObject"
+ name: "QtQuick.Dialogs/MessageDialog"
+ exports: ["QtQuick.Dialogs/MessageDialog 1.1"]
+ exportMetaObjectRevisions: [1]
+ isComposite: true
+ defaultProperty: "contentItem"
+ Method { name: "calculateImplicitWidth"; type: "QVariant" }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
Property { name: "text"; type: "string" }
Property { name: "informativeText"; type: "string" }
Property { name: "detailedText"; type: "string" }
Property { name: "icon"; type: "Icon" }
Property { name: "standardIconSource"; type: "QUrl"; isReadonly: true }
- Property { name: "standardButtons"; type: "StandardButtons" }
- Property { name: "clickedButton"; type: "StandardButton"; isReadonly: true }
+ Property { name: "standardButtons"; type: "QQuickAbstractDialog::StandardButtons" }
+ Property {
+ name: "clickedButton"
+ type: "QQuickAbstractDialog::StandardButton"
+ isReadonly: true
+ }
Signal { name: "buttonClicked" }
Signal { name: "discard" }
Signal { name: "help" }
@@ -642,13 +765,37 @@ Module {
}
Method {
name: "click"
- Parameter { name: "button"; type: "QMessageDialogOptions::StandardButton" }
- Parameter { type: "QMessageDialogOptions::ButtonRole" }
+ Parameter { name: "button"; type: "QQuickAbstractDialog::StandardButton" }
+ }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "modality"; type: "Qt::WindowModality" }
+ Property { name: "title"; type: "string" }
+ Property { name: "isWindow"; type: "bool"; isReadonly: true }
+ Property { name: "x"; type: "int" }
+ Property { name: "y"; type: "int" }
+ Property { name: "width"; type: "int" }
+ Property { name: "height"; type: "int" }
+ Signal { name: "visibilityChanged" }
+ Signal { name: "geometryChanged" }
+ Signal { name: "accepted" }
+ Signal { name: "rejected" }
+ Method { name: "open" }
+ Method { name: "close" }
+ Method {
+ name: "setX"
+ Parameter { name: "arg"; type: "int" }
}
Method {
- name: "click"
- Parameter { name: "button"; type: "QQuickAbstractMessageDialog::StandardButton" }
+ name: "setY"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setWidth"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setHeight"
+ Parameter { name: "arg"; type: "int" }
}
- Property { name: "implementation"; type: "QObject"; isPointer: true }
}
}
diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp
index 62d59c19..005d1015 100644
--- a/src/dialogs/qquickabstractdialog.cpp
+++ b/src/dialogs/qquickabstractdialog.cpp
@@ -57,9 +57,8 @@ QQuickAbstractDialog::QQuickAbstractDialog(QObject *parent)
, m_parentWindow(0)
, m_visible(false)
, m_modality(Qt::WindowModal)
- , m_qmlImplementation(0)
- , m_dialogWindow(0)
, m_contentItem(0)
+ , m_dialogWindow(0)
, m_windowDecoration(0)
, m_hasNativeWindows(QGuiApplicationPrivate::platformIntegration()->
hasCapability(QPlatformIntegration::MultipleWindows) &&
@@ -87,71 +86,64 @@ void QQuickAbstractDialog::setVisible(bool v)
helper()->hide();
}
} else {
- // For a pure QML implementation, there is no helper.
- // But m_implementation is probably either an Item or a Window at this point.
- if (!m_dialogWindow) {
- m_dialogWindow = qobject_cast<QWindow *>(m_qmlImplementation);
- if (!m_dialogWindow) {
- m_contentItem = qobject_cast<QQuickItem *>(m_qmlImplementation);
- if (m_contentItem) {
- if (m_hasNativeWindows)
- m_dialogWindow = m_contentItem->window();
- // An Item-based dialog implementation doesn't come with a window, so
- // we have to instantiate one iff the platform allows it.
- if (!m_dialogWindow && m_hasNativeWindows) {
- QQuickWindow *win = new QQuickWindow;
- ((QObject *)win)->setParent(this); // memory management only
- m_dialogWindow = win;
- m_contentItem->setParentItem(win->contentItem());
- QSize minSize = QSize(m_contentItem->implicitWidth(), m_contentItem->implicitHeight());
- QVariant minHeight = m_contentItem->property("minimumHeight");
- if (minHeight.isValid()) {
- if (minHeight.toInt() > minSize.height())
- minSize.setHeight(minHeight.toDouble());
- connect(m_contentItem, SIGNAL(minimumHeightChanged()), this, SLOT(minimumHeightChanged()));
- }
- QVariant minWidth = m_contentItem->property("minimumWidth");
- if (minWidth.isValid()) {
- if (minWidth.toInt() > minSize.width())
- minSize.setWidth(minWidth.toInt());
- connect(m_contentItem, SIGNAL(minimumWidthChanged()), this, SLOT(minimumWidthChanged()));
- }
- m_dialogWindow->setMinimumSize(minSize);
- connect(win, SIGNAL(widthChanged(int)), this, SLOT(windowGeometryChanged()));
- connect(win, SIGNAL(heightChanged(int)), this, SLOT(windowGeometryChanged()));
- }
+ // Pure QML implementation: wrap the contentItem in a window, or fake it
+ if (!m_dialogWindow && m_contentItem) {
+ if (m_hasNativeWindows)
+ m_dialogWindow = m_contentItem->window();
+ // An Item-based dialog implementation doesn't come with a window, so
+ // we have to instantiate one iff the platform allows it.
+ if (!m_dialogWindow && m_hasNativeWindows) {
+ QQuickWindow *win = new QQuickWindow;
+ ((QObject *)win)->setParent(this); // memory management only
+ m_dialogWindow = win;
+ m_contentItem->setParentItem(win->contentItem());
+ QSize minSize = QSize(m_contentItem->implicitWidth(), m_contentItem->implicitHeight());
+ QVariant minHeight = m_contentItem->property("minimumHeight");
+ if (minHeight.isValid()) {
+ if (minHeight.toInt() > minSize.height())
+ minSize.setHeight(minHeight.toDouble());
+ connect(m_contentItem, SIGNAL(minimumHeightChanged()), this, SLOT(minimumHeightChanged()));
+ }
+ QVariant minWidth = m_contentItem->property("minimumWidth");
+ if (minWidth.isValid()) {
+ if (minWidth.toInt() > minSize.width())
+ minSize.setWidth(minWidth.toInt());
+ connect(m_contentItem, SIGNAL(minimumWidthChanged()), this, SLOT(minimumWidthChanged()));
+ }
+ m_dialogWindow->setMinimumSize(minSize);
+ connect(win, SIGNAL(widthChanged(int)), this, SLOT(windowGeometryChanged()));
+ connect(win, SIGNAL(heightChanged(int)), this, SLOT(windowGeometryChanged()));
+ }
- QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
+ QQuickItem *parentItem = qobject_cast<QQuickItem *>(parent());
- // If the platform does not support multiple windows, but the dialog is
- // implemented as an Item, then try to decorate it as a fake window and make it visible.
- if (parentItem && !m_dialogWindow && !m_windowDecoration) {
- if (m_decorationComponent) {
- if (m_decorationComponent->isLoading())
- connect(m_decorationComponent, SIGNAL(statusChanged(QQmlComponent::Status)),
- this, SLOT(decorationLoaded()));
- else
- decorationLoaded();
- }
- // Window decoration wasn't possible, so just reparent it into the scene
- else {
- m_contentItem->setParentItem(parentItem);
- m_contentItem->setZ(10000);
- }
- }
+ // If the platform does not support multiple windows, but the dialog is
+ // implemented as an Item, then try to decorate it as a fake window and make it visible.
+ if (parentItem && !m_dialogWindow && !m_windowDecoration) {
+ if (m_decorationComponent) {
+ if (m_decorationComponent->isLoading())
+ connect(m_decorationComponent, SIGNAL(statusChanged(QQmlComponent::Status)),
+ this, SLOT(decorationLoaded()));
+ else
+ decorationLoaded();
+ }
+ // Window decoration wasn't possible, so just reparent it into the scene
+ else {
+ m_contentItem->setParentItem(parentItem);
+ m_contentItem->setZ(10000);
}
}
- if (m_dialogWindow) {
- // "grow up" to the size and position expected to achieve
- if (!m_sizeAspiration.isNull()) {
- if (m_hasAspiredPosition)
- m_dialogWindow->setGeometry(m_sizeAspiration);
- else {
- if (m_sizeAspiration.width() > 0)
- m_dialogWindow->setWidth(m_sizeAspiration.width());
- if (m_sizeAspiration.height() > 0)
- m_dialogWindow->setHeight(m_sizeAspiration.height());
- }
+ }
+ if (m_dialogWindow) {
+ // "grow up" to the size and position expected to achieve
+ if (!m_sizeAspiration.isNull()) {
+ if (m_hasAspiredPosition)
+ m_dialogWindow->setGeometry(m_sizeAspiration);
+ else {
+ if (m_sizeAspiration.width() > 0)
+ m_dialogWindow->setWidth(m_sizeAspiration.width());
+ if (m_sizeAspiration.height() > 0)
+ m_dialogWindow->setHeight(m_sizeAspiration.height());
}
connect(m_dialogWindow, SIGNAL(visibleChanged(bool)), this, SLOT(visibleChanged(bool)));
connect(m_dialogWindow, SIGNAL(xChanged(int)), this, SLOT(setX(int)));
@@ -172,7 +164,6 @@ void QQuickAbstractDialog::setVisible(bool v)
m_dialogWindow->setVisible(v);
}
}
-
emit visibilityChanged();
}
@@ -237,10 +228,9 @@ void QQuickAbstractDialog::visibleChanged(bool v)
void QQuickAbstractDialog::windowGeometryChanged()
{
- QQuickItem *content = qobject_cast<QQuickItem*>(m_qmlImplementation);
- if (m_dialogWindow && content) {
- content->setWidth(m_dialogWindow->width());
- content->setHeight(m_dialogWindow->height());
+ if (m_dialogWindow && m_contentItem) {
+ m_contentItem->setWidth(m_dialogWindow->width());
+ m_contentItem->setHeight(m_dialogWindow->height());
}
}
@@ -264,9 +254,9 @@ QQuickWindow *QQuickAbstractDialog::parentWindow()
return m_parentWindow;
}
-void QQuickAbstractDialog::setQmlImplementation(QObject *obj)
+void QQuickAbstractDialog::setContentItem(QQuickItem *obj)
{
- m_qmlImplementation = obj;
+ m_contentItem = obj;
if (m_dialogWindow) {
disconnect(this, SLOT(visibleChanged(bool)));
// Can't necessarily delete because m_dialogWindow might have been provided by the QML.
diff --git a/src/dialogs/qquickabstractdialog_p.h b/src/dialogs/qquickabstractdialog_p.h
index 79283c19..a905b097 100644
--- a/src/dialogs/qquickabstractdialog_p.h
+++ b/src/dialogs/qquickabstractdialog_p.h
@@ -82,7 +82,7 @@ public:
bool isVisible() const { return m_visible; }
Qt::WindowModality modality() const { return m_modality; }
virtual QString title() const = 0;
- QObject* qmlImplementation() { return m_qmlImplementation; }
+ QQuickItem* contentItem() { return m_contentItem; }
int x() const;
int y() const;
@@ -92,7 +92,7 @@ public:
virtual void setVisible(bool v);
virtual void setModality(Qt::WindowModality m);
virtual void setTitle(const QString &t) = 0;
- void setQmlImplementation(QObject* obj);
+ void setContentItem(QQuickItem* obj);
bool isWindow() const { return m_hasNativeWindows; }
enum StandardButton {
@@ -154,9 +154,8 @@ protected:
Qt::WindowModality m_modality;
protected: // variables for pure-QML implementations only
- QObject *m_qmlImplementation;
- QWindow *m_dialogWindow;
QQuickItem *m_contentItem;
+ QWindow *m_dialogWindow;
QQuickItem *m_windowDecoration;
bool m_hasNativeWindows;
QRect m_sizeAspiration;
diff --git a/src/dialogs/qquickcolordialog_p.h b/src/dialogs/qquickcolordialog_p.h
index c6ae69f8..20549459 100644
--- a/src/dialogs/qquickcolordialog_p.h
+++ b/src/dialogs/qquickcolordialog_p.h
@@ -60,8 +60,8 @@ QT_BEGIN_NAMESPACE
class QQuickColorDialog : public QQuickAbstractColorDialog
{
Q_OBJECT
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "implementation") // AbstractColorDialog in QML can have only one child
+ Q_PROPERTY(QQuickItem* contentItem READ contentItem WRITE setContentItem DESIGNABLE false)
+ Q_CLASSINFO("DefaultProperty", "contentItem") // AbstractColorDialog in QML can have only one child
public:
explicit QQuickColorDialog(QObject *parent = 0);
diff --git a/src/dialogs/qquickdialog.cpp b/src/dialogs/qquickdialog.cpp
index 9e726ccd..bed69e7b 100644
--- a/src/dialogs/qquickdialog.cpp
+++ b/src/dialogs/qquickdialog.cpp
@@ -104,13 +104,13 @@ QQuickDialog::~QQuickDialog()
{
}
-QJSValue QQuickDialog::standardButtonsLeftModel()
+QJSValue QQuickDialog::__standardButtonsLeftModel()
{
updateStandardButtons();
return m_standardButtonsLeftModel;
}
-QJSValue QQuickDialog::standardButtonsRightModel()
+QJSValue QQuickDialog::__standardButtonsRightModel()
{
updateStandardButtons();
return m_standardButtonsRightModel;
diff --git a/src/dialogs/qquickdialog_p.h b/src/dialogs/qquickdialog_p.h
index 54718221..d8b95234 100644
--- a/src/dialogs/qquickdialog_p.h
+++ b/src/dialogs/qquickdialog_p.h
@@ -68,10 +68,8 @@ class QQuickDialog : public QQuickAbstractDialog
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
Q_PROPERTY(QQuickAbstractDialog::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged)
Q_PROPERTY(QQuickAbstractDialog::StandardButton clickedButton READ clickedButton NOTIFY buttonClicked)
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
- Q_PROPERTY(QJSValue standardButtonsLeftModel READ standardButtonsLeftModel NOTIFY standardButtonsChanged)
- Q_PROPERTY(QJSValue standardButtonsRightModel READ standardButtonsRightModel NOTIFY standardButtonsChanged)
- Q_CLASSINFO("DefaultProperty", "implementation") // Dialog in QML can have only one child
+ Q_PROPERTY(QQuickItem* contentItem READ contentItem WRITE setContentItem DESIGNABLE false)
+ Q_CLASSINFO("DefaultProperty", "contentItem") // Dialog in QML can have only one child
public:
explicit QQuickDialog(QObject *parent = 0);
@@ -79,8 +77,8 @@ public:
StandardButtons standardButtons() const { return m_enabledButtons; }
StandardButton clickedButton() const { return m_clickedButton; }
- QJSValue standardButtonsLeftModel();
- QJSValue standardButtonsRightModel();
+ Q_INVOKABLE QJSValue __standardButtonsLeftModel();
+ Q_INVOKABLE QJSValue __standardButtonsRightModel();
QString title() const { return m_title; }
diff --git a/src/dialogs/qquickfiledialog_p.h b/src/dialogs/qquickfiledialog_p.h
index 0cfef472..1d2f37ab 100644
--- a/src/dialogs/qquickfiledialog_p.h
+++ b/src/dialogs/qquickfiledialog_p.h
@@ -62,9 +62,9 @@ QT_BEGIN_NAMESPACE
class QQuickFileDialog : public QQuickAbstractFileDialog
{
Q_OBJECT
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
+ Q_PROPERTY(QQuickItem* contentItem READ contentItem WRITE setContentItem DESIGNABLE false)
Q_PROPERTY(QJSValue shortcuts READ shortcuts CONSTANT)
- Q_CLASSINFO("DefaultProperty", "implementation") // AbstractFileDialog in QML can have only one child
+ Q_CLASSINFO("DefaultProperty", "contentItem") // AbstractFileDialog in QML can have only one child
public:
explicit QQuickFileDialog(QObject *parent = 0);
diff --git a/src/dialogs/qquickfontdialog_p.h b/src/dialogs/qquickfontdialog_p.h
index c51e1fd9..a6f2ee4e 100644
--- a/src/dialogs/qquickfontdialog_p.h
+++ b/src/dialogs/qquickfontdialog_p.h
@@ -60,8 +60,8 @@ QT_BEGIN_NAMESPACE
class QQuickFontDialog : public QQuickAbstractFontDialog
{
Q_OBJECT
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "implementation")
+ Q_PROPERTY(QQuickItem* contentItem READ contentItem WRITE setContentItem DESIGNABLE false)
+ Q_CLASSINFO("DefaultProperty", "contentItem")
public:
explicit QQuickFontDialog(QObject *parent = 0);
diff --git a/src/dialogs/qquickmessagedialog_p.h b/src/dialogs/qquickmessagedialog_p.h
index b21d8cba..80a0b04d 100644
--- a/src/dialogs/qquickmessagedialog_p.h
+++ b/src/dialogs/qquickmessagedialog_p.h
@@ -60,8 +60,8 @@ QT_BEGIN_NAMESPACE
class QQuickMessageDialog : public QQuickAbstractMessageDialog
{
Q_OBJECT
- Q_PROPERTY(QObject* implementation READ qmlImplementation WRITE setQmlImplementation DESIGNABLE false)
- Q_CLASSINFO("DefaultProperty", "implementation") // AbstractMessageDialog in QML can have only one child
+ Q_PROPERTY(QQuickItem* contentItem READ contentItem WRITE setContentItem DESIGNABLE false)
+ Q_CLASSINFO("DefaultProperty", "contentItem") // AbstractMessageDialog in QML can have only one child
public:
explicit QQuickMessageDialog(QObject *parent = 0);
diff --git a/src/dialogs/qquickplatformfiledialog.cpp b/src/dialogs/qquickplatformfiledialog.cpp
index 5a969adb..c4a39060 100644
--- a/src/dialogs/qquickplatformfiledialog.cpp
+++ b/src/dialogs/qquickplatformfiledialog.cpp
@@ -264,7 +264,7 @@ QPlatformFileDialogHelper *QQuickPlatformFileDialog::helper()
The value of this property is also updated after the dialog is closed.
- By default, this property is false.
+ By default, the url is empty.
*/
/*!
diff --git a/src/layouts/qquicklinearlayout.cpp b/src/layouts/qquicklinearlayout.cpp
index 4af3a76f..ea772225 100644
--- a/src/layouts/qquicklinearlayout.cpp
+++ b/src/layouts/qquicklinearlayout.cpp
@@ -219,14 +219,14 @@ QSizeF QQuickGridLayoutBase::sizeHint(Qt::SizeHint whichSizeHint) const
\since QtQuick.Layouts 1.1
This property holds the layout direction of the grid layout - it controls whether items are
- laid out from left ro right or right to left. If \c Qt.RightToLeft is specified,
+ laid out from left to right or right to left. If \c Qt.RightToLeft is specified,
left-aligned items will be right-aligned and right-aligned items will be left-aligned.
Possible values:
\list
\li Qt.LeftToRight (default) - Items are laid out from left to right.
- \li Qt.RightToLeft - Items are laid out from right to left
+ \li Qt.RightToLeft - Items are laid out from right to left.
\endlist
\sa RowLayout::layoutDirection, ColumnLayout::layoutDirection
diff --git a/src/widgets/plugins.qmltypes b/src/widgets/plugins.qmltypes
index a67443c5..7265bb05 100644
--- a/src/widgets/plugins.qmltypes
+++ b/src/widgets/plugins.qmltypes
@@ -46,6 +46,56 @@ Module {
Component {
name: "QQuickAbstractDialog"
prototype: "QObject"
+ Enum {
+ name: "StandardButton"
+ values: {
+ "NoButton": 0,
+ "Ok": 1024,
+ "Save": 2048,
+ "SaveAll": 4096,
+ "Open": 8192,
+ "Yes": 16384,
+ "YesToAll": 32768,
+ "No": 65536,
+ "NoToAll": 131072,
+ "Abort": 262144,
+ "Retry": 524288,
+ "Ignore": 1048576,
+ "Close": 2097152,
+ "Cancel": 4194304,
+ "Discard": 8388608,
+ "Help": 16777216,
+ "Apply": 33554432,
+ "Reset": 67108864,
+ "RestoreDefaults": 134217728,
+ "NButtons": 134217729
+ }
+ }
+ Enum {
+ name: "StandardButtons"
+ values: {
+ "NoButton": 0,
+ "Ok": 1024,
+ "Save": 2048,
+ "SaveAll": 4096,
+ "Open": 8192,
+ "Yes": 16384,
+ "YesToAll": 32768,
+ "No": 65536,
+ "NoToAll": 131072,
+ "Abort": 262144,
+ "Retry": 524288,
+ "Ignore": 1048576,
+ "Close": 2097152,
+ "Cancel": 4194304,
+ "Discard": 8388608,
+ "Help": 16777216,
+ "Apply": 33554432,
+ "Reset": 67108864,
+ "RestoreDefaults": 134217728,
+ "NButtons": 134217729
+ }
+ }
Property { name: "visible"; type: "bool" }
Property { name: "modality"; type: "Qt::WindowModality" }
Property { name: "title"; type: "string" }
@@ -86,6 +136,8 @@ Module {
Property { name: "folder"; type: "QUrl" }
Property { name: "nameFilters"; type: "QStringList" }
Property { name: "selectedNameFilter"; type: "string" }
+ Property { name: "selectedNameFilterExtensions"; type: "QStringList"; isReadonly: true }
+ Property { name: "selectedNameFilterIndex"; type: "int" }
Property { name: "fileUrl"; type: "QUrl"; isReadonly: true }
Property { name: "fileUrls"; type: "QList<QUrl>"; isReadonly: true }
Signal { name: "filterSelected" }
@@ -123,6 +175,10 @@ Module {
name: "selectNameFilter"
Parameter { name: "f"; type: "string" }
}
+ Method {
+ name: "setSelectedNameFilterIndex"
+ Parameter { name: "idx"; type: "int" }
+ }
}
Component {
name: "QQuickAbstractFontDialog"
@@ -132,6 +188,7 @@ Module {
Property { name: "monospacedFonts"; type: "bool" }
Property { name: "proportionalFonts"; type: "bool" }
Property { name: "font"; type: "QFont" }
+ Property { name: "currentFont"; type: "QFont" }
Signal { name: "selectionAccepted" }
Method {
name: "setVisible"
@@ -150,6 +207,10 @@ Module {
Parameter { name: "arg"; type: "QFont" }
}
Method {
+ name: "setCurrentFont"
+ Parameter { name: "arg"; type: "QFont" }
+ }
+ Method {
name: "setScalableFonts"
Parameter { name: "arg"; type: "bool" }
}
@@ -181,61 +242,17 @@ Module {
"Question": 4
}
}
- Enum {
- name: "StandardButton"
- values: {
- "NoButton": 0,
- "Ok": 1024,
- "Save": 2048,
- "SaveAll": 4096,
- "Open": 8192,
- "Yes": 16384,
- "YesToAll": 32768,
- "No": 65536,
- "NoToAll": 131072,
- "Abort": 262144,
- "Retry": 524288,
- "Ignore": 1048576,
- "Close": 2097152,
- "Cancel": 4194304,
- "Discard": 8388608,
- "Help": 16777216,
- "Apply": 33554432,
- "Reset": 67108864,
- "RestoreDefaults": 134217728
- }
- }
- Enum {
- name: "StandardButtons"
- values: {
- "NoButton": 0,
- "Ok": 1024,
- "Save": 2048,
- "SaveAll": 4096,
- "Open": 8192,
- "Yes": 16384,
- "YesToAll": 32768,
- "No": 65536,
- "NoToAll": 131072,
- "Abort": 262144,
- "Retry": 524288,
- "Ignore": 1048576,
- "Close": 2097152,
- "Cancel": 4194304,
- "Discard": 8388608,
- "Help": 16777216,
- "Apply": 33554432,
- "Reset": 67108864,
- "RestoreDefaults": 134217728
- }
- }
Property { name: "text"; type: "string" }
Property { name: "informativeText"; type: "string" }
Property { name: "detailedText"; type: "string" }
Property { name: "icon"; type: "Icon" }
Property { name: "standardIconSource"; type: "QUrl"; isReadonly: true }
- Property { name: "standardButtons"; type: "StandardButtons" }
- Property { name: "clickedButton"; type: "StandardButton"; isReadonly: true }
+ Property { name: "standardButtons"; type: "QQuickAbstractDialog::StandardButtons" }
+ Property {
+ name: "clickedButton"
+ type: "QQuickAbstractDialog::StandardButton"
+ isReadonly: true
+ }
Signal { name: "buttonClicked" }
Signal { name: "discard" }
Signal { name: "help" }
@@ -273,12 +290,7 @@ Module {
}
Method {
name: "click"
- Parameter { name: "button"; type: "QMessageDialogOptions::StandardButton" }
- Parameter { type: "QMessageDialogOptions::ButtonRole" }
- }
- Method {
- name: "click"
- Parameter { name: "button"; type: "QQuickAbstractMessageDialog::StandardButton" }
+ Parameter { name: "button"; type: "QQuickAbstractDialog::StandardButton" }
}
}
Component {
diff --git a/tests/auto/controls/controls.pro b/tests/auto/controls/controls.pro
index fedc36c4..1a3b0c0a 100644
--- a/tests/auto/controls/controls.pro
+++ b/tests/auto/controls/controls.pro
@@ -45,6 +45,5 @@ OTHER_FILES += \
$$PWD/data/tst_groupbox.qml \
$$PWD/data/tst_splitview.qml \
$$PWD/data/tst_styles.qml \
- $$PWD/data/tst_layout.qml
-
-win32-msvc2010:contains(QT_CONFIG, angle):CONFIG += insignificant_test # QTBUG-33029
+ $$PWD/data/tst_layout.qml \
+ $$PWD/data/tst_keys.qml
diff --git a/tests/auto/controls/data/tst_calendar.qml b/tests/auto/controls/data/tst_calendar.qml
index 843aed15..f2002844 100644
--- a/tests/auto/controls/data/tst_calendar.qml
+++ b/tests/auto/controls/data/tst_calendar.qml
@@ -642,13 +642,27 @@ Item {
dragTo(x, Math.floor(index / CalendarUtils.daysInAWeek), index, new Date(2014, 1, 24 + x));
}
- // Dragging into the next month should work.
- var firstDateInNextMonth = new Date(2014, 2, 1);
- dragTo(5, 4, 33, firstDateInNextMonth);
+ // Dragging into the next month shouldn't work, as it can lead to
+ // unwanted month changes if moving within a bunch of "next month" cells.
+ // We still emit the signals as usual, though.
+ var oldDate = calendar.selectedDate;
+ mouseMove(calendar, toPixelsX(5), toPixelsY(4), Qt.LeftButton);
+ compare(calendar.selectedDate, oldDate);
+ compare(calendar.__panel.pressedCellIndex, 32);
+ compare(calendar.__panel.hoveredCellIndex, 33);
+ compare(hoveredSignalSpy.count, 1);
+ compare(pressedSignalSpy.count, 1);
+ compare(releasedSignalSpy.count, 0);
+ compare(clickedSignalSpy.count, 0);
+
+ hoveredSignalSpy.clear();
+ pressedSignalSpy.clear();
+ releasedSignalSpy.clear();
+ clickedSignalSpy.clear();
- // Finish the drag.
- mouseRelease(calendar, toPixelsX(5), toPixelsY(0), Qt.LeftButton);
- compare(calendar.selectedDate, firstDateInNextMonth);
+ // Finish the drag over the day in the next month.
+ mouseRelease(calendar, toPixelsX(5), toPixelsY(4), Qt.LeftButton);
+ compare(calendar.selectedDate, oldDate);
compare(calendar.__panel.pressedCellIndex, -1);
compare(hoveredSignalSpy.count, 0);
compare(pressedSignalSpy.count, 0);
@@ -691,49 +705,68 @@ Item {
}
}
- function test_cellRectCalculation() {
+ function ensureGapsBetweenCells(columns, rows, availableWidth, availableHeight, gridLineWidth) {
+ for (var row = 1; row < rows; ++row) {
+ for (var col = 1; col < columns; ++col) {
+ var lastHorizontalRect = CalendarUtils.cellRectAt((row - 1) * columns + col - 1, columns, rows, availableWidth, availableHeight);
+ var thisHorizontalRect = CalendarUtils.cellRectAt((row - 1) * columns + col, columns, rows, availableWidth, availableHeight);
+ compare (lastHorizontalRect.x + lastHorizontalRect.width + gridLineWidth, thisHorizontalRect.x,
+ "No gap for grid line between column " + (col - 1) + " and " + col + " in a grid of " + columns + " columns and " + rows + " rows, "
+ + "with an availableWidth of " + availableWidth + " and availableHeight of " + availableHeight);
+
+ var lastVerticalRect = CalendarUtils.cellRectAt((row - 1) * columns + col - 1, columns, rows, availableWidth, availableHeight);
+ var thisVerticalRect = CalendarUtils.cellRectAt(row * columns + col - 1, columns, rows, availableWidth, availableHeight);
+ compare (lastVerticalRect.y + lastVerticalRect.height + gridLineWidth, thisVerticalRect.y,
+ "No gap for grid line between row " + (row - 1) + " and " + row + " in a grid of " + columns + " columns and " + rows + " rows, "
+ + "with an availableWidth of " + availableWidth + " and availableHeight of " + availableHeight);
+ }
+ }
+ }
+
+ function test_gridlessCellRectCalculation() {
var columns = CalendarUtils.daysInAWeek;
var rows = CalendarUtils.weeksOnACalendarMonth;
+ var gridLineWidth = 0;
// No extra space available.
var availableWidth = 10 * columns;
var availableHeight = 10 * rows;
- var rect = CalendarUtils.cellRectAt(0, columns, rows, availableWidth, availableHeight);
+ var rect = CalendarUtils.cellRectAt(0, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, 0);
compare(rect.y, 0);
compare(rect.width, 10);
compare(rect.height, 10);
- rect = CalendarUtils.cellRectAt(columns - 1, columns, rows, availableWidth, availableHeight);
+ rect = CalendarUtils.cellRectAt(columns - 1, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, (columns - 1) * 10);
compare(rect.y, 0);
compare(rect.width, 10);
compare(rect.height, 10);
- rect = CalendarUtils.cellRectAt(rows * columns - 1, columns, rows, availableWidth, availableHeight);
+ rect = CalendarUtils.cellRectAt(rows * columns - 1, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, (columns - 1) * 10);
compare(rect.y, (rows - 1) * 10);
compare(rect.width, 10);
compare(rect.height, 10);
- ensureNoGapsBetweenCells(columns, rows, availableWidth, availableHeight);
+ ensureNoGapsBetweenCells(columns, rows, availableWidth, availableHeight, gridLineWidth);
// 1 extra pixel of space in both width and height.
availableWidth = 10 * columns + 1;
availableHeight = 10 * rows + 1;
- rect = CalendarUtils.cellRectAt(0, columns, rows, availableWidth, availableHeight);
+ rect = CalendarUtils.cellRectAt(0, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, 0);
compare(rect.y, 0);
compare(rect.width, 10 + 1);
compare(rect.height, 10 + 1);
- rect = CalendarUtils.cellRectAt(columns - 1, columns, rows, availableWidth, availableHeight);
+ rect = CalendarUtils.cellRectAt(columns - 1, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, (columns - 1) * 10 + 1);
compare(rect.y, 0);
compare(rect.width, 10);
compare(rect.height, 10 + 1);
- rect = CalendarUtils.cellRectAt(rows * columns - 1, columns, rows, availableWidth, availableHeight);
+ rect = CalendarUtils.cellRectAt(rows * columns - 1, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, (columns - 1) * 10 + 1);
compare(rect.y, (rows - 1) * 10 + 1);
compare(rect.width, 10);
@@ -744,19 +777,19 @@ Item {
// 6 extra pixels in width, 5 in height.
availableWidth = 10 * columns + 6;
availableHeight = 10 * rows + 5;
- rect = CalendarUtils.cellRectAt(0, columns, rows, availableWidth, availableHeight);
+ rect = CalendarUtils.cellRectAt(0, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, 0);
compare(rect.y, 0);
compare(rect.width, 10 + 1);
compare(rect.height, 10 + 1);
- rect = CalendarUtils.cellRectAt(columns - 1, columns, rows, availableWidth, availableHeight);
+ rect = CalendarUtils.cellRectAt(columns - 1, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, (columns - 1) * 10 + 6);
compare(rect.y, 0);
compare(rect.width, 10);
compare(rect.height, 10 + 1);
- rect = CalendarUtils.cellRectAt(rows * columns - 1, columns, rows, availableWidth, availableHeight);
+ rect = CalendarUtils.cellRectAt(rows * columns - 1, columns, rows, availableWidth, availableHeight, gridLineWidth);
compare(rect.x, (columns - 1) * 10 + 6);
compare(rect.y, (rows - 1) * 10 + 5);
compare(rect.width, 10);
@@ -770,12 +803,54 @@ Item {
for (var i = 0; i < columns; ++i) {
++availableWidth;
- ensureNoGapsBetweenCells(columns, rows, availableWidth, availableHeight);
+ ensureNoGapsBetweenCells(columns, rows, availableWidth, availableHeight, gridLineWidth);
}
for (i = 0; i < columns; ++i) {
++availableHeight;
- ensureNoGapsBetweenCells(columns, rows, availableWidth, availableHeight);
+ ensureNoGapsBetweenCells(columns, rows, availableWidth, availableHeight, gridLineWidth);
+ }
+ }
+
+ function test_gridCellRectCalculation() {
+ var columns = CalendarUtils.daysInAWeek;
+ var rows = CalendarUtils.weeksOnACalendarMonth;
+ var gridLineWidth = 1;
+
+ var availableWidth = 10 * columns;
+ var availableHeight = 10 * rows;
+ var expectedXs = [0, 11, 21, 31, 41, 51, 61];
+ var expectedWidths = [10, 9, 9, 9, 9, 9, 9];
+ // Expected y positions and heights actually are the same as the x positions and widths in this case.
+ // The code below assumes that columns >= rows; if this becomes false, arrays for the expected
+ // y positions and heights must be created to avoid out of bounds accesses.
+ for (var row = 0; row < rows; ++row) {
+ for (var col = 0; col < columns; ++col) {
+ var index = row * columns + col;
+ var rect = CalendarUtils.cellRectAt(index, columns, rows, availableWidth, availableHeight, gridLineWidth);
+ compare(rect.x, expectedXs[col]);
+ compare(rect.y, expectedXs[row]);
+ compare(rect.width, expectedWidths[col]);
+ compare(rect.height, expectedWidths[row]);
+ }
+ }
+
+ // The available width and height of a 250x250 calendar (its implicit size).
+ availableWidth = 250;
+ availableHeight = 168;
+ expectedXs = [0, 36, 72, 108, 144, 180, 216];
+ var expectedYs = [0, 29, 57, 85, 113, 141];
+ expectedWidths = [35, 35, 35, 35, 35, 35, 34];
+ var expectedHeights = [28, 27, 27, 27, 27, 27];
+ for (row = 0; row < rows; ++row) {
+ for (col = 0; col < columns; ++col) {
+ index = row * columns + col;
+ rect = CalendarUtils.cellRectAt(index, columns, rows, availableWidth, availableHeight, gridLineWidth);
+ compare(rect.x, expectedXs[col]);
+ compare(rect.y, expectedYs[row]);
+ compare(rect.width, expectedWidths[col]);
+ compare(rect.height, expectedHeights[row]);
+ }
}
}
}
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index 8910a30e..2052e676 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -698,6 +698,20 @@ TestCase {
}
}
+ function test_minusOneToZeroSelection_QTBUG_38036() {
+ var qmlObject = 'import QtQuick.Controls 1.2 ; ComboBox { model: ["A", "B", "C"] }'
+ var comboBox = Qt.createQmlObject(qmlObject, testCase, '');
+ compare(comboBox.currentIndex, 0)
+ compare(comboBox.currentText, "A")
+ comboBox.currentIndex = -1
+ compare(comboBox.currentIndex, -1)
+ compare(comboBox.currentText, "")
+ comboBox.currentIndex = 0
+ compare(comboBox.currentIndex, 0)
+ compare(comboBox.currentText, "A")
+ comboBox.destroy()
+ }
+
function test_keys() {
var component = Qt.createComponent("combobox/cb_keys.qml")
compare(component.status, Component.Ready)
diff --git a/tests/auto/controls/data/tst_keys.qml b/tests/auto/controls/data/tst_keys.qml
new file mode 100644
index 00000000..b1c0ed9c
--- /dev/null
+++ b/tests/auto/controls/data/tst_keys.qml
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.2
+import QtTest 1.0
+
+TestCase {
+ id: testcase
+ name: "Tests_Keys"
+ when: windowShown
+ visible: true
+ width: 400
+ height: 400
+
+ function test_keys_data() {
+ return [
+ // note: test identical Keys behavior for TextInput and TextField
+ {tag:"TextInput", control: "TextInput", properties: "text: '0'"},
+ {tag:"TextField", control: "TextField", properties: "text: '0'"},
+
+ // note: test identical Keys behavior for TextEdit and TextArea
+ {tag:"TextEdit", control: "TextEdit", properties: "text: '0'"},
+ {tag:"TextArea", control: "TextArea", properties: "text: '0'"},
+
+ {tag:"SpinBox", control: "SpinBox", properties: "value: 0"},
+ {tag:"ComboBox", control: "ComboBox", properties: "currentIndex: 0; model: 3; editable: true;"},
+ ]
+ }
+
+ function test_keys(data) {
+ var qml = qsTr("import QtQuick 2.2;\
+ import QtQuick.Controls 1.2;\
+ Item {\
+ id: window;\
+ focus: true;\
+ width: 400; height: 400;\
+ property alias control: control;\
+ property var pressedKeys: [];\
+ property var releasedKeys: [];\
+ Keys.onPressed: { var keys = pressedKeys; keys.push(event.key); pressedKeys = keys; }\
+ Keys.onReleased: { var keys = releasedKeys; keys.push(event.key); releasedKeys = keys; }\
+ %1 {\
+ id: control;\
+ property bool accept: false;
+ property var pressedKeys: [];\
+ property var releasedKeys: [];\
+ Keys.onPressed: { var keys = pressedKeys; keys.push(event.key); pressedKeys = keys; event.accepted = accept; }\
+ Keys.onReleased: { var keys = releasedKeys; keys.push(event.key); releasedKeys = keys; event.accepted = accept; }\
+ %2\
+ }
+ }").arg(data.control).arg(data.properties)
+
+ var window = Qt.createQmlObject(qml, testcase, "")
+
+ verify(window)
+ verify(window.control)
+ waitForRendering(window)
+
+ window.forceActiveFocus()
+ verify(window.activeFocus)
+
+ // check that parent's key events don't end up in the control
+ keyPress(Qt.Key_0)
+ compare(window.pressedKeys, [Qt.Key_0])
+ compare(window.releasedKeys, [])
+ compare(window.control.pressedKeys, [])
+ compare(window.control.releasedKeys, [])
+ keyRelease(Qt.Key_0)
+ compare(window.pressedKeys, [Qt.Key_0])
+ compare(window.releasedKeys, [Qt.Key_0])
+ compare(window.control.pressedKeys, [])
+ compare(window.control.releasedKeys, [])
+
+ var editor = findEditor(window.control)
+ verify(editor)
+ editor.forceActiveFocus()
+ verify(editor.activeFocus)
+ compare(editor.text, "0")
+
+ editor.text = ""
+ window.control.accept = false
+
+ // check that editor's key events end up in the control, but not further.
+ // when a control doesn't accept the event, the editor does handle it.
+ keyPress(Qt.Key_1)
+ compare(window.control.pressedKeys, [Qt.Key_1])
+ compare(window.control.releasedKeys, [])
+ compare(window.pressedKeys, [Qt.Key_0])
+ compare(window.releasedKeys, [Qt.Key_0])
+ keyRelease(Qt.Key_1)
+ compare(window.control.pressedKeys, [Qt.Key_1])
+ // compare(window.control.releasedKeys, [Qt.Key_1]) // QTBUG-38289
+ compare(window.pressedKeys, [Qt.Key_0])
+ // compare(window.releasedKeys, [Qt.Key_0]) // QTBUG-38289
+ compare(editor.text, "1") // editor handled
+
+ editor.text = ""
+ window.control.accept = true
+
+ // check that editor's key events end up in the control, but not further.
+ // when a control accepts the event, the editor doesn't handle it.
+ keyPress(Qt.Key_2)
+ compare(window.control.pressedKeys, [Qt.Key_1, Qt.Key_2])
+ // compare(window.control.releasedKeys, [Qt.Key_1]) // QTBUG-38289
+ compare(window.pressedKeys, [Qt.Key_0])
+ // compare(window.releasedKeys, [Qt.Key_0]) // QTBUG-38289
+ keyRelease(Qt.Key_2)
+ compare(window.control.pressedKeys, [Qt.Key_1, Qt.Key_2])
+ // compare(window.control.releasedKeys, [Qt.Key_1, Qt.Key_2]) // QTBUG-38289
+ compare(window.pressedKeys, [Qt.Key_0])
+ // compare(window.releasedKeys, [Qt.Key_0]) // QTBUG-38289
+ compare(editor.text, "") // editor didn't handle
+
+ window.destroy()
+ }
+
+ function findEditor(parent) {
+ for (var i = 0; i < parent.children.length; ++i) {
+ var child = parent.children[i]
+ var editor = findEditor(child)
+ if (editor)
+ return editor
+ }
+ if (parent.hasOwnProperty("text") && parent.hasOwnProperty("readOnly")
+ && parent.hasOwnProperty("copy") && parent["copy"] instanceof Function
+ && parent.hasOwnProperty("paste") && parent["paste"] instanceof Function)
+ return parent
+ return null
+ }
+}
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index a9f07a8b..c99d2dcd 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -385,6 +385,24 @@ TestCase {
verify(table.selection.contains(8))
}
+ function test_initializedStyleData() {
+ var table = Qt.createQmlObject('import QtQuick.Controls 1.2; \
+ import QtQuick 2.2; \
+ TableView { \
+ model: 3; \
+ TableViewColumn{} \
+ property var items: []; \
+ property var rows: []; \
+ itemDelegate: Item{ Component.onCompleted: { items.push(styleData.row) } } \
+ rowDelegate: Item{ Component.onCompleted: { if (styleData.row !== undefined) rows.push(styleData.row) } } \
+ }'
+ , testCase, '')
+ waitForRendering(table)
+ compare(table.items, [0, 1, 2]);
+ compare(table.rows, [0, 1, 2]);
+ }
+
+
function test_usingcppqobjectmodel() {
var component = Qt.createComponent("tableview/table1_qobjectmodel.qml")
diff --git a/tests/auto/controls/data/tst_tabview.qml b/tests/auto/controls/data/tst_tabview.qml
index b7de67ba..9e556dd1 100644
--- a/tests/auto/controls/data/tst_tabview.qml
+++ b/tests/auto/controls/data/tst_tabview.qml
@@ -84,22 +84,53 @@ TestCase {
function test_addRemoveTab() {
var tabView = Qt.createQmlObject('import QtQuick 2.2; import QtQuick.Controls 1.2; TabView { }', testCase, '');
+
+ function verifyCurrentIndexCountDiff() {
+ verify(!tabView.currentIndex || tabView.count > tabView.currentIndex)
+ }
+ tabView.currentIndexChanged.connect(verifyCurrentIndexCountDiff)
+ tabView.countChanged.connect(verifyCurrentIndexCountDiff)
+
compare(tabView.count, 0)
+ compare(tabView.currentIndex, 0)
tabView.addTab("title 1", newTab)
compare(tabView.count, 1)
+ compare(tabView.currentIndex, 0)
tabView.addTab("title 2", newTab)
compare(tabView.count, 2)
+ compare(tabView.currentIndex, 0)
compare(tabView.getTab(0).title, "title 1")
compare(tabView.getTab(1).title, "title 2")
+ tabView.currentIndex = 1
+
tabView.insertTab(1, "title 3")
compare(tabView.count, 3)
+ compare(tabView.currentIndex, 2)
compare(tabView.getTab(0).title, "title 1")
compare(tabView.getTab(1).title, "title 3")
compare(tabView.getTab(2).title, "title 2")
tabView.insertTab(0, "title 4")
compare(tabView.count, 4)
+ compare(tabView.currentIndex, 3)
+ compare(tabView.getTab(0).title, "title 4")
+ compare(tabView.getTab(1).title, "title 1")
+ compare(tabView.getTab(2).title, "title 3")
+ compare(tabView.getTab(3).title, "title 2")
+
+ tabView.insertTab(tabView.count, "title 5")
+ compare(tabView.count, 5)
+ compare(tabView.currentIndex, 3)
+ compare(tabView.getTab(0).title, "title 4")
+ compare(tabView.getTab(1).title, "title 1")
+ compare(tabView.getTab(2).title, "title 3")
+ compare(tabView.getTab(3).title, "title 2")
+ compare(tabView.getTab(4).title, "title 5")
+
+ tabView.removeTab(tabView.count - 1)
+ compare(tabView.count, 4)
+ compare(tabView.currentIndex, 3)
compare(tabView.getTab(0).title, "title 4")
compare(tabView.getTab(1).title, "title 1")
compare(tabView.getTab(2).title, "title 3")
@@ -107,21 +138,25 @@ TestCase {
tabView.removeTab(0)
compare(tabView.count, 3)
+ compare(tabView.currentIndex, 2)
compare(tabView.getTab(0).title, "title 1")
compare(tabView.getTab(1).title, "title 3")
compare(tabView.getTab(2).title, "title 2")
tabView.removeTab(1)
compare(tabView.count, 2)
+ compare(tabView.currentIndex, 1)
compare(tabView.getTab(0).title, "title 1")
compare(tabView.getTab(1).title, "title 2")
tabView.removeTab(1)
compare(tabView.count, 1)
+ compare(tabView.currentIndex, 0)
compare(tabView.getTab(0).title, "title 1")
tabView.removeTab(0)
compare(tabView.count, 0)
+ compare(tabView.currentIndex, 0)
tabView.destroy()
}