summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--.qmake.conf2
-rw-r--r--examples/quick/controls/basiclayouts/main.qml25
-rw-r--r--examples/quick/controls/basiclayouts/src/main.cpp2
-rw-r--r--examples/quick/controls/calendar/src/main.cpp2
-rw-r--r--examples/quick/controls/calendar/src/sqleventmodel.cpp3
-rw-r--r--examples/quick/controls/calendar/src/sqleventmodel.h3
-rw-r--r--examples/quick/controls/filesystembrowser/main.cpp13
-rw-r--r--examples/quick/controls/filesystembrowser/main.qml12
-rw-r--r--examples/quick/controls/gallery/main.cpp2
-rw-r--r--examples/quick/controls/styles/main.cpp3
-rw-r--r--examples/quick/controls/texteditor/qml/main.qml2
-rw-r--r--examples/quick/controls/texteditor/src/main.cpp2
-rw-r--r--examples/quick/controls/touch/src/main.cpp2
-rw-r--r--examples/quick/controls/uiforms/main.cpp2
-rw-r--r--examples/quick/dialogs/systemdialogs/main.cpp2
-rw-r--r--examples/quick/extras/dashboard/main.cpp2
-rw-r--r--examples/quick/extras/flat/main.cpp2
-rw-r--r--examples/quick/extras/gallery/main.cpp2
-rw-r--r--qtquickcontrols.pro1
-rw-r--r--src/controls/ApplicationWindow.qml1
-rw-r--r--src/controls/ComboBox.qml48
-rw-r--r--src/controls/Menu.qml1
-rw-r--r--src/controls/MenuBar.qml1
-rw-r--r--src/controls/Private/AbstractCheckable.qml1
-rw-r--r--src/controls/Private/BasicButton.qml3
-rw-r--r--src/controls/Private/BasicTableView.qml78
-rw-r--r--src/controls/Private/ColumnMenuContent.qml2
-rw-r--r--src/controls/Private/Control.qml21
-rw-r--r--src/controls/Private/EditMenu.qml19
-rw-r--r--src/controls/Private/EditMenu_ios.qml43
-rw-r--r--src/controls/Private/MenuContentItem.qml2
-rw-r--r--src/controls/Private/ScrollBar.qml2
-rw-r--r--src/controls/Private/ScrollViewHelper.qml58
-rw-r--r--src/controls/Private/TextInputWithHandles.qml12
-rw-r--r--src/controls/Private/TreeViewItemDelegateLoader.qml1
-rw-r--r--src/controls/Private/qquickcontrolsettings.cpp7
-rw-r--r--src/controls/Private/qquickcontrolsettings_p.h2
-rw-r--r--src/controls/Private/qquickstyleitem.cpp312
-rw-r--r--src/controls/Private/qquicktreemodeladaptor.cpp52
-rw-r--r--src/controls/Private/qquicktreemodeladaptor_p.h6
-rw-r--r--src/controls/ScrollView.qml38
-rw-r--r--src/controls/SpinBox.qml9
-rw-r--r--src/controls/SplitView.qml1
-rw-r--r--src/controls/StackView.qml1
-rw-r--r--src/controls/StackViewDelegate.qml1
-rw-r--r--src/controls/StatusBar.qml1
-rw-r--r--src/controls/Styles/Android/ApplicationWindowStyle.qml1
-rw-r--r--src/controls/Styles/Base/BasicTableViewStyle.qml17
-rw-r--r--src/controls/Styles/Base/CircularTickmarkLabelStyle.qml4
-rw-r--r--src/controls/Styles/Base/DelayButtonStyle.qml3
-rw-r--r--src/controls/Styles/Base/PieMenuStyle.qml24
-rw-r--r--src/controls/Styles/Base/ScrollViewStyle.qml1
-rw-r--r--src/controls/Styles/Base/StatusIndicatorStyle.qml8
-rw-r--r--src/controls/Styles/Base/TabViewStyle.qml1
-rw-r--r--src/controls/Styles/Base/TextAreaStyle.qml6
-rw-r--r--src/controls/Styles/Base/TextFieldStyle.qml6
-rw-r--r--src/controls/Styles/Base/ToggleButtonStyle.qml4
-rw-r--r--src/controls/Styles/Base/TreeViewStyle.qml7
-rw-r--r--src/controls/Styles/Base/TumblerStyle.qml5
-rw-r--r--src/controls/Styles/Base/images/spinner_large.pngbin8401 -> 4723 bytes
-rw-r--r--src/controls/Styles/Base/images/spinner_medium.pngbin2772 -> 1621 bytes
-rw-r--r--src/controls/Styles/Base/images/spinner_small.pngbin1810 -> 998 bytes
-rw-r--r--src/controls/Styles/Desktop/ScrollViewStyle.qml3
-rw-r--r--src/controls/Styles/Desktop/TableViewStyle.qml5
-rw-r--r--src/controls/Styles/Desktop/TreeViewStyle.qml4
-rw-r--r--src/controls/Styles/iOS/SliderStyle.qml50
-rw-r--r--src/controls/Tab.qml1
-rw-r--r--src/controls/TabView.qml1
-rw-r--r--src/controls/TableViewColumn.qml1
-rw-r--r--src/controls/TextArea.qml13
-rw-r--r--src/controls/TextField.qml6
-rw-r--r--src/controls/ToolBar.qml1
-rw-r--r--src/controls/TreeView.qml1
-rw-r--r--src/controls/controls.pro4
-rw-r--r--src/controls/doc/qtquickcontrols.qdocconf24
-rw-r--r--src/controls/doc/src/qtquickcontrols-overview.qdoc4
-rw-r--r--src/controls/doc/src/qtquickcontrols-tableview.qdoc1
-rw-r--r--src/controls/doc/src/qtquickcontrols-treeview.qdoc18
-rw-r--r--src/controls/doc/src/qtquickcontrolsstyles-index.qdoc11
-rw-r--r--src/controls/doc/src/qtquickcontrolsstyles-tableviewstyle.qdoc1
-rw-r--r--src/controls/doc/src/qtquickcontrolsstyles-treeviewstyle.qdoc1
-rw-r--r--src/controls/plugin.cpp13
-rw-r--r--src/controls/plugins.qmltypes635
-rw-r--r--src/controls/qquickaction.cpp5
-rw-r--r--src/controls/qquickaction_p.h16
-rw-r--r--src/controls/qquickexclusivegroup.cpp22
-rw-r--r--src/controls/qquickexclusivegroup_p.h10
-rw-r--r--src/controls/qquickmenu.cpp143
-rw-r--r--src/controls/qquickmenu_p.h25
-rw-r--r--src/controls/qquickmenubar.cpp38
-rw-r--r--src/controls/qquickmenubar_p.h18
-rw-r--r--src/controls/qquickmenuitem.cpp60
-rw-r--r--src/controls/qquickmenuitem_p.h24
-rw-r--r--src/controls/qquickmenuitemcontainer_p.h2
-rw-r--r--src/controls/qquickmenupopupwindow.cpp32
-rw-r--r--src/controls/qquickmenupopupwindow_p.h15
-rw-r--r--src/controls/qquickpopupwindow.cpp16
-rw-r--r--src/controls/qquickpopupwindow_p.h1
-rw-r--r--src/controls/qquickstack.cpp1
-rw-r--r--src/dialogs/Private/plugins.qmltypes325
-rw-r--r--src/dialogs/Private/qquickfontlistmodel.cpp2
-rw-r--r--src/dialogs/Private/qquickwritingsystemlistmodel.cpp2
-rw-r--r--src/dialogs/dialogs.pro2
-rw-r--r--src/dialogs/doc/qtquickdialogs.qdocconf2
-rw-r--r--src/dialogs/plugin.cpp6
-rw-r--r--src/dialogs/plugins.qmltypes2562
-rw-r--r--src/dialogs/qquickabstractdialog.cpp8
-rw-r--r--src/dialogs/qquickabstractdialog_p.h4
-rw-r--r--src/extras/Styles/Flat/ApplicationWindowStyle.qml1
-rw-r--r--src/extras/Styles/Flat/GroupBoxStyle.qml4
-rw-r--r--src/extras/Tumbler.qml11
-rw-r--r--src/extras/doc/qtquickextras.qdocconf2
-rw-r--r--src/extras/extras.pro2
-rw-r--r--src/extras/plugins.qmltypes90
-rw-r--r--src/layouts/doc/src/qtquicklayouts.qdoc4
-rw-r--r--src/layouts/layouts.pro2
-rw-r--r--src/layouts/plugin.cpp2
-rw-r--r--src/layouts/plugins.qmltypes17
-rw-r--r--src/layouts/qquickgridlayoutengine.cpp255
-rw-r--r--src/layouts/qquickgridlayoutengine_p.h14
-rw-r--r--src/layouts/qquicklayout.cpp397
-rw-r--r--src/layouts/qquicklayout_p.h28
-rw-r--r--src/layouts/qquicklinearlayout.cpp65
-rw-r--r--src/layouts/qquicklinearlayout_p.h12
-rw-r--r--src/layouts/qquickstacklayout.cpp333
-rw-r--r--src/layouts/qquickstacklayout_p.h105
-rw-r--r--src/widgets/plugins.qmltypes9
-rw-r--r--src/widgets/qquickqfiledialog.cpp1
-rw-r--r--src/widgets/widgets.pro2
-rw-r--r--sync.profile1
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/controls/data/tableview/table_buttondelegate.qml5
-rw-r--r--tests/auto/controls/data/textarea/ta_editingfinished.qml59
-rw-r--r--tests/auto/controls/data/tst_baselines.qml1
-rw-r--r--tests/auto/controls/data/tst_combobox.qml14
-rw-r--r--tests/auto/controls/data/tst_gridlayout.qml6
-rw-r--r--tests/auto/controls/data/tst_menu.qml2
-rw-r--r--tests/auto/controls/data/tst_menubar.qml51
-rw-r--r--tests/auto/controls/data/tst_rowlayout.qml88
-rw-r--r--tests/auto/controls/data/tst_slider.qml4
-rw-r--r--tests/auto/controls/data/tst_spinbox.qml3
-rw-r--r--tests/auto/controls/data/tst_stacklayout.qml448
-rw-r--r--tests/auto/controls/data/tst_tableview.qml5
-rw-r--r--tests/auto/controls/data/tst_textarea.qml30
-rw-r--r--tests/auto/controls/data/tst_treeview.qml27
-rw-r--r--tests/auto/extras/data/tst_circulartickmarklabel.qml9
-rw-r--r--tests/auto/extras/data/tst_delaybutton.qml18
-rw-r--r--tests/auto/extras/data/tst_piemenu.qml11
-rw-r--r--tests/auto/extras/data/tst_tumbler.qml6
-rw-r--r--tests/auto/extras/extras.pro1
-rw-r--r--tests/auto/paint/paint.pro6
-rw-r--r--tests/auto/paint/tst_paint.cpp107
-rw-r--r--tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp47
-rw-r--r--tests/benchmarks/benchmarks.pro1
-rw-r--r--tests/benchmarks/objectcount/objectcount.pro9
-rw-r--r--tests/benchmarks/objectcount/tst_objectcount.cpp168
-rw-r--r--tests/manual/viewinqwidget/main.cpp54
-rw-r--r--tests/manual/viewinqwidget/main.qml50
-rw-r--r--tests/manual/viewinqwidget/viewinqwidget.pro6
160 files changed, 5838 insertions, 1793 deletions
diff --git a/.gitignore b/.gitignore
index ad328129..a953698b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,8 +17,9 @@
/tests/auto/dialogs/tst_dialogs
/tests/auto/extras/tst_extras
/tests/auto/paint/tst_paint
-/tests/auto/qtdesktop/tst_qtdesktop
/tests/auto/applicationwindow/tst_applicationwindow
+/tests/auto/customcontrolsstyle/tst_customcontrolsstyle
+/tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor
/tests/auto/testplugin/QtQuickControlsTests/testplugin.*
/tests/benchmarks/statusindicator/tst_bench_statusindicator
diff --git a/.qmake.conf b/.qmake.conf
index 0abcc473..235e5216 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,4 +2,4 @@ load(qt_build_config)
CONFIG += warning_clean
android|ios|qnx|winrt|isEmpty(QT.widgets.name): CONFIG += no_desktop
-MODULE_VERSION = 5.5.1
+MODULE_VERSION = 5.6.0
diff --git a/examples/quick/controls/basiclayouts/main.qml b/examples/quick/controls/basiclayouts/main.qml
index bc5ca214..b6694b45 100644
--- a/examples/quick/controls/basiclayouts/main.qml
+++ b/examples/quick/controls/basiclayouts/main.qml
@@ -40,7 +40,7 @@
import QtQuick 2.2
import QtQuick.Controls 1.2
-import QtQuick.Layouts 1.0
+import QtQuick.Layouts 1.3
ApplicationWindow {
visible: true
@@ -108,5 +108,28 @@ ApplicationWindow {
Layout.fillHeight: true
Layout.fillWidth: true
}
+ GroupBox {
+ id: stackBox
+ title: "Stack layout"
+ implicitWidth: 200
+ implicitHeight: 60
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ StackLayout {
+ id: stackLayout
+ anchors.fill: parent
+
+ function advance() { currentIndex = (currentIndex + 1) % count }
+
+ Repeater {
+ id: stackRepeater
+ model: 5
+ Rectangle {
+ color: Qt.hsla((0.5 + index)/stackRepeater.count, 0.3, 0.7, 1)
+ Button { anchors.centerIn: parent; text: "Page " + (index + 1); onClicked: { stackLayout.advance() } }
+ }
+ }
+ }
+ }
}
}
diff --git a/examples/quick/controls/basiclayouts/src/main.cpp b/examples/quick/controls/basiclayouts/src/main.cpp
index bb4b3bdd..e66387f7 100644
--- a/examples/quick/controls/basiclayouts/src/main.cpp
+++ b/examples/quick/controls/basiclayouts/src/main.cpp
@@ -45,5 +45,7 @@ int main(int argc, char *argv[])
{
QtQuickControlsApplication app(argc, argv);
QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/controls/calendar/src/main.cpp b/examples/quick/controls/calendar/src/main.cpp
index 6b3c058a..bab7e4b2 100644
--- a/examples/quick/controls/calendar/src/main.cpp
+++ b/examples/quick/controls/calendar/src/main.cpp
@@ -48,5 +48,7 @@ int main(int argc, char *argv[])
QtQuickControlsApplication app(argc, argv);
qmlRegisterType<SqlEventModel>("org.qtproject.examples.calendar", 1, 0, "SqlEventModel");
QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/controls/calendar/src/sqleventmodel.cpp b/examples/quick/controls/calendar/src/sqleventmodel.cpp
index 95a62843..92e558ef 100644
--- a/examples/quick/controls/calendar/src/sqleventmodel.cpp
+++ b/examples/quick/controls/calendar/src/sqleventmodel.cpp
@@ -45,8 +45,7 @@
#include <QSqlError>
#include <QSqlQuery>
-SqlEventModel::SqlEventModel() :
- QSqlQueryModel()
+SqlEventModel::SqlEventModel()
{
createConnection();
}
diff --git a/examples/quick/controls/calendar/src/sqleventmodel.h b/examples/quick/controls/calendar/src/sqleventmodel.h
index ae0f3374..e7a35c01 100644
--- a/examples/quick/controls/calendar/src/sqleventmodel.h
+++ b/examples/quick/controls/calendar/src/sqleventmodel.h
@@ -43,11 +43,10 @@
#include <QList>
#include <QObject>
-#include <QSqlTableModel>
#include "event.h"
-class SqlEventModel : public QSqlQueryModel
+class SqlEventModel : public QObject
{
Q_OBJECT
diff --git a/examples/quick/controls/filesystembrowser/main.cpp b/examples/quick/controls/filesystembrowser/main.cpp
index 176d334c..e9c63c20 100644
--- a/examples/quick/controls/filesystembrowser/main.cpp
+++ b/examples/quick/controls/filesystembrowser/main.cpp
@@ -88,16 +88,18 @@ static inline QString sizeString(const QFileInfo &fi)
}
class DisplayFileSystemModel : public QFileSystemModel {
+ Q_OBJECT
public:
explicit DisplayFileSystemModel(QObject *parent = Q_NULLPTR)
: QFileSystemModel(parent) {}
- enum {
+ enum Roles {
SizeRole = Qt::UserRole + 4,
DisplayableFilePermissionsRole = Qt::UserRole + 5,
LastModifiedRole = Qt::UserRole + 6,
- UrlStringRole = Qt::UserRole + 7 // 263
+ UrlStringRole = Qt::UserRole + 7
};
+ Q_ENUM(Roles)
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE
{
@@ -133,11 +135,18 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
QQmlApplicationEngine engine;
+ qmlRegisterUncreatableType<DisplayFileSystemModel>("io.qt.examples.quick.controls.filesystembrowser", 1, 0,
+ "FileSystemModel", "Cannot create a FileSystemModel instance.");
QFileSystemModel *fsm = new DisplayFileSystemModel(&engine);
fsm->setRootPath(QDir::homePath());
fsm->setResolveSymlinks(true);
engine.rootContext()->setContextProperty("fileSystemModel", fsm);
+ engine.rootContext()->setContextProperty("rootPathIndex", fsm->index(fsm->rootPath()));
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
+
+#include "main.moc"
diff --git a/examples/quick/controls/filesystembrowser/main.qml b/examples/quick/controls/filesystembrowser/main.qml
index abc3c20c..6e79ca61 100644
--- a/examples/quick/controls/filesystembrowser/main.qml
+++ b/examples/quick/controls/filesystembrowser/main.qml
@@ -39,8 +39,9 @@
****************************************************************************/
import QtQuick 2.2
-import QtQuick.Controls 1.4
+import QtQuick.Controls 1.5
import QtQml.Models 2.2
+import io.qt.examples.quick.controls.filesystembrowser 1.0
ApplicationWindow {
visible: true
@@ -90,6 +91,7 @@ ApplicationWindow {
anchors.fill: parent
anchors.margins: 2 * 12 + row.height
model: fileSystemModel
+ rootIndex: rootPathIndex
selection: sel
TableViewColumn {
@@ -103,12 +105,14 @@ ApplicationWindow {
role: "size"
resizable: true
horizontalAlignment : Text.AlignRight
+ width: 70
}
TableViewColumn {
title: "Permissions"
role: "displayableFilePermissions"
resizable: true
+ width: 100
}
TableViewColumn {
@@ -117,7 +121,9 @@ ApplicationWindow {
resizable: true
}
- onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index)
- onActivated : Qt.openUrlExternally(fileSystemModel.data(index, 263))
+ onActivated : {
+ var url = fileSystemModel.data(index, FileSystemModel.UrlStringRole)
+ Qt.openUrlExternally(url)
+ }
}
}
diff --git a/examples/quick/controls/gallery/main.cpp b/examples/quick/controls/gallery/main.cpp
index 4c254a4e..ac3f447d 100644
--- a/examples/quick/controls/gallery/main.cpp
+++ b/examples/quick/controls/gallery/main.cpp
@@ -52,5 +52,7 @@ int main(int argc, char *argv[])
QSurfaceFormat::setDefaultFormat(fmt);
}
QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/controls/styles/main.cpp b/examples/quick/controls/styles/main.cpp
index 1f6684a6..55c592e6 100644
--- a/examples/quick/controls/styles/main.cpp
+++ b/examples/quick/controls/styles/main.cpp
@@ -47,6 +47,7 @@ int main(int argc, char *argv[])
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
-
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/controls/texteditor/qml/main.qml b/examples/quick/controls/texteditor/qml/main.qml
index cefbf434..42f5e7f9 100644
--- a/examples/quick/controls/texteditor/qml/main.qml
+++ b/examples/quick/controls/texteditor/qml/main.qml
@@ -169,7 +169,6 @@ ApplicationWindow {
ColorDialog {
id: colorDialog
color: "black"
- onAccepted: document.textColor = color
}
Action {
@@ -333,6 +332,7 @@ ApplicationWindow {
cursorPosition: textArea.cursorPosition
selectionStart: textArea.selectionStart
selectionEnd: textArea.selectionEnd
+ textColor: colorDialog.color
Component.onCompleted: document.fileUrl = "qrc:/example.html"
onFontSizeChanged: {
fontSizeSpinBox.valueGuard = false
diff --git a/examples/quick/controls/texteditor/src/main.cpp b/examples/quick/controls/texteditor/src/main.cpp
index 160e6a9a..1ef76e3a 100644
--- a/examples/quick/controls/texteditor/src/main.cpp
+++ b/examples/quick/controls/texteditor/src/main.cpp
@@ -47,5 +47,7 @@ int main(int argc, char *argv[])
QtQuickControlsApplication app(argc, argv);
qmlRegisterType<DocumentHandler>("org.qtproject.example", 1, 0, "DocumentHandler");
QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/controls/touch/src/main.cpp b/examples/quick/controls/touch/src/main.cpp
index bb4b3bdd..e66387f7 100644
--- a/examples/quick/controls/touch/src/main.cpp
+++ b/examples/quick/controls/touch/src/main.cpp
@@ -45,5 +45,7 @@ int main(int argc, char *argv[])
{
QtQuickControlsApplication app(argc, argv);
QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/controls/uiforms/main.cpp b/examples/quick/controls/uiforms/main.cpp
index de92dd70..6a15842a 100644
--- a/examples/quick/controls/uiforms/main.cpp
+++ b/examples/quick/controls/uiforms/main.cpp
@@ -55,5 +55,7 @@ int main(int argc, char *argv[])
qmlRegisterSingletonType(QUrl(QStringLiteral("qrc:/qml/CustomerModel.qml")), "io.qt.example", 1, 0, "CustomerModel");
QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/dialogs/systemdialogs/main.cpp b/examples/quick/dialogs/systemdialogs/main.cpp
index f83c8c22..5f65ce04 100644
--- a/examples/quick/dialogs/systemdialogs/main.cpp
+++ b/examples/quick/dialogs/systemdialogs/main.cpp
@@ -53,5 +53,7 @@ int main(int argc, char *argv[])
QSurfaceFormat::setDefaultFormat(fmt);
}
QQmlApplicationEngine engine(QUrl("qrc:/dialogs/systemdialogs/systemdialogs.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/extras/dashboard/main.cpp b/examples/quick/extras/dashboard/main.cpp
index 77a0ada5..74ea0772 100644
--- a/examples/quick/extras/dashboard/main.cpp
+++ b/examples/quick/extras/dashboard/main.cpp
@@ -51,5 +51,7 @@ int main(int argc, char *argv[])
app.setFont(QFont("DejaVu Sans"));
QQmlApplicationEngine engine(QUrl("qrc:/qml/dashboard.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/extras/flat/main.cpp b/examples/quick/extras/flat/main.cpp
index 1012fa4e..8faafdca 100644
--- a/examples/quick/extras/flat/main.cpp
+++ b/examples/quick/extras/flat/main.cpp
@@ -51,5 +51,7 @@ int main(int argc, char *argv[])
}
QQmlApplicationEngine engine;
engine.load(QUrl("qrc:/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/examples/quick/extras/gallery/main.cpp b/examples/quick/extras/gallery/main.cpp
index 9ba1835e..1d5d2313 100644
--- a/examples/quick/extras/gallery/main.cpp
+++ b/examples/quick/extras/gallery/main.cpp
@@ -45,5 +45,7 @@ int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine(QUrl("qrc:/qml/gallery.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}
diff --git a/qtquickcontrols.pro b/qtquickcontrols.pro
index 7e514bf8..67086100 100644
--- a/qtquickcontrols.pro
+++ b/qtquickcontrols.pro
@@ -1,4 +1,3 @@
requires(qtHaveModule(quick))
-requires(contains(QT_CONFIG, accessibility))
load(qt_parts)
diff --git a/src/controls/ApplicationWindow.qml b/src/controls/ApplicationWindow.qml
index 4c30664d..fa2d1b51 100644
--- a/src/controls/ApplicationWindow.qml
+++ b/src/controls/ApplicationWindow.qml
@@ -45,6 +45,7 @@ import QtQuick.Controls.Private 1.0
\since 5.1
\inqmlmodule QtQuick.Controls
\ingroup applicationwindow
+ \ingroup controls
\brief Provides a top-level application window.
\image applicationwindow.png
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml
index 8a2908b5..10702ff6 100644
--- a/src/controls/ComboBox.qml
+++ b/src/controls/ComboBox.qml
@@ -145,6 +145,50 @@ Control {
*/
property alias editText: input.text
+ /*! \qmlproperty enumeration ComboBox::inputMethodHints
+ \since QtQuick.Controls 1.5
+ Provides hints to the input method about the expected content of the combo box and how it
+ should operate.
+
+ The value is a bit-wise combination of flags or \c Qt.ImhNone if no hints are set.
+
+ Flags that alter behavior are:
+
+ \list
+ \li Qt.ImhHiddenText - Characters should be hidden, as is typically used when entering passwords.
+ \li Qt.ImhSensitiveData - Typed text should not be stored by the active input method
+ in any persistent storage like predictive user dictionary.
+ \li Qt.ImhNoAutoUppercase - The input method should not try to automatically switch to upper case
+ when a sentence ends.
+ \li Qt.ImhPreferNumbers - Numbers are preferred (but not required).
+ \li Qt.ImhPreferUppercase - Upper case letters are preferred (but not required).
+ \li Qt.ImhPreferLowercase - Lower case letters are preferred (but not required).
+ \li Qt.ImhNoPredictiveText - Do not use predictive text (i.e. dictionary lookup) while typing.
+
+ \li Qt.ImhDate - The text editor functions as a date field.
+ \li Qt.ImhTime - The text editor functions as a time field.
+ \endlist
+
+ Flags that restrict input (exclusive flags) are:
+
+ \list
+ \li Qt.ImhDigitsOnly - Only digits are allowed.
+ \li Qt.ImhFormattedNumbersOnly - Only number input is allowed. This includes decimal point and minus sign.
+ \li Qt.ImhUppercaseOnly - Only upper case letter input is allowed.
+ \li Qt.ImhLowercaseOnly - Only lower case letter input is allowed.
+ \li Qt.ImhDialableCharactersOnly - Only characters suitable for phone dialing are allowed.
+ \li Qt.ImhEmailCharactersOnly - Only characters suitable for email addresses are allowed.
+ \li Qt.ImhUrlCharactersOnly - Only characters suitable for URLs are allowed.
+ \endlist
+
+ Masks:
+
+ \list
+ \li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
+ \endlist
+ */
+ property alias inputMethodHints: input.inputMethodHints
+
/*! This property specifies whether the combobox should gain active focus when pressed.
The default value is \c false. */
property bool activeFocusOnPress: false
@@ -511,6 +555,8 @@ Control {
onTextRoleChanged: popup.resolveTextValue(textRole)
+ ExclusiveGroup { id: eg }
+
Menu {
id: popup
objectName: "popup"
@@ -536,8 +582,6 @@ Control {
__minimumWidth: comboBox.width
__visualItem: comboBox
- property ExclusiveGroup eg: ExclusiveGroup { id: eg }
-
property bool modelIsArray: false
Instantiator {
diff --git a/src/controls/Menu.qml b/src/controls/Menu.qml
index 037fa550..d485cb65 100644
--- a/src/controls/Menu.qml
+++ b/src/controls/Menu.qml
@@ -44,6 +44,7 @@ import QtQuick.Controls.Private 1.0
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup menus
+ \ingroup controls
\brief Provides a menu component for use as a context menu, popup menu, or
as part of a menu bar.
diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml
index 8d49a1ed..cb31ed71 100644
--- a/src/controls/MenuBar.qml
+++ b/src/controls/MenuBar.qml
@@ -44,6 +44,7 @@ import QtQuick.Controls.Private 1.0
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup applicationwindow
+ \ingroup controls
\brief Provides a horizontal menu bar.
\image menubar.png
diff --git a/src/controls/Private/AbstractCheckable.qml b/src/controls/Private/AbstractCheckable.qml
index 42abebe5..bca626e0 100644
--- a/src/controls/Private/AbstractCheckable.qml
+++ b/src/controls/Private/AbstractCheckable.qml
@@ -41,7 +41,6 @@ import QtQuick.Controls.Private 1.0
/*!
\qmltype AbstractCheckable
\inqmlmodule QtQuick.Controls
- \ingroup controls
\brief An abstract representation of a checkable control with a label
\qmlabstract
\internal
diff --git a/src/controls/Private/BasicButton.qml b/src/controls/Private/BasicButton.qml
index 1756a296..346cd419 100644
--- a/src/controls/Private/BasicButton.qml
+++ b/src/controls/Private/BasicButton.qml
@@ -38,6 +38,7 @@ import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles 1.1
+import QtQuick.Window 2.2
/*!
\qmltype BasicButton
@@ -206,7 +207,7 @@ Control {
Timer {
interval: 1000
- running: behavior.containsMouse && !pressed && tooltip.length
+ running: behavior.containsMouse && !pressed && tooltip.length && behavior.Window.visibility !== Window.Hidden
onTriggered: Tooltip.showText(behavior, Qt.point(behavior.mouseX, behavior.mouseY), tooltip)
}
}
diff --git a/src/controls/Private/BasicTableView.qml b/src/controls/Private/BasicTableView.qml
index 27635bc9..afec226d 100644
--- a/src/controls/Private/BasicTableView.qml
+++ b/src/controls/Private/BasicTableView.qml
@@ -45,8 +45,8 @@
// We mean it.
//
-import QtQuick 2.4
-import QtQuick.Controls 1.3
+import QtQuick 2.6
+import QtQuick.Controls 1.5
import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles 1.2
import QtQuick.Window 2.2
@@ -94,6 +94,7 @@ ScrollView {
property Component itemDelegate: __style ? __style.itemDelegate : null
/*! \qmlproperty Component BasicTableView::rowDelegate
+ \keyword basictableview-rowdelegate
This property defines a delegate to draw a row.
@@ -116,6 +117,7 @@ ScrollView {
property Component rowDelegate: __style ? __style.rowDelegate : null
/*! \qmlproperty Component BasicTableView::headerDelegate
+ \keyword basictableview-headerdelegate
This property defines a delegate to draw a header.
@@ -323,7 +325,7 @@ ScrollView {
function resizeColumnsToContents () {
for (var i = 0; i < __columns.length; ++i) {
var col = getColumn(i)
- var header = repeater.itemAt(i)
+ var header = __listView.headerItem.headerRepeater.itemAt(i)
if (col) {
col.__index = i
col.resizeToContents()
@@ -347,8 +349,8 @@ ScrollView {
implicitHeight: 150
frameVisible: true
- __scrollBarTopMargin: (__style && __style.transientScrollBars || Qt.platform.os === "osx") ? headerrow.height : 0
- __viewTopMargin: headerVisible ? headerrow.height : 0
+ __scrollBarTopMargin: headerVisible && (listView.transientScrollBars || Qt.platform.os === "osx")
+ ? listView.headerItem.height : 0
/*! \internal
Use this to display user-friendly messages in TableView and TreeView common functions.
@@ -393,13 +395,32 @@ ScrollView {
focus: true
activeFocusOnTab: false
Keys.forwardTo: [__mouseArea]
- anchors.topMargin: headerVisible ? tableHeader.height : 0
anchors.fill: parent
+ contentWidth: headerItem.headerRow.width + listView.vScrollbarPadding
+ // ### FIXME Late configuration of the header item requires
+ // this binding to get the header visible after creation
+ contentY: -headerItem.height
+
currentIndex: -1
visible: columnCount > 0
interactive: Settings.hasTouchScreen
property var rowItemStack: [] // Used as a cache for rowDelegates
+ readonly property bool transientScrollbars: __style && !!__style.transientScrollBars
+ readonly property real vScrollbarPadding: __scroller.verticalScrollBar.visible
+ && !transientScrollbars && Qt.platform.os === "osx" ?
+ __verticalScrollBar.width + __scroller.scrollBarSpacing + root.__style.padding.right : 0
+
+ Binding {
+ // On Mac, we reserve the vSB space in the contentItem because the vSB should
+ // appear under the header. Unfortunately, the ListView header won't expand
+ // beyond the ListView's boundaries, that's why we need to ressort to this.
+ target: root.__scroller
+ when: Qt.platform.os === "osx"
+ property: "verticalScrollbarOffset"
+ value: 0
+ }
+
function incrementCurrentIndexBlocking() {
var oldIndex = __listView.currentIndex
__scroller.blockUpdates = true;
@@ -570,7 +591,6 @@ ScrollView {
id: itemrow
height: parent.height
Repeater {
- id: repeater
model: columnModel
delegate: __itemDelegateLoader
@@ -586,27 +606,17 @@ ScrollView {
}
}
- Item {
+ headerPositioning: ListView.OverlayHeader
+ header: Item {
id: tableHeader
- clip: true
- parent: __scroller
visible: headerVisible
- anchors.top: parent.top
- anchors.topMargin: viewport.anchors.topMargin
- anchors.leftMargin: viewport.anchors.leftMargin
- anchors.margins: viewport.anchors.margins
- anchors.rightMargin: (frameVisible ? __scroller.rightMargin : 0) +
- (__scroller.outerFrame && __scrollBarTopMargin ? 0
- : __verticalScrollBar.width + __scroller.scrollBarSpacing + root.__style.padding.right)
-
- anchors.left: parent.left
- anchors.right: parent.right
-
- height: headerrow.height
+ width: Math.max(headerRow.width + listView.vScrollbarPadding, root.viewport.width)
+ height: visible ? headerRow.height : 0
+ property alias headerRow: row
+ property alias headerRepeater: repeater
Row {
- id: headerrow
- x: -listView.contentX
+ id: row
Repeater {
id: repeater
@@ -630,8 +640,7 @@ ScrollView {
Loader {
id: headerStyle
sourceComponent: root.headerDelegate
- anchors.left: parent.left
- anchors.right: parent.right
+ width: parent.width
property QtObject styleData: QtObject {
readonly property string value: modelData.title
readonly property bool pressed: headerClickArea.pressed
@@ -668,7 +677,7 @@ ScrollView {
onPositionChanged: {
if (drag.active && modelData.movable && pressed && columnCount > 1) { // only do this while dragging
for (var h = columnCount-1 ; h >= 0 ; --h) {
- if (drag.target.x + listView.contentX + headerRowDelegate.width/2 > headerrow.children[h].x) {
+ if (headerRow.children[h].visible && drag.target.x + headerRowDelegate.width/2 > headerRow.children[h].x) {
repeater.targetIndex = h
break
}
@@ -706,7 +715,7 @@ ScrollView {
}
parent: tableHeader
x: __implicitX
- property double __implicitX: headerRowDelegate.x - listView.contentX
+ property double __implicitX: headerRowDelegate.x
width: modelData.width
height: parent.height
sourceComponent: root.headerDelegate
@@ -740,12 +749,9 @@ ScrollView {
}
}
}
-
- onWidthChanged: listView.contentWidth = width
}
Loader {
- id: loader
property QtObject styleData: QtObject{
readonly property string value: ""
readonly property bool pressed: false
@@ -756,17 +762,17 @@ ScrollView {
anchors.top: parent.top
anchors.right: parent.right
- anchors.bottom: headerrow.bottom
- anchors.rightMargin: -2
+ anchors.bottom: headerRow.bottom
sourceComponent: root.headerDelegate
- width: root.width - headerrow.width + 2
- visible: root.columnCount
+ readonly property real __remainingWidth: parent.width - headerRow.width
+ visible: __remainingWidth > 0
+ width: __remainingWidth
z:-1
}
}
function columnAt(offset) {
- var item = headerrow.childAt(offset, 0)
+ var item = listView.headerItem.headerRow.childAt(offset, 0)
return item ? item.column : -1
}
}
diff --git a/src/controls/Private/ColumnMenuContent.qml b/src/controls/Private/ColumnMenuContent.qml
index 4d0f944d..d184524e 100644
--- a/src/controls/Private/ColumnMenuContent.qml
+++ b/src/controls/Private/ColumnMenuContent.qml
@@ -201,7 +201,7 @@ Item {
onPositionChanged: updateCurrentItem({ "x": mouse.x, "y": mouse.y })
onPressed: updateCurrentItem({ "x": mouse.x, "y": mouse.y })
onReleased: {
- if (currentItem.__menuItem.enabled) {
+ if (currentItem && currentItem.__menuItem.enabled) {
if (currentItem.styleData.type === MenuItemType.Menu) {
showCurrentItemSubMenu(true)
} else {
diff --git a/src/controls/Private/Control.qml b/src/controls/Private/Control.qml
index f4733cc5..4b965482 100644
--- a/src/controls/Private/Control.qml
+++ b/src/controls/Private/Control.qml
@@ -72,19 +72,20 @@ FocusScope {
property alias __styleData: styleLoader.styleData
Loader {
+ id: styleLoader
+ sourceComponent: style
+ property Item __control: root
+ property QtObject styleData: null
+ onStatusChanged: {
+ if (status === Loader.Error)
+ console.error("Failed to load Style for", root)
+ }
+ }
+
+ Loader {
id: panelLoader
anchors.fill: parent
sourceComponent: __style ? __style.panel : null
onStatusChanged: if (status === Loader.Error) console.error("Failed to load Style for", root)
- Loader {
- id: styleLoader
- sourceComponent: style
- property Item __control: root
- property QtObject styleData: null
- onStatusChanged: {
- if (status === Loader.Error)
- console.error("Failed to load Style for", root)
- }
- }
}
}
diff --git a/src/controls/Private/EditMenu.qml b/src/controls/Private/EditMenu.qml
index 51abe758..a70e8407 100644
--- a/src/controls/Private/EditMenu.qml
+++ b/src/controls/Private/EditMenu.qml
@@ -45,8 +45,9 @@ Loader {
property Item selectionHandle
property Flickable flickable
property Component defaultMenu: item && item.defaultMenu ? item.defaultMenu : null
- property Menu menuInstance: null
+ property QtObject menuInstance: null
property MouseArea mouseArea
+ property QtObject style: __style
Connections {
target: control
@@ -67,6 +68,18 @@ Loader {
return menuInstance;
}
- source: Qt.resolvedUrl(Qt.platform.os === "ios" ? "EditMenu_ios.qml"
- : Qt.platform.os === "android" ? "" : "EditMenu_base.qml")
+ function syncStyle() {
+ if (!style)
+ return;
+
+ if (style.__editMenu)
+ sourceComponent = style.__editMenu;
+ else {
+ // todo: get ios/android/base menus from style as well
+ source = (Qt.resolvedUrl(Qt.platform.os === "ios" ? "EditMenu_ios.qml"
+ : Qt.platform.os === "android" ? "" : "EditMenu_base.qml"));
+ }
+ }
+ onStyleChanged: syncStyle();
+ Component.onCompleted: syncStyle();
}
diff --git a/src/controls/Private/EditMenu_ios.qml b/src/controls/Private/EditMenu_ios.qml
index 94c4617a..690b8797 100644
--- a/src/controls/Private/EditMenu_ios.qml
+++ b/src/controls/Private/EditMenu_ios.qml
@@ -44,48 +44,7 @@ Item {
property bool __showMenuFromTouch: false
property Component defaultMenu: Menu {
- MenuItem {
- text: qsTr("Cut")
- shortcut: StandardKey.Cut
- visible: !input.readOnly && selectionStart !== selectionEnd
- onTriggered: {
- cut();
- select(input.cursorPosition, input.cursorPosition);
- }
- }
- MenuItem {
- text: qsTr("Copy")
- shortcut: StandardKey.Copy
- visible: selectionStart !== selectionEnd
- onTriggered: {
- copy();
- select(input.cursorPosition, input.cursorPosition);
- }
- }
- MenuItem {
- text: qsTr("Paste")
- shortcut: StandardKey.Paste
- visible: input.canPaste
- onTriggered: paste();
- }
- MenuItem {
- text: qsTr("Delete")
- shortcut: StandardKey.Delete
- visible: !input.readOnly && selectionStart !== selectionEnd
- onTriggered: remove(selectionStart, selectionEnd)
- }
- MenuItem {
- text: qsTr("Select")
- shortcut: StandardKey.Select
- visible: selectionStart === selectionEnd && input.length > 0
- onTriggered: selectWord();
- }
- MenuItem {
- text: qsTr("Select All")
- shortcut: StandardKey.SelectAll
- visible: !(selectionStart === 0 && selectionEnd === length)
- onTriggered: selectAll();
- }
+ /* iOS plugin will automatically populate edit menus with standard edit actions */
}
Connections {
diff --git a/src/controls/Private/MenuContentItem.qml b/src/controls/Private/MenuContentItem.qml
index c208e093..5a827b61 100644
--- a/src/controls/Private/MenuContentItem.qml
+++ b/src/controls/Private/MenuContentItem.qml
@@ -178,7 +178,7 @@ Loader {
id: menuItemLoader
Accessible.role: opts.type === MenuItemType.Item || opts.type === MenuItemType.Menu ?
- Accessible.MenuItem : Acccessible.NoRole
+ Accessible.MenuItem : Accessible.NoRole
Accessible.name: StyleHelpers.removeMnemonics(opts.text)
Accessible.checkable: opts.checkable
Accessible.checked: opts.checked
diff --git a/src/controls/Private/ScrollBar.qml b/src/controls/Private/ScrollBar.qml
index f6f5e26d..ca9c21cd 100644
--- a/src/controls/Private/ScrollBar.qml
+++ b/src/controls/Private/ScrollBar.qml
@@ -88,7 +88,7 @@ Item {
property int pageStep: internal.horizontal ? width : height
property bool scrollToClickposition: internal.scrollToClickPosition
anchors.fill: parent
- cursorShape: __panel.visible ? Qt.ArrowCursor : Qt.IBeamCursor // forces a cursor change
+ cursorShape: __panel && __panel.visible ? Qt.ArrowCursor : Qt.IBeamCursor // forces a cursor change
property bool autoincrement: false
property bool scrollToClickPosition: __style ? __style.scrollToClickedPosition : 0
diff --git a/src/controls/Private/ScrollViewHelper.qml b/src/controls/Private/ScrollViewHelper.qml
index e63d33ff..24def4c9 100644
--- a/src/controls/Private/ScrollViewHelper.qml
+++ b/src/controls/Private/ScrollViewHelper.qml
@@ -44,7 +44,7 @@ import QtQuick.Controls.Private 1.0
\inqmlmodule QtQuick.Controls.Private
*/
Item {
- id: wheelarea
+ id: scrollHelper
property alias horizontalScrollBar: hscrollbar
property alias verticalScrollBar: vscrollbar
@@ -53,17 +53,15 @@ Item {
property int availableWidth
property int contentHeight
property int contentWidth
- property real originX
- property real originY
property bool active
property int horizontalScrollBarPolicy: Qt.ScrollBarAsNeeded
property int verticalScrollBarPolicy: Qt.ScrollBarAsNeeded
- property int leftMargin: outerFrame ? root.__style.padding.left : 0
- property int rightMargin: outerFrame ? root.__style.padding.right : 0
- property int topMargin: outerFrame ? root.__style.padding.top : 0
- property int bottomMargin: outerFrame ? root.__style.padding.bottom : 0
+ property int leftMargin: outerFrame && root.__style ? root.__style.padding.left : 0
+ property int rightMargin: outerFrame && root.__style ? root.__style.padding.right : 0
+ property int topMargin: outerFrame && root.__style ? root.__style.padding.top : 0
+ property int bottomMargin: outerFrame && root.__style ? root.__style.padding.bottom : 0
anchors.fill: parent
@@ -72,12 +70,10 @@ Item {
function doLayout() {
if (!recursionGuard) {
recursionGuard = true
- wheelarea.availableWidth = viewport.width
- wheelarea.availableHeight = viewport.height
- wheelarea.contentWidth = flickableItem !== null ? flickableItem.contentWidth : 0
- wheelarea.contentHeight = flickableItem !== null ? flickableItem.contentHeight : 0
- wheelarea.originX = flickableItem !== null ? flickableItem.originX : 0
- wheelarea.originY = flickableItem !== null ? flickableItem.originY : 0
+ scrollHelper.availableWidth = viewport.width
+ scrollHelper.availableHeight = viewport.height
+ scrollHelper.contentWidth = flickableItem !== null ? flickableItem.contentWidth : 0
+ scrollHelper.contentHeight = flickableItem !== null ? flickableItem.contentHeight : 0
recursionGuard = false
}
}
@@ -92,12 +88,6 @@ Item {
target: flickableItem
onContentWidthChanged: doLayout()
onContentHeightChanged: doLayout()
- onOriginXChanged: doLayout()
- onOriginYChanged: doLayout()
- }
-
- Connections {
- target: flickableItem
onContentXChanged: {
hscrollbar.flash()
vscrollbar.flash()
@@ -111,7 +101,7 @@ Item {
Loader {
id: cornerFill
z: 1
- sourceComponent: __style.corner
+ sourceComponent: __style ? __style.corner : null
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: bottomMargin
@@ -123,15 +113,17 @@ Item {
ScrollBar {
id: hscrollbar
+ readonly property int scrollAmount: contentWidth - availableWidth
+ readonly property bool scrollable: scrollAmount > 0
isTransient: !!__panel && !!__panel.isTransient
active: !!__panel && (__panel.sunken || __panel.activeControl !== "none")
enabled: !isTransient || __panel.visible
orientation: Qt.Horizontal
- visible: horizontalScrollBarPolicy == Qt.ScrollBarAsNeeded ? (contentWidth > availableWidth) : horizontalScrollBarPolicy == Qt.ScrollBarAlwaysOn
+ visible: horizontalScrollBarPolicy == Qt.ScrollBarAsNeeded ? scrollable : horizontalScrollBarPolicy == Qt.ScrollBarAlwaysOn
height: visible ? implicitHeight : 0
z: 1
- maximumValue: contentWidth > availableWidth ? originX + contentWidth - availableWidth : 0
- minimumValue: originX
+ maximumValue: scrollable ? scrollAmount : 0
+ minimumValue: 0
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: cornerFill.left
@@ -139,20 +131,20 @@ Item {
anchors.bottomMargin: bottomMargin
onValueChanged: {
if (!blockUpdates) {
- flickableItem.contentX = value
+ flickableItem.contentX = value + flickableItem.originX
}
}
Binding {
target: hscrollbar.__panel
property: "raised"
- value: vscrollbar.active || wheelarea.active
+ value: vscrollbar.active || scrollHelper.active
when: hscrollbar.isTransient
}
Binding {
target: hscrollbar.__panel
property: "visible"
value: true
- when: !hscrollbar.isTransient || wheelarea.active
+ when: !hscrollbar.isTransient || scrollHelper.active
}
function flash() {
if (hscrollbar.isTransient) {
@@ -170,36 +162,38 @@ Item {
ScrollBar {
id: vscrollbar
+ readonly property int scrollAmount: contentHeight - availableHeight
+ readonly property bool scrollable: scrollAmount > 0
isTransient: !!__panel && !!__panel.isTransient
active: !!__panel && (__panel.sunken || __panel.activeControl !== "none")
enabled: !isTransient || __panel.visible
orientation: Qt.Vertical
- visible: verticalScrollBarPolicy == Qt.ScrollBarAsNeeded ? (contentHeight > availableHeight) : verticalScrollBarPolicy == Qt.ScrollBarAlwaysOn
+ visible: verticalScrollBarPolicy === Qt.ScrollBarAsNeeded ? scrollable : verticalScrollBarPolicy === Qt.ScrollBarAlwaysOn
width: visible ? implicitWidth : 0
z: 1
anchors.bottom: cornerFill.top
- maximumValue: contentHeight > availableHeight ? originY + contentHeight - availableHeight + __viewTopMargin : 0
- minimumValue: originY
+ maximumValue: scrollable ? scrollAmount + __viewTopMargin : 0
+ minimumValue: 0
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: __scrollBarTopMargin + topMargin
anchors.rightMargin: rightMargin
onValueChanged: {
if (flickableItem && !blockUpdates && enabled) {
- flickableItem.contentY = value
+ flickableItem.contentY = value + flickableItem.originY
}
}
Binding {
target: vscrollbar.__panel
property: "raised"
- value: hscrollbar.active || wheelarea.active
+ value: hscrollbar.active || scrollHelper.active
when: vscrollbar.isTransient
}
Binding {
target: vscrollbar.__panel
property: "visible"
value: true
- when: !vscrollbar.isTransient || wheelarea.active
+ when: !vscrollbar.isTransient || scrollHelper.active
}
function flash() {
if (vscrollbar.isTransient) {
diff --git a/src/controls/Private/TextInputWithHandles.qml b/src/controls/Private/TextInputWithHandles.qml
index 42e7fde0..b1ea9a57 100644
--- a/src/controls/Private/TextInputWithHandles.qml
+++ b/src/controls/Private/TextInputWithHandles.qml
@@ -144,13 +144,15 @@ TextInput {
active: control.selectByMouse && Settings.isMobile
maximum: cursorHandle.position - 1
+ readonly property var mappedOrigin: editor.mapToItem(parent, 0,0)
+
// Mention scenePos in the mappedPos binding to force re-evaluation if it changes
- property var mappedPos: listener.scenePos.x !== listener.scenePos.y !== Number.MAX_VALUE ?
+ readonly property var mappedPos: listener.scenePos.x !== listener.scenePos.y !== Number.MAX_VALUE ?
editor.mapToItem(parent, editor.selectionRectangle.x, editor.selectionRectangle.y) : -1
x: mappedPos.x
y: mappedPos.y
- visible: pressed || (input.hasSelection && handleX + handleWidth >= -1 && handleX <= control.width + 1)
+ visible: pressed || (input.hasSelection && handleX + handleWidth >= -1 && handleX - mappedOrigin.x <= control.width + 1)
onPositionChanged: {
if (!input.blockRecursion) {
@@ -173,13 +175,15 @@ TextInput {
active: control.selectByMouse && Settings.isMobile
minimum: input.hasSelection ? selectionHandle.position + 1 : -1
+ readonly property var mappedOrigin: editor.mapToItem(parent, 0,0)
+
// Mention scenePos in the mappedPos binding to force re-evaluation if it changes
- property var mappedPos: listener.scenePos.x !== listener.scenePos.y !== Number.MAX_VALUE ?
+ readonly property var mappedPos: listener.scenePos.x !== listener.scenePos.y !== Number.MAX_VALUE ?
editor.mapToItem(parent, editor.cursorRectangle.x, editor.cursorRectangle.y) : -1
x: mappedPos.x
y: mappedPos.y
- visible: pressed || ((input.cursorVisible || input.hasSelection) && handleX + handleWidth >= -1 && handleX <= control.width + 1)
+ visible: pressed || ((input.cursorVisible || input.hasSelection) && handleX + handleWidth >= -1 && handleX - mappedOrigin.x <= control.width + 1)
onPositionChanged: {
if (!input.blockRecursion) {
diff --git a/src/controls/Private/TreeViewItemDelegateLoader.qml b/src/controls/Private/TreeViewItemDelegateLoader.qml
index c4e13729..8b8801fc 100644
--- a/src/controls/Private/TreeViewItemDelegateLoader.qml
+++ b/src/controls/Private/TreeViewItemDelegateLoader.qml
@@ -98,6 +98,7 @@ TableViewItemDelegateLoader {
visible: itemDelegateLoader.width > __itemIndentation
sourceComponent: __style && __style.__branchDelegate || null
anchors.right: parent.item ? parent.item.left : undefined
+ anchors.rightMargin: __style.__indentation > width ? (__style.__indentation - width) / 2 : 0
anchors.verticalCenter: parent.verticalCenter
property QtObject styleData: itemDelegateLoader.styleData
onLoaded: if (__rowItem) __rowItem.branchDecoration = item
diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp
index 55850bf0..6f7dc729 100644
--- a/src/controls/Private/qquickcontrolsettings.cpp
+++ b/src/controls/Private/qquickcontrolsettings.cpp
@@ -98,6 +98,9 @@ bool QQuickControlSettings::isMobile() const
#if defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX) || defined(Q_OS_WINRT)
return true;
#else
+ if (qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MOBILE")) {
+ return true;
+ }
return false;
#endif
}
@@ -112,11 +115,11 @@ QString QQuickControlSettings::makeStyleComponentPath(const QString &controlStyl
return styleDirPath + QStringLiteral("/") + controlStyleName;
}
-QUrl QQuickControlSettings::makeStyleComponentUrl(const QString &controlStyleName, QString styleDirPath)
+QUrl QQuickControlSettings::makeStyleComponentUrl(const QString &controlStyleName, const QString &styleDirPath)
{
QString styleFilePath = makeStyleComponentPath(controlStyleName, styleDirPath);
- if (styleDirPath.startsWith(QStringLiteral(":/")))
+ if (styleDirPath.startsWith(QLatin1String(":/")))
return QUrl(QStringLiteral("qrc") + styleFilePath);
return QUrl::fromLocalFile(styleFilePath);
diff --git a/src/controls/Private/qquickcontrolsettings_p.h b/src/controls/Private/qquickcontrolsettings_p.h
index 1b99fd3e..6a4e8c6a 100644
--- a/src/controls/Private/qquickcontrolsettings_p.h
+++ b/src/controls/Private/qquickcontrolsettings_p.h
@@ -90,7 +90,7 @@ private:
void findStyle(QQmlEngine *engine, const QString &styleName);
bool resolveCurrentStylePath();
QString makeStyleComponentPath(const QString &controlStyleName, const QString &styleDirPath);
- QUrl makeStyleComponentUrl(const QString &controlStyleName, QString styleDirPath);
+ QUrl makeStyleComponentUrl(const QString &controlStyleName, const QString &styleDirPath);
struct StyleData
{
diff --git a/src/controls/Private/qquickstyleitem.cpp b/src/controls/Private/qquickstyleitem.cpp
index 3cf8ebbe..c8be5685 100644
--- a/src/controls/Private/qquickstyleitem.cpp
+++ b/src/controls/Private/qquickstyleitem.cpp
@@ -284,9 +284,9 @@ void QQuickStyleItem::initStyleOption()
if (m_styleoption)
m_styleoption->state = 0;
- QString sizeHint = m_hints.value("size").toString();
- QPlatformTheme::Font platformFont = (sizeHint == "mini") ? QPlatformTheme::MiniFont :
- (sizeHint == "small") ? QPlatformTheme::SmallFont :
+ QString sizeHint = m_hints.value(QStringLiteral("size")).toString();
+ QPlatformTheme::Font platformFont = (sizeHint == QLatin1String("mini")) ? QPlatformTheme::MiniFont :
+ (sizeHint == QLatin1String("small")) ? QPlatformTheme::SmallFont :
QPlatformTheme::SystemFont;
bool needsResolvePalette = true;
@@ -298,10 +298,10 @@ void QQuickStyleItem::initStyleOption()
QStyleOptionButton *opt = qstyleoption_cast<QStyleOptionButton*>(m_styleoption);
opt->text = text();
- opt->icon = m_properties["icon"].value<QIcon>();
+ opt->icon = m_properties[QStringLiteral("icon")].value<QIcon>();
int e = qApp->style()->pixelMetric(QStyle::PM_ButtonIconSize, m_styleoption, 0);
opt->iconSize = QSize(e, e);
- opt->features = (activeControl() == "default") ?
+ opt->features = activeControl() == QLatin1String("default") ?
QStyleOptionButton::DefaultButton :
QStyleOptionButton::None;
if (platformFont == QPlatformTheme::SystemFont)
@@ -309,11 +309,11 @@ void QQuickStyleItem::initStyleOption()
const QFont *font = QGuiApplicationPrivate::platformTheme()->font(platformFont);
if (font)
opt->fontMetrics = QFontMetrics(*font);
- QObject * menu = m_properties["menu"].value<QObject *>();
+ QObject * menu = m_properties[QStringLiteral("menu")].value<QObject *>();
if (menu) {
opt->features |= QStyleOptionButton::HasMenu;
#ifdef Q_OS_OSX
- if (style() == "mac") {
+ if (style() == QLatin1String("mac")) {
if (platformFont == QPlatformTheme::PushButtonFont)
menu->setProperty("__xOffset", 12);
else
@@ -337,7 +337,7 @@ void QQuickStyleItem::initStyleOption()
QStyleOptionViewItem *opt = qstyleoption_cast<QStyleOptionViewItem*>(m_styleoption);
opt->features = 0;
- if (activeControl() == "alternate")
+ if (activeControl() == QLatin1String("alternate"))
opt->features |= QStyleOptionViewItem::Alternate;
}
break;
@@ -375,9 +375,9 @@ void QQuickStyleItem::initStyleOption()
m_styleoption = new QStyleOption;
m_styleoption->state = QStyle::State_Item; // We don't want to fully support Win 95
- if (m_properties.value("hasChildren").toBool())
+ if (m_properties.value(QStringLiteral("hasChildren")).toBool())
m_styleoption->state |= QStyle::State_Children;
- if (m_properties.value("hasSibling").toBool()) // Even this one could go away
+ if (m_properties.value(QStringLiteral("hasSibling")).toBool()) // Even this one could go away
m_styleoption->state |= QStyle::State_Sibling;
if (m_on)
m_styleoption->state |= QStyle::State_Open;
@@ -389,17 +389,17 @@ void QQuickStyleItem::initStyleOption()
QStyleOptionHeader *opt = qstyleoption_cast<QStyleOptionHeader*>(m_styleoption);
opt->text = text();
- opt->textAlignment = static_cast<Qt::AlignmentFlag>(m_properties.value("textalignment").toInt());
- opt->sortIndicator = activeControl() == "down" ?
+ opt->textAlignment = static_cast<Qt::AlignmentFlag>(m_properties.value(QStringLiteral("textalignment")).toInt());
+ opt->sortIndicator = activeControl() == QLatin1String("down") ?
QStyleOptionHeader::SortDown
- : activeControl() == "up" ?
+ : activeControl() == QLatin1String("up") ?
QStyleOptionHeader::SortUp : QStyleOptionHeader::None;
- QString headerpos = m_properties.value("headerpos").toString();
- if (headerpos == "beginning")
+ QString headerpos = m_properties.value(QStringLiteral("headerpos")).toString();
+ if (headerpos == QLatin1String("beginning"))
opt->position = QStyleOptionHeader::Beginning;
- else if (headerpos == "end")
+ else if (headerpos == QLatin1String("end"))
opt->position = QStyleOptionHeader::End;
- else if (headerpos == "only")
+ else if (headerpos == QLatin1String("only"))
opt->position = QStyleOptionHeader::OnlyOneSection;
else
opt->position = QStyleOptionHeader::Middle;
@@ -417,9 +417,9 @@ void QQuickStyleItem::initStyleOption()
opt->state |= QStyle::State_AutoRaise;
opt->activeSubControls = QStyle::SC_ToolButton;
opt->text = text();
- opt->icon = m_properties["icon"].value<QIcon>();
+ opt->icon = m_properties[QStringLiteral("icon")].value<QIcon>();
- if (m_properties.value("menu").toBool()) {
+ if (m_properties.value(QStringLiteral("menu")).toBool()) {
opt->subControls |= QStyle::SC_ToolButtonMenu;
opt->features = QStyleOptionToolButton::HasMenu;
}
@@ -451,14 +451,14 @@ void QQuickStyleItem::initStyleOption()
QStyleOptionTab *opt = qstyleoption_cast<QStyleOptionTab*>(m_styleoption);
opt->text = text();
- if (m_properties.value("hasFrame").toBool())
+ if (m_properties.value(QStringLiteral("hasFrame")).toBool())
opt->features |= QStyleOptionTab::HasFrame;
- QString orientation = m_properties.value("orientation").toString();
- QString position = m_properties.value("tabpos").toString();
- QString selectedPosition = m_properties.value("selectedpos").toString();
+ QString orientation = m_properties.value(QStringLiteral("orientation")).toString();
+ QString position = m_properties.value(QStringLiteral("tabpos")).toString();
+ QString selectedPosition = m_properties.value(QStringLiteral("selectedpos")).toString();
- opt->shape = (orientation == "Bottom") ? QTabBar::RoundedSouth : QTabBar::RoundedNorth;
+ opt->shape = orientation == QLatin1String("Bottom") ? QTabBar::RoundedSouth : QTabBar::RoundedNorth;
if (position == QLatin1String("beginning"))
opt->position = QStyleOptionTab::Beginning;
else if (position == QLatin1String("end"))
@@ -500,8 +500,8 @@ void QQuickStyleItem::initStyleOption()
m_styleoption = new QStyleOptionTabWidgetFrame();
QStyleOptionTabWidgetFrame *opt = qstyleoption_cast<QStyleOptionTabWidgetFrame*>(m_styleoption);
- opt->selectedTabRect = m_properties["selectedTabRect"].toRect();
- opt->shape = m_properties["orientation"] == Qt::BottomEdge ? QTabBar::RoundedSouth : QTabBar::RoundedNorth;
+ opt->selectedTabRect = m_properties[QStringLiteral("selectedTabRect")].toRect();
+ opt->shape = m_properties[QStringLiteral("orientation")] == Qt::BottomEdge ? QTabBar::RoundedSouth : QTabBar::RoundedNorth;
if (minimum())
opt->selectedTabRect = QRect(value(), 0, minimum(), height());
opt->tabBarSize = QSize(minimum() , height());
@@ -525,7 +525,7 @@ void QQuickStyleItem::initStyleOption()
QStyleOptionMenuItem *opt = qstyleoption_cast<QStyleOptionMenuItem*>(m_styleoption);
opt->text = text();
opt->menuItemType = QStyleOptionMenuItem::Normal;
- setProperty("_q_showUnderlined", m_hints["showUnderlined"].toBool());
+ setProperty("_q_showUnderlined", m_hints[QStringLiteral("showUnderlined")].toBool());
if (const QFont *font = QGuiApplicationPrivate::platformTheme()->font(QPlatformTheme::MenuBarFont)) {
opt->font = *font;
@@ -550,9 +550,9 @@ void QQuickStyleItem::initStyleOption()
setProperty("_q_isComboBoxPopupItem", m_itemType == ComboBoxItem);
QQuickMenuItemType::MenuItemType type =
- static_cast<QQuickMenuItemType::MenuItemType>(m_properties["type"].toInt());
+ static_cast<QQuickMenuItemType::MenuItemType>(m_properties[QStringLiteral("type")].toInt());
if (type == QQuickMenuItemType::ScrollIndicator) {
- int scrollerDirection = m_properties["scrollerDirection"].toInt();
+ int scrollerDirection = m_properties[QStringLiteral("scrollerDirection")].toInt();
opt->menuItemType = QStyleOptionMenuItem::Scroller;
opt->state |= scrollerDirection == Qt::UpArrow ?
QStyle::State_UpArrow : QStyle::State_DownArrow;
@@ -566,21 +566,21 @@ void QQuickStyleItem::initStyleOption()
} else {
opt->menuItemType = QStyleOptionMenuItem::Normal;
- QString shortcut = m_properties["shortcut"].toString();
+ QString shortcut = m_properties[QStringLiteral("shortcut")].toString();
if (!shortcut.isEmpty()) {
opt->text += QLatin1Char('\t') + shortcut;
opt->tabWidth = qMax(opt->tabWidth, qRound(textWidth(shortcut)));
}
- if (m_properties["checkable"].toBool()) {
+ if (m_properties[QStringLiteral("checkable")].toBool()) {
opt->checked = on();
- QVariant exclusive = m_properties["exclusive"];
+ QVariant exclusive = m_properties[QStringLiteral("exclusive")];
opt->checkType = exclusive.toBool() ? QStyleOptionMenuItem::Exclusive :
QStyleOptionMenuItem::NonExclusive;
}
}
- if (m_properties["icon"].canConvert<QIcon>())
- opt->icon = m_properties["icon"].value<QIcon>();
+ if (m_properties[QStringLiteral("icon")].canConvert<QIcon>())
+ opt->icon = m_properties[QStringLiteral("icon")].value<QIcon>();
setProperty("_q_showUnderlined", m_hints["showUnderlined"].toBool());
if (const QFont *font = QGuiApplicationPrivate::platformTheme()->font(m_itemType == ComboBoxItem ? QPlatformTheme::ComboMenuItemFont : QPlatformTheme::MenuFont)) {
@@ -600,7 +600,7 @@ void QQuickStyleItem::initStyleOption()
QStyleOptionButton *opt = qstyleoption_cast<QStyleOptionButton*>(m_styleoption);
if (!on())
opt->state |= QStyle::State_Off;
- if (m_properties.value("partiallyChecked").toBool())
+ if (m_properties.value(QStringLiteral("partiallyChecked")).toBool())
opt->state |= QStyle::State_NoChange;
opt->text = text();
}
@@ -625,10 +625,11 @@ void QQuickStyleItem::initStyleOption()
if (font)
opt->fontMetrics = QFontMetrics(*font);
opt->currentText = text();
- opt->editable = m_properties["editable"].toBool();
+ opt->editable = m_properties[QStringLiteral("editable")].toBool();
#ifdef Q_OS_OSX
- if (m_properties["popup"].canConvert<QObject *>() && style() == "mac") {
- QObject *popup = m_properties["popup"].value<QObject *>();
+ if (m_properties[QStringLiteral("popup")].canConvert<QObject *>()
+ && style() == QLatin1String("mac")) {
+ QObject *popup = m_properties[QStringLiteral("popup")].value<QObject *>();
if (platformFont == QPlatformTheme::MiniFont) {
popup->setProperty("__xOffset", -2);
popup->setProperty("__yOffset", 5);
@@ -690,8 +691,8 @@ void QQuickStyleItem::initStyleOption()
opt->sliderValue = value();
opt->subControls = QStyle::SC_SliderGroove | QStyle::SC_SliderHandle;
- opt->tickPosition = (activeControl() == "ticks" ?
- QSlider::TicksBelow : QSlider::NoTicks);
+ opt->tickPosition = activeControl() == QLatin1String("ticks") ?
+ QSlider::TicksBelow : QSlider::NoTicks;
if (opt->tickPosition != QSlider::NoTicks)
opt->subControls |= QStyle::SC_SliderTickmarks;
@@ -718,12 +719,12 @@ void QQuickStyleItem::initStyleOption()
opt->lineWidth = 1;
opt->subControls = QStyle::SC_GroupBoxLabel;
opt->features = 0;
- if (m_properties["sunken"].toBool()) { // Qt draws an ugly line here so I ignore it
+ if (m_properties[QStringLiteral("sunken")].toBool()) { // Qt draws an ugly line here so I ignore it
opt->subControls |= QStyle::SC_GroupBoxFrame;
} else {
opt->features |= QStyleOptionFrame::Flat;
}
- if (m_properties["checkable"].toBool())
+ if (m_properties[QStringLiteral("checkable")].toBool())
opt->subControls |= QStyle::SC_GroupBoxCheckBox;
}
@@ -805,9 +806,9 @@ void QQuickStyleItem::initStyleOption()
}
}
- if (sizeHint == "mini") {
+ if (sizeHint == QLatin1String("mini")) {
m_styleoption->state |= QStyle::State_Mini;
- } else if (sizeHint == "small") {
+ } else if (sizeHint == QLatin1String("small")) {
m_styleoption->state |= QStyle::State_Small;
}
@@ -888,7 +889,7 @@ QString QQuickStyleItem::style() const
style = style.toLower();
if (style.startsWith(QLatin1Char('q')))
style = style.right(style.length() - 1);
- if (style.endsWith("style"))
+ if (style.endsWith(QLatin1String("style")))
style = style.left(style.length() - 5);
return style;
}
@@ -902,10 +903,9 @@ QString QQuickStyleItem::hitTest(int px, int py)
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
QPoint(px,py), 0);
if (subcontrol == QStyle::SC_SpinBoxUp)
- return "up";
+ return QStringLiteral("up");
else if (subcontrol == QStyle::SC_SpinBoxDown)
- return "down";
-
+ return QStringLiteral("down");
}
break;
@@ -914,32 +914,40 @@ QString QQuickStyleItem::hitTest(int px, int py)
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
QPoint(px,py), 0);
if (subcontrol == QStyle::SC_SliderHandle)
- return "handle";
-
+ return QStringLiteral("handle");
}
break;
+
case ScrollBar: {
subcontrol = qApp->style()->hitTestComplexControl(QStyle::CC_ScrollBar,
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
QPoint(px,py), 0);
- if (subcontrol == QStyle::SC_ScrollBarSlider)
- return "handle";
+ switch (subcontrol) {
+ case QStyle::SC_ScrollBarSlider:
+ return QStringLiteral("handle");
+
+ case QStyle::SC_ScrollBarSubLine:
+ return QStringLiteral("up");
+
+ case QStyle::SC_ScrollBarSubPage:
+ return QStringLiteral("upPage");
- if (subcontrol == QStyle::SC_ScrollBarSubLine)
- return "up";
- else if (subcontrol == QStyle::SC_ScrollBarSubPage)
- return "upPage";
+ case QStyle::SC_ScrollBarAddLine:
+ return QStringLiteral("down");
- if (subcontrol == QStyle::SC_ScrollBarAddLine)
- return "down";
- else if (subcontrol == QStyle::SC_ScrollBarAddPage)
- return "downPage";
+ case QStyle::SC_ScrollBarAddPage:
+ return QStringLiteral("downPage");
+
+ default:
+ break;
+ }
}
break;
+
default:
break;
}
- return "none";
+ return QStringLiteral("none");
}
QSize QQuickStyleItem::sizeFromContents(int width, int height)
@@ -955,7 +963,7 @@ QSize QQuickStyleItem::sizeFromContents(int width, int height)
size = qApp->style()->sizeFromContents(QStyle::CT_CheckBox, m_styleoption, QSize(width,height));
break;
case ToolBar:
- size = QSize(200, style().contains("windows") ? 30 : 42);
+ size = QSize(200, style().contains(QLatin1String("windows")) ? 30 : 42);
break;
case ToolButton: {
QStyleOptionToolButton *btn = qstyleoption_cast<QStyleOptionToolButton*>(m_styleoption);
@@ -999,7 +1007,7 @@ QSize QQuickStyleItem::sizeFromContents(int width, int height)
int newHeight = qMax(height, contentHeight);
size = qApp->style()->sizeFromContents(QStyle::CT_PushButton, m_styleoption, QSize(newWidth, newHeight)); }
#ifdef Q_OS_OSX
- if (style() == "mac") {
+ if (style() == QLatin1String("mac")) {
// Cancel out QMacStylePrivate::PushButton*Offset, or part of it
size -= QSize(7, 6);
}
@@ -1022,20 +1030,20 @@ QSize QQuickStyleItem::sizeFromContents(int width, int height)
break;
case SpinBox:
#ifdef Q_OS_OSX
- if (style() == "mac") {
+ if (style() == QLatin1String("mac")) {
size = qApp->style()->sizeFromContents(QStyle::CT_SpinBox, m_styleoption, QSize(width, height + 5));
break;
}
#endif // fall through if not mac
case Edit:
#ifdef Q_OS_OSX
- if (style() =="mac") {
- QString sizeHint = m_hints.value("size").toString();
- if ((sizeHint == "small") || (sizeHint == "mini"))
+ if (style() == QLatin1String("mac")) {
+ QString sizeHint = m_hints.value(QStringLiteral("size")).toString();
+ if (sizeHint == QLatin1String("small") || sizeHint == QLatin1String("mini"))
size = QSize(width, 19);
else
size = QSize(width, 22);
- if (style() == "mac" && hints().value("rounded").toBool())
+ if (hints().value(QStringLiteral("rounded")).toBool())
size += QSize(4, 4);
} else
@@ -1069,7 +1077,7 @@ QSize QQuickStyleItem::sizeFromContents(int width, int height)
case Header:
size = qApp->style()->sizeFromContents(QStyle::CT_HeaderSection, m_styleoption, QSize(width,height));
#ifdef Q_OS_OSX
- if (style() =="mac")
+ if (style() == QLatin1String("mac"))
size.setHeight(15);
#endif
break;
@@ -1120,7 +1128,7 @@ qreal QQuickStyleItem::baselineOffset()
case ComboBox:
if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox *>(m_styleoption)) {
r = qApp->style()->subControlRect(QStyle::CC_ComboBox, combo, QStyle::SC_ComboBoxEditField);
- if (style() != QStringLiteral("mac"))
+ if (style() != QLatin1String("mac"))
r.adjust(0,0,0,1);
}
break;
@@ -1140,7 +1148,7 @@ qreal QQuickStyleItem::baselineOffset()
surplus++;
int result = r.top() + surplus/2 + fm.ascent();
#ifdef Q_OS_OSX
- if (style() == QStringLiteral("mac")) {
+ if (style() == QLatin1String("mac")) {
switch (m_itemType) {
case Button:
case Edit:
@@ -1200,47 +1208,47 @@ void QQuickStyleItem::updateRect()
int QQuickStyleItem::pixelMetric(const QString &metric)
{
- if (metric == "scrollbarExtent")
+ if (metric == QLatin1String("scrollbarExtent"))
return qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0 );
- else if (metric == "defaultframewidth")
+ else if (metric == QLatin1String("defaultframewidth"))
return qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption);
- else if (metric == "taboverlap")
+ else if (metric == QLatin1String("taboverlap"))
return qApp->style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0 );
- else if (metric == "tabbaseoverlap")
+ else if (metric == QLatin1String("tabbaseoverlap"))
return qApp->style()->pixelMetric(QStyle::PM_TabBarBaseOverlap, m_styleoption );
- else if (metric == "tabhspace")
+ else if (metric == QLatin1String("tabhspace"))
return qApp->style()->pixelMetric(QStyle::PM_TabBarTabHSpace, 0 );
- else if (metric == "indicatorwidth")
+ else if (metric == QLatin1String("indicatorwidth"))
return qApp->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, 0 );
- else if (metric == "tabvspace")
+ else if (metric == QLatin1String("tabvspace"))
return qApp->style()->pixelMetric(QStyle::PM_TabBarTabVSpace, 0 );
- else if (metric == "tabbaseheight")
+ else if (metric == QLatin1String("tabbaseheight"))
return qApp->style()->pixelMetric(QStyle::PM_TabBarBaseHeight, 0 );
- else if (metric == "tabvshift")
+ else if (metric == QLatin1String("tabvshift"))
return qApp->style()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, 0 );
- else if (metric == "menubarhmargin")
+ else if (metric == QLatin1String("menubarhmargin"))
return qApp->style()->pixelMetric(QStyle::PM_MenuBarHMargin, 0 );
- else if (metric == "menubarvmargin")
+ else if (metric == QLatin1String("menubarvmargin"))
return qApp->style()->pixelMetric(QStyle::PM_MenuBarVMargin, 0 );
- else if (metric == "menubarpanelwidth")
+ else if (metric == QLatin1String("menubarpanelwidth"))
return qApp->style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, 0 );
- else if (metric == "menubaritemspacing")
+ else if (metric == QLatin1String("menubaritemspacing"))
return qApp->style()->pixelMetric(QStyle::PM_MenuBarItemSpacing, 0 );
- else if (metric == "spacebelowmenubar")
+ else if (metric == QLatin1String("spacebelowmenubar"))
return qApp->style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, m_styleoption);
- else if (metric == "menuhmargin")
+ else if (metric == QLatin1String("menuhmargin"))
return qApp->style()->pixelMetric(QStyle::PM_MenuHMargin, 0 );
- else if (metric == "menuvmargin")
+ else if (metric == QLatin1String("menuvmargin"))
return qApp->style()->pixelMetric(QStyle::PM_MenuVMargin, 0 );
- else if (metric == "menupanelwidth")
+ else if (metric == QLatin1String("menupanelwidth"))
return qApp->style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0 );
- else if (metric == "submenuoverlap")
+ else if (metric == QLatin1String("submenuoverlap"))
return qApp->style()->pixelMetric(QStyle::PM_SubMenuOverlap, 0 );
- else if (metric == "splitterwidth")
+ else if (metric == QLatin1String("splitterwidth"))
return qApp->style()->pixelMetric(QStyle::PM_SplitterWidth, 0 );
- else if (metric == "scrollbarspacing")
+ else if (metric == QLatin1String("scrollbarspacing"))
return abs(qApp->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, 0 ));
- else if (metric == "treeviewindentation")
+ else if (metric == QLatin1String("treeviewindentation"))
return qApp->style()->pixelMetric(QStyle::PM_TreeViewIndentation, 0 );
return 0;
}
@@ -1248,30 +1256,30 @@ int QQuickStyleItem::pixelMetric(const QString &metric)
QVariant QQuickStyleItem::styleHint(const QString &metric)
{
initStyleOption();
- if (metric == "comboboxpopup") {
+ if (metric == QLatin1String("comboboxpopup")) {
return qApp->style()->styleHint(QStyle::SH_ComboBox_Popup, m_styleoption);
- } else if (metric == "highlightedTextColor") {
+ } else if (metric == QLatin1String("highlightedTextColor")) {
return m_styleoption->palette.highlightedText().color().name();
- } else if (metric == "textColor") {
+ } else if (metric == QLatin1String("textColor")) {
QPalette pal = m_styleoption->palette;
pal.setCurrentColorGroup(active()? QPalette::Active : QPalette::Inactive);
return pal.text().color().name();
- } else if (metric == "focuswidget") {
+ } else if (metric == QLatin1String("focuswidget")) {
return qApp->style()->styleHint(QStyle::SH_FocusFrame_AboveWidget);
- } else if (metric == "tabbaralignment") {
+ } else if (metric == QLatin1String("tabbaralignment")) {
int result = qApp->style()->styleHint(QStyle::SH_TabBar_Alignment);
if (result == Qt::AlignCenter)
- return "center";
- return "left";
- } else if (metric == "externalScrollBars") {
+ return QStringLiteral("center");
+ return QStringLiteral("left");
+ } else if (metric == QLatin1String("externalScrollBars")) {
return qApp->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents);
- } else if (metric == "scrollToClickPosition")
+ } else if (metric == QLatin1String("scrollToClickPosition"))
return qApp->style()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition);
- else if (metric == "activateItemOnSingleClick")
+ else if (metric == QLatin1String("activateItemOnSingleClick"))
return qApp->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick);
- else if (metric == "submenupopupdelay")
+ else if (metric == QLatin1String("submenupopupdelay"))
return qApp->style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, m_styleoption);
- else if (metric == "wheelScrollLines")
+ else if (metric == QLatin1String("wheelScrollLines"))
return qApp->wheelScrollLines();
return 0;
@@ -1316,76 +1324,76 @@ void QQuickStyleItem::setElementType(const QString &str)
}
// Only enable visible if the widget can animate
- if (str == "menu") {
+ if (str == QLatin1String("menu")) {
m_itemType = Menu;
- } else if (str == "menuitem") {
+ } else if (str == QLatin1String("menuitem")) {
m_itemType = MenuItem;
- } else if (str == "item" || str == "itemrow" || str == "header") {
+ } else if (str == QLatin1String("item") || str == QLatin1String("itemrow") || str == QLatin1String("header")) {
#ifdef Q_OS_OSX
m_font.setPointSize(11.0);
emit fontChanged();
#endif
- if (str == "header") {
+ if (str == QLatin1String("header")) {
m_itemType = Header;
} else {
- m_itemType = (str == "item") ? Item : ItemRow;
+ m_itemType = str == QLatin1String("item") ? Item : ItemRow;
}
- } else if (str == "itembranchindicator") {
+ } else if (str == QLatin1String("itembranchindicator")) {
m_itemType = ItemBranchIndicator;
- } else if (str == "groupbox") {
+ } else if (str == QLatin1String("groupbox")) {
m_itemType = GroupBox;
- } else if (str == "tab") {
+ } else if (str == QLatin1String("tab")) {
m_itemType = Tab;
- } else if (str == "tabframe") {
+ } else if (str == QLatin1String("tabframe")) {
m_itemType = TabFrame;
- } else if (str == "comboboxitem") {
+ } else if (str == QLatin1String("comboboxitem")) {
// Gtk uses qobject cast, hence we need to separate this from menuitem
// On mac, we temporarily use the menu item because it has more accurate
// palette.
m_itemType = ComboBoxItem;
- } else if (str == "toolbar") {
+ } else if (str == QLatin1String("toolbar")) {
m_itemType = ToolBar;
- } else if (str == "toolbutton") {
+ } else if (str == QLatin1String("toolbutton")) {
m_itemType = ToolButton;
- } else if (str == "slider") {
+ } else if (str == QLatin1String("slider")) {
m_itemType = Slider;
- } else if (str == "frame") {
+ } else if (str == QLatin1String("frame")) {
m_itemType = Frame;
- } else if (str == "combobox") {
+ } else if (str == QLatin1String("combobox")) {
m_itemType = ComboBox;
- } else if (str == "splitter") {
+ } else if (str == QLatin1String("splitter")) {
m_itemType = Splitter;
- } else if (str == "progressbar") {
+ } else if (str == QLatin1String("progressbar")) {
m_itemType = ProgressBar;
- } else if (str == "button") {
+ } else if (str == QLatin1String("button")) {
m_itemType = Button;
- } else if (str == "checkbox") {
+ } else if (str == QLatin1String("checkbox")) {
m_itemType = CheckBox;
- } else if (str == "radiobutton") {
+ } else if (str == QLatin1String("radiobutton")) {
m_itemType = RadioButton;
- } else if (str == "edit") {
+ } else if (str == QLatin1String("edit")) {
m_itemType = Edit;
- } else if (str == "spinbox") {
+ } else if (str == QLatin1String("spinbox")) {
m_itemType = SpinBox;
- } else if (str == "scrollbar") {
+ } else if (str == QLatin1String("scrollbar")) {
m_itemType = ScrollBar;
- } else if (str == "widget") {
+ } else if (str == QLatin1String("widget")) {
m_itemType = Widget;
- } else if (str == "focusframe") {
+ } else if (str == QLatin1String("focusframe")) {
m_itemType = FocusFrame;
- } else if (str == "focusrect") {
+ } else if (str == QLatin1String("focusrect")) {
m_itemType = FocusRect;
- } else if (str == "dial") {
+ } else if (str == QLatin1String("dial")) {
m_itemType = Dial;
- } else if (str == "statusbar") {
+ } else if (str == QLatin1String("statusbar")) {
m_itemType = StatusBar;
- } else if (str == "machelpbutton") {
+ } else if (str == QLatin1String("machelpbutton")) {
m_itemType = MacHelpButton;
- } else if (str == "scrollareacorner") {
+ } else if (str == QLatin1String("scrollareacorner")) {
m_itemType = ScrollAreaCorner;
- } else if (str == "menubar") {
+ } else if (str == QLatin1String("menubar")) {
m_itemType = MenuBar;
- } else if (str == "menubaritem") {
+ } else if (str == QLatin1String("menubaritem")) {
m_itemType = MenuBarItem;
} else {
m_itemType = Undefined;
@@ -1500,7 +1508,7 @@ void QQuickStyleItem::paint(QPainter *painter)
switch (m_itemType) {
case Button:
#ifdef Q_OS_OSX
- if (style() == "mac") {
+ if (style() == QLatin1String("mac")) {
// Add back what was substracted in sizeFromContents()
m_styleoption->rect.adjust(-4, -2, 3, 4);
}
@@ -1517,7 +1525,7 @@ void QQuickStyleItem::paint(QPainter *painter)
pixmap.fill(Qt::transparent);
QPainter pixpainter(&pixmap);
qApp->style()->drawPrimitive(QStyle::PE_PanelItemViewRow, m_styleoption, &pixpainter);
- if ((style() == "mac" || !qApp->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected)) && selected()) {
+ if ((style() == QLatin1String("mac") || !qApp->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected)) && selected()) {
QPalette pal = QApplication::palette("QAbstractItemView");
pal.setCurrentColorGroup(m_styleoption->palette.currentColorGroup());
pixpainter.fillRect(m_styleoption->rect, pal.highlight());
@@ -1539,7 +1547,7 @@ void QQuickStyleItem::paint(QPainter *painter)
case ToolButton:
#ifdef Q_OS_OSX
- if (style() == "mac" && hints().value("segmented").toBool()) {
+ if (style() == QLatin1String("mac") && hints().value(QStringLiteral("segmented")).toBool()) {
const QPaintDevice *target = painter->device();
HIThemeSegmentDrawInfo sgi;
sgi.version = 0;
@@ -1555,10 +1563,10 @@ void QQuickStyleItem::paint(QPainter *painter)
}
SInt32 button_height;
GetThemeMetric(kThemeMetricButtonRoundedHeight, &button_height);
- QString buttonPos = m_properties.value("position").toString();
- sgi.position = buttonPos == "leftmost" ? kHIThemeSegmentPositionFirst :
- buttonPos == "rightmost" ? kHIThemeSegmentPositionLast :
- buttonPos == "h_middle" ? kHIThemeSegmentPositionMiddle :
+ QString buttonPos = m_properties.value(QStringLiteral("position")).toString();
+ sgi.position = buttonPos == QLatin1String("leftmost") ? kHIThemeSegmentPositionFirst :
+ buttonPos == QLatin1String("rightmost") ? kHIThemeSegmentPositionLast :
+ buttonPos == QLatin1String("h_middle") ? kHIThemeSegmentPositionMiddle :
kHIThemeSegmentPositionOnly;
QRect centered = m_styleoption->rect;
centered.setHeight(button_height);
@@ -1571,7 +1579,7 @@ void QQuickStyleItem::paint(QPainter *painter)
break;
case Tab:
#ifdef Q_OS_OSX
- if (style() == "mac") {
+ if (style() == QLatin1String("mac")) {
m_styleoption->rect.translate(0, 1); // Unhack QMacStyle's hack
qApp->style()->drawControl(QStyle::CE_TabBarTabShape, m_styleoption, painter);
m_styleoption->rect.translate(0, -1);
@@ -1616,7 +1624,7 @@ void QQuickStyleItem::paint(QPainter *painter)
break;
case Edit: {
#ifdef Q_OS_OSX
- if (style() == "mac" && hints().value("rounded").toBool()) {
+ if (style() == QLatin1String("mac") && hints().value(QStringLiteral("rounded")).toBool()) {
const QPaintDevice *target = painter->device();
HIThemeFrameDrawInfo fdi;
fdi.version = 0;
@@ -1674,7 +1682,7 @@ void QQuickStyleItem::paint(QPainter *painter)
case SpinBox:
#ifdef Q_OS_MAC
// macstyle depends on the embedded qlineedit to fill the editfield background
- if (style() == "mac") {
+ if (style() == QLatin1String("mac")) {
QRect editRect = qApp->style()->subControlRect(QStyle::CC_SpinBox,
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
QStyle::SC_SpinBoxEditField);
@@ -1702,14 +1710,14 @@ void QQuickStyleItem::paint(QPainter *painter)
painter->fillRect(m_styleoption->rect, m_styleoption->palette.window().color());
qApp->style()->drawControl(QStyle::CE_ToolBar, m_styleoption, painter);
painter->save();
- painter->setPen(style() != "fusion" ? m_styleoption->palette.dark().color().darker(120) :
+ painter->setPen(style() != QLatin1String("fusion") ? m_styleoption->palette.dark().color().darker(120) :
m_styleoption->palette.window().color().lighter(107));
painter->drawLine(m_styleoption->rect.bottomLeft(), m_styleoption->rect.bottomRight());
painter->restore();
break;
case StatusBar:
#ifdef Q_OS_OSX
- if (style() == "mac") {
+ if (style() == QLatin1String("mac")) {
qApp->style()->drawControl(QStyle::CE_ToolBar, m_styleoption, painter);
painter->setPen(m_styleoption->palette.dark().color().darker(120));
painter->drawLine(m_styleoption->rect.topLeft(), m_styleoption->rect.topRight());
@@ -1876,20 +1884,20 @@ QPixmap QQuickTableRowImageProvider::requestPixmap(const QString &id, QSize *siz
QString style = qApp->style()->metaObject()->className();
opt.features = 0;
- if (id.contains("selected"))
+ if (id.contains(QLatin1String("selected")))
opt.state |= QStyle::State_Selected;
- if (id.contains("active")) {
+ if (id.contains(QLatin1String("active"))) {
opt.state |= QStyle::State_Active;
opt.palette.setCurrentColorGroup(QPalette::Active);
} else
opt.palette.setCurrentColorGroup(QPalette::Inactive);
- if (id.contains("alternate"))
+ if (id.contains(QLatin1String("alternate")))
opt.features |= QStyleOptionViewItem::Alternate;
QPalette pal = QApplication::palette("QAbstractItemView");
- if (opt.state & QStyle::State_Selected && (style.contains("Mac") ||
+ if (opt.state & QStyle::State_Selected && (style.contains(QLatin1String("Mac")) ||
!qApp->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected))) {
pal.setCurrentColorGroup(opt.palette.currentColorGroup());
pixmap.fill(pal.highlight().color());
diff --git a/src/controls/Private/qquicktreemodeladaptor.cpp b/src/controls/Private/qquicktreemodeladaptor.cpp
index 87b2808e..666fafc9 100644
--- a/src/controls/Private/qquicktreemodeladaptor.cpp
+++ b/src/controls/Private/qquicktreemodeladaptor.cpp
@@ -120,6 +120,29 @@ void QQuickTreeModelAdaptor::clearModelData()
endResetModel();
}
+const QModelIndex &QQuickTreeModelAdaptor::rootIndex() const
+{
+ return m_rootIndex;
+}
+
+void QQuickTreeModelAdaptor::setRootIndex(const QModelIndex &idx)
+{
+ if (m_rootIndex == idx)
+ return;
+
+ if (m_model)
+ clearModelData();
+ m_rootIndex = idx;
+ if (m_model)
+ showModelTopLevelItems();
+ emit rootIndexChanged();
+}
+
+void QQuickTreeModelAdaptor::resetRootIndex()
+{
+ setRootIndex(QModelIndex());
+}
+
QHash<int, QByteArray> QQuickTreeModelAdaptor::roleNames() const
{
if (!m_model)
@@ -180,7 +203,7 @@ bool QQuickTreeModelAdaptor::setData(const QModelIndex &index, const QVariant &v
int QQuickTreeModelAdaptor::itemIndex(const QModelIndex &index) const
{
// This is basically a plagiarism of QTreeViewPrivate::viewIndex()
- if (!index.isValid() || m_items.isEmpty())
+ if (!index.isValid() || index == m_rootIndex || m_items.isEmpty())
return -1;
const int totalCount = m_items.count();
@@ -226,7 +249,7 @@ bool QQuickTreeModelAdaptor::isVisible(const QModelIndex &index)
bool QQuickTreeModelAdaptor::childrenVisible(const QModelIndex &index)
{
- return (!index.isValid() && !m_items.isEmpty())
+ return (index == m_rootIndex && !m_items.isEmpty())
|| (m_expandedItems.contains(index) && isVisible(index));
}
@@ -302,21 +325,21 @@ void QQuickTreeModelAdaptor::showModelTopLevelItems(bool doInsertRows)
if (!m_model)
return;
- if (m_model->hasChildren(QModelIndex()) && m_model->canFetchMore(QModelIndex()))
- m_model->fetchMore(QModelIndex());
- const long topLevelRowCount = m_model->rowCount();
+ if (m_model->hasChildren(m_rootIndex) && m_model->canFetchMore(m_rootIndex))
+ m_model->fetchMore(m_rootIndex);
+ const long topLevelRowCount = m_model->rowCount(m_rootIndex);
if (topLevelRowCount == 0)
return;
- showModelChildItems(TreeItem(), 0, topLevelRowCount - 1, doInsertRows);
+ showModelChildItems(TreeItem(m_rootIndex), 0, topLevelRowCount - 1, doInsertRows);
}
void QQuickTreeModelAdaptor::showModelChildItems(const TreeItem &parentItem, int start, int end, bool doInsertRows, bool doExpandPendingRows)
{
const QModelIndex &parentIndex = parentItem.index;
- int rowIdx = parentIndex.isValid() ? itemIndex(parentIndex) + 1 : 0;
+ int rowIdx = parentIndex.isValid() && parentIndex != m_rootIndex ? itemIndex(parentIndex) + 1 : 0;
Q_ASSERT(rowIdx == 0 || parentItem.expanded);
- if (parentIndex.isValid() && (rowIdx == 0 || !parentItem.expanded))
+ if (parentIndex.isValid() && parentIndex != m_rootIndex && (rowIdx == 0 || !parentItem.expanded))
return;
if (m_model->rowCount(parentIndex) == 0) {
@@ -603,8 +626,11 @@ void QQuickTreeModelAdaptor::modelRowsInserted(const QModelIndex & parent, int s
ASSERT_CONSISTENCY();
return;
}
- } else if (parent.isValid()) {
+ } else if (parent == m_rootIndex) {
item = TreeItem(parent);
+ } else {
+ ASSERT_CONSISTENCY();
+ return;
}
showModelChildItems(item, start, end);
ASSERT_CONSISTENCY();
@@ -612,10 +638,8 @@ void QQuickTreeModelAdaptor::modelRowsInserted(const QModelIndex & parent, int s
void QQuickTreeModelAdaptor::modelRowsAboutToBeRemoved(const QModelIndex & parent, int start, int end)
{
- Q_UNUSED(start);
- Q_UNUSED(end);
ASSERT_CONSISTENCY();
- if (!parent.isValid() || childrenVisible(parent)) {
+ if (parent == m_rootIndex || childrenVisible(parent)) {
const QModelIndex &smi = m_model->index(start, 0, parent);
int startIndex = itemIndex(smi);
const QModelIndex &emi = m_model->index(end, 0, parent);
@@ -756,9 +780,9 @@ bool QQuickTreeModelAdaptor::testConsistency(bool dumpOnFail) const
}
return true;
}
- QModelIndex parent;
+ QModelIndex parent = m_rootIndex;
QStack<QModelIndex> ancestors;
- QModelIndex idx = m_model->index(0, 0);
+ QModelIndex idx = m_model->index(0, 0, parent);
for (int i = 0; i < m_items.count(); i++) {
bool isConsistent = true;
const TreeItem &item = m_items.at(i);
diff --git a/src/controls/Private/qquicktreemodeladaptor_p.h b/src/controls/Private/qquicktreemodeladaptor_p.h
index 2297c365..3eefbe77 100644
--- a/src/controls/Private/qquicktreemodeladaptor_p.h
+++ b/src/controls/Private/qquicktreemodeladaptor_p.h
@@ -61,6 +61,7 @@ class QQuickTreeModelAdaptor : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelChanged)
+ Q_PROPERTY(QModelIndex rootIndex READ rootIndex WRITE setRootIndex RESET resetRootIndex NOTIFY rootIndexChanged)
struct TreeItem;
@@ -68,6 +69,9 @@ public:
explicit QQuickTreeModelAdaptor(QObject *parent = 0);
QAbstractItemModel *model() const;
+ const QModelIndex &rootIndex() const;
+ void setRootIndex(const QModelIndex &idx);
+ void resetRootIndex();
enum {
DepthRole = Qt::UserRole - 4,
@@ -110,6 +114,7 @@ public:
signals:
void modelChanged(QAbstractItemModel *model);
+ void rootIndexChanged();
void expanded(const QModelIndex &index);
void collapsed(const QModelIndex &index);
@@ -149,6 +154,7 @@ private:
};
QPointer<QAbstractItemModel> m_model;
+ QPersistentModelIndex m_rootIndex;
QList<TreeItem> m_items;
QSet<QPersistentModelIndex> m_expandedItems;
QList<TreeItem *> m_itemsToExpand;
diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml
index 5c21848f..d2e61c81 100644
--- a/src/controls/ScrollView.qml
+++ b/src/controls/ScrollView.qml
@@ -44,6 +44,7 @@ import QtQuick.Controls.Styles 1.1
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup views
+ \ingroup controls
\brief Provides a scrolling view within another Item.
\image scrollview.png
@@ -163,7 +164,9 @@ FocusScope {
default property Item contentItem
/*! \internal */
- property Item __scroller: scroller
+ property alias __scroller: scroller
+ /*! \internal */
+ property alias __verticalScrollbarOffset: scroller.verticalScrollbarOffset
/*! \internal */
property alias __wheelAreaScrollSpeed: wheelArea.scrollSpeed
/*! \internal */
@@ -237,13 +240,13 @@ FocusScope {
onContentYChanged: {
scroller.blockUpdates = true
- scroller.verticalScrollBar.value = flickableItem.contentY
+ scroller.verticalScrollBar.value = flickableItem.contentY - flickableItem.originY
scroller.blockUpdates = false
}
onContentXChanged: {
scroller.blockUpdates = true
- scroller.horizontalScrollBar.value = flickableItem.contentX
+ scroller.horizontalScrollBar.value = flickableItem.contentX - flickableItem.originX
scroller.blockUpdates = false
}
@@ -273,49 +276,50 @@ FocusScope {
property bool horizontalRecursionGuard: false
property bool verticalRecursionGuard: false
- horizontalMinimumValue: flickableItem ? flickableItem.originX : 0
- horizontalMaximumValue: flickableItem ? flickableItem.originX + flickableItem.contentWidth - viewport.width : 0
+ horizontalMinimumValue: 0
+ horizontalMaximumValue: flickableItem ? flickableItem.contentWidth - viewport.width : 0
- verticalMinimumValue: flickableItem ? flickableItem.originY : 0
- verticalMaximumValue: flickableItem ? flickableItem.originY + flickableItem.contentHeight - viewport.height + __viewTopMargin : 0
+ verticalMinimumValue: 0
+ verticalMaximumValue: flickableItem ? flickableItem.contentHeight - viewport.height + __viewTopMargin : 0
// The default scroll speed for typical angle-based mouse wheels. The value
// comes originally from QTextEdit, which sets 20px steps by default, as well as
// QQuickWheelArea.
// TODO: centralize somewhere, QPlatformTheme?
- scrollSpeed: 20 * (__style.__wheelScrollLines || 1)
+ scrollSpeed: 20 * (__style && __style.__wheelScrollLines || 1)
Connections {
target: flickableItem
onContentYChanged: {
wheelArea.verticalRecursionGuard = true
- wheelArea.verticalValue = flickableItem.contentY
+ wheelArea.verticalValue = flickableItem.contentY - flickableItem.originY
wheelArea.verticalRecursionGuard = false
}
onContentXChanged: {
wheelArea.horizontalRecursionGuard = true
- wheelArea.horizontalValue = flickableItem.contentX
+ wheelArea.horizontalValue = flickableItem.contentX - flickableItem.originX
wheelArea.horizontalRecursionGuard = false
}
}
onVerticalValueChanged: {
if (!verticalRecursionGuard) {
- if (flickableItem.contentY < flickThreshold && verticalDelta > speedThreshold) {
+ var effectiveContentY = flickableItem.contentY - flickableItem.originY
+ if (effectiveContentY < flickThreshold && verticalDelta > speedThreshold) {
flickableItem.flick(ignored, Math.min(maxFlick, acceleration * verticalDelta))
- } else if (flickableItem.contentY > flickableItem.contentHeight
- - flickThreshold - viewport.height && verticalDelta < -speedThreshold) {
+ } else if (effectiveContentY > flickableItem.contentHeight - flickThreshold - viewport.height
+ && verticalDelta < -speedThreshold) {
flickableItem.flick(ignored, Math.max(-maxFlick, acceleration * verticalDelta))
} else {
- flickableItem.contentY = verticalValue
+ flickableItem.contentY = verticalValue + flickableItem.originY
}
}
}
onHorizontalValueChanged: {
if (!horizontalRecursionGuard)
- flickableItem.contentX = horizontalValue
+ flickableItem.contentX = horizontalValue + flickableItem.originX
}
}
@@ -326,9 +330,9 @@ FocusScope {
property bool outerFrame: !frameVisible || !(__style ? __style.__externalScrollBars : 0)
property int scrollBarSpacing: outerFrame ? 0 : (__style ? __style.__scrollBarSpacing : 0)
property int verticalScrollbarOffset: verticalScrollBar.visible && !verticalScrollBar.isTransient ?
- verticalScrollBar.width + scrollBarSpacing : 0
+ verticalScrollBar.width + scrollBarSpacing : 0
property int horizontalScrollbarOffset: horizontalScrollBar.visible && !horizontalScrollBar.isTransient ?
- horizontalScrollBar.height + scrollBarSpacing : 0
+ horizontalScrollBar.height + scrollBarSpacing : 0
Loader {
id: frameLoader
sourceComponent: __style ? __style.frame : null
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index 96d8d0a2..aa7ccb1c 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -132,6 +132,15 @@ Control {
*/
property alias font: input.font
+ /*!
+ \qmlproperty int SpinBox::cursorPosition
+ \since QtQuick.Controls 1.5
+
+ This property holds the position of the cursor in the SpinBox.
+ */
+ property alias cursorPosition: input.cursorPosition
+
+
/*! This property indicates whether the Spinbox should get active
focus when pressed.
The default value is \c true.
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml
index c7d5d42c..868108aa 100644
--- a/src/controls/SplitView.qml
+++ b/src/controls/SplitView.qml
@@ -45,6 +45,7 @@ import QtQuick.Window 2.1
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup views
+ \ingroup controls
\brief Lays out items with a draggable splitter between each item.
\image splitview.png
diff --git a/src/controls/StackView.qml b/src/controls/StackView.qml
index 26772781..c76459ff 100644
--- a/src/controls/StackView.qml
+++ b/src/controls/StackView.qml
@@ -42,6 +42,7 @@ import QtQuick.Controls.Private 1.0
\qmltype StackView
\inherits Item
\ingroup views
+ \ingroup controls
\inqmlmodule QtQuick.Controls
\since 5.1
diff --git a/src/controls/StackViewDelegate.qml b/src/controls/StackViewDelegate.qml
index c837c281..a1dacb21 100644
--- a/src/controls/StackViewDelegate.qml
+++ b/src/controls/StackViewDelegate.qml
@@ -39,6 +39,7 @@ import QtQuick 2.2
/*!
\qmltype StackViewDelegate
\inqmlmodule QtQuick.Controls
+ \ingroup controls
\since 5.1
\brief A delegate used by StackView for loading transitions.
diff --git a/src/controls/StatusBar.qml b/src/controls/StatusBar.qml
index f151a3ac..468d3587 100644
--- a/src/controls/StatusBar.qml
+++ b/src/controls/StatusBar.qml
@@ -43,6 +43,7 @@ import QtQuick.Controls.Private 1.0
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup applicationwindow
+ \ingroup controls
\brief Contains status information in your app.
The common way of using StatusBar is in relation to \l ApplicationWindow.
diff --git a/src/controls/Styles/Android/ApplicationWindowStyle.qml b/src/controls/Styles/Android/ApplicationWindowStyle.qml
index 550d31a3..6f703845 100644
--- a/src/controls/Styles/Android/ApplicationWindowStyle.qml
+++ b/src/controls/Styles/Android/ApplicationWindowStyle.qml
@@ -104,6 +104,7 @@ QtObject {
Menu {
id: proxyMenu
+ __isProxy: true
items: control.menuBar ? control.menuBar.menus : []
}
diff --git a/src/controls/Styles/Base/BasicTableViewStyle.qml b/src/controls/Styles/Base/BasicTableViewStyle.qml
index 973d09c0..e0a33406 100644
--- a/src/controls/Styles/Base/BasicTableViewStyle.qml
+++ b/src/controls/Styles/Base/BasicTableViewStyle.qml
@@ -84,7 +84,7 @@ ScrollViewStyle {
See qtquickcontrolsstyles-tableviewstyle.qdoc and qtquickcontrolsstyles-treeviewstyle.qdoc
*/
property Component headerDelegate: BorderImage {
- height: textItem.implicitHeight * 1.2
+ height: Math.round(textItem.implicitHeight * 1.2)
source: "images/header.png"
border.left: 4
border.bottom: 2
@@ -94,19 +94,17 @@ ScrollViewStyle {
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
horizontalAlignment: styleData.textAlignment
- anchors.leftMargin: 12
+ anchors.leftMargin: horizontalAlignment === Text.AlignLeft ? 12 : 1
+ anchors.rightMargin: horizontalAlignment === Text.AlignRight ? 8 : 1
text: styleData.value
elide: Text.ElideRight
color: textColor
renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
Rectangle {
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 1
- anchors.topMargin: 1
width: 1
+ height: parent.height - 2
+ y: 1
color: "#ccc"
}
}
@@ -137,8 +135,9 @@ ScrollViewStyle {
Text {
id: label
objectName: "label"
- width: parent.width - x
- x: styleData.depth && styleData.column === 0 ? 0 : 8
+ width: parent.width - x - (horizontalAlignment === Text.AlignRight ? 8 : 1)
+ x: (styleData.hasOwnProperty("depth") && styleData.column === 0) ? 0 :
+ horizontalAlignment === Text.AlignRight ? 1 : 8
horizontalAlignment: styleData.textAlignment
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
diff --git a/src/controls/Styles/Base/CircularTickmarkLabelStyle.qml b/src/controls/Styles/Base/CircularTickmarkLabelStyle.qml
index 010e9245..6e1c6740 100644
--- a/src/controls/Styles/Base/CircularTickmarkLabelStyle.qml
+++ b/src/controls/Styles/Base/CircularTickmarkLabelStyle.qml
@@ -285,6 +285,7 @@ Style {
}
delegate: Loader {
id: tickmarkLabelDelegateLoader
+ objectName: "labelDelegateLoader" + index
sourceComponent: tickmarkLabel
x: pos.x
y: pos.y
@@ -292,8 +293,9 @@ Style {
readonly property point pos: panelItem.labelPosFromIndex(index, width, height);
readonly property int __index: index
+ readonly property real __value: value
property QtObject styleData: QtObject {
- readonly property var value: index != -1 ? labelItemRepeater.model.get(index).value : 0
+ readonly property var value: index != -1 ? tickmarkLabelDelegateLoader.__value : 0
readonly property alias index: tickmarkLabelDelegateLoader.__index
}
}
diff --git a/src/controls/Styles/Base/DelayButtonStyle.qml b/src/controls/Styles/Base/DelayButtonStyle.qml
index 12f545be..71e1c67d 100644
--- a/src/controls/Styles/Base/DelayButtonStyle.qml
+++ b/src/controls/Styles/Base/DelayButtonStyle.qml
@@ -191,11 +191,8 @@ CircularButtonStyle {
DropShadow {
id: progressBarDropShadow
anchors.fill: progressBar
- fast: true
// QTBUG-33747
// cached: !control.pressed
- radius: 4
- samples: radius * 2
color: progressBarDropShadowColor
source: progressBar
}
diff --git a/src/controls/Styles/Base/PieMenuStyle.qml b/src/controls/Styles/Base/PieMenuStyle.qml
index fdfa92e7..6137cc91 100644
--- a/src/controls/Styles/Base/PieMenuStyle.qml
+++ b/src/controls/Styles/Base/PieMenuStyle.qml
@@ -115,13 +115,25 @@ Style {
/*! The selection color. */
property color selectionColor: "#eee"
- /*! The shadow color. */
+ /*!
+ The shadow color.
+
+ \sa DropShadow
+ */
property color shadowColor: Qt.rgba(0, 0, 0, 0.26)
- /*! The shadow radius. */
- property real shadowRadius: 50
+ /*!
+ The shadow radius.
- /*! The shadow spread. */
+ \sa DropShadow
+ */
+ property real shadowRadius: 10
+
+ /*!
+ The shadow spread.
+
+ \sa DropShadow
+ */
property real shadowSpread: 0.3
/*!
@@ -366,11 +378,9 @@ Style {
DropShadow {
id: dropShadow
anchors.fill: itemgroup
- fast: true
- radius: shadowRadius
spread: shadowSpread
+ samples: shadowRadius * 2 + 1
transparentBorder: true
- samples: 12
color: shadowColor
source: itemgroup
}
diff --git a/src/controls/Styles/Base/ScrollViewStyle.qml b/src/controls/Styles/Base/ScrollViewStyle.qml
index ed72951f..09bc7da3 100644
--- a/src/controls/Styles/Base/ScrollViewStyle.qml
+++ b/src/controls/Styles/Base/ScrollViewStyle.qml
@@ -43,6 +43,7 @@ import QtQuick.Controls.Private 1.0
\inqmlmodule QtQuick.Controls.Styles
\since 5.1
\ingroup viewsstyling
+ \ingroup controlsstyling
\brief Provides custom styling for ScrollView
*/
Style {
diff --git a/src/controls/Styles/Base/StatusIndicatorStyle.qml b/src/controls/Styles/Base/StatusIndicatorStyle.qml
index 4366d1f7..bd539db3 100644
--- a/src/controls/Styles/Base/StatusIndicatorStyle.qml
+++ b/src/controls/Styles/Base/StatusIndicatorStyle.qml
@@ -73,7 +73,6 @@ Style {
property Component indicator: Item {
readonly property real shineStep: 0.05
readonly property real smallestAxis: Math.min(control.width, control.height)
- readonly property real shadowRadius: smallestAxis * 0.4
readonly property real outerRecessPercentage: 0.11
readonly property color offColor: Qt.rgba(0.13, 0.13, 0.13)
readonly property color baseColor: control.active ? control.color : offColor
@@ -113,12 +112,12 @@ Style {
Item {
id: shadowGuard
anchors.fill: backgroundCanvas
- anchors.margins: -shadowRadius
+ anchors.margins: -shadow.radius
Canvas {
id: colorCanvas
anchors.fill: parent
- anchors.margins: shadowRadius
+ anchors.margins: shadow.radius
Connections {
target: control
@@ -144,9 +143,6 @@ Style {
id: shadow
source: shadowGuard
color: control.color
- // Don't set fast here because Qt < 5.3 will run into QTBUG-36931
- radius: shadowRadius
- samples: Math.min(32, radius)
cached: true
anchors.fill: shadowGuard
visible: control.active
diff --git a/src/controls/Styles/Base/TabViewStyle.qml b/src/controls/Styles/Base/TabViewStyle.qml
index 4842c39a..94cc1240 100644
--- a/src/controls/Styles/Base/TabViewStyle.qml
+++ b/src/controls/Styles/Base/TabViewStyle.qml
@@ -43,6 +43,7 @@ import QtQuick.Controls.Private 1.0
\inqmlmodule QtQuick.Controls.Styles
\since 5.1
\ingroup viewsstyling
+ \ingroup controlsstyling
\brief Provides custom styling for TabView
\qml
diff --git a/src/controls/Styles/Base/TextAreaStyle.qml b/src/controls/Styles/Base/TextAreaStyle.qml
index 678d365d..1da52227 100644
--- a/src/controls/Styles/Base/TextAreaStyle.qml
+++ b/src/controls/Styles/Base/TextAreaStyle.qml
@@ -146,4 +146,10 @@ ScrollViewStyle {
\since QtQuick.Controls.Styles 1.3
*/
property Component __cursorDelegate
+
+ /*! \internal
+ The delegate for the cut/copy/paste menu.
+ \since QtQuick.Controls.Styles 1.4
+ */
+ property Component __editMenu
}
diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml
index e9247416..b5e024b4 100644
--- a/src/controls/Styles/Base/TextFieldStyle.qml
+++ b/src/controls/Styles/Base/TextFieldStyle.qml
@@ -209,4 +209,10 @@ Style {
\since QtQuick.Controls.Styles 1.3
*/
property Component __cursorDelegate
+
+ /*! \internal
+ The delegate for the cut/copy/paste menu.
+ \since QtQuick.Controls.Styles 1.4
+ */
+ property Component __editMenu
}
diff --git a/src/controls/Styles/Base/ToggleButtonStyle.qml b/src/controls/Styles/Base/ToggleButtonStyle.qml
index ca185012..64f1bb56 100644
--- a/src/controls/Styles/Base/ToggleButtonStyle.qml
+++ b/src/controls/Styles/Base/ToggleButtonStyle.qml
@@ -249,8 +249,6 @@ CircularButtonStyle {
id: uncheckedDropShadow
anchors.fill: uncheckedCanvas
cached: true
- radius: 4
- samples: 8
color: uncheckedDropShadowColor
source: uncheckedCanvas
visible: !control.checked
@@ -260,8 +258,6 @@ CircularButtonStyle {
id: checkedDropShadow
anchors.fill: checkedCanvas
cached: true
- radius: 4
- samples: 8
color: checkedDropShadowColor
source: checkedCanvas
visible: control.checked
diff --git a/src/controls/Styles/Base/TreeViewStyle.qml b/src/controls/Styles/Base/TreeViewStyle.qml
index b8f03f65..e90542fe 100644
--- a/src/controls/Styles/Base/TreeViewStyle.qml
+++ b/src/controls/Styles/Base/TreeViewStyle.qml
@@ -43,10 +43,10 @@ BasicTableViewStyle {
readonly property TreeView control: __control
- property int indentation: 12
+ property int indentation: 16
property Component branchDelegate: Item {
- width: 16
+ width: indentation
height: 16
Text {
visible: styleData.column === 0 && styleData.hasChildren
@@ -54,8 +54,9 @@ BasicTableViewStyle {
color: !control.activeFocus || styleData.selected ? styleData.textColor : "#666"
font.pointSize: 10
renderType: Text.NativeRendering
+ style: Text.PlainText
anchors.centerIn: parent
- anchors.verticalCenterOffset: styleData.isExpanded ? 2 : 0
+ anchors.verticalCenterOffset: 2
}
}
diff --git a/src/controls/Styles/Base/TumblerStyle.qml b/src/controls/Styles/Base/TumblerStyle.qml
index 46605538..fd847e85 100644
--- a/src/controls/Styles/Base/TumblerStyle.qml
+++ b/src/controls/Styles/Base/TumblerStyle.qml
@@ -132,8 +132,9 @@ Style {
DropShadow {
anchors.fill: rect
source: rect
- radius: __padding
- samples: Math.min(32, radius * 2)
+ samples: 15
+ spread: 0.45
+ cached: true
}
}
diff --git a/src/controls/Styles/Base/images/spinner_large.png b/src/controls/Styles/Base/images/spinner_large.png
index bcf51339..8e6a7738 100644
--- a/src/controls/Styles/Base/images/spinner_large.png
+++ b/src/controls/Styles/Base/images/spinner_large.png
Binary files differ
diff --git a/src/controls/Styles/Base/images/spinner_medium.png b/src/controls/Styles/Base/images/spinner_medium.png
index da8141bf..48a24d58 100644
--- a/src/controls/Styles/Base/images/spinner_medium.png
+++ b/src/controls/Styles/Base/images/spinner_medium.png
Binary files differ
diff --git a/src/controls/Styles/Base/images/spinner_small.png b/src/controls/Styles/Base/images/spinner_small.png
index 1f158f56..c3e86dc6 100644
--- a/src/controls/Styles/Base/images/spinner_small.png
+++ b/src/controls/Styles/Base/images/spinner_small.png
Binary files differ
diff --git a/src/controls/Styles/Desktop/ScrollViewStyle.qml b/src/controls/Styles/Desktop/ScrollViewStyle.qml
index 0ec5788f..bba99fde 100644
--- a/src/controls/Styles/Desktop/ScrollViewStyle.qml
+++ b/src/controls/Styles/Desktop/ScrollViewStyle.qml
@@ -71,6 +71,7 @@ Style {
readonly property bool __externalScrollBars: __styleitem.styleHint("externalScrollBars")
readonly property int __scrollBarSpacing: __styleitem.pixelMetric("scrollbarspacing")
readonly property bool scrollToClickedPosition: __styleitem.styleHint("scrollToClickPosition") !== 0
+ property bool transientScrollBars: false
readonly property int __wheelScrollLines: __styleitem.styleHint("wheelScrollLines")
@@ -88,6 +89,8 @@ Style {
implicitWidth: horizontal ? 200 : pixelMetric("scrollbarExtent")
implicitHeight: horizontal ? pixelMetric("scrollbarExtent") : 200
+
+ onIsTransientChanged: root.transientScrollBars = isTransient
}
}
diff --git a/src/controls/Styles/Desktop/TableViewStyle.qml b/src/controls/Styles/Desktop/TableViewStyle.qml
index f5199f3f..1ead1b34 100644
--- a/src/controls/Styles/Desktop/TableViewStyle.qml
+++ b/src/controls/Styles/Desktop/TableViewStyle.qml
@@ -96,7 +96,10 @@ ScrollViewStyle {
font: __styleitem.font
anchors.left: parent.left
anchors.right: parent.right
- anchors.leftMargin: styleData["depth"] && styleData.column === 0 ? 0 : 8
+ anchors.leftMargin: styleData.hasOwnProperty("depth") && styleData.column === 0 ? 0 :
+ horizontalAlignment === Text.AlignRight ? 1 : 8
+ anchors.rightMargin: (styleData.hasOwnProperty("depth") && styleData.column === 0)
+ || horizontalAlignment !== Text.AlignRight ? 1 : 8
horizontalAlignment: styleData.textAlignment
anchors.verticalCenter: parent.verticalCenter
elide: styleData.elideMode
diff --git a/src/controls/Styles/Desktop/TreeViewStyle.qml b/src/controls/Styles/Desktop/TreeViewStyle.qml
index 1901c40c..6424ed0e 100644
--- a/src/controls/Styles/Desktop/TreeViewStyle.qml
+++ b/src/controls/Styles/Desktop/TreeViewStyle.qml
@@ -56,12 +56,12 @@ Desktop.TableViewStyle {
hasFocus: __styleitem.active
Component.onCompleted: {
- implicitWidth = si.pixelMetric("treeviewindentation")
+ root.__indentation = si.pixelMetric("treeviewindentation")
+ implicitWidth = root.__indentation
implicitHeight = implicitWidth
var rect = si.subControlRect("dummy");
width = rect.width
height = rect.height
- root.__indentation = width
}
}
}
diff --git a/src/controls/Styles/iOS/SliderStyle.qml b/src/controls/Styles/iOS/SliderStyle.qml
index 3d39ce2b..8a87f809 100644
--- a/src/controls/Styles/iOS/SliderStyle.qml
+++ b/src/controls/Styles/iOS/SliderStyle.qml
@@ -34,6 +34,54 @@
**
****************************************************************************/
+import QtQuick 2.3
import QtQuick.Controls.Styles 1.3
-SliderStyle { }
+SliderStyle {
+ groove: Rectangle {
+ implicitWidth: 20
+ implicitHeight: 2
+
+ color: "#a8a8a8"
+ radius: 45.0
+
+ Rectangle {
+ width: styleData.handlePosition
+ height: parent.height
+ color: "#0a60ff"
+ radius: parent.radius
+ }
+ }
+
+ handle: Item {
+ width: 29
+ height: 32
+
+ Rectangle {
+ y: 3
+ width: 29
+ height: 29
+ radius: 90.0
+
+ color: "#d6d6d6"
+ opacity: 0.2
+ }
+
+ Rectangle {
+ width: 29
+ height: 29
+ radius: 90.0
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#e2e2e2" }
+ GradientStop { position: 1.0; color: "#d6d6d6" }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 1
+ radius: parent.radius
+ }
+ }
+ }
+}
diff --git a/src/controls/Tab.qml b/src/controls/Tab.qml
index f5d02cf3..07a4cd9e 100644
--- a/src/controls/Tab.qml
+++ b/src/controls/Tab.qml
@@ -41,6 +41,7 @@ import QtQuick 2.2
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup viewaddons
+ \ingroup controls
\brief Tab represents the content of a tab in a TabView.
A Tab item inherits from Loader and provides a similar
diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml
index e284a46d..c671a273 100644
--- a/src/controls/TabView.qml
+++ b/src/controls/TabView.qml
@@ -43,6 +43,7 @@ import QtQuick.Controls.Private 1.0
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup views
+ \ingroup controls
\brief A control that allows the user to select one of multiple stacked items.
\image tabview.png
diff --git a/src/controls/TableViewColumn.qml b/src/controls/TableViewColumn.qml
index 9bcdfe6d..3f5a8468 100644
--- a/src/controls/TableViewColumn.qml
+++ b/src/controls/TableViewColumn.qml
@@ -41,6 +41,7 @@ import QtQuick 2.2
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup viewitems
+ \ingroup controls
\brief Used to define columns in a \l TableView or in a \l TreeView.
\image tableview.png
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index 23360f06..87b13e0d 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -34,7 +34,7 @@
**
****************************************************************************/
-import QtQuick 2.2
+import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -423,6 +423,16 @@ ScrollView {
signal linkHovered(string link)
/*!
+ \qmlsignal TextArea::editingFinished()
+ \since QtQuick.Controls 1.5
+
+ This signal is emitted when the text area loses focus.
+
+ The corresponding handler is \c onEditingFinished.
+ */
+ signal editingFinished()
+
+ /*!
\qmlproperty string TextArea::hoveredLink
\since QtQuick.Controls 1.1
@@ -819,6 +829,7 @@ ScrollView {
onLinkActivated: area.linkActivated(link)
onLinkHovered: area.linkHovered(link)
+ onEditingFinished: area.editingFinished()
function activate() {
if (activeFocusOnPress) {
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index 589869d3..c5d5d2b5 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -34,7 +34,7 @@
**
****************************************************************************/
-import QtQuick 2.2
+import QtQuick 2.6
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -625,7 +625,7 @@ Control {
font: textInput.font
horizontalAlignment: textInput.horizontalAlignment
verticalAlignment: textInput.verticalAlignment
- opacity: textInput.displayText.length ? 0.0 : 1.0
+ opacity: !textInput.displayText && (!textInput.activeFocus || textInput.horizontalAlignment !== Qt.AlignHCenter) ? 1.0 : 0.0
color: __panel ? __panel.placeholderTextColor : "darkgray"
clip: contentWidth > width;
elide: Text.ElideRight
@@ -660,6 +660,8 @@ Control {
Keys.forwardTo: textfield
+ EnterKey.type: control.EnterKey.type
+
onAccepted: textfield.accepted()
onEditingFinished: textfield.editingFinished()
diff --git a/src/controls/ToolBar.qml b/src/controls/ToolBar.qml
index 48f62f16..f5d0a994 100644
--- a/src/controls/ToolBar.qml
+++ b/src/controls/ToolBar.qml
@@ -43,6 +43,7 @@ import QtQuick.Controls.Private 1.0
\inqmlmodule QtQuick.Controls
\since 5.1
\ingroup applicationwindow
+ \ingroup controls
\brief Contains ToolButton and related controls.
\image toolbar.png
diff --git a/src/controls/TreeView.qml b/src/controls/TreeView.qml
index c97930f3..637c46c3 100644
--- a/src/controls/TreeView.qml
+++ b/src/controls/TreeView.qml
@@ -44,6 +44,7 @@ BasicTableView {
id: root
property var model: null
+ property alias rootIndex: modelAdaptor.rootIndex
readonly property var currentIndex: modelAdaptor.mapRowToModelIndex(__currentRow)
property ItemSelectionModel selection: null
diff --git a/src/controls/controls.pro b/src/controls/controls.pro
index 7dd176f0..f725b1ce 100644
--- a/src/controls/controls.pro
+++ b/src/controls/controls.pro
@@ -1,6 +1,8 @@
+requires(contains(QT_CONFIG, accessibility))
+
TARGET = qtquickcontrolsplugin
TARGETPATH = QtQuick/Controls
-IMPORT_VERSION = 1.4
+IMPORT_VERSION = 1.5
QT += qml quick quick-private qml-private gui-private core-private
diff --git a/src/controls/doc/qtquickcontrols.qdocconf b/src/controls/doc/qtquickcontrols.qdocconf
index e8aa0422..6ea7e741 100644
--- a/src/controls/doc/qtquickcontrols.qdocconf
+++ b/src/controls/doc/qtquickcontrols.qdocconf
@@ -17,16 +17,22 @@ qhp.QtQuickControls.filterAttributes = qtquickcontrols $QT_VERSION qtrefdoc
qhp.QtQuickControls.customFilters.Qt.name = QtQuickControls $QT_VERSION
qhp.QtQuickControls.customFilters.Qt.filterAttributes = qtquickcontrols $QT_VERSION
-qhp.QtQuickControls.subprojects = qtquickcontrolsqmltypes qtquickcontrolsstyles
+qhp.QtQuickControls.subprojects = qqcqmltypes qqcstylesqmltypes qqcexamples
-qhp.QtQuickControls.subprojects.qtquickcontrolsqmltypes.title = Controls QML Types
-qhp.QtQuickControls.subprojects.qtquickcontrolsqmltypes.indexTitle = Qt Quick Controls QML Types
-qhp.QtQuickControls.subprojects.qtquickcontrolsqmltypes.selectors = qmlclass # cannot choose qmltypes from a specific group QTBUG-32985
-qhp.QtQuickControls.subprojects.qtquickcontrolsqmltypes.sortPages = true
+qhp.QtQuickControls.subprojects.qqcqmltypes.title = Controls QML Types
+qhp.QtQuickControls.subprojects.qqcqmltypes.indexTitle = Qt Quick Controls QML Types
+qhp.QtQuickControls.subprojects.qqcqmltypes.selectors = group:controls
+qhp.QtQuickControls.subprojects.qqcqmltypes.sortPages = true
-qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.title = Qt Quick Controls Styles Structure
-qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.indexTitle = Qt Quick Controls Styles Structure
-qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.type = manual
+qhp.QtQuickControls.subprojects.qqcstylesqmltypes.title = Controls Styles QML Types
+qhp.QtQuickControls.subprojects.qqcstylesqmltypes.indexTitle = Qt Quick Controls Styles QML Types
+qhp.QtQuickControls.subprojects.qqcstylesqmltypes.selectors = group:controlsstyling
+qhp.QtQuickControls.subprojects.qqcstylesqmltypes.sortPages = true
+
+qhp.QtQuickControls.subprojects.qqcexamples.title = Examples and Tutorials
+qhp.QtQuickControls.subprojects.qqcexamples.indexTitle = Qt Quick Controls Examples
+qhp.QtQuickControls.subprojects.qqcexamples.selectors = doc:example group:stylingtutorials
+qhp.QtQuickControls.subprojects.qqcexamples.sortpages = true
depends = qtcore qtdoc qtgui qtwidgets qtqml qtquick qtquicklayouts qtquickdialogs qtquickextras
@@ -35,7 +41,7 @@ depends = qtcore qtdoc qtgui qtwidgets qtqml qtquick qtquicklayouts qtquickdialo
# is given as part of \example commands
exampledirs += ../../../examples/quick/controls \
snippets
-examplesinstallpath = quick/controls
+examplesinstallpath = qtquickcontrols/quick/controls
headerdirs += ..
diff --git a/src/controls/doc/src/qtquickcontrols-overview.qdoc b/src/controls/doc/src/qtquickcontrols-overview.qdoc
index 45a4557a..f549d0c8 100644
--- a/src/controls/doc/src/qtquickcontrols-overview.qdoc
+++ b/src/controls/doc/src/qtquickcontrols-overview.qdoc
@@ -126,6 +126,10 @@
forgotten. This is a known limitation and a workaround is to add potentially missing imports in
one of the qml files of the application using the controls.
+ \section2 Testing Desktop and Mobile behavior of the controls
+ You can test how the controls on your application or style will behave on
+ a mobile platform by setting the environment variable \e QT_QUICK_CONTROLS_MOBILE, to force a behavior optimized for mobile devices.
+
\section1 Related information
\list
diff --git a/src/controls/doc/src/qtquickcontrols-tableview.qdoc b/src/controls/doc/src/qtquickcontrols-tableview.qdoc
index c2c015e1..fa3b103c 100644
--- a/src/controls/doc/src/qtquickcontrols-tableview.qdoc
+++ b/src/controls/doc/src/qtquickcontrols-tableview.qdoc
@@ -31,6 +31,7 @@
\inherits BasicTableView
\since 5.1
\ingroup views
+ \ingroup controls
\brief Provides a list view with scroll bars, styling and header sections.
\image tableview.png
diff --git a/src/controls/doc/src/qtquickcontrols-treeview.qdoc b/src/controls/doc/src/qtquickcontrols-treeview.qdoc
index f9c2e692..321f1934 100644
--- a/src/controls/doc/src/qtquickcontrols-treeview.qdoc
+++ b/src/controls/doc/src/qtquickcontrols-treeview.qdoc
@@ -31,6 +31,7 @@
\inherits BasicTableView
\since 5.5
\ingroup views
+ \ingroup controls
\brief Provides a tree view with scroll bars, styling and header sections.
\image treeview.png
@@ -63,8 +64,8 @@
the model role they attach to. Each property in the model will
then be shown in their corresponding column.
- You can customize the look by overriding the \l {TreeView::itemDelegate}{itemDelegate},
- \l {TreeView::rowDelegate}{rowDelegate}, or \l {TreeView::headerDelegate}{headerDelegate} properties.
+ You can customize the look by overriding the \l [QML]{TreeView::}{itemDelegate},
+ \l {basictableview-rowdelegate}{rowDelegate}, or \l {basictableview-headerdelegate}{headerDelegate} properties.
The view itself does not provide sorting. This has to
be done on the model itself. However you can provide sorting
@@ -142,6 +143,19 @@
*/
/*!
+ \qmlproperty QModelIndex TreeView::rootIndex
+ The model index of the root item in the tree view. The root item is the
+ parent item to the view's top-level items. Only items descending from the
+ root item will be visible in the view.
+
+ Its default value is an invalid QModelIndex, which means the whole
+ model data is shown by the tree view (assigning \c undefined to this
+ proprety resets it to its default value.)
+
+ \since QtQuick.Controls 1.5
+*/
+
+/*!
\qmlproperty QModelIndex TreeView::currentIndex
The model index of the current row in the tree view.
*/
diff --git a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
index 94eb6fb4..792f064c 100644
--- a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
+++ b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
@@ -125,17 +125,6 @@
*/
/*!
- \page qtquickcontrolsstyles-structure.html
- \title Qt Quick Controls Styles Structure
- \list
- \li \l{Qt Quick Controls Styles}
- \list
- \li \l{Qt Quick Controls Styles QML Types}{Styles QMl Types}
- \endlist
- \endlist
-*/
-
-/*!
\qmlmodule QtQuick.Controls.Styles 1.4
\title Qt Quick Controls Styles QML Types
\ingroup qmlmodules
diff --git a/src/controls/doc/src/qtquickcontrolsstyles-tableviewstyle.qdoc b/src/controls/doc/src/qtquickcontrolsstyles-tableviewstyle.qdoc
index 0b5012f1..c781f903 100644
--- a/src/controls/doc/src/qtquickcontrolsstyles-tableviewstyle.qdoc
+++ b/src/controls/doc/src/qtquickcontrolsstyles-tableviewstyle.qdoc
@@ -31,6 +31,7 @@
\inherits BasicTableViewStyle
\since 5.1
\ingroup viewsstyling
+ \ingroup controlsstyling
\brief Provides custom styling for TableView
*/
diff --git a/src/controls/doc/src/qtquickcontrolsstyles-treeviewstyle.qdoc b/src/controls/doc/src/qtquickcontrolsstyles-treeviewstyle.qdoc
index 3f4508f4..e98b6cae 100644
--- a/src/controls/doc/src/qtquickcontrolsstyles-treeviewstyle.qdoc
+++ b/src/controls/doc/src/qtquickcontrolsstyles-treeviewstyle.qdoc
@@ -31,6 +31,7 @@
\inherits BasicTableViewStyle
\since 5.5
\ingroup viewsstyling
+ \ingroup controlsstyling
\brief Provides custom styling for TreeView
*/
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index 8ab956c6..da670dc8 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -112,15 +112,18 @@ static const struct {
{ "TextArea", 1, 3 },
- { "TreeView", 1, 4 }
+ { "TreeView", 1, 4 },
+
+ { "TextArea", 1, 5 },
+ { "TreeView", 1, 5 }
};
void QtQuickControlsPlugin::registerTypes(const char *uri)
{
initResources();
qmlRegisterType<QQuickAction>(uri, 1, 0, "Action");
- qmlRegisterType<QQuickExclusiveGroup>(uri, 1, 0, "ExclusiveGroup");
- qmlRegisterType<QQuickMenuItem>(uri, 1, 0, "MenuItem");
+ qmlRegisterType<QQuickExclusiveGroup1>(uri, 1, 0, "ExclusiveGroup");
+ qmlRegisterType<QQuickMenuItem1>(uri, 1, 0, "MenuItem");
qmlRegisterUncreatableType<QQuickMenuItemType>(uri, 1, 0, "MenuItemType",
QLatin1String("Do not create objects of type MenuItemType"));
qmlRegisterType<QQuickMenuSeparator>(uri, 1, 0, "MenuSeparator");
@@ -158,8 +161,8 @@ void QtQuickControlsPlugin::initializeEngine(QQmlEngine *engine, const char *uri
qmlRegisterType<QQuickTreeModelAdaptor>(private_uri, 1, 0, "TreeModelAdaptor");
qmlRegisterType<QQuickScenePosListener>(private_uri, 1, 0, "ScenePosListener");
- qmlRegisterType<QQuickMenu>(private_uri, 1, 0, "MenuPrivate");
- qmlRegisterType<QQuickMenuBar>(private_uri, 1, 0, "MenuBarPrivate");
+ qmlRegisterType<QQuickMenu1>(private_uri, 1, 0, "MenuPrivate");
+ qmlRegisterType<QQuickMenuBar1>(private_uri, 1, 0, "MenuBarPrivate");
qmlRegisterType<QQuickPopupWindow>(private_uri, 1, 0, "PopupWindow");
qmlRegisterUncreatableType<QAbstractItemModel>(private_uri, 1, 0, "AbstractItemModel",
diff --git a/src/controls/plugins.qmltypes b/src/controls/plugins.qmltypes
index 89b9260a..11994894 100644
--- a/src/controls/plugins.qmltypes
+++ b/src/controls/plugins.qmltypes
@@ -4,13 +4,14 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtQuick.Controls 1.4'
+// 'qmlplugindump -nonrelocatable QtQuick.Controls 1.5'
Module {
dependencies: [
"QtGraphicalEffects 1.0",
+ "QtGraphicalEffects.private 1.0",
"QtQml.Models 2.2",
- "QtQuick 2.5",
+ "QtQuick 2.6",
"QtQuick.Controls.Styles 1.4",
"QtQuick.Extras 1.4",
"QtQuick.Extras.Private.CppUtils 1.1",
@@ -184,10 +185,9 @@ Module {
Signal { name: "__menuPopupDestroyed" }
Signal { name: "menuContentItemChanged" }
Signal { name: "minimumWidthChanged" }
- Method { name: "__closeMenu" }
Method { name: "__dismissMenu" }
- Method { name: "__destroyMenuPopup" }
- Method { name: "__destroyAllMenuPopups" }
+ Method { name: "__closeAndDestroy" }
+ Method { name: "__dismissAndDestroy" }
Method { name: "popup" }
Method {
name: "addItem"
@@ -603,6 +603,7 @@ Module {
exports: ["QtQuick.Controls.Private/TreeModelAdaptor 1.0"]
exportMetaObjectRevisions: [0]
Property { name: "model"; type: "QAbstractItemModel"; isPointer: true }
+ Property { name: "rootIndex"; type: "QModelIndex" }
Signal {
name: "modelChanged"
Parameter { name: "model"; type: "QAbstractItemModel"; isPointer: true }
@@ -665,12 +666,12 @@ Module {
}
Component {
prototype: "QQuickWindowQmlImpl"
- name: "QtQuick.Controls/ApplicationWindow"
+ name: "QtQuick.Controls/ApplicationWindow 1.0"
exports: ["QtQuick.Controls/ApplicationWindow 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
- Property { name: "menuBar"; type: "MenuBar_QMLTYPE_3"; isPointer: true }
+ Property { name: "menuBar"; type: "MenuBar_QMLTYPE_2"; isPointer: true }
Property { name: "toolBar"; type: "QQuickItem"; isPointer: true }
Property { name: "statusBar"; type: "QQuickItem"; isPointer: true }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
@@ -678,14 +679,19 @@ Module {
Property { name: "__qwindowsize_max"; type: "double"; isReadonly: true }
Property { name: "__width"; type: "double" }
Property { name: "__height"; type: "double" }
- Property { name: "contentItem"; type: "ContentItem_QMLTYPE_1"; isReadonly: true; isPointer: true }
+ Property {
+ name: "contentItem"
+ type: "ContentItem_QMLTYPE_10"
+ isReadonly: true
+ isPointer: true
+ }
Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
Property { name: "__panel"; type: "QObject"; isReadonly: true; isPointer: true }
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/BusyIndicator"
+ name: "QtQuick.Controls/BusyIndicator 1.1"
exports: ["QtQuick.Controls/BusyIndicator 1.1"]
exportMetaObjectRevisions: [1]
isComposite: true
@@ -699,7 +705,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/Button"
+ name: "QtQuick.Controls/Button 1.0"
exports: ["QtQuick.Controls/Button 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -719,8 +725,8 @@ Module {
Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
Property { name: "__action"; type: "QQuickAction"; isPointer: true }
Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
- Property { name: "__effectivePressed"; type: "bool" }
Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
@@ -733,7 +739,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/Calendar"
+ name: "QtQuick.Controls/Calendar 1.2"
exports: ["QtQuick.Controls/Calendar 1.2"]
exportMetaObjectRevisions: [2]
isComposite: true
@@ -744,8 +750,8 @@ Module {
Property { name: "weekNumbersVisible"; type: "bool" }
Property { name: "navigationBarVisible"; type: "bool" }
Property { name: "dayOfWeekFormat"; type: "int" }
- Property { name: "__model"; type: "QQuickCalendarModel"; isPointer: true }
Property { name: "__locale"; type: "QVariant" }
+ Property { name: "__model"; type: "QQuickCalendarModel"; isPointer: true }
Property { name: "selectedDate"; type: "QDate" }
Property { name: "minimumDate"; type: "QDate" }
Property { name: "maximumDate"; type: "QDate" }
@@ -793,7 +799,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/CheckBox"
+ name: "QtQuick.Controls/CheckBox 1.0"
exports: ["QtQuick.Controls/CheckBox 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -819,7 +825,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras.Private/CircularButton"
+ name: "QtQuick.Extras.Private/CircularButton 1.0"
exports: ["QtQuick.Extras.Private/CircularButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -839,8 +845,8 @@ Module {
Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
Property { name: "__action"; type: "QQuickAction"; isPointer: true }
Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
- Property { name: "__effectivePressed"; type: "bool" }
Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
@@ -853,7 +859,7 @@ Module {
}
Component {
prototype: "QObject"
- name: "QtQuick.Extras.Private/CircularButtonStyleHelper"
+ name: "QtQuick.Extras.Private/CircularButtonStyleHelper 1.0"
exports: ["QtQuick.Extras.Private/CircularButtonStyleHelper 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -899,7 +905,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/CircularGauge"
+ name: "QtQuick.Extras/CircularGauge 1.0"
exports: ["QtQuick.Extras/CircularGauge 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -917,7 +923,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras.Private/CircularTickmarkLabel"
+ name: "QtQuick.Extras.Private/CircularTickmarkLabel 1.0"
exports: ["QtQuick.Extras.Private/CircularTickmarkLabel 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -951,7 +957,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/ComboBox"
+ name: "QtQuick.Controls/ComboBox 1.0"
exports: ["QtQuick.Controls/ComboBox 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -969,6 +975,7 @@ Module {
Property { name: "currentIndex"; type: "int" }
Property { name: "currentText"; type: "string"; isReadonly: true }
Property { name: "editText"; type: "string" }
+ Property { name: "inputMethodHints"; type: "int" }
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "validator"; type: "QValidator"; isPointer: true }
Property { name: "acceptableInput"; type: "bool"; isReadonly: true }
@@ -998,7 +1005,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/DelayButton"
+ name: "QtQuick.Extras/DelayButton 1.0"
exports: ["QtQuick.Extras/DelayButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1022,8 +1029,8 @@ Module {
Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
Property { name: "__action"; type: "QQuickAction"; isPointer: true }
Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
- Property { name: "__effectivePressed"; type: "bool" }
Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
@@ -1036,7 +1043,29 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/Dial"
+ name: "QtQuick.Extras/Dial 1.0"
+ exports: ["QtQuick.Extras/Dial 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "__wrap"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "tickmarksVisible"; type: "bool" }
+ Property { name: "value"; type: "double" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "stepSize"; type: "double" }
+ Property { name: "pressed"; type: "bool"; isReadonly: 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.Extras/Dial 1.1"
exports: ["QtQuick.Extras/Dial 1.1"]
exportMetaObjectRevisions: [1]
isComposite: true
@@ -1058,7 +1087,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/Gauge"
+ name: "QtQuick.Extras/Gauge 1.0"
exports: ["QtQuick.Extras/Gauge 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1083,7 +1112,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/GroupBox"
+ name: "QtQuick.Controls/GroupBox 1.0"
exports: ["QtQuick.Controls/GroupBox 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1100,7 +1129,7 @@ Module {
}
Component {
prototype: "QQuickText"
- name: "QtQuick.Controls/Label"
+ name: "QtQuick.Controls/Label 1.0"
exports: ["QtQuick.Controls/Label 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1108,7 +1137,7 @@ Module {
}
Component {
prototype: "QObject"
- name: "QtQuick.Controls/Menu"
+ name: "QtQuick.Controls/Menu 1.0"
exports: ["QtQuick.Controls/Menu 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1116,8 +1145,8 @@ Module {
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: "__parentContentItem"; type: "QVariant" }
+ Property { name: "__currentIndex"; type: "int" }
Method {
name: "addMenu"
type: "QVariant"
@@ -1146,10 +1175,9 @@ Module {
Signal { name: "__menuPopupDestroyed" }
Signal { name: "menuContentItemChanged" }
Signal { name: "minimumWidthChanged" }
- Method { name: "__closeMenu" }
Method { name: "__dismissMenu" }
- Method { name: "__destroyMenuPopup" }
- Method { name: "__destroyAllMenuPopups" }
+ Method { name: "__closeAndDestroy" }
+ Method { name: "__dismissAndDestroy" }
Method { name: "popup" }
Method {
name: "addItem"
@@ -1200,7 +1228,7 @@ Module {
}
Component {
prototype: "QObject"
- name: "QtQuick.Controls/MenuBar"
+ name: "QtQuick.Controls/MenuBar 1.0"
exports: ["QtQuick.Controls/MenuBar 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1217,7 +1245,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/PieMenu"
+ name: "QtQuick.Extras/PieMenu 1.0"
exports: ["QtQuick.Extras/PieMenu 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1262,18 +1290,18 @@ Module {
}
Component {
prototype: "QQuickLoader"
- name: "QtQuick.Extras.Private/PieMenuIcon"
+ name: "QtQuick.Extras.Private/PieMenuIcon 1.0"
exports: ["QtQuick.Extras.Private/PieMenuIcon 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
- Property { name: "control"; type: "PieMenu_QMLTYPE_176"; isPointer: true }
+ Property { name: "control"; type: "PieMenu_QMLTYPE_168"; isPointer: true }
Property { name: "styleData"; type: "QObject"; isPointer: true }
Property { name: "iconSource"; type: "string"; isReadonly: true }
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/ProgressBar"
+ name: "QtQuick.Controls/ProgressBar 1.0"
exports: ["QtQuick.Controls/ProgressBar 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1298,7 +1326,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/RadioButton"
+ name: "QtQuick.Controls/RadioButton 1.0"
exports: ["QtQuick.Controls/RadioButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1319,7 +1347,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/ScrollView"
+ name: "QtQuick.Controls/ScrollView 1.0"
exports: ["QtQuick.Controls/ScrollView 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1331,7 +1359,7 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -1339,20 +1367,20 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_25"
+ type: "ScrollBar_QMLTYPE_24"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_25"
+ type: "ScrollBar_QMLTYPE_24"
isReadonly: true
isPointer: true
}
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/Slider"
+ name: "QtQuick.Controls/Slider 1.0"
exports: ["QtQuick.Controls/Slider 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1379,7 +1407,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/SpinBox"
+ name: "QtQuick.Controls/SpinBox 1.0"
exports: ["QtQuick.Controls/SpinBox 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1398,6 +1426,7 @@ Module {
Property { name: "prefix"; type: "string" }
Property { name: "decimals"; type: "int" }
Property { name: "font"; type: "QFont" }
+ Property { name: "cursorPosition"; type: "int" }
Property { name: "__text"; type: "string" }
Property { name: "__baselineOffset"; type: "double" }
Signal { name: "editingFinished" }
@@ -1411,7 +1440,7 @@ Module {
}
Component {
prototype: "QQuickItem"
- name: "QtQuick.Controls/SplitView"
+ name: "QtQuick.Controls/SplitView 1.0"
exports: ["QtQuick.Controls/SplitView 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1435,19 +1464,19 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/StackView"
+ name: "QtQuick.Controls/StackView 1.0"
exports: ["QtQuick.Controls/StackView 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
+ Property { name: "initialItem"; type: "QVariant" }
Property { name: "busy"; type: "bool"; isReadonly: true }
- Property { name: "delegate"; type: "StackViewDelegate_QMLTYPE_233"; isPointer: true }
+ Property { name: "delegate"; type: "StackViewDelegate_QMLTYPE_225"; isPointer: true }
Property { name: "__currentItem"; type: "QQuickItem"; isPointer: true }
Property { name: "__depth"; type: "int" }
+ Property { name: "__currentTransition"; type: "QVariant" }
Property { name: "__guard"; type: "bool" }
Property { name: "invalidItemReplacement"; type: "QQmlComponent"; isPointer: true }
- Property { name: "initialItem"; type: "QVariant" }
- Property { name: "__currentTransition"; type: "QVariant" }
Property { name: "depth"; type: "int"; isReadonly: true }
Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Method {
@@ -1517,7 +1546,7 @@ Module {
}
Component {
prototype: "QObject"
- name: "QtQuick.Controls/StackViewDelegate"
+ name: "QtQuick.Controls/StackViewDelegate 1.0"
exports: ["QtQuick.Controls/StackViewDelegate 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1537,7 +1566,7 @@ Module {
}
Component {
prototype: "QQuickParallelAnimation"
- name: "QtQuick.Controls/StackViewTransition"
+ name: "QtQuick.Controls/StackViewTransition 1.0"
exports: ["QtQuick.Controls/StackViewTransition 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1549,7 +1578,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/StatusBar"
+ name: "QtQuick.Controls/StatusBar 1.0"
exports: ["QtQuick.Controls/StatusBar 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1562,7 +1591,23 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/StatusIndicator"
+ name: "QtQuick.Extras/StatusIndicator 1.0"
+ exports: ["QtQuick.Extras/StatusIndicator 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "active"; type: "bool" }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "on"; type: "bool" }
+ 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.Extras/StatusIndicator 1.1"
exports: ["QtQuick.Extras/StatusIndicator 1.1"]
exportMetaObjectRevisions: [1]
isComposite: true
@@ -1578,7 +1623,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/Switch"
+ name: "QtQuick.Controls/Switch 1.1"
exports: ["QtQuick.Controls/Switch 1.1"]
exportMetaObjectRevisions: [1]
isComposite: true
@@ -1596,7 +1641,7 @@ Module {
}
Component {
prototype: "QQuickLoader"
- name: "QtQuick.Controls/Tab"
+ name: "QtQuick.Controls/Tab 1.0"
exports: ["QtQuick.Controls/Tab 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1607,7 +1652,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/TabView"
+ name: "QtQuick.Controls/TabView 1.0"
exports: ["QtQuick.Controls/TabView 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1665,17 +1710,17 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/TableView"
+ name: "QtQuick.Controls/TableView 1.0"
exports: ["QtQuick.Controls/TableView 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "__columns"
- Property { name: "rowCount"; type: "int"; isReadonly: true }
Property { name: "model"; type: "QVariant" }
+ Property { name: "rowCount"; type: "int"; isReadonly: true }
Property { name: "currentRow"; type: "int" }
Property {
name: "selection"
- type: "TableViewSelection_QMLTYPE_265"
+ type: "TableViewSelection_QMLTYPE_281"
isReadonly: true
isPointer: true
}
@@ -1719,9 +1764,9 @@ Module {
Property { name: "__viewTypeName"; type: "string" }
Property { name: "__isTreeView"; type: "bool"; isReadonly: true }
Property { name: "__itemDelegateLoader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__model"; type: "QVariant" }
Property { name: "__activateItemOnSingleClick"; type: "bool" }
Property { name: "__mouseArea"; type: "QQuickItem"; isPointer: true }
- Property { name: "__model"; type: "QVariant" }
Property { name: "backgroundVisible"; type: "bool" }
Property { name: "contentHeader"; type: "QQmlComponent"; isPointer: true }
Property { name: "contentFooter"; type: "QQmlComponent"; isPointer: true }
@@ -1766,7 +1811,7 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -1774,20 +1819,20 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_25"
+ type: "ScrollBar_QMLTYPE_24"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_25"
+ type: "ScrollBar_QMLTYPE_24"
isReadonly: true
isPointer: true
}
}
Component {
prototype: "QObject"
- name: "QtQuick.Controls/TableViewColumn"
+ name: "QtQuick.Controls/TableViewColumn 1.0"
exports: ["QtQuick.Controls/TableViewColumn 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -1806,7 +1851,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/TextArea"
+ name: "QtQuick.Controls/TextArea 1.3"
exports: ["QtQuick.Controls/TextArea 1.3"]
exportMetaObjectRevisions: [3]
isComposite: true
@@ -1853,6 +1898,291 @@ Module {
name: "linkHovered"
Parameter { name: "link"; type: "string" }
}
+ Signal { name: "editingFinished" }
+ Method {
+ name: "append"
+ type: "QVariant"
+ Parameter { name: "string"; type: "QVariant" }
+ }
+ Method { name: "copy"; type: "QVariant" }
+ Method { name: "cut"; type: "QVariant" }
+ Method { name: "deselect"; type: "QVariant" }
+ Method {
+ name: "getFormattedText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "getText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "insert"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "text"; type: "QVariant" }
+ }
+ Method {
+ name: "isRightToLeft"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "moveCursorSelection"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "mode"; type: "QVariant" }
+ }
+ Method { name: "paste"; type: "QVariant" }
+ Method {
+ name: "positionAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Method {
+ name: "positionToRectangle"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ }
+ Method { name: "redo"; type: "QVariant" }
+ Method {
+ name: "remove"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "select"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ 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_1"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_24"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_24"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TextArea 1.0"
+ exports: ["QtQuick.Controls/TextArea 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true }
+ Property { name: "tabChangesFocus"; type: "bool" }
+ Property { name: "selectByMouse"; type: "bool" }
+ Property { name: "menu"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "baseUrl"; type: "QUrl" }
+ Property { name: "canPaste"; type: "bool"; isReadonly: true }
+ Property { name: "canRedo"; type: "bool"; isReadonly: true }
+ Property { name: "canUndo"; type: "bool"; isReadonly: true }
+ Property { name: "textColor"; type: "QColor" }
+ Property { name: "cursorPosition"; type: "int" }
+ Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "horizontalAlignment"; type: "int" }
+ Property { name: "effectiveHorizontalAlignment"; type: "int"; isReadonly: true }
+ Property { name: "verticalAlignment"; type: "int" }
+ Property { name: "inputMethodHints"; type: "int" }
+ Property { name: "length"; type: "int"; isReadonly: true }
+ Property { name: "lineCount"; type: "int"; isReadonly: true }
+ Property { name: "readOnly"; type: "bool" }
+ Property { name: "selectedText"; type: "string"; isReadonly: true }
+ Property { name: "selectionEnd"; type: "int"; isReadonly: true }
+ Property { name: "selectionStart"; type: "int"; isReadonly: true }
+ Property { name: "text"; type: "string" }
+ Property { name: "textFormat"; type: "int" }
+ Property { name: "wrapMode"; type: "int" }
+ Property { name: "selectByKeyboard"; type: "bool" }
+ Property { name: "hoveredLink"; type: "string"; isReadonly: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "textMargin"; type: "double" }
+ Property { name: "contentWidth"; type: "double"; isReadonly: true }
+ Property { name: "contentHeight"; type: "double"; isReadonly: true }
+ Property { name: "textDocument"; type: "QQuickTextDocument"; isReadonly: true; isPointer: true }
+ Signal {
+ name: "linkActivated"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal {
+ name: "linkHovered"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal { name: "editingFinished" }
+ Method {
+ name: "append"
+ type: "QVariant"
+ Parameter { name: "string"; type: "QVariant" }
+ }
+ Method { name: "copy"; type: "QVariant" }
+ Method { name: "cut"; type: "QVariant" }
+ Method { name: "deselect"; type: "QVariant" }
+ Method {
+ name: "getFormattedText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "getText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "insert"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "text"; type: "QVariant" }
+ }
+ Method {
+ name: "isRightToLeft"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "moveCursorSelection"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "mode"; type: "QVariant" }
+ }
+ Method { name: "paste"; type: "QVariant" }
+ Method {
+ name: "positionAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Method {
+ name: "positionToRectangle"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ }
+ Method { name: "redo"; type: "QVariant" }
+ Method {
+ name: "remove"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "select"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ 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_1"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_24"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_24"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TextArea 1.5"
+ exports: ["QtQuick.Controls/TextArea 1.5"]
+ exportMetaObjectRevisions: [5]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true }
+ Property { name: "tabChangesFocus"; type: "bool" }
+ Property { name: "selectByMouse"; type: "bool" }
+ Property { name: "menu"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "baseUrl"; type: "QUrl" }
+ Property { name: "canPaste"; type: "bool"; isReadonly: true }
+ Property { name: "canRedo"; type: "bool"; isReadonly: true }
+ Property { name: "canUndo"; type: "bool"; isReadonly: true }
+ Property { name: "textColor"; type: "QColor" }
+ Property { name: "cursorPosition"; type: "int" }
+ Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "horizontalAlignment"; type: "int" }
+ Property { name: "effectiveHorizontalAlignment"; type: "int"; isReadonly: true }
+ Property { name: "verticalAlignment"; type: "int" }
+ Property { name: "inputMethodHints"; type: "int" }
+ Property { name: "length"; type: "int"; isReadonly: true }
+ Property { name: "lineCount"; type: "int"; isReadonly: true }
+ Property { name: "readOnly"; type: "bool" }
+ Property { name: "selectedText"; type: "string"; isReadonly: true }
+ Property { name: "selectionEnd"; type: "int"; isReadonly: true }
+ Property { name: "selectionStart"; type: "int"; isReadonly: true }
+ Property { name: "text"; type: "string" }
+ Property { name: "textFormat"; type: "int" }
+ Property { name: "wrapMode"; type: "int" }
+ Property { name: "selectByKeyboard"; type: "bool" }
+ Property { name: "hoveredLink"; type: "string"; isReadonly: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "textMargin"; type: "double" }
+ Property { name: "contentWidth"; type: "double"; isReadonly: true }
+ Property { name: "contentHeight"; type: "double"; isReadonly: true }
+ Property { name: "textDocument"; type: "QQuickTextDocument"; isReadonly: true; isPointer: true }
+ Signal {
+ name: "linkActivated"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal {
+ name: "linkHovered"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal { name: "editingFinished" }
Method {
name: "append"
type: "QVariant"
@@ -1926,7 +2256,7 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -1934,20 +2264,20 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_25"
+ type: "ScrollBar_QMLTYPE_24"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_25"
+ type: "ScrollBar_QMLTYPE_24"
isReadonly: true
isPointer: true
}
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/TextField"
+ name: "QtQuick.Controls/TextField 1.0"
exports: ["QtQuick.Controls/TextField 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -2032,7 +2362,7 @@ Module {
}
Component {
prototype: "QQuickText"
- name: "QtQuick.Extras.Private/TextSingleton"
+ name: "QtQuick.Extras.Private/TextSingleton 1.0"
exports: ["QtQuick.Extras.Private/TextSingleton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -2042,7 +2372,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/ToggleButton"
+ name: "QtQuick.Extras/ToggleButton 1.0"
exports: ["QtQuick.Extras/ToggleButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -2062,8 +2392,8 @@ Module {
Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
Property { name: "__action"; type: "QQuickAction"; isPointer: true }
Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
- Property { name: "__effectivePressed"; type: "bool" }
Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
@@ -2076,7 +2406,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/ToolBar"
+ name: "QtQuick.Controls/ToolBar 1.0"
exports: ["QtQuick.Controls/ToolBar 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -2090,7 +2420,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/ToolButton"
+ name: "QtQuick.Controls/ToolButton 1.0"
exports: ["QtQuick.Controls/ToolButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -2110,8 +2440,8 @@ Module {
Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
Property { name: "__action"; type: "QQuickAction"; isPointer: true }
Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
- Property { name: "__effectivePressed"; type: "bool" }
Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
@@ -2124,14 +2454,149 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Controls/TreeView"
+ name: "QtQuick.Controls/TreeView 1.5"
+ exports: ["QtQuick.Controls/TreeView 1.5"]
+ exportMetaObjectRevisions: [5]
+ isComposite: true
+ defaultProperty: "__columns"
+ Property { name: "model"; type: "QVariant" }
+ Property { name: "currentIndex"; type: "QVariant"; isReadonly: true }
+ Property { name: "selection"; type: "QItemSelectionModel"; isPointer: true }
+ Property { name: "rootIndex"; type: "QModelIndex" }
+ Signal {
+ name: "activated"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "clicked"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "doubleClicked"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "pressAndHold"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "expanded"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "collapsed"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "isExpanded"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "collapse"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "expand"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "indexAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Property { name: "alternatingRowColors"; type: "bool" }
+ Property { name: "headerVisible"; type: "bool" }
+ Property { name: "itemDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "rowDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "headerDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "sortIndicatorColumn"; type: "int" }
+ Property { name: "sortIndicatorVisible"; type: "bool" }
+ Property { name: "sortIndicatorOrder"; type: "int" }
+ Property { name: "selectionMode"; type: "int" }
+ Property { name: "__viewTypeName"; type: "string" }
+ Property { name: "__isTreeView"; type: "bool"; isReadonly: true }
+ Property { name: "__itemDelegateLoader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__model"; type: "QVariant" }
+ Property { name: "__activateItemOnSingleClick"; type: "bool" }
+ Property { name: "__mouseArea"; type: "QQuickItem"; isPointer: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "contentHeader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "contentFooter"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "columnCount"; type: "int"; isReadonly: true }
+ Property { name: "section"; type: "QQuickViewSection"; isReadonly: true; isPointer: true }
+ Property { name: "__columns"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "__currentRowItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "__currentRow"; type: "int" }
+ Property { name: "__listView"; type: "QQuickListView"; isReadonly: true; isPointer: true }
+ Method {
+ name: "addColumn"
+ type: "QVariant"
+ Parameter { name: "column"; type: "QVariant" }
+ }
+ Method {
+ name: "insertColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ Parameter { name: "column"; type: "QVariant" }
+ }
+ Method {
+ name: "removeColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "moveColumn"
+ type: "QVariant"
+ Parameter { name: "from"; type: "QVariant" }
+ Parameter { name: "to"; type: "QVariant" }
+ }
+ Method {
+ name: "getColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method { name: "resizeColumnsToContents"; 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_1"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_24"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_24"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TreeView 1.4"
exports: ["QtQuick.Controls/TreeView 1.4"]
exportMetaObjectRevisions: [4]
isComposite: true
defaultProperty: "__columns"
- Property { name: "selection"; type: "QItemSelectionModel"; isPointer: true }
Property { name: "model"; type: "QVariant" }
Property { name: "currentIndex"; type: "QVariant"; isReadonly: true }
+ Property { name: "selection"; type: "QItemSelectionModel"; isPointer: true }
+ Property { name: "rootIndex"; type: "QModelIndex" }
Signal {
name: "activated"
Parameter { name: "index"; type: "QVariant" }
@@ -2189,9 +2654,9 @@ Module {
Property { name: "__viewTypeName"; type: "string" }
Property { name: "__isTreeView"; type: "bool"; isReadonly: true }
Property { name: "__itemDelegateLoader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__model"; type: "QVariant" }
Property { name: "__activateItemOnSingleClick"; type: "bool" }
Property { name: "__mouseArea"; type: "QQuickItem"; isPointer: true }
- Property { name: "__model"; type: "QVariant" }
Property { name: "backgroundVisible"; type: "bool" }
Property { name: "contentHeader"; type: "QQmlComponent"; isPointer: true }
Property { name: "contentFooter"; type: "QQmlComponent"; isPointer: true }
@@ -2236,7 +2701,7 @@ Module {
Property { name: "__scrollBarTopMargin"; type: "int" }
Property { name: "__viewTopMargin"; type: "int" }
Property { name: "style"; type: "QQmlComponent"; isPointer: true }
- Property { name: "__style"; type: "Style_QMLTYPE_2"; isPointer: true }
+ Property { name: "__style"; type: "Style_QMLTYPE_1"; isPointer: true }
Property { name: "horizontalScrollBarPolicy"; type: "int" }
Property { name: "verticalScrollBarPolicy"; type: "int" }
Property { name: "viewport"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -2244,20 +2709,20 @@ Module {
Property { name: "__wheelAreaScrollSpeed"; type: "double" }
Property {
name: "__horizontalScrollBar"
- type: "ScrollBar_QMLTYPE_25"
+ type: "ScrollBar_QMLTYPE_24"
isReadonly: true
isPointer: true
}
Property {
name: "__verticalScrollBar"
- type: "ScrollBar_QMLTYPE_25"
+ type: "ScrollBar_QMLTYPE_24"
isReadonly: true
isPointer: true
}
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/Tumbler"
+ name: "QtQuick.Extras/Tumbler 1.2"
exports: ["QtQuick.Extras/Tumbler 1.2"]
exportMetaObjectRevisions: [2]
isComposite: true
@@ -2317,13 +2782,14 @@ Module {
}
Component {
prototype: "QObject"
- name: "QtQuick.Extras/TumblerColumn"
+ name: "QtQuick.Extras/TumblerColumn 1.2"
exports: ["QtQuick.Extras/TumblerColumn 1.2"]
exportMetaObjectRevisions: [2]
isComposite: true
Property { name: "__tumbler"; type: "QQuickItem"; isPointer: true }
Property { name: "__index"; type: "int" }
Property { name: "__currentIndex"; type: "int" }
+ Property { name: "model"; type: "QVariant" }
Property { name: "role"; type: "string" }
Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
Property { name: "highlight"; type: "QQmlComponent"; isPointer: true }
@@ -2331,10 +2797,12 @@ Module {
Property { name: "visible"; type: "bool" }
Property { name: "activeFocus"; type: "bool"; isReadonly: true }
Property { name: "width"; type: "double" }
- Property { name: "model"; type: "QVariant" }
Property { name: "currentIndex"; type: "int"; isReadonly: true }
}
+ //
+ // Manually added to work around QtC limitations:
+ //
Component {
name: "QQuickWindow"
defaultProperty: "data"
@@ -2581,4 +3049,5 @@ Module {
}
Method { name: "requestUpdate"; revision: 3 }
}
+
}
diff --git a/src/controls/qquickaction.cpp b/src/controls/qquickaction.cpp
index 90a1fd67..47032aab 100644
--- a/src/controls/qquickaction.cpp
+++ b/src/controls/qquickaction.cpp
@@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE
\qmltype Action
\instantiates QQuickAction
\ingroup applicationwindow
+ \ingroup controls
\inqmlmodule QtQuick.Controls
\brief Action provides an abstract user interface action that can be bound to items
@@ -391,12 +392,12 @@ void QQuickAction::setChecked(bool c)
emit toggled(m_checked);
}
-QQuickExclusiveGroup *QQuickAction::exclusiveGroup() const
+QQuickExclusiveGroup1 *QQuickAction::exclusiveGroup() const
{
return m_exclusiveGroup.data();
}
-void QQuickAction::setExclusiveGroup(QQuickExclusiveGroup *eg)
+void QQuickAction::setExclusiveGroup(QQuickExclusiveGroup1 *eg)
{
if (m_exclusiveGroup == eg)
return;
diff --git a/src/controls/qquickaction_p.h b/src/controls/qquickaction_p.h
index 1828cc9e..953cfcb0 100644
--- a/src/controls/qquickaction_p.h
+++ b/src/controls/qquickaction_p.h
@@ -46,7 +46,7 @@
QT_BEGIN_NAMESPACE
-class QQuickExclusiveGroup;
+class QQuickExclusiveGroup1;
class QQuickAction : public QObject
{
@@ -61,7 +61,7 @@ class QQuickAction : public QObject
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged)
Q_PROPERTY(bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled)
- Q_PROPERTY(QQuickExclusiveGroup *exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup NOTIFY exclusiveGroupChanged)
+ Q_PROPERTY(QQuickExclusiveGroup1 *exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup NOTIFY exclusiveGroupChanged)
#ifndef QT_NO_SHORTCUT
Q_PROPERTY(QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged)
#endif
@@ -99,12 +99,12 @@ public:
bool isChecked() const { return m_checkable && m_checked; }
void setChecked(bool c);
- QQuickExclusiveGroup *exclusiveGroup() const;
- void setExclusiveGroup(QQuickExclusiveGroup *arg);
+ QQuickExclusiveGroup1 *exclusiveGroup() const;
+ void setExclusiveGroup(QQuickExclusiveGroup1 *arg);
QIcon icon() const { return m_icon; }
QVariant iconVariant() const { return QVariant(m_icon); }
- void setIcon(QIcon icon) { m_icon = icon; emit iconChanged(); }
+ void setIcon(const QIcon &icon) { m_icon = icon; emit iconChanged(); }
bool event(QEvent *e);
@@ -116,12 +116,12 @@ Q_SIGNALS:
void toggled(bool checked);
void textChanged();
- void shortcutChanged(QVariant shortcut);
+ void shortcutChanged(const QVariant &shortcut);
void iconChanged();
void iconNameChanged();
void iconSourceChanged();
- void tooltipChanged(QString arg);
+ void tooltipChanged(const QString &arg);
void enabledChanged();
void checkableChanged();
@@ -135,7 +135,7 @@ private:
bool m_enabled;
bool m_checkable;
bool m_checked;
- QPointer<QQuickExclusiveGroup> m_exclusiveGroup;
+ QPointer<QQuickExclusiveGroup1> m_exclusiveGroup;
QKeySequence m_shortcut;
QKeySequence m_mnemonic;
QString m_tooltip;
diff --git a/src/controls/qquickexclusivegroup.cpp b/src/controls/qquickexclusivegroup.cpp
index 08fe6d58..9682b85d 100644
--- a/src/controls/qquickexclusivegroup.cpp
+++ b/src/controls/qquickexclusivegroup.cpp
@@ -60,7 +60,7 @@ static bool isChecked(const QObject *o)
/*!
\qmltype ExclusiveGroup
- \instantiates QQuickExclusiveGroup
+ \instantiates QQuickExclusiveGroup1
\ingroup controls
\inqmlmodule QtQuick.Controls
\brief ExclusiveGroup provides a way to declare several checkable controls as mutually exclusive.
@@ -172,25 +172,25 @@ static bool isChecked(const QObject *o)
\sa ExclusiveGroup::bindCheckable()
*/
-QQuickExclusiveGroup::QQuickExclusiveGroup(QObject *parent)
+QQuickExclusiveGroup1::QQuickExclusiveGroup1(QObject *parent)
: QObject(parent), m_current(0)
{
int index = metaObject()->indexOfMethod("updateCurrent()");
m_updateCurrentMethod = metaObject()->method(index);
}
-QQmlListProperty<QQuickAction> QQuickExclusiveGroup::actions()
+QQmlListProperty<QQuickAction> QQuickExclusiveGroup1::actions()
{
- return QQmlListProperty<QQuickAction>(this, 0, &QQuickExclusiveGroup::append_actions, 0, 0, 0);
+ return QQmlListProperty<QQuickAction>(this, 0, &QQuickExclusiveGroup1::append_actions, 0, 0, 0);
}
-void QQuickExclusiveGroup::append_actions(QQmlListProperty<QQuickAction> *list, QQuickAction *action)
+void QQuickExclusiveGroup1::append_actions(QQmlListProperty<QQuickAction> *list, QQuickAction *action)
{
- if (QQuickExclusiveGroup *eg = qobject_cast<QQuickExclusiveGroup *>(list->object))
+ if (QQuickExclusiveGroup1 *eg = qobject_cast<QQuickExclusiveGroup1 *>(list->object))
action->setExclusiveGroup(eg);
}
-void QQuickExclusiveGroup::setCurrent(QObject * o)
+void QQuickExclusiveGroup1::setCurrent(QObject * o)
{
if (m_current == o)
return;
@@ -203,14 +203,14 @@ void QQuickExclusiveGroup::setCurrent(QObject * o)
emit currentChanged();
}
-void QQuickExclusiveGroup::updateCurrent()
+void QQuickExclusiveGroup1::updateCurrent()
{
QObject *checkable = sender();
if (isChecked(checkable))
setCurrent(checkable);
}
-void QQuickExclusiveGroup::bindCheckable(QObject *o)
+void QQuickExclusiveGroup1::bindCheckable(QObject *o)
{
for (const char **signalName = checkableSignals; *signalName; signalName++) {
int signalIndex = o->metaObject()->indexOfSignal(*signalName);
@@ -224,10 +224,10 @@ void QQuickExclusiveGroup::bindCheckable(QObject *o)
}
}
- qWarning() << "QQuickExclusiveGroup::bindCheckable(): Cannot bind to" << o;
+ qWarning() << "QQuickExclusiveGroup1::bindCheckable(): Cannot bind to" << o;
}
-void QQuickExclusiveGroup::unbindCheckable(QObject *o)
+void QQuickExclusiveGroup1::unbindCheckable(QObject *o)
{
if (m_current == o)
setCurrent(0);
diff --git a/src/controls/qquickexclusivegroup_p.h b/src/controls/qquickexclusivegroup_p.h
index 05256dcf..835bdb5e 100644
--- a/src/controls/qquickexclusivegroup_p.h
+++ b/src/controls/qquickexclusivegroup_p.h
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKEXCLUSIVEGROUP_H
-#define QQUICKEXCLUSIVEGROUP_H
+#ifndef QQUICKEXCLUSIVEGROUP1_H
+#define QQUICKEXCLUSIVEGROUP1_H
#include <QtCore/qobject.h>
#include <QtCore/qmetaobject.h>
@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
class QQuickAction;
-class QQuickExclusiveGroup : public QObject
+class QQuickExclusiveGroup1 : public QObject
{
Q_OBJECT
@@ -54,7 +54,7 @@ class QQuickExclusiveGroup : public QObject
Q_CLASSINFO("DefaultProperty", "__actions")
public:
- explicit QQuickExclusiveGroup(QObject *parent = 0);
+ explicit QQuickExclusiveGroup1(QObject *parent = 0);
QObject *current() const { return m_current; }
void setCurrent(QObject * o);
@@ -80,4 +80,4 @@ private:
QT_END_NAMESPACE
-#endif // QQUICKEXCLUSIVEGROUP_H
+#endif // QQUICKEXCLUSIVEGROUP1_H
diff --git a/src/controls/qquickmenu.cpp b/src/controls/qquickmenu.cpp
index beabe65b..6ae20ff1 100644
--- a/src/controls/qquickmenu.cpp
+++ b/src/controls/qquickmenu.cpp
@@ -51,13 +51,13 @@
QT_BEGIN_NAMESPACE
/*!
- \class QQuickMenu
+ \class QQuickMenu1
\internal
*/
/*!
\qmltype MenuPrivate
- \instantiates QQuickMenu
+ \instantiates QQuickMenu1
\internal
\inqmlmodule QtQuick.Controls
*/
@@ -254,7 +254,7 @@ QT_BEGIN_NAMESPACE
\sa aboutToShow()
*/
-QQuickMenu::QQuickMenu(QObject *parent)
+QQuickMenu1::QQuickMenu1(QObject *parent)
: QQuickMenuText(parent, QQuickMenuItemType::Menu),
m_itemsCount(0),
m_selectedIndex(-1),
@@ -266,7 +266,8 @@ QQuickMenu::QQuickMenu(QObject *parent)
m_containersCount(0),
m_xOffset(0),
m_yOffset(0),
- m_triggerCount(0)
+ m_triggerCount(0),
+ m_proxy(false)
{
connect(this, SIGNAL(__textChanged()), this, SIGNAL(titleChanged()));
@@ -281,7 +282,7 @@ QQuickMenu::QQuickMenu(QObject *parent)
m_font = *const_cast<QFont*>(font);
}
-QQuickMenu::~QQuickMenu()
+QQuickMenu1::~QQuickMenu1()
{
while (!m_menuItems.empty()) {
QQuickMenuBase *item = m_menuItems.takeFirst();
@@ -296,14 +297,14 @@ QQuickMenu::~QQuickMenu()
m_platformMenu = 0;
}
-void QQuickMenu::syncParentMenuBar()
+void QQuickMenu1::syncParentMenuBar()
{
- QQuickMenuBar *menubar = qobject_cast<QQuickMenuBar *>(parent());
+ QQuickMenuBar1 *menubar = qobject_cast<QQuickMenuBar1 *>(parent());
if (menubar && menubar->platformMenuBar())
menubar->platformMenuBar()->syncMenu(m_platformMenu);
}
-void QQuickMenu::setVisible(bool v)
+void QQuickMenu1::setVisible(bool v)
{
QQuickMenuBase::setVisible(v);
if (m_platformMenu) {
@@ -312,7 +313,7 @@ void QQuickMenu::setVisible(bool v)
}
}
-void QQuickMenu::setEnabled(bool e)
+void QQuickMenu1::setEnabled(bool e)
{
QQuickMenuText::setEnabled(e);
if (m_platformMenu) {
@@ -321,14 +322,14 @@ void QQuickMenu::setEnabled(bool e)
}
}
-void QQuickMenu::updateText()
+void QQuickMenu1::updateText()
{
if (m_platformMenu)
m_platformMenu->setText(this->text());
QQuickMenuText::updateText();
}
-void QQuickMenu::setMinimumWidth(int w)
+void QQuickMenu1::setMinimumWidth(int w)
{
if (w == m_minimumWidth)
return;
@@ -340,7 +341,7 @@ void QQuickMenu::setMinimumWidth(int w)
emit minimumWidthChanged();
}
-void QQuickMenu::setFont(const QFont &arg)
+void QQuickMenu1::setFont(const QFont &arg)
{
if (arg == m_font)
return;
@@ -350,17 +351,17 @@ void QQuickMenu::setFont(const QFont &arg)
m_platformMenu->setFont(arg);
}
-void QQuickMenu::setXOffset(qreal x)
+void QQuickMenu1::setXOffset(qreal x)
{
m_xOffset = x;
}
-void QQuickMenu::setYOffset(qreal y)
+void QQuickMenu1::setYOffset(qreal y)
{
m_yOffset = y;
}
-void QQuickMenu::setSelectedIndex(int index)
+void QQuickMenu1::setSelectedIndex(int index)
{
if (m_selectedIndex == index)
return;
@@ -369,21 +370,21 @@ void QQuickMenu::setSelectedIndex(int index)
emit __selectedIndexChanged();
}
-void QQuickMenu::updateSelectedIndex()
+void QQuickMenu1::updateSelectedIndex()
{
- if (QQuickMenuItem *menuItem = qobject_cast<QQuickMenuItem*>(sender())) {
+ if (QQuickMenuItem1 *menuItem = qobject_cast<QQuickMenuItem1*>(sender())) {
int index = indexOfMenuItem(menuItem);
setSelectedIndex(index);
}
}
-QQuickMenuItems QQuickMenu::menuItems()
+QQuickMenuItems QQuickMenu1::menuItems()
{
- return QQuickMenuItems(this, 0, &QQuickMenu::append_menuItems, &QQuickMenu::count_menuItems,
- &QQuickMenu::at_menuItems, &QQuickMenu::clear_menuItems);
+ return QQuickMenuItems(this, 0, &QQuickMenu1::append_menuItems, &QQuickMenu1::count_menuItems,
+ &QQuickMenu1::at_menuItems, &QQuickMenu1::clear_menuItems);
}
-QQuickWindow *QQuickMenu::findParentWindow()
+QQuickWindow *QQuickMenu1::findParentWindow()
{
if (!m_parentWindow) {
QQuickItem *parentAsItem = qobject_cast<QQuickItem *>(parent());
@@ -393,7 +394,7 @@ QQuickWindow *QQuickMenu::findParentWindow()
return m_parentWindow;
}
-void QQuickMenu::popup()
+void QQuickMenu1::popup()
{
QQuickWindow *quickWindow = findParentWindow();
QPoint renderOffset;
@@ -413,7 +414,7 @@ void QQuickMenu::popup()
__popup(QRectF(mousePos.x() - renderOffset.x(), mousePos.y() - renderOffset.y(), 0, 0));
}
-void QQuickMenu::__popup(const QRectF &targetRect, int atItemIndex, MenuType menuType)
+void QQuickMenu1::__popup(const QRectF &targetRect, int atItemIndex, MenuType menuType)
{
if (popupVisible()) {
hideMenu();
@@ -465,7 +466,7 @@ void QQuickMenu::__popup(const QRectF &targetRect, int atItemIndex, MenuType men
}
}
-void QQuickMenu::setMenuContentItem(QQuickItem *item)
+void QQuickMenu1::setMenuContentItem(QQuickItem *item)
{
if (m_menuContentItem != item) {
m_menuContentItem = item;
@@ -473,7 +474,7 @@ void QQuickMenu::setMenuContentItem(QQuickItem *item)
}
}
-void QQuickMenu::setPopupVisible(bool v)
+void QQuickMenu1::setPopupVisible(bool v)
{
if (m_popupVisible != v) {
m_popupVisible = v;
@@ -481,7 +482,7 @@ void QQuickMenu::setPopupVisible(bool v)
}
}
-QRect QQuickMenu::popupGeometry() const
+QRect QQuickMenu1::popupGeometry() const
{
if (!m_popupWindow || !m_popupVisible)
return QRect();
@@ -489,13 +490,13 @@ QRect QQuickMenu::popupGeometry() const
return m_popupWindow->geometry();
}
-void QQuickMenu::prepareItemTrigger(QQuickMenuItem *)
+void QQuickMenu1::prepareItemTrigger(QQuickMenuItem1 *)
{
m_triggerCount++;
__dismissMenu();
}
-void QQuickMenu::concludeItemTrigger(QQuickMenuItem *)
+void QQuickMenu1::concludeItemTrigger(QQuickMenuItem1 *)
{
if (--m_triggerCount == 0)
destroyAllMenuPopups();
@@ -505,7 +506,7 @@ void QQuickMenu::concludeItemTrigger(QQuickMenuItem *)
* \internal
* Close this menu's popup window. Emits aboutToHide and sets __popupVisible to false.
*/
-void QQuickMenu::hideMenu()
+void QQuickMenu1::hideMenu()
{
if (m_popupVisible) {
emit aboutToHide();
@@ -516,7 +517,7 @@ void QQuickMenu::hideMenu()
m_parentWindow = 0;
}
-QQuickMenuPopupWindow *QQuickMenu::topMenuPopup() const
+QQuickMenuPopupWindow *QQuickMenu1::topMenuPopup() const
{
QQuickMenuPopupWindow *topMenuWindow = m_popupWindow;
while (topMenuWindow) {
@@ -535,7 +536,7 @@ QQuickMenuPopupWindow *QQuickMenu::topMenuPopup() const
* In QQuickPopupWindow, before closing, dismissPopup() emits popupDismissed()
* which is connected to dismissPopup() on any child popup.
*/
-void QQuickMenu::__dismissMenu()
+void QQuickMenu1::__dismissMenu()
{
if (m_platformMenu) {
m_platformMenu->dismiss();
@@ -548,7 +549,7 @@ void QQuickMenu::__dismissMenu()
* \internal
* Called when the popup window visible property changes.
*/
-void QQuickMenu::windowVisibleChanged(bool v)
+void QQuickMenu1::windowVisibleChanged(bool v)
{
if (!v) {
if (m_popupWindow) {
@@ -563,13 +564,13 @@ void QQuickMenu::windowVisibleChanged(bool v)
}
}
-void QQuickMenu::clearPopupWindow()
+void QQuickMenu1::clearPopupWindow()
{
m_popupWindow = 0;
emit __menuPopupDestroyed();
}
-void QQuickMenu::destroyMenuPopup()
+void QQuickMenu1::destroyMenuPopup()
{
if (m_triggerCount > 0)
return;
@@ -577,7 +578,7 @@ void QQuickMenu::destroyMenuPopup()
m_popupWindow->setToBeDeletedLater();
}
-void QQuickMenu::destroyAllMenuPopups() {
+void QQuickMenu1::destroyAllMenuPopups() {
if (m_triggerCount > 0)
return;
QQuickMenuPopupWindow *popup = topMenuPopup();
@@ -585,19 +586,36 @@ void QQuickMenu::destroyAllMenuPopups() {
popup->setToBeDeletedLater();
}
-void QQuickMenu::__closeAndDestroy()
+QQuickMenuBar1 *QQuickMenu1::menuBar()
+{
+ QObject *pi = parentMenuOrMenuBar();
+ while (pi) {
+ if (QQuickMenuBar1 *menuBar = qobject_cast<QQuickMenuBar1*>(pi))
+ return menuBar;
+ else if (QQuickMenu1 *menu = qobject_cast<QQuickMenu1*>(pi))
+ pi = menu->parentMenuOrMenuBar();
+ else
+ return 0;
+ }
+ return 0;
+}
+
+void QQuickMenu1::__closeAndDestroy()
{
hideMenu();
destroyMenuPopup();
}
-void QQuickMenu::__dismissAndDestroy()
+void QQuickMenu1::__dismissAndDestroy()
{
+ if (m_platformMenu)
+ return;
+
__dismissMenu();
destroyAllMenuPopups();
}
-void QQuickMenu::itemIndexToListIndex(int itemIndex, int *listIndex, int *containerIndex) const
+void QQuickMenu1::itemIndexToListIndex(int itemIndex, int *listIndex, int *containerIndex) const
{
*listIndex = -1;
QQuickMenuItemContainer *container = 0;
@@ -613,7 +631,7 @@ void QQuickMenu::itemIndexToListIndex(int itemIndex, int *listIndex, int *contai
*containerIndex = -1;
}
-int QQuickMenu::itemIndexForListIndex(int listIndex) const
+int QQuickMenu1::itemIndexForListIndex(int listIndex) const
{
int index = 0;
int i = 0;
@@ -626,7 +644,7 @@ int QQuickMenu::itemIndexForListIndex(int listIndex) const
return index;
}
-QQuickMenuBase *QQuickMenu::nextMenuItem(QQuickMenu::MenuItemIterator *it) const
+QQuickMenuBase *QQuickMenu1::nextMenuItem(QQuickMenu1::MenuItemIterator *it) const
{
if (it->containerIndex != -1) {
QQuickMenuItemContainer *container = qobject_cast<QQuickMenuItemContainer *>(m_menuItems[it->index]);
@@ -647,7 +665,7 @@ QQuickMenuBase *QQuickMenu::nextMenuItem(QQuickMenu::MenuItemIterator *it) const
return 0;
}
-QQuickMenuBase *QQuickMenu::menuItemAtIndex(int index) const
+QQuickMenuBase *QQuickMenu1::menuItemAtIndex(int index) const
{
if (0 <= index && index < m_itemsCount) {
if (!m_containersCount) {
@@ -671,7 +689,7 @@ QQuickMenuBase *QQuickMenu::menuItemAtIndex(int index) const
return 0;
}
-bool QQuickMenu::contains(QQuickMenuBase *item)
+bool QQuickMenu1::contains(QQuickMenuBase *item)
{
if (item->container())
return item->container()->items().contains(item);
@@ -679,7 +697,7 @@ bool QQuickMenu::contains(QQuickMenuBase *item)
return m_menuItems.contains(item);
}
-int QQuickMenu::indexOfMenuItem(QQuickMenuBase *item) const
+int QQuickMenu1::indexOfMenuItem(QQuickMenuBase *item) const
{
if (!item)
return -1;
@@ -695,31 +713,31 @@ int QQuickMenu::indexOfMenuItem(QQuickMenuBase *item) const
}
}
-QQuickMenuItem *QQuickMenu::addItem(QString title)
+QQuickMenuItem1 *QQuickMenu1::addItem(const QString &title)
{
return insertItem(m_itemsCount, title);
}
-QQuickMenuItem *QQuickMenu::insertItem(int index, QString title)
+QQuickMenuItem1 *QQuickMenu1::insertItem(int index, const QString &title)
{
- QQuickMenuItem *item = new QQuickMenuItem(this);
+ QQuickMenuItem1 *item = new QQuickMenuItem1(this);
item->setText(title);
insertItem(index, item);
return item;
}
-void QQuickMenu::addSeparator()
+void QQuickMenu1::addSeparator()
{
insertSeparator(m_itemsCount);
}
-void QQuickMenu::insertSeparator(int index)
+void QQuickMenu1::insertSeparator(int index)
{
QQuickMenuSeparator *item = new QQuickMenuSeparator(this);
insertItem(index, item);
}
-void QQuickMenu::insertItem(int index, QQuickMenuBase *menuItem)
+void QQuickMenu1::insertItem(int index, QQuickMenuBase *menuItem)
{
if (!menuItem)
return;
@@ -742,7 +760,7 @@ void QQuickMenu::insertItem(int index, QQuickMenuBase *menuItem)
emit itemsChanged();
}
-void QQuickMenu::removeItem(QQuickMenuBase *menuItem)
+void QQuickMenu1::removeItem(QQuickMenuBase *menuItem)
{
if (!menuItem)
return;
@@ -758,17 +776,22 @@ void QQuickMenu::removeItem(QQuickMenuBase *menuItem)
emit itemsChanged();
}
-void QQuickMenu::clear()
+void QQuickMenu1::clear()
{
m_containers.clear();
m_containersCount = 0;
+ // QTBUG-48927: a proxy menu (ApplicationWindowStyle.qml) must not
+ // delete its items, because they are owned by the menubar
+ if (m_proxy)
+ m_menuItems.clear();
+
while (!m_menuItems.empty())
delete m_menuItems.takeFirst();
m_itemsCount = 0;
}
-void QQuickMenu::setupMenuItem(QQuickMenuBase *item, int platformIndex)
+void QQuickMenu1::setupMenuItem(QQuickMenuBase *item, int platformIndex)
{
item->setParentMenu(this);
if (m_platformMenu) {
@@ -780,9 +803,9 @@ void QQuickMenu::setupMenuItem(QQuickMenuBase *item, int platformIndex)
++m_itemsCount;
}
-void QQuickMenu::append_menuItems(QQuickMenuItems *list, QObject *o)
+void QQuickMenu1::append_menuItems(QQuickMenuItems *list, QObject *o)
{
- if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(list->object)) {
+ if (QQuickMenu1 *menu = qobject_cast<QQuickMenu1 *>(list->object)) {
if (QQuickMenuBase *menuItem = qobject_cast<QQuickMenuBase *>(o)) {
menu->m_menuItems.append(menuItem);
menu->setupMenuItem(menuItem);
@@ -802,25 +825,25 @@ void QQuickMenu::append_menuItems(QQuickMenuItems *list, QObject *o)
}
}
-int QQuickMenu::count_menuItems(QQuickMenuItems *list)
+int QQuickMenu1::count_menuItems(QQuickMenuItems *list)
{
- if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(list->object))
+ if (QQuickMenu1 *menu = qobject_cast<QQuickMenu1 *>(list->object))
return menu->m_itemsCount;
return 0;
}
-QObject *QQuickMenu::at_menuItems(QQuickMenuItems *list, int index)
+QObject *QQuickMenu1::at_menuItems(QQuickMenuItems *list, int index)
{
- if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(list->object))
+ if (QQuickMenu1 *menu = qobject_cast<QQuickMenu1 *>(list->object))
return menu->menuItemAtIndex(index);
return 0;
}
-void QQuickMenu::clear_menuItems(QQuickMenuItems *list)
+void QQuickMenu1::clear_menuItems(QQuickMenuItems *list)
{
- if (QQuickMenu *menu = qobject_cast<QQuickMenu *>(list->object))
+ if (QQuickMenu1 *menu = qobject_cast<QQuickMenu1 *>(list->object))
menu->clear();
}
diff --git a/src/controls/qquickmenu_p.h b/src/controls/qquickmenu_p.h
index a626179a..576ae5fd 100644
--- a/src/controls/qquickmenu_p.h
+++ b/src/controls/qquickmenu_p.h
@@ -51,10 +51,11 @@ class QPlatformMenu;
class QQuickMenuPopupWindow;
class QQuickMenuItemContainer;
class QQuickWindow;
+class QQuickMenuBar1;
typedef QQmlListProperty<QObject> QQuickMenuItems;
-class QQuickMenu : public QQuickMenuText
+class QQuickMenu1 : public QQuickMenuText
{
Q_OBJECT
Q_PROPERTY(QString title READ text WRITE setText NOTIFY titleChanged)
@@ -70,6 +71,7 @@ class QQuickMenu : public QQuickMenuText
Q_PROPERTY(qreal __yOffset READ yOffset WRITE setYOffset)
Q_PROPERTY(QQuickAction *__action READ action CONSTANT)
Q_PROPERTY(QRect __popupGeometry READ popupGeometry NOTIFY __popupGeometryChanged)
+ Q_PROPERTY(bool __isProxy READ isProxy WRITE setProxy NOTIFY __proxyChanged)
Q_ENUMS(MenuType)
public:
@@ -77,8 +79,8 @@ public:
enum MenuType { DefaultMenu = 0, EditMenu };
Q_INVOKABLE void popup();
- Q_INVOKABLE QQuickMenuItem *addItem(QString);
- Q_INVOKABLE QQuickMenuItem *insertItem(int, QString);
+ Q_INVOKABLE QQuickMenuItem1 *addItem(const QString &);
+ Q_INVOKABLE QQuickMenuItem1 *insertItem(int, const QString &);
Q_INVOKABLE void addSeparator();
Q_INVOKABLE void insertSeparator(int);
@@ -106,10 +108,11 @@ Q_SIGNALS:
void __popupGeometryChanged();
void menuContentItemChanged();
void minimumWidthChanged();
+ void __proxyChanged();
public:
- QQuickMenu(QObject *parent = 0);
- virtual ~QQuickMenu();
+ QQuickMenu1(QObject *parent = 0);
+ virtual ~QQuickMenu1();
void setVisible(bool);
void setEnabled(bool);
@@ -142,11 +145,16 @@ public:
QRect popupGeometry() const;
- void prepareItemTrigger(QQuickMenuItem *);
- void concludeItemTrigger(QQuickMenuItem *);
+ bool isProxy() const { return m_proxy; }
+ void setProxy(bool proxy) { if (m_proxy != proxy) { m_proxy = proxy; emit __proxyChanged(); } }
+
+ void prepareItemTrigger(QQuickMenuItem1 *);
+ void concludeItemTrigger(QQuickMenuItem1 *);
void destroyMenuPopup();
void destroyAllMenuPopups();
+ QQuickMenuBar1 *menuBar();
+
protected Q_SLOTS:
void updateSelectedIndex();
@@ -196,10 +204,11 @@ private:
qreal m_yOffset;
QFont m_font;
int m_triggerCount;
+ bool m_proxy;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickMenu)
+QML_DECLARE_TYPE(QQuickMenu1)
#endif // QQUICKMENU_P_H
diff --git a/src/controls/qquickmenubar.cpp b/src/controls/qquickmenubar.cpp
index efec6510..b795cd98 100644
--- a/src/controls/qquickmenubar.cpp
+++ b/src/controls/qquickmenubar.cpp
@@ -45,13 +45,13 @@ QT_BEGIN_NAMESPACE
/*!
- \class QQuickMenuBar
+ \class QQuickMenuBar1
\internal
*/
/*!
\qmltype MenuBarPrivate
- \instantiates QQuickMenuBar
+ \instantiates QQuickMenuBar1
\internal
\inqmlmodule QtQuick.Controls
*/
@@ -65,28 +65,28 @@ QT_BEGIN_NAMESPACE
\sa Menu
*/
-QQuickMenuBar::QQuickMenuBar(QObject *parent)
+QQuickMenuBar1::QQuickMenuBar1(QObject *parent)
: QObject(parent), m_platformMenuBar(0), m_contentItem(0), m_parentWindow(0)
{
}
-QQuickMenuBar::~QQuickMenuBar()
+QQuickMenuBar1::~QQuickMenuBar1()
{
if (isNative())
setNativeNoNotify(false);
}
-QQmlListProperty<QQuickMenu> QQuickMenuBar::menus()
+QQmlListProperty<QQuickMenu1> QQuickMenuBar1::menus()
{
- return QQmlListProperty<QQuickMenu>(this, 0, &QQuickMenuBar::append_menu, &QQuickMenuBar::count_menu, &QQuickMenuBar::at_menu, 0);
+ return QQmlListProperty<QQuickMenu1>(this, 0, &QQuickMenuBar1::append_menu, &QQuickMenuBar1::count_menu, &QQuickMenuBar1::at_menu, 0);
}
-bool QQuickMenuBar::isNative() const
+bool QQuickMenuBar1::isNative() const
{
return m_platformMenuBar != 0;
}
-void QQuickMenuBar::setNative(bool native)
+void QQuickMenuBar1::setNative(bool native)
{
bool wasNative = isNative();
setNativeNoNotify(native);
@@ -94,20 +94,20 @@ void QQuickMenuBar::setNative(bool native)
emit nativeChanged();
}
-void QQuickMenuBar::setNativeNoNotify(bool native)
+void QQuickMenuBar1::setNativeNoNotify(bool native)
{
if (native) {
if (!m_platformMenuBar) {
m_platformMenuBar = QGuiApplicationPrivate::platformTheme()->createPlatformMenuBar();
if (m_platformMenuBar) {
m_platformMenuBar->handleReparent(m_parentWindow);
- foreach (QQuickMenu *menu, m_menus)
+ foreach (QQuickMenu1 *menu, m_menus)
m_platformMenuBar->insertMenu(menu->platformMenu(), 0 /* append */);
}
}
} else {
if (m_platformMenuBar) {
- foreach (QQuickMenu *menu, m_menus)
+ foreach (QQuickMenu1 *menu, m_menus)
m_platformMenuBar->removeMenu(menu->platformMenu());
}
delete m_platformMenuBar;
@@ -115,7 +115,7 @@ void QQuickMenuBar::setNativeNoNotify(bool native)
}
}
-void QQuickMenuBar::setContentItem(QQuickItem *item)
+void QQuickMenuBar1::setContentItem(QQuickItem *item)
{
if (item != m_contentItem) {
m_contentItem = item;
@@ -123,7 +123,7 @@ void QQuickMenuBar::setContentItem(QQuickItem *item)
}
}
-void QQuickMenuBar::setParentWindow(QQuickWindow *newParentWindow)
+void QQuickMenuBar1::setParentWindow(QQuickWindow *newParentWindow)
{
if (newParentWindow != m_parentWindow) {
m_parentWindow = newParentWindow;
@@ -132,9 +132,9 @@ void QQuickMenuBar::setParentWindow(QQuickWindow *newParentWindow)
}
}
-void QQuickMenuBar::append_menu(QQmlListProperty<QQuickMenu> *list, QQuickMenu *menu)
+void QQuickMenuBar1::append_menu(QQmlListProperty<QQuickMenu1> *list, QQuickMenu1 *menu)
{
- if (QQuickMenuBar *menuBar = qobject_cast<QQuickMenuBar *>(list->object)) {
+ if (QQuickMenuBar1 *menuBar = qobject_cast<QQuickMenuBar1 *>(list->object)) {
menu->setParent(menuBar);
menuBar->m_menus.append(menu);
@@ -145,16 +145,16 @@ void QQuickMenuBar::append_menu(QQmlListProperty<QQuickMenu> *list, QQuickMenu *
}
}
-int QQuickMenuBar::count_menu(QQmlListProperty<QQuickMenu> *list)
+int QQuickMenuBar1::count_menu(QQmlListProperty<QQuickMenu1> *list)
{
- if (QQuickMenuBar *menuBar = qobject_cast<QQuickMenuBar *>(list->object))
+ if (QQuickMenuBar1 *menuBar = qobject_cast<QQuickMenuBar1 *>(list->object))
return menuBar->m_menus.size();
return 0;
}
-QQuickMenu *QQuickMenuBar::at_menu(QQmlListProperty<QQuickMenu> *list, int index)
+QQuickMenu1 *QQuickMenuBar1::at_menu(QQmlListProperty<QQuickMenu1> *list, int index)
{
- QQuickMenuBar *menuBar = qobject_cast<QQuickMenuBar *>(list->object);
+ QQuickMenuBar1 *menuBar = qobject_cast<QQuickMenuBar1 *>(list->object);
if (menuBar && 0 <= index && index < menuBar->m_menus.size())
return menuBar->m_menus[index];
return 0;
diff --git a/src/controls/qquickmenubar_p.h b/src/controls/qquickmenubar_p.h
index 83166d77..47b27a42 100644
--- a/src/controls/qquickmenubar_p.h
+++ b/src/controls/qquickmenubar_p.h
@@ -47,11 +47,11 @@ QT_BEGIN_NAMESPACE
class QPlatformMenuBar;
class QQuickItem;
-class QQuickMenuBar: public QObject
+class QQuickMenuBar1: public QObject
{
Q_OBJECT
- Q_PROPERTY(QQmlListProperty<QQuickMenu> menus READ menus NOTIFY menusChanged)
+ Q_PROPERTY(QQmlListProperty<QQuickMenu1> menus READ menus NOTIFY menusChanged)
Q_CLASSINFO("DefaultProperty", "menus")
Q_PROPERTY(QQuickItem *__contentItem READ contentItem WRITE setContentItem NOTIFY contentItemChanged)
@@ -64,10 +64,10 @@ Q_SIGNALS:
void contentItemChanged();
public:
- QQuickMenuBar(QObject *parent = 0);
- ~QQuickMenuBar();
+ QQuickMenuBar1(QObject *parent = 0);
+ ~QQuickMenuBar1();
- QQmlListProperty<QQuickMenu> menus();
+ QQmlListProperty<QQuickMenu1> menus();
bool isNative() const;
void setNative(bool native);
@@ -82,12 +82,12 @@ public:
private:
void setNativeNoNotify(bool native);
- static void append_menu(QQmlListProperty<QQuickMenu> *list, QQuickMenu *menu);
- static int count_menu(QQmlListProperty<QQuickMenu> *list);
- static QQuickMenu *at_menu(QQmlListProperty<QQuickMenu> *list, int index);
+ static void append_menu(QQmlListProperty<QQuickMenu1> *list, QQuickMenu1 *menu);
+ static int count_menu(QQmlListProperty<QQuickMenu1> *list);
+ static QQuickMenu1 *at_menu(QQmlListProperty<QQuickMenu1> *list, int index);
private:
- QList<QQuickMenu *> m_menus;
+ QList<QQuickMenu1 *> m_menus;
QPlatformMenuBar *m_platformMenuBar;
QQuickItem *m_contentItem;
QQuickWindow *m_parentWindow;
diff --git a/src/controls/qquickmenuitem.cpp b/src/controls/qquickmenuitem.cpp
index be15a435..2057ba11 100644
--- a/src/controls/qquickmenuitem.cpp
+++ b/src/controls/qquickmenuitem.cpp
@@ -89,12 +89,12 @@ QObject *QQuickMenuBase::parentMenuOrMenuBar() const
return m_parentMenu;
}
-QQuickMenu *QQuickMenuBase::parentMenu() const
+QQuickMenu1 *QQuickMenuBase::parentMenu() const
{
return m_parentMenu;
}
-void QQuickMenuBase::setParentMenu(QQuickMenu *parentMenu)
+void QQuickMenuBase::setParentMenu(QQuickMenu1 *parentMenu)
{
if (m_platformItem && m_parentMenu && m_parentMenu->platformMenu())
m_parentMenu->platformMenu()->removeMenuItem(m_platformItem);
@@ -114,7 +114,7 @@ void QQuickMenuBase::setContainer(QQuickMenuItemContainer *c)
void QQuickMenuBase::syncWithPlatformMenu()
{
- QQuickMenu *menu = parentMenu();
+ QQuickMenu1 *menu = parentMenu();
if (menu && menu->platformMenu() && platformItem()
&& menu->contains(this)) // If not, it'll be added later and then sync'ed
menu->platformMenu()->syncMenuItem(platformItem());
@@ -135,6 +135,7 @@ void QQuickMenuBase::setVisualItem(QQuickItem *item)
\instantiates QQuickMenuSeparator
\inqmlmodule QtQuick.Controls
\ingroup menus
+ \ingroup controls
\brief MenuSeparator provides a separator for items inside a menu.
\image menu.png
@@ -282,8 +283,9 @@ void QQuickMenuText::updateIcon()
/*!
\qmltype MenuItem
- \instantiates QQuickMenuItem
+ \instantiates QQuickMenuItem1
\ingroup menus
+ \ingroup controls
\inqmlmodule QtQuick.Controls
\brief MenuItem provides an item to add in a menu or a menu bar.
@@ -454,7 +456,7 @@ void QQuickMenuText::updateIcon()
Defaults to \c null, meaning no action is bound to the menu item.
*/
-QQuickMenuItem::QQuickMenuItem(QObject *parent)
+QQuickMenuItem1::QQuickMenuItem1(QObject *parent)
: QQuickMenuText(parent, QQuickMenuItemType::Item), m_boundAction(0)
{
connect(this, SIGNAL(__textChanged()), this, SIGNAL(textChanged()));
@@ -467,21 +469,21 @@ QQuickMenuItem::QQuickMenuItem(QObject *parent)
connect(platformItem(), SIGNAL(activated()), this, SLOT(trigger()), Qt::QueuedConnection);
}
-QQuickMenuItem::~QQuickMenuItem()
+QQuickMenuItem1::~QQuickMenuItem1()
{
unbindFromAction(m_boundAction);
if (platformItem())
disconnect(platformItem(), SIGNAL(activated()), this, SLOT(trigger()));
}
-void QQuickMenuItem::setParentMenu(QQuickMenu *parentMenu)
+void QQuickMenuItem1::setParentMenu(QQuickMenu1 *parentMenu)
{
QQuickMenuText::setParentMenu(parentMenu);
if (parentMenu)
connect(this, SIGNAL(triggered()), parentMenu, SLOT(updateSelectedIndex()));
}
-void QQuickMenuItem::bindToAction(QQuickAction *action)
+void QQuickMenuItem1::bindToAction(QQuickAction *action)
{
m_boundAction = action;
@@ -509,7 +511,7 @@ void QQuickMenuItem::bindToAction(QQuickAction *action)
}
}
-void QQuickMenuItem::unbindFromAction(QObject *o)
+void QQuickMenuItem1::unbindFromAction(QObject *o)
{
if (!o)
return;
@@ -536,14 +538,14 @@ void QQuickMenuItem::unbindFromAction(QObject *o)
disconnect(action, SIGNAL(iconSourceChanged()), this, SIGNAL(iconSourceChanged()));
}
-QQuickAction *QQuickMenuItem::action() const
+QQuickAction *QQuickMenuItem1::action() const
{
if (m_boundAction)
return m_boundAction;
return QQuickMenuText::action();
}
-void QQuickMenuItem::setBoundAction(QQuickAction *a)
+void QQuickMenuItem1::setBoundAction(QQuickAction *a)
{
if (a == m_boundAction)
return;
@@ -554,7 +556,7 @@ void QQuickMenuItem::setBoundAction(QQuickAction *a)
emit actionChanged();
}
-QString QQuickMenuItem::text() const
+QString QQuickMenuItem1::text() const
{
QString ownText = QQuickMenuText::text();
if (!ownText.isNull())
@@ -562,7 +564,7 @@ QString QQuickMenuItem::text() const
return m_boundAction ? m_boundAction->text() : QString();
}
-QUrl QQuickMenuItem::iconSource() const
+QUrl QQuickMenuItem1::iconSource() const
{
QUrl ownIconSource = QQuickMenuText::iconSource();
if (!ownIconSource.isEmpty())
@@ -570,7 +572,7 @@ QUrl QQuickMenuItem::iconSource() const
return m_boundAction ? m_boundAction->iconSource() : QUrl();
}
-QString QQuickMenuItem::iconName() const
+QString QQuickMenuItem1::iconName() const
{
QString ownIconName = QQuickMenuText::iconName();
if (!ownIconName.isEmpty())
@@ -578,7 +580,7 @@ QString QQuickMenuItem::iconName() const
return m_boundAction ? m_boundAction->iconName() : QString();
}
-QIcon QQuickMenuItem::icon() const
+QIcon QQuickMenuItem1::icon() const
{
QIcon ownIcon = QQuickMenuText::icon();
if (!ownIcon.isNull())
@@ -586,18 +588,18 @@ QIcon QQuickMenuItem::icon() const
return m_boundAction ? m_boundAction->icon() : QIcon();
}
-QVariant QQuickMenuItem::shortcut() const
+QVariant QQuickMenuItem1::shortcut() const
{
return action()->shortcut();
}
-void QQuickMenuItem::setShortcut(const QVariant &shortcut)
+void QQuickMenuItem1::setShortcut(const QVariant &shortcut)
{
if (!m_boundAction)
action()->setShortcut(shortcut);
}
-void QQuickMenuItem::updateShortcut()
+void QQuickMenuItem1::updateShortcut()
{
if (platformItem()) {
QKeySequence sequence;
@@ -612,18 +614,18 @@ void QQuickMenuItem::updateShortcut()
emit shortcutChanged();
}
-bool QQuickMenuItem::checkable() const
+bool QQuickMenuItem1::checkable() const
{
return action()->isCheckable();
}
-void QQuickMenuItem::setCheckable(bool checkable)
+void QQuickMenuItem1::setCheckable(bool checkable)
{
if (!m_boundAction)
action()->setCheckable(checkable);
}
-void QQuickMenuItem::updateCheckable()
+void QQuickMenuItem1::updateCheckable()
{
if (platformItem()) {
platformItem()->setCheckable(checkable());
@@ -633,18 +635,18 @@ void QQuickMenuItem::updateCheckable()
emit checkableChanged();
}
-bool QQuickMenuItem::checked() const
+bool QQuickMenuItem1::checked() const
{
return action()->isChecked();
}
-void QQuickMenuItem::setChecked(bool checked)
+void QQuickMenuItem1::setChecked(bool checked)
{
if (!m_boundAction)
action()->setChecked(checked);
}
-void QQuickMenuItem::updateChecked()
+void QQuickMenuItem1::updateChecked()
{
bool checked = this->checked();
if (platformItem()) {
@@ -655,26 +657,26 @@ void QQuickMenuItem::updateChecked()
emit toggled(checked);
}
-QQuickExclusiveGroup *QQuickMenuItem::exclusiveGroup() const
+QQuickExclusiveGroup1 *QQuickMenuItem1::exclusiveGroup() const
{
return action()->exclusiveGroup();
}
-void QQuickMenuItem::setExclusiveGroup(QQuickExclusiveGroup *eg)
+void QQuickMenuItem1::setExclusiveGroup(QQuickExclusiveGroup1 *eg)
{
if (!m_boundAction)
action()->setExclusiveGroup(eg);
}
-void QQuickMenuItem::setEnabled(bool enabled)
+void QQuickMenuItem1::setEnabled(bool enabled)
{
if (!m_boundAction)
action()->setEnabled(enabled);
}
-void QQuickMenuItem::trigger()
+void QQuickMenuItem1::trigger()
{
- QPointer<QQuickMenu> menu(parentMenu());
+ QPointer<QQuickMenu1> menu(parentMenu());
if (menu)
menu->prepareItemTrigger(this);
action()->trigger(this);
diff --git a/src/controls/qquickmenuitem_p.h b/src/controls/qquickmenuitem_p.h
index fe05c9c3..4c60a9b8 100644
--- a/src/controls/qquickmenuitem_p.h
+++ b/src/controls/qquickmenuitem_p.h
@@ -50,8 +50,8 @@ class QUrl;
class QPlatformMenuItem;
class QQuickItem;
class QQuickAction;
-class QQuickExclusiveGroup;
-class QQuickMenu;
+class QQuickExclusiveGroup1;
+class QQuickMenu1;
class QQuickMenuItemContainer;
class QQuickMenuItemType
@@ -88,9 +88,9 @@ public:
bool visible() const { return m_visible; }
virtual void setVisible(bool);
- QQuickMenu *parentMenu() const;
+ QQuickMenu1 *parentMenu() const;
QObject *parentMenuOrMenuBar() const;
- virtual void setParentMenu(QQuickMenu *parentMenu);
+ virtual void setParentMenu(QQuickMenu1 *parentMenu);
QQuickMenuItemContainer *container() const;
void setContainer(QQuickMenuItemContainer *);
@@ -107,7 +107,7 @@ public:
private:
bool m_visible;
QQuickMenuItemType::MenuItemType m_type;
- QQuickMenu *m_parentMenu;
+ QQuickMenu1 *m_parentMenu;
QQuickMenuItemContainer *m_container;
QPlatformMenuItem *m_platformItem;
QPointer<QQuickItem> m_visualItem;
@@ -167,13 +167,13 @@ private:
QQuickAction *m_action;
};
-class QQuickMenuItem : public QQuickMenuText
+class QQuickMenuItem1 : public QQuickMenuText
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
Q_PROPERTY(bool checkable READ checkable WRITE setCheckable NOTIFY checkableChanged)
Q_PROPERTY(bool checked READ checked WRITE setChecked NOTIFY toggled)
- Q_PROPERTY(QQuickExclusiveGroup *exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup NOTIFY exclusiveGroupChanged)
+ Q_PROPERTY(QQuickExclusiveGroup1 *exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup NOTIFY exclusiveGroupChanged)
Q_PROPERTY(QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged)
Q_PROPERTY(QQuickAction *action READ boundAction WRITE setBoundAction NOTIFY actionChanged)
@@ -191,8 +191,8 @@ Q_SIGNALS:
void actionChanged();
public:
- QQuickMenuItem(QObject *parent = 0);
- ~QQuickMenuItem();
+ QQuickMenuItem1(QObject *parent = 0);
+ ~QQuickMenuItem1();
void setEnabled(bool enabled);
@@ -213,10 +213,10 @@ public:
bool checked() const;
void setChecked(bool checked);
- QQuickExclusiveGroup *exclusiveGroup() const;
- void setExclusiveGroup(QQuickExclusiveGroup *);
+ QQuickExclusiveGroup1 *exclusiveGroup() const;
+ void setExclusiveGroup(QQuickExclusiveGroup1 *);
- void setParentMenu(QQuickMenu *parentMenu);
+ void setParentMenu(QQuickMenu1 *parentMenu);
protected Q_SLOTS:
void updateShortcut();
diff --git a/src/controls/qquickmenuitemcontainer_p.h b/src/controls/qquickmenuitemcontainer_p.h
index a69d219d..fe58bf92 100644
--- a/src/controls/qquickmenuitemcontainer_p.h
+++ b/src/controls/qquickmenuitemcontainer_p.h
@@ -56,7 +56,7 @@ public:
setParentMenu(0);
}
- void setParentMenu(QQuickMenu *parentMenu)
+ void setParentMenu(QQuickMenu1 *parentMenu)
{
QQuickMenuBase::setParentMenu(parentMenu);
Q_FOREACH (QQuickMenuBase *item, m_menuItems)
diff --git a/src/controls/qquickmenupopupwindow.cpp b/src/controls/qquickmenupopupwindow.cpp
index d4ad6795..670ad6aa 100644
--- a/src/controls/qquickmenupopupwindow.cpp
+++ b/src/controls/qquickmenupopupwindow.cpp
@@ -46,7 +46,7 @@
QT_BEGIN_NAMESPACE
-QQuickMenuPopupWindow::QQuickMenuPopupWindow(QQuickMenu *menu) :
+QQuickMenuPopupWindow::QQuickMenuPopupWindow(QQuickMenu1 *menu) :
m_itemAt(0),
m_logicalParentWindow(0),
m_menu(menu)
@@ -170,32 +170,22 @@ void QQuickMenuPopupWindow::exposeEvent(QExposeEvent *e)
updateSize();
}
-QQuickMenu *QQuickMenuPopupWindow::menu() const
+QQuickMenu1 *QQuickMenuPopupWindow::menu() const
{
return m_menu;
}
-QQuickMenuBar *QQuickMenuPopupWindow::menuBar() const
-{
- QObject *pi = menu()->parentMenuOrMenuBar();
- while (pi) {
- if (QQuickMenuBar *menuBar = qobject_cast<QQuickMenuBar*>(pi))
- return menuBar;
- else if (QQuickMenu *menu = qobject_cast<QQuickMenu*>(pi))
- pi = menu->parentMenuOrMenuBar();
- else
- return 0;
- }
- return 0;
-}
-
bool QQuickMenuPopupWindow::shouldForwardEventAfterDismiss(QMouseEvent *e) const
{
- // The events that dismissed a popup child of a menu contained in the menubar
- // are never forwarded
- if (QQuickMenuBar *mb = menuBar()) {
- QPoint parentPos = transientParent()->mapFromGlobal(mapToGlobal(e->pos()));
- if (!mb->isNative() && mb->contentItem()->contains(parentPos))
+ // If the event falls inside this item the event should not be forwarded.
+ // For example for comboboxes or top menus of the menubar
+ QQuickMenuBar1 *mb = m_menu ? m_menu->menuBar() : Q_NULLPTR;
+ QQuickItem *item = mb && !mb->isNative() ? mb->contentItem() : menu()->visualItem();
+ QWindow *window = transientParent();
+ if (item && window && item->window() == window) {
+ QPointF pos = window->mapFromGlobal(mapToGlobal(e->pos()));
+ pos = item->mapFromScene(pos);
+ if (item->contains(pos))
return false;
}
diff --git a/src/controls/qquickmenupopupwindow_p.h b/src/controls/qquickmenupopupwindow_p.h
index fb96dc74..abee1f83 100644
--- a/src/controls/qquickmenupopupwindow_p.h
+++ b/src/controls/qquickmenupopupwindow_p.h
@@ -41,14 +41,14 @@
QT_BEGIN_NAMESPACE
-class QQuickMenu;
-class QQuickMenuBar;
+class QQuickMenu1;
+class QQuickMenuBar1;
class QQuickMenuPopupWindow : public QQuickPopupWindow
{
Q_OBJECT
public:
- QQuickMenuPopupWindow(QQuickMenu *menu);
+ QQuickMenuPopupWindow(QQuickMenu1 *menu);
void setItemAt(QQuickItem *menuItem);
void setParentWindow(QWindow *effectiveParentWindow, QQuickWindow *parentWindow);
@@ -56,7 +56,7 @@ public:
void setParentItem(QQuickItem *);
- QQuickMenu *menu() const;
+ QQuickMenu1 *menu() const;
public Q_SLOTS:
void setToBeDeletedLater();
@@ -76,11 +76,8 @@ private:
QQuickItem *m_itemAt;
QPointF m_oldItemPos;
QPointF m_initialPos;
- QQuickWindow *m_logicalParentWindow;
- QQuickMenu *m_menu;
-
-private:
- QQuickMenuBar *menuBar() const;
+ QPointer<QQuickWindow> m_logicalParentWindow;
+ QQuickMenu1 *m_menu;
};
QT_END_NAMESPACE
diff --git a/src/controls/qquickpopupwindow.cpp b/src/controls/qquickpopupwindow.cpp
index a8f45167..cfab5bd5 100644
--- a/src/controls/qquickpopupwindow.cpp
+++ b/src/controls/qquickpopupwindow.cpp
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
QQuickPopupWindow::QQuickPopupWindow() :
QQuickWindow(), m_parentItem(0), m_contentItem(0),
m_mouseMoved(false), m_needsActivatedEvent(true),
- m_dismissed(false)
+ m_dismissed(false), m_pressed(false)
{
setFlags(Qt::Popup);
connect(qApp, SIGNAL(applicationStateChanged(Qt::ApplicationState)),
@@ -67,6 +67,7 @@ void QQuickPopupWindow::show()
if (QWindow *tp = transientParent()) {
if (m_parentItem) {
QPointF pos = m_parentItem->mapToItem(m_parentItem->window()->contentItem(), QPointF(posx, posy));
+ pos += tp->mapFromGlobal(m_parentItem->window()->mapToGlobal(QPoint()));
posx = pos.x();
posy = pos.y();
}
@@ -145,17 +146,22 @@ void QQuickPopupWindow::mouseMoveEvent(QMouseEvent *e)
{
QRect rect = QRect(QPoint(), size());
m_mouseMoved = true;
- if (rect.contains(e->pos()))
+ if (rect.contains(e->pos())) {
+ if (e->buttons() != Qt::NoButton)
+ m_pressed = true;
QQuickWindow::mouseMoveEvent(e);
+ }
else
forwardEventToTransientParent(e);
}
void QQuickPopupWindow::mousePressEvent(QMouseEvent *e)
{
+ m_pressed = true;
QRect rect = QRect(QPoint(), size());
- if (rect.contains(e->pos()))
+ if (rect.contains(e->pos())) {
QQuickWindow::mousePressEvent(e);
+ }
else
forwardEventToTransientParent(e);
}
@@ -172,8 +178,10 @@ void QQuickPopupWindow::mouseReleaseEvent(QMouseEvent *e)
}
m_mouseMoved = true; // Initial mouse release counts as move.
} else {
- forwardEventToTransientParent(e);
+ if (m_pressed)
+ forwardEventToTransientParent(e);
}
+ m_pressed = false;
}
void QQuickPopupWindow::forwardEventToTransientParent(QMouseEvent *e)
diff --git a/src/controls/qquickpopupwindow_p.h b/src/controls/qquickpopupwindow_p.h
index 617df53d..830ba382 100644
--- a/src/controls/qquickpopupwindow_p.h
+++ b/src/controls/qquickpopupwindow_p.h
@@ -88,6 +88,7 @@ private:
bool m_mouseMoved;
bool m_needsActivatedEvent;
bool m_dismissed;
+ bool m_pressed;
};
QT_END_NAMESPACE
diff --git a/src/controls/qquickstack.cpp b/src/controls/qquickstack.cpp
index 16031656..3524b9ef 100644
--- a/src/controls/qquickstack.cpp
+++ b/src/controls/qquickstack.cpp
@@ -42,6 +42,7 @@ QT_BEGIN_NAMESPACE
\qmltype Stack
\instantiates QQuickStack
\inqmlmodule QtQuick.Controls
+ \ingroup controls
\brief Provides attached properties for items pushed onto a StackView.
The Stack type provides attached properties for items pushed onto a \l StackView.
diff --git a/src/dialogs/Private/plugins.qmltypes b/src/dialogs/Private/plugins.qmltypes
new file mode 100644
index 00000000..6052caeb
--- /dev/null
+++ b/src/dialogs/Private/plugins.qmltypes
@@ -0,0 +1,325 @@
+import QtQuick.tooling 1.2
+
+// This file describes the plugin-supplied types contained in the library.
+// It is used for QML tooling purposes only.
+//
+// This file was auto-generated by:
+// 'qmlplugindump -nonrelocatable QtQuick.Dialogs.Private 1.1'
+
+Module {
+ dependencies: []
+ Component {
+ name: "QAbstractItemModel"
+ prototype: "QObject"
+ Enum {
+ name: "LayoutChangeHint"
+ values: {
+ "NoLayoutChangeHint": 0,
+ "VerticalSortHint": 1,
+ "HorizontalSortHint": 2
+ }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ Parameter { name: "roles"; type: "QVector<int>" }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ }
+ Signal {
+ name: "headerDataChanged"
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutChanged" }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutAboutToBeChanged" }
+ Signal {
+ name: "rowsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal { name: "modelAboutToBeReset" }
+ Signal { name: "modelReset" }
+ Signal {
+ name: "rowsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationRow"; type: "int" }
+ }
+ Signal {
+ name: "rowsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "row"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationColumn"; type: "int" }
+ }
+ Signal {
+ name: "columnsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method { name: "submit"; type: "bool" }
+ Method { name: "revert" }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "parent"
+ type: "QModelIndex"
+ Parameter { name: "child"; type: "QModelIndex" }
+ }
+ Method {
+ name: "sibling"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "idx"; type: "QModelIndex" }
+ }
+ Method {
+ name: "rowCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "rowCount"; type: "int" }
+ Method {
+ name: "columnCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "columnCount"; type: "int" }
+ Method {
+ name: "hasChildren"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "hasChildren"; type: "bool" }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ }
+ Method {
+ name: "fetchMore"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "canFetchMore"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "flags"
+ type: "Qt::ItemFlags"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ Parameter { name: "flags"; type: "Qt::MatchFlags" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ }
+ Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" }
+ Component {
+ name: "QQuickFontListModel"
+ prototype: "QAbstractListModel"
+ exports: ["QtQuick.Dialogs.Private/FontListModel 1.1"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "writingSystem"; type: "string" }
+ Property { name: "scalableFonts"; type: "bool" }
+ Property { name: "nonScalableFonts"; type: "bool" }
+ Property { name: "monospacedFonts"; type: "bool" }
+ Property { name: "proportionalFonts"; type: "bool" }
+ Property { name: "count"; type: "int"; isReadonly: true }
+ Signal { name: "rowCountChanged" }
+ Method {
+ name: "setScalableFonts"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "setNonScalableFonts"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "setMonospacedFonts"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "setProportionalFonts"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "get"
+ type: "QJSValue"
+ Parameter { name: "index"; type: "int" }
+ }
+ Method { name: "pointSizes"; type: "QJSValue" }
+ }
+ Component {
+ name: "QQuickWritingSystemListModel"
+ prototype: "QAbstractListModel"
+ exports: ["QtQuick.Dialogs.Private/WritingSystemListModel 1.1"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "writingSystems"; type: "QStringList"; isReadonly: true }
+ Property { name: "count"; type: "int"; isReadonly: true }
+ Signal { name: "rowCountChanged" }
+ Method {
+ name: "get"
+ type: "QJSValue"
+ Parameter { name: "index"; type: "int" }
+ }
+ }
+}
diff --git a/src/dialogs/Private/qquickfontlistmodel.cpp b/src/dialogs/Private/qquickfontlistmodel.cpp
index 8cd24880..0091f74f 100644
--- a/src/dialogs/Private/qquickfontlistmodel.cpp
+++ b/src/dialogs/Private/qquickfontlistmodel.cpp
@@ -206,7 +206,7 @@ QJSValue QQuickFontListModel::get(int idx) const
return engine->newObject();
QJSValue result = engine->newObject();
- int count = d->roleNames.keys().count();
+ int count = d->roleNames.count();
for (int i = 0; i < count; ++i)
result.setProperty(QString(d->roleNames[Qt::UserRole + i + 1]), data(index(idx, 0), Qt::UserRole + i + 1).toString());
diff --git a/src/dialogs/Private/qquickwritingsystemlistmodel.cpp b/src/dialogs/Private/qquickwritingsystemlistmodel.cpp
index fc0aa033..2b26f366 100644
--- a/src/dialogs/Private/qquickwritingsystemlistmodel.cpp
+++ b/src/dialogs/Private/qquickwritingsystemlistmodel.cpp
@@ -144,7 +144,7 @@ QJSValue QQuickWritingSystemListModel::get(int idx) const
return engine->newObject();
QJSValue result = engine->newObject();
- int count = d->roleNames.keys().count();
+ int count = d->roleNames.count();
for (int i = 0; i < count; ++i)
result.setProperty(QString(d->roleNames[Qt::UserRole + i + 1]), data(index(idx, 0), Qt::UserRole + i + 1).toString());
diff --git a/src/dialogs/dialogs.pro b/src/dialogs/dialogs.pro
index b0b9db2d..9daaa6e6 100644
--- a/src/dialogs/dialogs.pro
+++ b/src/dialogs/dialogs.pro
@@ -1,3 +1,5 @@
+requires(contains(QT_CONFIG, accessibility))
+
CXX_MODULE = qml
TARGET = dialogplugin
TARGETPATH = QtQuick/Dialogs
diff --git a/src/dialogs/doc/qtquickdialogs.qdocconf b/src/dialogs/doc/qtquickdialogs.qdocconf
index 2dd08ed6..30f3635a 100644
--- a/src/dialogs/doc/qtquickdialogs.qdocconf
+++ b/src/dialogs/doc/qtquickdialogs.qdocconf
@@ -26,7 +26,7 @@ depends = qtqml qtquick qtgui qtwidgets qtdoc qtcore
exampledirs += ../../../examples/quick/dialogs
-examplesinstallpath = quick/dialogs
+examplesinstallpath = qtquickcontrols/quick/dialogs
headerdirs += ..
diff --git a/src/dialogs/plugin.cpp b/src/dialogs/plugin.cpp
index 7fac166d..65740024 100644
--- a/src/dialogs/plugin.cpp
+++ b/src/dialogs/plugin.cpp
@@ -175,7 +175,7 @@ public:
protected:
template <class WrapperType>
- void registerWidgetOrQmlImplementation(QDir widgetsDir, QDir qmlDir,
+ void registerWidgetOrQmlImplementation(const QDir &widgetsDir, const QDir &qmlDir,
const char *qmlName, const char *uri, bool hasTopLevelWindows, int versionMajor, int versionMinor) {
qCDebug(lcRegistration) << qmlName << uri << ": QML in" << qmlDir.absolutePath()
<< "using resources?" << m_useResources << "; widgets in" << widgetsDir.absolutePath();
@@ -191,7 +191,7 @@ protected:
}
template <class WrapperType>
- bool registerWidgetImplementation(QDir widgetsDir, QDir qmlDir,
+ bool registerWidgetImplementation(const QDir &widgetsDir, const QDir &qmlDir,
const char *qmlName, const char *uri, bool hasTopLevelWindows, int versionMajor, int versionMinor)
{
@@ -223,7 +223,7 @@ protected:
}
template <class WrapperType>
- void registerQmlImplementation(QDir qmlDir, const char *qmlName, const char *uri , int versionMajor, int versionMinor)
+ void registerQmlImplementation(const QDir &qmlDir, const char *qmlName, const char *uri , int versionMajor, int versionMinor)
{
qCDebug(lcRegistration) << "Register QML version for" << qmlName << "with uri:" << uri;
diff --git a/src/dialogs/plugins.qmltypes b/src/dialogs/plugins.qmltypes
index 4d94782c..c5993304 100644
--- a/src/dialogs/plugins.qmltypes
+++ b/src/dialogs/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,296 +7,21 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQuick.Dialogs 1.2'
Module {
- Component {
- name: "QQuickAbstractColorDialog"
- prototype: "QQuickAbstractDialog"
- Property { name: "showAlphaChannel"; type: "bool" }
- Property { name: "color"; type: "QColor" }
- Property { name: "currentColor"; type: "QColor" }
- Property { name: "currentHue"; type: "double"; isReadonly: true }
- Property { name: "currentSaturation"; type: "double"; isReadonly: true }
- Property { name: "currentLightness"; type: "double"; isReadonly: true }
- Property { name: "currentAlpha"; type: "double"; isReadonly: true }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setModality"
- Parameter { name: "m"; type: "Qt::WindowModality" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setColor"
- Parameter { name: "arg"; type: "QColor" }
- }
- Method {
- name: "setCurrentColor"
- Parameter { name: "currentColor"; type: "QColor" }
- }
- Method {
- name: "setShowAlphaChannel"
- Parameter { name: "arg"; type: "bool" }
- }
- }
- 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" }
- 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" }
- Property { name: "__maximumDimension"; type: "int"; isReadonly: true }
- 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: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
- }
- Component {
- name: "QQuickAbstractFileDialog"
- prototype: "QQuickAbstractDialog"
- 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 }
- Property { name: "sidebarVisible"; type: "bool" }
- Signal { name: "filterSelected" }
- Signal { name: "fileModeChanged" }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setSelectExisting"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setSelectMultiple"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setSelectFolder"
- Parameter { name: "s"; type: "bool" }
- }
- Method {
- name: "setFolder"
- Parameter { name: "f"; type: "QUrl" }
- }
- Method {
- name: "setNameFilters"
- Parameter { name: "f"; type: "QStringList" }
- }
- Method {
- name: "selectNameFilter"
- Parameter { name: "f"; type: "string" }
- }
- Method {
- name: "setSelectedNameFilterIndex"
- Parameter { name: "idx"; type: "int" }
- }
- Method {
- name: "setSidebarVisible"
- Parameter { name: "s"; type: "bool" }
- }
- }
- Component {
- name: "QQuickAbstractFontDialog"
- prototype: "QQuickAbstractDialog"
- 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" }
- Property { name: "currentFont"; type: "QFont" }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setModality"
- Parameter { name: "m"; type: "Qt::WindowModality" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setFont"
- Parameter { name: "arg"; type: "QFont" }
- }
- Method {
- name: "setCurrentFont"
- Parameter { name: "arg"; type: "QFont" }
- }
- Method {
- name: "setScalableFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setNonScalableFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setMonospacedFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- Method {
- name: "setProportionalFonts"
- Parameter { name: "arg"; type: "bool" }
- }
- }
- Component {
- name: "QQuickAbstractMessageDialog"
- prototype: "QQuickAbstractDialog"
- Enum {
- name: "Icon"
- values: {
- "NoIcon": 0,
- "Information": 1,
- "Warning": 2,
- "Critical": 3,
- "Question": 4
- }
- }
- 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: "QQuickAbstractDialog::StandardButtons" }
- Property {
- name: "clickedButton"
- type: "QQuickAbstractDialog::StandardButton"
- isReadonly: true
- }
- Signal { name: "buttonClicked" }
- Signal { name: "discard" }
- Signal { name: "help" }
- Signal { name: "yes" }
- Signal { name: "no" }
- Signal { name: "apply" }
- Signal { name: "reset" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setInformativeText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setDetailedText"
- Parameter { name: "arg"; type: "string" }
- }
- Method {
- name: "setIcon"
- Parameter { name: "icon"; type: "Icon" }
- }
- Method {
- name: "setStandardButtons"
- Parameter { name: "buttons"; type: "StandardButtons" }
- }
- Method {
- name: "click"
- Parameter { name: "button"; type: "QQuickAbstractDialog::StandardButton" }
- }
- }
+ dependencies: [
+ "Qt.labs.folderlistmodel 2.1",
+ "Qt.labs.settings 1.0",
+ "QtGraphicalEffects 1.0",
+ "QtGraphicalEffects.private 1.0",
+ "QtQml.Models 2.2",
+ "QtQuick 2.6",
+ "QtQuick.Controls 1.4",
+ "QtQuick.Controls.Styles 1.4",
+ "QtQuick.Extras 1.4",
+ "QtQuick.Extras.Private.CppUtils 1.1",
+ "QtQuick.Layouts 1.1",
+ "QtQuick.PrivateWidgets 1.1",
+ "QtQuick.Window 2.2"
+ ]
Component {
name: "QQuickColorDialog"
defaultProperty: "contentItem"
@@ -349,6 +74,7 @@ Module {
exportMetaObjectRevisions: [0]
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
Property { name: "shortcuts"; type: "QJSValue"; isReadonly: true }
+ Property { name: "__shortcuts"; type: "QJSValue"; isReadonly: true }
Method { name: "clearSelection" }
Method {
name: "addSelection"
@@ -385,8 +111,299 @@ Module {
exportMetaObjectRevisions: [0]
}
Component {
+ prototype: "QQuickWindowQmlImpl"
+ name: "QtQuick.Controls/ApplicationWindow 1.0"
+ exports: ["QtQuick.Controls/ApplicationWindow 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "menuBar"; type: "MenuBar_QMLTYPE_4"; isPointer: true }
+ Property { name: "toolBar"; type: "QQuickItem"; isPointer: true }
+ Property { name: "statusBar"; type: "QQuickItem"; isPointer: true }
+ Property { name: "style"; type: "QQmlComponent"; 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_12"
+ isReadonly: true
+ isPointer: true
+ }
+ Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
+ Property { name: "__panel"; type: "QObject"; isReadonly: true; isPointer: true }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/BusyIndicator 1.1"
+ exports: ["QtQuick.Controls/BusyIndicator 1.1"]
+ exportMetaObjectRevisions: [1]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "running"; type: "bool" }
+ 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/Button 1.0"
+ exports: ["QtQuick.Controls/Button 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "isDefault"; type: "bool" }
+ Property { name: "menu"; type: "Menu_QMLTYPE_52"; isPointer: true }
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "checked"; type: "bool" }
+ Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
+ Property { name: "action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "text"; type: "string" }
+ Property { name: "tooltip"; type: "string" }
+ Property { name: "iconSource"; type: "QUrl" }
+ Property { name: "iconName"; type: "string" }
+ Property { name: "__position"; type: "string" }
+ Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
+ Property { name: "__action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
+ Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Signal { name: "clicked" }
+ Method { name: "accessiblePressAction"; 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/Calendar 1.2"
+ 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: "navigationBarVisible"; type: "bool" }
+ Property { name: "dayOfWeekFormat"; type: "int" }
+ Property { name: "__locale"; type: "QVariant" }
+ Property { name: "__model"; type: "QQuickCalendarModel"; isPointer: true }
+ 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" }
+ }
+ Signal {
+ name: "pressAndHold"
+ 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 }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/CheckBox 1.0"
+ 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 }
+ Property { name: "text"; type: "string" }
+ Property { name: "__cycleStatesHandler"; type: "QVariant" }
+ Property { name: "pressed"; type: "bool" }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Signal { name: "clicked" }
+ 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.Extras.Private/CircularButton 1.0"
+ exports: ["QtQuick.Extras.Private/CircularButton 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "isDefault"; type: "bool" }
+ Property { name: "menu"; type: "Menu_QMLTYPE_52"; isPointer: true }
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "checked"; type: "bool" }
+ Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
+ Property { name: "action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "text"; type: "string" }
+ Property { name: "tooltip"; type: "string" }
+ Property { name: "iconSource"; type: "QUrl" }
+ Property { name: "iconName"; type: "string" }
+ Property { name: "__position"; type: "string" }
+ Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
+ Property { name: "__action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
+ Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Signal { name: "clicked" }
+ Method { name: "accessiblePressAction"; 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: "QObject"
- name: "QtQuick.Dialogs/ColorDialog"
+ name: "QtQuick.Extras.Private/CircularButtonStyleHelper 1.0"
+ exports: ["QtQuick.Extras.Private/CircularButtonStyleHelper 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ Property { name: "control"; type: "QQuickItem"; isPointer: true }
+ Property { name: "buttonColorUpTop"; type: "QColor" }
+ Property { name: "buttonColorUpBottom"; type: "QColor" }
+ Property { name: "buttonColorDownTop"; type: "QColor" }
+ Property { name: "buttonColorDownBottom"; type: "QColor" }
+ Property { name: "outerArcColorTop"; type: "QColor" }
+ Property { name: "outerArcColorBottom"; type: "QColor" }
+ Property { name: "innerArcColorTop"; type: "QColor" }
+ Property { name: "innerArcColorBottom"; type: "QColor" }
+ Property { name: "innerArcColorBottomStop"; type: "double" }
+ Property { name: "shineColor"; type: "QColor" }
+ Property { name: "smallestAxis"; type: "double" }
+ Property { name: "outerArcLineWidth"; type: "double" }
+ Property { name: "innerArcLineWidth"; type: "double" }
+ Property { name: "shineArcLineWidth"; type: "double" }
+ Property { name: "implicitWidth"; type: "double" }
+ Property { name: "implicitHeight"; type: "double" }
+ Property { name: "textColorUp"; type: "QColor" }
+ Property { name: "textColorDown"; type: "QColor" }
+ Property { name: "textRaisedColorUp"; type: "QColor" }
+ Property { name: "textRaisedColorDown"; type: "QColor" }
+ Property { name: "radius"; type: "double" }
+ Property { name: "halfRadius"; type: "double" }
+ Property { name: "outerArcRadius"; type: "double" }
+ Property { name: "innerArcRadius"; type: "double" }
+ Property { name: "shineArcRadius"; type: "double" }
+ Property { name: "zeroAngle"; type: "double" }
+ Property { name: "buttonColorTop"; type: "QColor" }
+ Property { name: "buttonColorBottom"; type: "QColor" }
+ Method {
+ name: "toPixels"
+ type: "QVariant"
+ Parameter { name: "percentageOfSmallestAxis"; type: "QVariant" }
+ }
+ Method {
+ name: "paintBackground"
+ type: "QVariant"
+ Parameter { name: "ctx"; type: "QVariant" }
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Extras/CircularGauge 1.0"
+ exports: ["QtQuick.Extras/CircularGauge 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "tickmarksVisible"; type: "bool" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "value"; type: "double" }
+ Property { name: "stepSize"; 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.Extras.Private/CircularTickmarkLabel 1.0"
+ exports: ["QtQuick.Extras.Private/CircularTickmarkLabel 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "minimumValueAngle"; type: "double" }
+ Property { name: "maximumValueAngle"; type: "double" }
+ Property { name: "angleRange"; type: "double"; isReadonly: true }
+ Property { name: "tickmarkStepSize"; type: "double" }
+ Property { name: "tickmarkInset"; type: "double" }
+ Property { name: "tickmarkCount"; type: "int"; isReadonly: true }
+ Property { name: "minorTickmarkCount"; type: "int" }
+ Property { name: "minorTickmarkInset"; type: "double" }
+ Property { name: "labelInset"; type: "double" }
+ Property { name: "labelStepSize"; type: "double" }
+ Property { name: "labelCount"; type: "int"; isReadonly: true }
+ Property { name: "__tickmarkCount"; type: "double"; isReadonly: true }
+ Property { name: "tickmarksVisible"; type: "bool" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "stepSize"; type: "double" }
+ Method {
+ name: "valueToAngle"
+ type: "QVariant"
+ Parameter { name: "value"; 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: "QQuickAbstractColorDialog"
+ name: "QtQuick.Dialogs/ColorDialog 1.0"
exports: ["QtQuick.Dialogs/ColorDialog 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -394,73 +411,140 @@ Module {
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" }
- Property { name: "currentHue"; type: "double"; isReadonly: true }
- Property { name: "currentSaturation"; type: "double"; isReadonly: true }
- Property { name: "currentLightness"; type: "double"; isReadonly: true }
- Property { name: "currentAlpha"; type: "double"; isReadonly: true }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
- }
- Method {
- name: "setModality"
- Parameter { name: "m"; type: "Qt::WindowModality" }
- }
- Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
- }
- Method {
- name: "setColor"
- Parameter { name: "arg"; type: "QColor" }
- }
- Method {
- name: "setCurrentColor"
- Parameter { name: "currentColor"; type: "QColor" }
- }
- Method {
- name: "setShowAlphaChannel"
- Parameter { name: "arg"; type: "bool" }
- }
- 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" }
- Property { name: "__maximumDimension"; type: "int"; isReadonly: true }
- Signal { name: "visibilityChanged" }
- Signal { name: "geometryChanged" }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/ComboBox 1.0"
+ exports: ["QtQuick.Controls/ComboBox 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "textRole"; type: "string" }
+ Property { name: "editable"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "menu"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "selectByMouse"; type: "bool" }
+ Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true }
+ Property { name: "__popup"; type: "QVariant" }
+ Property { name: "model"; type: "QVariant" }
+ Property { name: "currentIndex"; type: "int" }
+ Property { name: "currentText"; type: "string"; isReadonly: true }
+ Property { name: "editText"; type: "string" }
+ Property { name: "inputMethodHints"; type: "int" }
+ Property { name: "count"; type: "int"; isReadonly: true }
+ Property { name: "validator"; type: "QValidator"; isPointer: true }
+ Property { name: "acceptableInput"; type: "bool"; isReadonly: true }
Signal { name: "accepted" }
- Signal { name: "rejected" }
- Method { name: "open" }
- Method { name: "close" }
- Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
+ Signal {
+ name: "activated"
+ Parameter { name: "index"; type: "int" }
}
Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
+ name: "textAt"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
}
Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
+ name: "find"
+ type: "QVariant"
+ 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 }
+ Property { name: "styleHints"; type: "QVariant" }
+ Property { name: "__styleData"; type: "QObject"; isPointer: true }
}
Component {
- prototype: "QObject"
- name: "QtQuick.Dialogs/Dialog"
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Extras/DelayButton 1.0"
+ exports: ["QtQuick.Extras/DelayButton 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "delay"; type: "int" }
+ Property { name: "__progress"; type: "double" }
+ Property { name: "progress"; type: "double"; isReadonly: true }
+ Signal { name: "activated" }
+ Property { name: "isDefault"; type: "bool" }
+ Property { name: "menu"; type: "Menu_QMLTYPE_52"; isPointer: true }
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "checked"; type: "bool" }
+ Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
+ Property { name: "action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "text"; type: "string" }
+ Property { name: "tooltip"; type: "string" }
+ Property { name: "iconSource"; type: "QUrl" }
+ Property { name: "iconName"; type: "string" }
+ Property { name: "__position"; type: "string" }
+ Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
+ Property { name: "__action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
+ Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Signal { name: "clicked" }
+ Method { name: "accessiblePressAction"; 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.Extras/Dial 1.1"
+ exports: ["QtQuick.Extras/Dial 1.1"]
+ exportMetaObjectRevisions: [1]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "__wrap"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "tickmarksVisible"; type: "bool" }
+ Property { name: "value"; type: "double" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "stepSize"; type: "double" }
+ Property { name: "pressed"; type: "bool"; isReadonly: 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.Extras/Dial 1.0"
+ exports: ["QtQuick.Extras/Dial 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "__wrap"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "tickmarksVisible"; type: "bool" }
+ Property { name: "value"; type: "double" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "stepSize"; type: "double" }
+ Property { name: "pressed"; type: "bool"; isReadonly: 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: "QQuickAbstractDialog"
+ name: "QtQuick.Dialogs/Dialog 1.2"
exports: ["QtQuick.Dialogs/Dialog 1.2"]
exportMetaObjectRevisions: [2]
isComposite: true
@@ -496,40 +580,10 @@ Module {
}
Method { name: "__standardButtonsLeftModel"; type: "QJSValue" }
Method { name: "__standardButtonsRightModel"; type: "QJSValue" }
- Property { name: "visible"; type: "bool" }
- Property { name: "modality"; type: "Qt::WindowModality" }
- 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" }
- Property { name: "__maximumDimension"; type: "int"; isReadonly: true }
- 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: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
}
Component {
- prototype: "QObject"
- name: "QtQuick.Dialogs/FileDialog"
+ prototype: "QQuickAbstractFileDialog"
+ name: "QtQuick.Dialogs/FileDialog 1.0"
exports: ["QtQuick.Dialogs/FileDialog 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -537,8 +591,8 @@ Module {
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" }
+ Property { name: "dirUpAction"; type: "QQuickAction"; isPointer: true }
Method {
name: "dirDown"
type: "QVariant"
@@ -548,270 +602,1674 @@ Module {
Method { name: "acceptSelection"; type: "QVariant" }
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
Property { name: "shortcuts"; type: "QJSValue"; isReadonly: 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 }
- Property { name: "sidebarVisible"; type: "bool" }
- Signal { name: "filterSelected" }
- Signal { name: "fileModeChanged" }
- Signal { name: "selectionAccepted" }
- Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
+ }
+ Component {
+ prototype: "QQuickAbstractFontDialog"
+ name: "QtQuick.Dialogs/FontDialog 1.1"
+ 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 }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Extras/Gauge 1.0"
+ exports: ["QtQuick.Extras/Gauge 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "orientation"; type: "int" }
+ Property { name: "tickmarkAlignment"; type: "int" }
+ Property { name: "__tickmarkAlignment"; type: "int" }
+ Property { name: "__tickmarksInside"; type: "bool" }
+ Property { name: "tickmarkStepSize"; type: "double" }
+ Property { name: "minorTickmarkCount"; type: "int" }
+ Property { name: "formatValue"; type: "QVariant" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "value"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "__hiddenText"; type: "QQuickText"; isReadonly: true; 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/GroupBox 1.0"
+ exports: ["QtQuick.Controls/GroupBox 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "__content"
+ Property { name: "title"; type: "string" }
+ Property { name: "flat"; type: "bool" }
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ 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_76"; isReadonly: true; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickText"
+ name: "QtQuick.Controls/Label 1.0"
+ exports: ["QtQuick.Controls/Label 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickMenu"
+ name: "QtQuick.Controls/Menu 1.0"
+ 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: "__parentContentItem"; type: "QVariant" }
+ Property { name: "__currentIndex"; type: "int" }
+ Method {
+ name: "addMenu"
+ type: "QVariant"
+ Parameter { name: "title"; type: "QVariant" }
}
Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
+ name: "insertMenu"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ Parameter { name: "title"; type: "QVariant" }
+ }
+ }
+ Component {
+ prototype: "QQuickMenuBar"
+ name: "QtQuick.Controls/MenuBar 1.0"
+ exports: ["QtQuick.Controls/MenuBar 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "menus"
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isPointer: true }
+ Property { name: "__menuBarComponent"; type: "QQmlComponent"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickAbstractMessageDialog"
+ name: "QtQuick.Dialogs/MessageDialog 1.1"
+ exports: ["QtQuick.Dialogs/MessageDialog 1.1"]
+ exportMetaObjectRevisions: [1]
+ isComposite: true
+ defaultProperty: "contentItem"
+ Method { name: "calculateImplicitWidth"; type: "QVariant" }
+ Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Extras/PieMenu 1.0"
+ exports: ["QtQuick.Extras/PieMenu 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "menuItems"
+ Property { name: "selectionAngle"; type: "double"; isReadonly: true }
+ Property { name: "triggerMode"; type: "int" }
+ Property { name: "title"; type: "string" }
+ Property { name: "boundingItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__protectedScope"; type: "QObject"; isPointer: true }
+ Property { name: "activationMode"; type: "int" }
+ Property { name: "menuItems"; type: "QQuickMenuItem"; isList: true; isReadonly: true }
+ Property { name: "currentIndex"; type: "int"; isReadonly: true }
+ Property { name: "currentItem"; type: "QQuickMenuItem"; isReadonly: true; isPointer: true }
+ Property { name: "__mouseThief"; type: "QQuickMouseThief"; isReadonly: true; isPointer: true }
+ Method {
+ name: "popup"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Method {
+ name: "addItem"
+ type: "QVariant"
+ Parameter { name: "text"; type: "QVariant" }
+ }
+ Method {
+ name: "insertItem"
+ type: "QVariant"
+ Parameter { name: "before"; type: "QVariant" }
+ Parameter { name: "text"; type: "QVariant" }
}
Method {
- name: "setSelectExisting"
- Parameter { name: "s"; type: "bool" }
+ name: "removeItem"
+ type: "QVariant"
+ Parameter { name: "item"; 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: "QQuickLoader"
+ name: "QtQuick.Extras.Private/PieMenuIcon 1.0"
+ exports: ["QtQuick.Extras.Private/PieMenuIcon 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "control"; type: "PieMenu_QMLTYPE_250"; isPointer: true }
+ Property { name: "styleData"; type: "QObject"; isPointer: true }
+ Property { name: "iconSource"; type: "string"; isReadonly: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/ProgressBar 1.0"
+ exports: ["QtQuick.Controls/ProgressBar 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "value"; type: "double" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "indeterminate"; type: "bool" }
+ Property { name: "orientation"; type: "int" }
+ Property { name: "__initialized"; type: "bool" }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Method {
+ name: "setValue"
+ 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 1.0"
+ exports: ["QtQuick.Controls/RadioButton 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "checked"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
+ Property { name: "text"; type: "string" }
+ Property { name: "__cycleStatesHandler"; type: "QVariant" }
+ Property { name: "pressed"; type: "bool" }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Signal { name: "clicked" }
+ 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/ScrollView 1.0"
+ exports: ["QtQuick.Controls/ScrollView 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentItem"
+ 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_3"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_27"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_27"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/Slider 1.0"
+ exports: ["QtQuick.Controls/Slider 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "orientation"; type: "int" }
+ Property { name: "updateValueWhileDragging"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "tickmarksEnabled"; type: "bool" }
+ Property { name: "__horizontal"; type: "bool" }
+ Property { name: "__handlePos"; type: "double" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "stepSize"; type: "double" }
+ Property { name: "value"; type: "double" }
+ Method { name: "accessibleIncreaseAction"; type: "QVariant" }
+ Method { name: "accessibleDecreaseAction"; 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/SpinBox 1.0"
+ exports: ["QtQuick.Controls/SpinBox 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "horizontalAlignment"; type: "int" }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "selectByMouse"; type: "bool" }
+ Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true }
+ Property { name: "menu"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "value"; type: "double" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "stepSize"; type: "double" }
+ Property { name: "suffix"; type: "string" }
+ Property { name: "prefix"; type: "string" }
+ Property { name: "decimals"; type: "int" }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "cursorPosition"; type: "int" }
+ 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 1.0"
+ exports: ["QtQuick.Controls/SplitView 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "__contents"
+ Property { name: "orientation"; type: "int" }
+ Property { name: "handleDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "resizing"; type: "bool" }
+ Property { name: "__contents"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "__items"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Property { name: "__handles"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Method {
+ name: "addItem"
+ type: "QVariant"
+ Parameter { name: "item"; type: "QVariant" }
}
Method {
- name: "setSelectMultiple"
- Parameter { name: "s"; type: "bool" }
+ name: "removeItem"
+ type: "QVariant"
+ Parameter { name: "item"; type: "QVariant" }
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/StackView 1.0"
+ exports: ["QtQuick.Controls/StackView 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "initialItem"; type: "QVariant" }
+ Property { name: "busy"; type: "bool"; isReadonly: true }
+ Property { name: "delegate"; type: "StackViewDelegate_QMLTYPE_293"; isPointer: true }
+ Property { name: "__currentItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__depth"; type: "int" }
+ Property { name: "__currentTransition"; type: "QVariant" }
+ Property { name: "__guard"; type: "bool" }
+ Property { name: "invalidItemReplacement"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "depth"; type: "int"; isReadonly: true }
+ Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Method {
+ name: "push"
+ type: "QVariant"
+ Parameter { name: "item"; type: "QVariant" }
}
Method {
- name: "setSelectFolder"
- Parameter { name: "s"; type: "bool" }
+ name: "pop"
+ type: "QVariant"
+ Parameter { name: "item"; type: "QVariant" }
}
+ Method { name: "clear"; type: "QVariant" }
Method {
- name: "setFolder"
- Parameter { name: "f"; type: "QUrl" }
+ name: "find"
+ type: "QVariant"
+ Parameter { name: "func"; type: "QVariant" }
+ Parameter { name: "onlySearchLoadedItems"; type: "QVariant" }
}
Method {
- name: "setNameFilters"
- Parameter { name: "f"; type: "QStringList" }
+ name: "get"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ Parameter { name: "dontLoad"; type: "QVariant" }
}
+ Method { name: "completeTransition"; type: "QVariant" }
Method {
- name: "selectNameFilter"
- Parameter { name: "f"; type: "string" }
+ name: "replace"
+ type: "QVariant"
+ Parameter { name: "item"; type: "QVariant" }
+ Parameter { name: "properties"; type: "QVariant" }
+ Parameter { name: "immediate"; type: "QVariant" }
}
Method {
- name: "setSelectedNameFilterIndex"
- Parameter { name: "idx"; type: "int" }
+ name: "__recursionGuard"
+ type: "QVariant"
+ Parameter { name: "use"; type: "QVariant" }
}
Method {
- name: "setSidebarVisible"
- Parameter { name: "s"; type: "bool" }
+ name: "__loadElement"
+ type: "QVariant"
+ Parameter { name: "element"; type: "QVariant" }
}
- 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" }
- Property { name: "__maximumDimension"; type: "int"; isReadonly: true }
- 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" }
+ name: "__resolveComponent"
+ type: "QVariant"
+ Parameter { name: "unknownObjectType"; type: "QVariant" }
+ Parameter { name: "element"; type: "QVariant" }
}
Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
+ name: "__cleanup"
+ type: "QVariant"
+ Parameter { name: "element"; type: "QVariant" }
}
Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
+ name: "__setStatus"
+ type: "QVariant"
+ Parameter { name: "item"; type: "QVariant" }
+ Parameter { name: "status"; type: "QVariant" }
}
Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
+ name: "__performTransition"
+ type: "QVariant"
+ Parameter { name: "transition"; type: "QVariant" }
}
+ Method { name: "animationFinished"; type: "QVariant" }
}
Component {
prototype: "QObject"
- name: "QtQuick.Dialogs/FontDialog"
- exports: ["QtQuick.Dialogs/FontDialog 1.1"]
+ name: "QtQuick.Controls/StackViewDelegate 1.0"
+ 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 }
+ Method {
+ name: "getTransition"
+ type: "QVariant"
+ Parameter { name: "properties"; type: "QVariant" }
+ }
+ Method {
+ name: "transitionFinished"
+ type: "QVariant"
+ Parameter { name: "properties"; type: "QVariant" }
+ }
+ }
+ Component {
+ prototype: "QQuickParallelAnimation"
+ name: "QtQuick.Controls/StackViewTransition 1.0"
+ exports: ["QtQuick.Controls/StackViewTransition 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "animations"
+ Property { name: "name"; type: "string" }
+ Property { name: "enterItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "exitItem"; type: "QQuickItem"; isPointer: true }
+ Property { name: "immediate"; type: "bool" }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/StatusBar 1.0"
+ exports: ["QtQuick.Controls/StatusBar 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "__content"
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
+ Property { name: "__content"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Extras/StatusIndicator 1.0"
+ exports: ["QtQuick.Extras/StatusIndicator 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "active"; type: "bool" }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "on"; type: "bool" }
+ 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.Extras/StatusIndicator 1.1"
+ exports: ["QtQuick.Extras/StatusIndicator 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" }
- Signal { name: "selectionAccepted" }
+ defaultProperty: "data"
+ Property { name: "active"; type: "bool" }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "on"; type: "bool" }
+ 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/Switch 1.1"
+ 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: "pressed"; type: "bool"; isReadonly: true }
+ Signal { name: "clicked" }
+ 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 1.0"
+ exports: ["QtQuick.Controls/Tab 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "component"
+ Property { name: "title"; type: "string" }
+ Property { name: "__inserted"; type: "bool" }
+ Property { name: "component"; type: "QQmlComponent"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TabView 1.0"
+ exports: ["QtQuick.Controls/TabView 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "currentIndex"; type: "int" }
+ Property { name: "count"; type: "int"; isReadonly: true }
+ Property { name: "frameVisible"; type: "bool" }
+ Property { name: "tabsVisible"; type: "bool" }
+ Property { name: "tabPosition"; type: "int" }
+ Property { name: "__tabs"; type: "QQmlListModel"; isPointer: true }
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__styleItem"; type: "QVariant" }
+ Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
+ name: "addTab"
+ type: "QVariant"
+ Parameter { name: "title"; type: "QVariant" }
+ Parameter { name: "component"; type: "QVariant" }
}
Method {
- name: "setModality"
- Parameter { name: "m"; type: "Qt::WindowModality" }
+ name: "insertTab"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ Parameter { name: "title"; type: "QVariant" }
+ Parameter { name: "component"; type: "QVariant" }
}
Method {
- name: "setTitle"
- Parameter { name: "t"; type: "string" }
+ name: "removeTab"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
}
Method {
- name: "setFont"
- Parameter { name: "arg"; type: "QFont" }
+ name: "moveTab"
+ type: "QVariant"
+ Parameter { name: "from"; type: "QVariant" }
+ Parameter { name: "to"; type: "QVariant" }
}
Method {
- name: "setCurrentFont"
- Parameter { name: "arg"; type: "QFont" }
+ name: "getTab"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
}
Method {
- name: "setScalableFonts"
- Parameter { name: "arg"; type: "bool" }
+ name: "__willRemoveIndex"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
}
Method {
- name: "setNonScalableFonts"
- Parameter { name: "arg"; type: "bool" }
+ name: "__didInsertIndex"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method { name: "__setOpacities"; type: "QVariant" }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TableView 1.0"
+ exports: ["QtQuick.Controls/TableView 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "__columns"
+ Property { name: "model"; type: "QVariant" }
+ Property { name: "rowCount"; type: "int"; isReadonly: true }
+ Property { name: "currentRow"; type: "int" }
+ Property {
+ name: "selection"
+ type: "TableViewSelection_QMLTYPE_175"
+ isReadonly: true
+ isPointer: true
+ }
+ Signal {
+ name: "activated"
+ Parameter { name: "row"; type: "int" }
+ }
+ Signal {
+ name: "clicked"
+ Parameter { name: "row"; type: "int" }
+ }
+ Signal {
+ name: "doubleClicked"
+ Parameter { name: "row"; type: "int" }
+ }
+ Signal {
+ name: "pressAndHold"
+ Parameter { name: "row"; type: "int" }
}
Method {
- name: "setMonospacedFonts"
- Parameter { name: "arg"; type: "bool" }
+ name: "positionViewAtRow"
+ type: "QVariant"
+ Parameter { name: "row"; type: "QVariant" }
+ Parameter { name: "mode"; type: "QVariant" }
}
Method {
- name: "setProportionalFonts"
- Parameter { name: "arg"; type: "bool" }
+ name: "rowAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Property { name: "alternatingRowColors"; type: "bool" }
+ Property { name: "headerVisible"; type: "bool" }
+ Property { name: "itemDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "rowDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "headerDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "sortIndicatorColumn"; type: "int" }
+ Property { name: "sortIndicatorVisible"; type: "bool" }
+ Property { name: "sortIndicatorOrder"; type: "int" }
+ Property { name: "selectionMode"; type: "int" }
+ Property { name: "__viewTypeName"; type: "string" }
+ Property { name: "__isTreeView"; type: "bool"; isReadonly: true }
+ Property { name: "__itemDelegateLoader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__model"; type: "QVariant" }
+ Property { name: "__activateItemOnSingleClick"; type: "bool" }
+ Property { name: "__mouseArea"; type: "QQuickItem"; isPointer: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "contentHeader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "contentFooter"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "columnCount"; type: "int"; isReadonly: true }
+ Property { name: "section"; type: "QQuickViewSection"; isReadonly: true; isPointer: true }
+ Property { name: "__columns"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "__currentRowItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "__currentRow"; type: "int" }
+ Property { name: "__listView"; type: "QQuickListView"; isReadonly: true; isPointer: true }
+ Method {
+ name: "addColumn"
+ type: "QVariant"
+ Parameter { name: "column"; type: "QVariant" }
}
- 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" }
- Property { name: "__maximumDimension"; type: "int"; isReadonly: true }
- 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" }
+ name: "insertColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ Parameter { name: "column"; type: "QVariant" }
}
Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
+ name: "removeColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
}
Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
+ name: "moveColumn"
+ type: "QVariant"
+ Parameter { name: "from"; type: "QVariant" }
+ Parameter { name: "to"; type: "QVariant" }
}
Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
+ name: "getColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method { name: "resizeColumnsToContents"; 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_3"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_27"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_27"
+ isReadonly: true
+ isPointer: true
}
}
Component {
prototype: "QObject"
- name: "QtQuick.Dialogs/MessageDialog"
- exports: ["QtQuick.Dialogs/MessageDialog 1.1"]
- exportMetaObjectRevisions: [1]
+ name: "QtQuick.Controls/TableViewColumn 1.0"
+ exports: ["QtQuick.Controls/TableViewColumn 1.0"]
+ exportMetaObjectRevisions: [0]
isComposite: true
- defaultProperty: "contentItem"
- Method { name: "calculateImplicitWidth"; type: "QVariant" }
+ 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" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "resizable"; type: "bool" }
+ Property { name: "movable"; type: "bool" }
+ 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 1.3"
+ exports: ["QtQuick.Controls/TextArea 1.3"]
+ exportMetaObjectRevisions: [3]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true }
+ Property { name: "tabChangesFocus"; type: "bool" }
+ Property { name: "selectByMouse"; type: "bool" }
+ Property { name: "menu"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "baseUrl"; type: "QUrl" }
+ Property { name: "canPaste"; type: "bool"; isReadonly: true }
+ Property { name: "canRedo"; type: "bool"; isReadonly: true }
+ Property { name: "canUndo"; type: "bool"; isReadonly: true }
+ Property { name: "textColor"; type: "QColor" }
+ Property { name: "cursorPosition"; type: "int" }
+ Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "horizontalAlignment"; type: "int" }
+ Property { name: "effectiveHorizontalAlignment"; type: "int"; isReadonly: true }
+ Property { name: "verticalAlignment"; type: "int" }
+ Property { name: "inputMethodHints"; type: "int" }
+ Property { name: "length"; type: "int"; isReadonly: true }
+ Property { name: "lineCount"; type: "int"; isReadonly: true }
+ Property { name: "readOnly"; type: "bool" }
+ Property { name: "selectedText"; type: "string"; isReadonly: true }
+ Property { name: "selectionEnd"; type: "int"; isReadonly: true }
+ Property { name: "selectionStart"; type: "int"; isReadonly: true }
+ Property { name: "text"; type: "string" }
+ Property { name: "textFormat"; type: "int" }
+ Property { name: "wrapMode"; type: "int" }
+ Property { name: "selectByKeyboard"; type: "bool" }
+ Property { name: "hoveredLink"; type: "string"; isReadonly: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "textMargin"; type: "double" }
+ Property { name: "contentWidth"; type: "double"; isReadonly: true }
+ Property { name: "contentHeight"; type: "double"; isReadonly: true }
+ Property { name: "textDocument"; type: "QQuickTextDocument"; isReadonly: true; isPointer: true }
+ Signal {
+ name: "linkActivated"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal {
+ name: "linkHovered"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal { name: "editingFinished" }
+ Method {
+ name: "append"
+ type: "QVariant"
+ Parameter { name: "string"; type: "QVariant" }
+ }
+ Method { name: "copy"; type: "QVariant" }
+ Method { name: "cut"; type: "QVariant" }
+ Method { name: "deselect"; type: "QVariant" }
+ Method {
+ name: "getFormattedText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "getText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "insert"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "text"; type: "QVariant" }
+ }
+ Method {
+ name: "isRightToLeft"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "moveCursorSelection"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "mode"; type: "QVariant" }
+ }
+ Method { name: "paste"; type: "QVariant" }
+ Method {
+ name: "positionAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Method {
+ name: "positionToRectangle"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ }
+ Method { name: "redo"; type: "QVariant" }
+ Method {
+ name: "remove"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "select"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ 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_3"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_27"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_27"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TextArea 1.0"
+ exports: ["QtQuick.Controls/TextArea 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true }
+ Property { name: "tabChangesFocus"; type: "bool" }
+ Property { name: "selectByMouse"; type: "bool" }
+ Property { name: "menu"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "baseUrl"; type: "QUrl" }
+ Property { name: "canPaste"; type: "bool"; isReadonly: true }
+ Property { name: "canRedo"; type: "bool"; isReadonly: true }
+ Property { name: "canUndo"; type: "bool"; isReadonly: true }
+ Property { name: "textColor"; type: "QColor" }
+ Property { name: "cursorPosition"; type: "int" }
+ Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "horizontalAlignment"; type: "int" }
+ Property { name: "effectiveHorizontalAlignment"; type: "int"; isReadonly: true }
+ Property { name: "verticalAlignment"; type: "int" }
+ Property { name: "inputMethodHints"; type: "int" }
+ Property { name: "length"; type: "int"; isReadonly: true }
+ Property { name: "lineCount"; type: "int"; isReadonly: true }
+ Property { name: "readOnly"; type: "bool" }
+ Property { name: "selectedText"; type: "string"; isReadonly: true }
+ Property { name: "selectionEnd"; type: "int"; isReadonly: true }
+ Property { name: "selectionStart"; type: "int"; isReadonly: 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: "QQuickAbstractDialog::StandardButtons" }
+ Property { name: "textFormat"; type: "int" }
+ Property { name: "wrapMode"; type: "int" }
+ Property { name: "selectByKeyboard"; type: "bool" }
+ Property { name: "hoveredLink"; type: "string"; isReadonly: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "textMargin"; type: "double" }
+ Property { name: "contentWidth"; type: "double"; isReadonly: true }
+ Property { name: "contentHeight"; type: "double"; isReadonly: true }
+ Property { name: "textDocument"; type: "QQuickTextDocument"; isReadonly: true; isPointer: true }
+ Signal {
+ name: "linkActivated"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal {
+ name: "linkHovered"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal { name: "editingFinished" }
+ Method {
+ name: "append"
+ type: "QVariant"
+ Parameter { name: "string"; type: "QVariant" }
+ }
+ Method { name: "copy"; type: "QVariant" }
+ Method { name: "cut"; type: "QVariant" }
+ Method { name: "deselect"; type: "QVariant" }
+ Method {
+ name: "getFormattedText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "getText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "insert"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "text"; type: "QVariant" }
+ }
+ Method {
+ name: "isRightToLeft"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "moveCursorSelection"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "mode"; type: "QVariant" }
+ }
+ Method { name: "paste"; type: "QVariant" }
+ Method {
+ name: "positionAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Method {
+ name: "positionToRectangle"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ }
+ Method { name: "redo"; type: "QVariant" }
+ Method {
+ name: "remove"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "select"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ 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_3"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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: "clickedButton"
- type: "QQuickAbstractDialog::StandardButton"
+ name: "__horizontalScrollBar"
+ type: "ScrollBar_QMLTYPE_27"
isReadonly: true
+ isPointer: true
}
- Signal { name: "buttonClicked" }
- Signal { name: "discard" }
- Signal { name: "help" }
- Signal { name: "yes" }
- Signal { name: "no" }
- Signal { name: "apply" }
- Signal { name: "reset" }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_27"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TextArea 1.5"
+ exports: ["QtQuick.Controls/TextArea 1.5"]
+ exportMetaObjectRevisions: [5]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true }
+ Property { name: "tabChangesFocus"; type: "bool" }
+ Property { name: "selectByMouse"; type: "bool" }
+ Property { name: "menu"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "baseUrl"; type: "QUrl" }
+ Property { name: "canPaste"; type: "bool"; isReadonly: true }
+ Property { name: "canRedo"; type: "bool"; isReadonly: true }
+ Property { name: "canUndo"; type: "bool"; isReadonly: true }
+ Property { name: "textColor"; type: "QColor" }
+ Property { name: "cursorPosition"; type: "int" }
+ Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "horizontalAlignment"; type: "int" }
+ Property { name: "effectiveHorizontalAlignment"; type: "int"; isReadonly: true }
+ Property { name: "verticalAlignment"; type: "int" }
+ Property { name: "inputMethodHints"; type: "int" }
+ Property { name: "length"; type: "int"; isReadonly: true }
+ Property { name: "lineCount"; type: "int"; isReadonly: true }
+ Property { name: "readOnly"; type: "bool" }
+ Property { name: "selectedText"; type: "string"; isReadonly: true }
+ Property { name: "selectionEnd"; type: "int"; isReadonly: true }
+ Property { name: "selectionStart"; type: "int"; isReadonly: true }
+ Property { name: "text"; type: "string" }
+ Property { name: "textFormat"; type: "int" }
+ Property { name: "wrapMode"; type: "int" }
+ Property { name: "selectByKeyboard"; type: "bool" }
+ Property { name: "hoveredLink"; type: "string"; isReadonly: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "textMargin"; type: "double" }
+ Property { name: "contentWidth"; type: "double"; isReadonly: true }
+ Property { name: "contentHeight"; type: "double"; isReadonly: true }
+ Property { name: "textDocument"; type: "QQuickTextDocument"; isReadonly: true; isPointer: true }
+ Signal {
+ name: "linkActivated"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal {
+ name: "linkHovered"
+ Parameter { name: "link"; type: "string" }
+ }
+ Signal { name: "editingFinished" }
Method {
- name: "setVisible"
- Parameter { name: "v"; type: "bool" }
+ name: "append"
+ type: "QVariant"
+ Parameter { name: "string"; type: "QVariant" }
}
+ Method { name: "copy"; type: "QVariant" }
+ Method { name: "cut"; type: "QVariant" }
+ Method { name: "deselect"; type: "QVariant" }
Method {
- name: "setTitle"
- Parameter { name: "arg"; type: "string" }
+ name: "getFormattedText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
}
Method {
- name: "setText"
- Parameter { name: "arg"; type: "string" }
+ name: "getText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
}
Method {
- name: "setInformativeText"
- Parameter { name: "arg"; type: "string" }
+ name: "insert"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "text"; type: "QVariant" }
}
Method {
- name: "setDetailedText"
- Parameter { name: "arg"; type: "string" }
+ name: "isRightToLeft"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
}
Method {
- name: "setIcon"
- Parameter { name: "icon"; type: "Icon" }
+ name: "moveCursorSelection"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "mode"; type: "QVariant" }
}
+ Method { name: "paste"; type: "QVariant" }
Method {
- name: "setStandardButtons"
- Parameter { name: "buttons"; type: "StandardButtons" }
+ name: "positionAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
}
Method {
- name: "click"
- Parameter { name: "button"; type: "QQuickAbstractDialog::StandardButton" }
+ name: "positionToRectangle"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
}
- 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" }
- Property { name: "__maximumDimension"; type: "int"; isReadonly: true }
- Signal { name: "visibilityChanged" }
- Signal { name: "geometryChanged" }
+ Method { name: "redo"; type: "QVariant" }
+ Method {
+ name: "remove"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "select"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ 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_3"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_27"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_27"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TextField 1.0"
+ exports: ["QtQuick.Controls/TextField 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "inputMethodComposing"; type: "bool"; isReadonly: true }
+ Property { name: "selectByMouse"; type: "bool" }
+ Property { name: "menu"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "acceptableInput"; type: "bool"; isReadonly: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "canPaste"; type: "bool"; isReadonly: true }
+ Property { name: "canRedo"; type: "bool"; isReadonly: true }
+ Property { name: "canUndo"; type: "bool"; isReadonly: true }
+ Property { name: "textColor"; type: "QColor" }
+ Property { name: "cursorPosition"; type: "int" }
+ Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true }
+ Property { name: "displayText"; type: "string"; isReadonly: true }
+ Property { name: "echoMode"; type: "int" }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "horizontalAlignment"; type: "int" }
+ Property { name: "effectiveHorizontalAlignment"; type: "int"; isReadonly: true }
+ Property { name: "verticalAlignment"; type: "int" }
+ Property { name: "inputMask"; type: "string" }
+ Property { name: "inputMethodHints"; type: "int" }
+ Property { name: "length"; type: "int"; isReadonly: true }
+ Property { name: "maximumLength"; type: "int" }
+ Property { name: "placeholderText"; type: "string" }
+ Property { name: "readOnly"; type: "bool" }
+ Property { name: "selectedText"; type: "string"; isReadonly: true }
+ Property { name: "selectionEnd"; type: "int"; isReadonly: true }
+ Property { name: "selectionStart"; type: "int"; isReadonly: true }
+ Property { name: "text"; type: "string" }
+ Property { name: "validator"; type: "QValidator"; isPointer: true }
+ 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: "rejected" }
- Method { name: "open" }
- Method { name: "close" }
+ Signal { name: "editingFinished" }
+ Method { name: "copy"; type: "QVariant" }
+ Method { name: "cut"; type: "QVariant" }
+ Method { name: "deselect"; type: "QVariant" }
+ Method {
+ name: "getText"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "insert"
+ type: "QVariant"
+ Parameter { name: "position"; type: "QVariant" }
+ Parameter { name: "text"; type: "QVariant" }
+ }
+ Method {
+ name: "isRightToLeft"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method { name: "paste"; type: "QVariant" }
+ Method { name: "redo"; type: "QVariant" }
+ Method {
+ name: "remove"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ Method {
+ name: "select"
+ type: "QVariant"
+ Parameter { name: "start"; type: "QVariant" }
+ Parameter { name: "end"; type: "QVariant" }
+ }
+ 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: "QQuickText"
+ name: "QtQuick.Extras.Private/TextSingleton 1.0"
+ exports: ["QtQuick.Extras.Private/TextSingleton 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ isCreatable: false
+ isSingleton: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Extras/ToggleButton 1.0"
+ exports: ["QtQuick.Extras/ToggleButton 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "isDefault"; type: "bool" }
+ Property { name: "menu"; type: "Menu_QMLTYPE_52"; isPointer: true }
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "checked"; type: "bool" }
+ Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
+ Property { name: "action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "text"; type: "string" }
+ Property { name: "tooltip"; type: "string" }
+ Property { name: "iconSource"; type: "QUrl" }
+ Property { name: "iconName"; type: "string" }
+ Property { name: "__position"; type: "string" }
+ Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
+ Property { name: "__action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
+ Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Signal { name: "clicked" }
+ Method { name: "accessiblePressAction"; 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/ToolBar 1.0"
+ exports: ["QtQuick.Controls/ToolBar 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "__content"
+ Property { name: "style"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__panel"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__menu"; type: "QVariant" }
+ Property { name: "__style"; type: "QObject"; isReadonly: true; isPointer: true }
+ Property { name: "__content"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/ToolButton 1.0"
+ exports: ["QtQuick.Controls/ToolButton 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "isDefault"; type: "bool" }
+ Property { name: "menu"; type: "Menu_QMLTYPE_52"; isPointer: true }
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "checked"; type: "bool" }
+ Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
+ Property { name: "action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "text"; type: "string" }
+ Property { name: "tooltip"; type: "string" }
+ Property { name: "iconSource"; type: "QUrl" }
+ Property { name: "iconName"; type: "string" }
+ Property { name: "__position"; type: "string" }
+ Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
+ Property { name: "__action"; type: "QQuickAction"; isPointer: true }
+ Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
+ Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Signal { name: "clicked" }
+ Method { name: "accessiblePressAction"; 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/TreeView 1.5"
+ exports: ["QtQuick.Controls/TreeView 1.5"]
+ exportMetaObjectRevisions: [5]
+ isComposite: true
+ defaultProperty: "__columns"
+ Property { name: "model"; type: "QVariant" }
+ Property { name: "currentIndex"; type: "QVariant"; isReadonly: true }
+ Property { name: "selection"; type: "QItemSelectionModel"; isPointer: true }
+ Property { name: "rootIndex"; type: "QModelIndex" }
+ Signal {
+ name: "activated"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "clicked"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "doubleClicked"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "pressAndHold"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "expanded"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "collapsed"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "isExpanded"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "collapse"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
+ name: "expand"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "indexAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Property { name: "alternatingRowColors"; type: "bool" }
+ Property { name: "headerVisible"; type: "bool" }
+ Property { name: "itemDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "rowDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "headerDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "sortIndicatorColumn"; type: "int" }
+ Property { name: "sortIndicatorVisible"; type: "bool" }
+ Property { name: "sortIndicatorOrder"; type: "int" }
+ Property { name: "selectionMode"; type: "int" }
+ Property { name: "__viewTypeName"; type: "string" }
+ Property { name: "__isTreeView"; type: "bool"; isReadonly: true }
+ Property { name: "__itemDelegateLoader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__model"; type: "QVariant" }
+ Property { name: "__activateItemOnSingleClick"; type: "bool" }
+ Property { name: "__mouseArea"; type: "QQuickItem"; isPointer: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "contentHeader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "contentFooter"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "columnCount"; type: "int"; isReadonly: true }
+ Property { name: "section"; type: "QQuickViewSection"; isReadonly: true; isPointer: true }
+ Property { name: "__columns"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "__currentRowItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "__currentRow"; type: "int" }
+ Property { name: "__listView"; type: "QQuickListView"; isReadonly: true; isPointer: true }
+ Method {
+ name: "addColumn"
+ type: "QVariant"
+ Parameter { name: "column"; type: "QVariant" }
+ }
+ Method {
+ name: "insertColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ Parameter { name: "column"; type: "QVariant" }
+ }
+ Method {
+ name: "removeColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "moveColumn"
+ type: "QVariant"
+ Parameter { name: "from"; type: "QVariant" }
+ Parameter { name: "to"; type: "QVariant" }
+ }
+ Method {
+ name: "getColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method { name: "resizeColumnsToContents"; 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_3"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_27"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_27"
+ isReadonly: true
+ isPointer: true
+ }
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Controls/TreeView 1.4"
+ exports: ["QtQuick.Controls/TreeView 1.4"]
+ exportMetaObjectRevisions: [4]
+ isComposite: true
+ defaultProperty: "__columns"
+ Property { name: "model"; type: "QVariant" }
+ Property { name: "currentIndex"; type: "QVariant"; isReadonly: true }
+ Property { name: "selection"; type: "QItemSelectionModel"; isPointer: true }
+ Property { name: "rootIndex"; type: "QModelIndex" }
+ Signal {
+ name: "activated"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "clicked"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "doubleClicked"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "pressAndHold"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "expanded"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Signal {
+ name: "collapsed"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "isExpanded"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "collapse"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "expand"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "indexAt"
+ type: "QVariant"
+ Parameter { name: "x"; type: "QVariant" }
+ Parameter { name: "y"; type: "QVariant" }
+ }
+ Property { name: "alternatingRowColors"; type: "bool" }
+ Property { name: "headerVisible"; type: "bool" }
+ Property { name: "itemDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "rowDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "headerDelegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "sortIndicatorColumn"; type: "int" }
+ Property { name: "sortIndicatorVisible"; type: "bool" }
+ Property { name: "sortIndicatorOrder"; type: "int" }
+ Property { name: "selectionMode"; type: "int" }
+ Property { name: "__viewTypeName"; type: "string" }
+ Property { name: "__isTreeView"; type: "bool"; isReadonly: true }
+ Property { name: "__itemDelegateLoader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "__model"; type: "QVariant" }
+ Property { name: "__activateItemOnSingleClick"; type: "bool" }
+ Property { name: "__mouseArea"; type: "QQuickItem"; isPointer: true }
+ Property { name: "backgroundVisible"; type: "bool" }
+ Property { name: "contentHeader"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "contentFooter"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "columnCount"; type: "int"; isReadonly: true }
+ Property { name: "section"; type: "QQuickViewSection"; isReadonly: true; isPointer: true }
+ Property { name: "__columns"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "__currentRowItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "__currentRow"; type: "int" }
+ Property { name: "__listView"; type: "QQuickListView"; isReadonly: true; isPointer: true }
+ Method {
+ name: "addColumn"
+ type: "QVariant"
+ Parameter { name: "column"; type: "QVariant" }
+ }
+ Method {
+ name: "insertColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ Parameter { name: "column"; type: "QVariant" }
+ }
+ Method {
+ name: "removeColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method {
+ name: "moveColumn"
+ type: "QVariant"
+ Parameter { name: "from"; type: "QVariant" }
+ Parameter { name: "to"; type: "QVariant" }
}
Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
+ name: "getColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ }
+ Method { name: "resizeColumnsToContents"; 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_3"; isPointer: true }
+ Property { name: "horizontalScrollBarPolicy"; type: "int" }
+ Property { name: "verticalScrollBarPolicy"; type: "int" }
+ 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_27"
+ isReadonly: true
+ isPointer: true
+ }
+ Property {
+ name: "__verticalScrollBar"
+ type: "ScrollBar_QMLTYPE_27"
+ isReadonly: true
+ isPointer: true
}
+ }
+ Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Extras/Tumbler 1.2"
+ exports: ["QtQuick.Extras/Tumbler 1.2"]
+ exportMetaObjectRevisions: [2]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "__highlightMoveDuration"; type: "int" }
+ Property { name: "columnCount"; type: "int"; isReadonly: true }
+ Property { name: "__columnRow"; type: "QQuickRow"; isReadonly: true; isPointer: true }
+ Property { name: "__movementDelayTimer"; type: "QQmlTimer"; isReadonly: true; isPointer: true }
Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
+ name: "__isValidColumnIndex"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
}
Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
+ name: "__isValidColumnAndItemIndex"
+ type: "QVariant"
+ Parameter { name: "columnIndex"; type: "QVariant" }
+ Parameter { name: "itemIndex"; type: "QVariant" }
}
+ Method {
+ name: "currentIndexAt"
+ type: "QVariant"
+ Parameter { name: "columnIndex"; type: "QVariant" }
+ }
+ Method {
+ name: "setCurrentIndexAt"
+ type: "QVariant"
+ Parameter { name: "columnIndex"; type: "QVariant" }
+ Parameter { name: "itemIndex"; type: "QVariant" }
+ }
+ Method {
+ name: "getColumn"
+ type: "QVariant"
+ Parameter { name: "columnIndex"; type: "QVariant" }
+ }
+ Method {
+ name: "addColumn"
+ type: "QVariant"
+ Parameter { name: "column"; type: "QVariant" }
+ }
+ Method {
+ name: "insertColumn"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QVariant" }
+ Parameter { name: "column"; type: "QVariant" }
+ }
+ Method {
+ name: "__viewAt"
+ type: "QVariant"
+ Parameter { name: "index"; 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: "QObject"
+ name: "QtQuick.Extras/TumblerColumn 1.2"
+ exports: ["QtQuick.Extras/TumblerColumn 1.2"]
+ exportMetaObjectRevisions: [2]
+ isComposite: true
+ Property { name: "__tumbler"; type: "QQuickItem"; isPointer: true }
+ Property { name: "__index"; type: "int" }
+ Property { name: "__currentIndex"; type: "int" }
+ Property { name: "model"; type: "QVariant" }
+ Property { name: "role"; type: "string" }
+ Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "highlight"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "columnForeground"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "activeFocus"; type: "bool"; isReadonly: true }
+ Property { name: "width"; type: "double" }
+ Property { name: "currentIndex"; type: "int"; isReadonly: true }
}
}
diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp
index ba65bd8b..874b9be0 100644
--- a/src/dialogs/qquickabstractdialog.cpp
+++ b/src/dialogs/qquickabstractdialog.cpp
@@ -189,7 +189,7 @@ void QQuickAbstractDialog::setVisible(bool v)
}
}
if (m_windowDecoration) {
- m_windowDecoration->setProperty("dismissOnOuterClick", (m_modality == Qt::NonModal));
+ setDecorationDismissBehavior();
m_windowDecoration->setVisible(v);
} else if (m_dialogWindow) {
if (v) {
@@ -220,6 +220,7 @@ void QQuickAbstractDialog::decorationLoaded()
QVariant contentVariant;
contentVariant.setValue<QQuickItem*>(m_contentItem);
m_windowDecoration->setProperty("content", contentVariant);
+ setDecorationDismissBehavior();
connect(m_windowDecoration, SIGNAL(dismissed()), this, SLOT(reject()));
ok = true;
qCDebug(lcWindow) << "using synthetic window decoration" << m_windowDecoration << "from" << m_decorationComponent->url();
@@ -309,6 +310,11 @@ QQuickWindow *QQuickAbstractDialog::parentWindow()
return m_parentWindow;
}
+void QQuickAbstractDialog::setDecorationDismissBehavior()
+{
+ m_windowDecoration->setProperty("dismissOnOuterClick", (m_modality == Qt::NonModal));
+}
+
void QQuickAbstractDialog::setContentItem(QQuickItem *obj)
{
m_contentItem = obj;
diff --git a/src/dialogs/qquickabstractdialog_p.h b/src/dialogs/qquickabstractdialog_p.h
index 0fe7fa67..f153fb83 100644
--- a/src/dialogs/qquickabstractdialog_p.h
+++ b/src/dialogs/qquickabstractdialog_p.h
@@ -152,7 +152,9 @@ protected:
bool m_visible;
Qt::WindowModality m_modality;
-protected: // variables for pure-QML implementations only
+protected: // variables and methods for pure-QML implementations only
+ void setDecorationDismissBehavior();
+
QQuickItem *m_contentItem;
QWindow *m_dialogWindow;
QQuickItem *m_windowDecoration;
diff --git a/src/extras/Styles/Flat/ApplicationWindowStyle.qml b/src/extras/Styles/Flat/ApplicationWindowStyle.qml
index 248e39d4..db714889 100644
--- a/src/extras/Styles/Flat/ApplicationWindowStyle.qml
+++ b/src/extras/Styles/Flat/ApplicationWindowStyle.qml
@@ -96,6 +96,7 @@ Base.ApplicationWindowStyle {
Menu {
id: proxyMenu
+ __isProxy: true
items: control.menuBar ? control.menuBar.menus : []
}
diff --git a/src/extras/Styles/Flat/GroupBoxStyle.qml b/src/extras/Styles/Flat/GroupBoxStyle.qml
index 65f8cf19..e72c6075 100644
--- a/src/extras/Styles/Flat/GroupBoxStyle.qml
+++ b/src/extras/Styles/Flat/GroupBoxStyle.qml
@@ -65,8 +65,8 @@ Private.GroupBoxStyle {
// TODO:
Binding {
- target: root
- property: "padding.top"
+ target: root.padding
+ property: "top"
value: background.anchors.topMargin + root.spacing
}
diff --git a/src/extras/Tumbler.qml b/src/extras/Tumbler.qml
index 7cba6ed0..47cb043c 100644
--- a/src/extras/Tumbler.qml
+++ b/src/extras/Tumbler.qml
@@ -177,20 +177,19 @@ Control {
}
/*!
- \qmlmethod void Tumbler::setCurrentIndexAt(int columnIndex, int itemIndex)
- Sets the current index of the column at \a columnIndex to \a itemIndex.
+ \qmlmethod void Tumbler::setCurrentIndexAt(int columnIndex, int itemIndex, int interval)
+ Sets the current index of the column at \a columnIndex to \a itemIndex. The animation
+ length can be set with \a interval, which defaults to \c 0.
Does nothing if \a columnIndex or \a itemIndex are invalid.
*/
- function setCurrentIndexAt(columnIndex, itemIndex) {
+ function setCurrentIndexAt(columnIndex, itemIndex, interval) {
if (!__isValidColumnAndItemIndex(columnIndex, itemIndex))
return;
var view = columnRepeater.itemAt(columnIndex).view;
if (view.currentIndex !== itemIndex) {
- // Hack to work around the pathview jumping when the index is changed.
- // TODO: doesn't seem to be necessary anymore?
- view.highlightMoveDuration = 0;
+ view.highlightMoveDuration = typeof interval !== 'undefined' ? interval : 0;
view.currentIndex = itemIndex;
view.highlightMoveDuration = Qt.binding(function(){ return __highlightMoveDuration; });
}
diff --git a/src/extras/doc/qtquickextras.qdocconf b/src/extras/doc/qtquickextras.qdocconf
index a802d9fa..747465fc 100644
--- a/src/extras/doc/qtquickextras.qdocconf
+++ b/src/extras/doc/qtquickextras.qdocconf
@@ -30,7 +30,7 @@ qhp.QtQuickExtras.subprojects.qtquickextrasexamples.sortPages = true
depends = qtqml qtquick qtdoc qtquickcontrols qtgui
exampledirs += ../../../examples/quick/extras
-examplesinstallpath = quick/extras
+examplesinstallpath = qtquickcontrols/quick/extras
headerdirs += ../
diff --git a/src/extras/extras.pro b/src/extras/extras.pro
index 2ebd8f81..4363ce00 100644
--- a/src/extras/extras.pro
+++ b/src/extras/extras.pro
@@ -1,3 +1,5 @@
+requires(contains(QT_CONFIG, accessibility))
+
TARGET = qtquickextrasplugin
TARGETPATH = QtQuick/Extras
IMPORT_VERSION = 1.4
diff --git a/src/extras/plugins.qmltypes b/src/extras/plugins.qmltypes
index 59ca2dd1..b8ee60e6 100644
--- a/src/extras/plugins.qmltypes
+++ b/src/extras/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,12 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQuick.Extras 1.4'
Module {
+ dependencies: [
+ "QtGraphicalEffects 1.0",
+ "QtGraphicalEffects.private 1.0",
+ "QtQuick 2.0",
+ "QtQuick.Window 2.1"
+ ]
Component {
name: "QQuickActivationMode"
exports: ["QtQuick.Extras/ActivationMode 1.0"]
@@ -195,13 +201,13 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras.Private/CircularButton"
+ name: "QtQuick.Extras.Private/CircularButton 1.0"
exports: ["QtQuick.Extras.Private/CircularButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
Property { name: "isDefault"; type: "bool" }
- Property { name: "menu"; type: "Menu_QMLTYPE_33"; isPointer: true }
+ Property { name: "menu"; type: "Menu_QMLTYPE_28"; isPointer: true }
Property { name: "checkable"; type: "bool" }
Property { name: "checked"; type: "bool" }
Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
@@ -215,8 +221,8 @@ Module {
Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
Property { name: "__action"; type: "QQuickAction"; isPointer: true }
Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
- Property { name: "__effectivePressed"; type: "bool" }
Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
@@ -229,7 +235,7 @@ Module {
}
Component {
prototype: "QObject"
- name: "QtQuick.Extras.Private/CircularButtonStyleHelper"
+ name: "QtQuick.Extras.Private/CircularButtonStyleHelper 1.0"
exports: ["QtQuick.Extras.Private/CircularButtonStyleHelper 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -275,7 +281,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/CircularGauge"
+ name: "QtQuick.Extras/CircularGauge 1.0"
exports: ["QtQuick.Extras/CircularGauge 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -293,7 +299,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras.Private/CircularTickmarkLabel"
+ name: "QtQuick.Extras.Private/CircularTickmarkLabel 1.0"
exports: ["QtQuick.Extras.Private/CircularTickmarkLabel 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -327,7 +333,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/DelayButton"
+ name: "QtQuick.Extras/DelayButton 1.0"
exports: ["QtQuick.Extras/DelayButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -337,7 +343,7 @@ Module {
Property { name: "progress"; type: "double"; isReadonly: true }
Signal { name: "activated" }
Property { name: "isDefault"; type: "bool" }
- Property { name: "menu"; type: "Menu_QMLTYPE_33"; isPointer: true }
+ Property { name: "menu"; type: "Menu_QMLTYPE_28"; isPointer: true }
Property { name: "checkable"; type: "bool" }
Property { name: "checked"; type: "bool" }
Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
@@ -351,8 +357,8 @@ Module {
Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
Property { name: "__action"; type: "QQuickAction"; isPointer: true }
Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
- Property { name: "__effectivePressed"; type: "bool" }
Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
@@ -365,7 +371,29 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/Dial"
+ name: "QtQuick.Extras/Dial 1.0"
+ exports: ["QtQuick.Extras/Dial 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "__wrap"; type: "bool" }
+ Property { name: "activeFocusOnPress"; type: "bool" }
+ Property { name: "tickmarksVisible"; type: "bool" }
+ Property { name: "value"; type: "double" }
+ Property { name: "minimumValue"; type: "double" }
+ Property { name: "maximumValue"; type: "double" }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "stepSize"; type: "double" }
+ Property { name: "pressed"; type: "bool"; isReadonly: 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.Extras/Dial 1.1"
exports: ["QtQuick.Extras/Dial 1.1"]
exportMetaObjectRevisions: [1]
isComposite: true
@@ -387,7 +415,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/Gauge"
+ name: "QtQuick.Extras/Gauge 1.0"
exports: ["QtQuick.Extras/Gauge 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -412,7 +440,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/PieMenu"
+ name: "QtQuick.Extras/PieMenu 1.0"
exports: ["QtQuick.Extras/PieMenu 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -457,18 +485,18 @@ Module {
}
Component {
prototype: "QQuickLoader"
- name: "QtQuick.Extras.Private/PieMenuIcon"
+ name: "QtQuick.Extras.Private/PieMenuIcon 1.0"
exports: ["QtQuick.Extras.Private/PieMenuIcon 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
- Property { name: "control"; type: "PieMenu_QMLTYPE_93"; isPointer: true }
+ Property { name: "control"; type: "PieMenu_QMLTYPE_84"; isPointer: true }
Property { name: "styleData"; type: "QObject"; isPointer: true }
Property { name: "iconSource"; type: "string"; isReadonly: true }
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/StatusIndicator"
+ name: "QtQuick.Extras/StatusIndicator 1.1"
exports: ["QtQuick.Extras/StatusIndicator 1.1"]
exportMetaObjectRevisions: [1]
isComposite: true
@@ -483,8 +511,24 @@ Module {
Property { name: "__styleData"; type: "QObject"; isPointer: true }
}
Component {
+ prototype: "QQuickFocusScope"
+ name: "QtQuick.Extras/StatusIndicator 1.0"
+ exports: ["QtQuick.Extras/StatusIndicator 1.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "active"; type: "bool" }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "on"; type: "bool" }
+ 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: "QQuickText"
- name: "QtQuick.Extras.Private/TextSingleton"
+ name: "QtQuick.Extras.Private/TextSingleton 1.0"
exports: ["QtQuick.Extras.Private/TextSingleton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
@@ -494,13 +538,13 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/ToggleButton"
+ name: "QtQuick.Extras/ToggleButton 1.0"
exports: ["QtQuick.Extras/ToggleButton 1.0"]
exportMetaObjectRevisions: [0]
isComposite: true
defaultProperty: "data"
Property { name: "isDefault"; type: "bool" }
- Property { name: "menu"; type: "Menu_QMLTYPE_33"; isPointer: true }
+ Property { name: "menu"; type: "Menu_QMLTYPE_28"; isPointer: true }
Property { name: "checkable"; type: "bool" }
Property { name: "checked"; type: "bool" }
Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup"; isPointer: true }
@@ -514,8 +558,8 @@ Module {
Property { name: "__iconOverriden"; type: "bool"; isReadonly: true }
Property { name: "__action"; type: "QQuickAction"; isPointer: true }
Property { name: "__iconAction"; type: "QQuickAction"; isReadonly: true; isPointer: true }
- Property { name: "__effectivePressed"; type: "bool" }
Property { name: "__behavior"; type: "QVariant" }
+ Property { name: "__effectivePressed"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "hovered"; type: "bool"; isReadonly: true }
Signal { name: "clicked" }
@@ -528,7 +572,7 @@ Module {
}
Component {
prototype: "QQuickFocusScope"
- name: "QtQuick.Extras/Tumbler"
+ name: "QtQuick.Extras/Tumbler 1.2"
exports: ["QtQuick.Extras/Tumbler 1.2"]
exportMetaObjectRevisions: [2]
isComposite: true
@@ -588,13 +632,14 @@ Module {
}
Component {
prototype: "QObject"
- name: "QtQuick.Extras/TumblerColumn"
+ name: "QtQuick.Extras/TumblerColumn 1.2"
exports: ["QtQuick.Extras/TumblerColumn 1.2"]
exportMetaObjectRevisions: [2]
isComposite: true
Property { name: "__tumbler"; type: "QQuickItem"; isPointer: true }
Property { name: "__index"; type: "int" }
Property { name: "__currentIndex"; type: "int" }
+ Property { name: "model"; type: "QVariant" }
Property { name: "role"; type: "string" }
Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
Property { name: "highlight"; type: "QQmlComponent"; isPointer: true }
@@ -602,7 +647,6 @@ Module {
Property { name: "visible"; type: "bool" }
Property { name: "activeFocus"; type: "bool"; isReadonly: true }
Property { name: "width"; type: "double" }
- Property { name: "model"; type: "QVariant" }
Property { name: "currentIndex"; type: "int"; isReadonly: true }
}
}
diff --git a/src/layouts/doc/src/qtquicklayouts.qdoc b/src/layouts/doc/src/qtquicklayouts.qdoc
index f7cc2196..cb6351a2 100644
--- a/src/layouts/doc/src/qtquicklayouts.qdoc
+++ b/src/layouts/doc/src/qtquicklayouts.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtQuick.Layouts 1.2
+ \qmlmodule QtQuick.Layouts 1.3
\title Qt Quick Layouts QML Types
\ingroup qmlmodules
\brief Provides QML types for arranging QML items in a user interface.
@@ -40,7 +40,7 @@
following import statement in your .qml file.
\code
- import QtQuick.Layouts 1.2
+ import QtQuick.Layouts 1.3
\endcode
*/
diff --git a/src/layouts/layouts.pro b/src/layouts/layouts.pro
index 3ef18f85..f7a73b7e 100644
--- a/src/layouts/layouts.pro
+++ b/src/layouts/layouts.pro
@@ -10,12 +10,14 @@ QMAKE_DOCS = $$PWD/doc/qtquicklayouts.qdocconf
SOURCES += plugin.cpp \
qquicklayout.cpp \
qquicklinearlayout.cpp \
+ qquickstacklayout.cpp \
qquickgridlayoutengine.cpp \
qquicklayoutstyleinfo.cpp
HEADERS += \
qquicklayout_p.h \
qquicklinearlayout_p.h \
+ qquickstacklayout_p.h \
qquickgridlayoutengine_p.h \
qquicklayoutstyleinfo_p.h
diff --git a/src/layouts/plugin.cpp b/src/layouts/plugin.cpp
index fa72fa8d..6a670539 100644
--- a/src/layouts/plugin.cpp
+++ b/src/layouts/plugin.cpp
@@ -37,6 +37,7 @@
#include <QtQml/qqmlextensionplugin.h>
#include "qquicklinearlayout_p.h"
+#include "qquickstacklayout_p.h"
QT_BEGIN_NAMESPACE
@@ -54,6 +55,7 @@ public:
qmlRegisterType<QQuickRowLayout>(uri, 1, 0, "RowLayout");
qmlRegisterType<QQuickColumnLayout>(uri, 1, 0, "ColumnLayout");
qmlRegisterType<QQuickGridLayout>(uri, 1, 0, "GridLayout");
+ qmlRegisterType<QQuickStackLayout>(uri, 1, 3, "StackLayout");
qmlRegisterUncreatableType<QQuickLayout>(uri, 1, 0, "Layout",
QStringLiteral("Do not create objects of type Layout"));
qmlRegisterUncreatableType<QQuickLayout>(uri, 1, 2, "Layout",
diff --git a/src/layouts/plugins.qmltypes b/src/layouts/plugins.qmltypes
index 637210e2..b130215b 100644
--- a/src/layouts/plugins.qmltypes
+++ b/src/layouts/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,7 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQuick.Layouts 1.2'
Module {
+ dependencies: []
Component {
name: "QQuickColumnLayout"
defaultProperty: "data"
@@ -84,4 +85,18 @@ Module {
exports: ["QtQuick.Layouts/RowLayout 1.0"]
exportMetaObjectRevisions: [0]
}
+ Component {
+ name: "QQuickStackLayout"
+ defaultProperty: "data"
+ prototype: "QQuickLayout"
+ exports: ["QtQuick.Layouts/StackLayout 1.3"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "count"; type: "int"; isReadonly: true }
+ Property { name: "currentIndex"; type: "int" }
+ Method {
+ name: "itemAt"
+ type: "QQuickItem*"
+ Parameter { name: "index"; type: "int" }
+ }
+ }
}
diff --git a/src/layouts/qquickgridlayoutengine.cpp b/src/layouts/qquickgridlayoutengine.cpp
index 553f45d0..2c08eec1 100644
--- a/src/layouts/qquickgridlayoutengine.cpp
+++ b/src/layouts/qquickgridlayoutengine.cpp
@@ -40,261 +40,6 @@
QT_BEGIN_NAMESPACE
-/*
- The layout engine assumes:
- 1. minimum <= preferred <= maximum
- 2. descent is within minimum and maximum bounds (### verify)
-
- This function helps to ensure that by the following rules (in the following order):
- 1. If minimum > maximum, set minimum = maximum
- 2. Make sure preferred is not outside the [minimum,maximum] range.
- 3. If descent > minimum, set descent = minimum (### verify if this is correct, it might
- need some refinements to multiline texts)
-
- If any values are "not set" (i.e. negative), they will be left untouched, so that we
- know which values needs to be fetched from the implicit hints (not user hints).
- */
-static void normalizeHints(qreal &minimum, qreal &preferred, qreal &maximum, qreal &descent)
-{
- if (minimum >= 0 && maximum >= 0 && minimum > maximum)
- minimum = maximum;
-
- if (preferred >= 0) {
- if (minimum >= 0 && preferred < minimum) {
- preferred = minimum;
- } else if (maximum >= 0 && preferred > maximum) {
- preferred = maximum;
- }
- }
-
- if (minimum >= 0 && descent > minimum)
- descent = minimum;
-}
-
-static void boundSize(QSizeF &result, const QSizeF &size)
-{
- if (size.width() >= 0 && size.width() < result.width())
- result.setWidth(size.width());
- if (size.height() >= 0 && size.height() < result.height())
- result.setHeight(size.height());
-}
-
-static void expandSize(QSizeF &result, const QSizeF &size)
-{
- if (size.width() >= 0 && size.width() > result.width())
- result.setWidth(size.width());
- if (size.height() >= 0 && size.height() > result.height())
- result.setHeight(size.height());
-}
-
-static inline void combineHints(qreal &current, qreal fallbackHint)
-{
- if (current < 0)
- current = fallbackHint;
-}
-
-static inline void combineSize(QSizeF &result, const QSizeF &fallbackSize)
-{
- combineHints(result.rwidth(), fallbackSize.width());
- combineHints(result.rheight(), fallbackSize.height());
-}
-
-static inline void combineImplicitHints(QQuickLayoutAttached *info, Qt::SizeHint which, QSizeF *size)
-{
- if (!info) return;
-
- Q_ASSERT(which == Qt::MinimumSize || which == Qt::MaximumSize);
-
- const QSizeF constraint(which == Qt::MinimumSize
- ? QSizeF(info->minimumWidth(), info->minimumHeight())
- : QSizeF(info->maximumWidth(), info->maximumHeight()));
-
- if (!info->isExtentExplicitlySet(Qt::Horizontal, which))
- combineHints(size->rwidth(), constraint.width());
- if (!info->isExtentExplicitlySet(Qt::Vertical, which))
- combineHints(size->rheight(), constraint.height());
-}
-
-/*!
- \internal
- Note: Can potentially return the attached QQuickLayoutAttached object through \a attachedInfo.
-
- It is like this is because it enables it to be reused.
-
- The goal of this function is to return the effective minimum, preferred and maximum size hints
- that the layout will use for this item.
- This function takes care of gathering all explicitly set size hints, normalizes them so
- that min < pref < max.
- Further, the hints _not_explicitly_ set will then be initialized with the implicit size hints,
- which is usually derived from the content of the layouts (or items).
-
- The following table illustrates the preference of the properties used for measuring layout
- items. If present, the USER properties will be preferred. If USER properties are not present,
- the HINT properties will be preferred. Finally, the FALLBACK properties will be used as an
- ultimate fallback.
-
- Note that one can query if the value of Layout.minimumWidth or Layout.maximumWidth has been
- explicitly or implicitly set with QQuickLayoutAttached::isExtentExplicitlySet(). This
- determines if it should be used as a USER or as a HINT value.
-
- Fractional size hints will be ceiled to the closest integer. This is in order to give some
- slack when the items are snapped to the pixel grid.
-
- | *Minimum* | *Preferred* | *Maximum* |
-+----------------+----------------------+-----------------------+--------------------------+
-|USER (explicit) | Layout.minimumWidth | Layout.preferredWidth | Layout.maximumWidth |
-|HINT (implicit) | Layout.minimumWidth | implicitWidth | Layout.maximumWidth |
-|FALLBACK | 0 | width | Number.POSITIVE_INFINITY |
-+----------------+----------------------+-----------------------+--------------------------+
- */
-void QQuickGridLayoutItem::effectiveSizeHints_helper(QQuickItem *item, QSizeF *cachedSizeHints, QQuickLayoutAttached **attachedInfo, bool useFallbackToWidthOrHeight)
-{
- for (int i = 0; i < Qt::NSizeHints; ++i)
- cachedSizeHints[i] = QSizeF();
- QQuickLayoutAttached *info = attachedLayoutObject(item, false);
- // First, retrieve the user-specified hints from the attached "Layout." properties
- if (info) {
- struct Getters {
- SizeGetter call[NSizes];
- };
-
- static Getters horGetters = {
- {&QQuickLayoutAttached::minimumWidth, &QQuickLayoutAttached::preferredWidth, &QQuickLayoutAttached::maximumWidth},
- };
-
- static Getters verGetters = {
- {&QQuickLayoutAttached::minimumHeight, &QQuickLayoutAttached::preferredHeight, &QQuickLayoutAttached::maximumHeight}
- };
- for (int i = 0; i < NSizes; ++i) {
- SizeGetter getter = horGetters.call[i];
- Q_ASSERT(getter);
-
- if (info->isExtentExplicitlySet(Qt::Horizontal, (Qt::SizeHint)i))
- cachedSizeHints[i].setWidth(qCeil((info->*getter)()));
-
- getter = verGetters.call[i];
- Q_ASSERT(getter);
- if (info->isExtentExplicitlySet(Qt::Vertical, (Qt::SizeHint)i))
- cachedSizeHints[i].setHeight(qCeil((info->*getter)()));
- }
- }
-
- QSizeF &minS = cachedSizeHints[Qt::MinimumSize];
- QSizeF &prefS = cachedSizeHints[Qt::PreferredSize];
- QSizeF &maxS = cachedSizeHints[Qt::MaximumSize];
- QSizeF &descentS = cachedSizeHints[Qt::MinimumDescent];
-
- // For instance, will normalize the following user-set hints
- // from: [10, 5, 60]
- // to: [10, 10, 60]
- normalizeHints(minS.rwidth(), prefS.rwidth(), maxS.rwidth(), descentS.rwidth());
- normalizeHints(minS.rheight(), prefS.rheight(), maxS.rheight(), descentS.rheight());
-
- // All explicit values gathered, now continue to gather the implicit sizes
-
- //--- GATHER MAXIMUM SIZE HINTS ---
- combineImplicitHints(info, Qt::MaximumSize, &maxS);
- combineSize(maxS, QSizeF(std::numeric_limits<qreal>::infinity(), std::numeric_limits<qreal>::infinity()));
- // implicit max or min sizes should not limit an explicitly set preferred size
- expandSize(maxS, prefS);
- expandSize(maxS, minS);
-
- //--- GATHER MINIMUM SIZE HINTS ---
- combineImplicitHints(info, Qt::MinimumSize, &minS);
- expandSize(minS, QSizeF(0,0));
- boundSize(minS, prefS);
- boundSize(minS, maxS);
-
- //--- GATHER PREFERRED SIZE HINTS ---
- // First, from implicitWidth/Height
- qreal &prefWidth = prefS.rwidth();
- qreal &prefHeight = prefS.rheight();
- if (prefWidth < 0 && item->implicitWidth() > 0)
- prefWidth = qCeil(item->implicitWidth());
- if (prefHeight < 0 && item->implicitHeight() > 0)
- prefHeight = qCeil(item->implicitHeight());
-
- // If that fails, make an ultimate fallback to width/height
-
- if (!info && (prefWidth < 0 || prefHeight < 0))
- info = attachedLayoutObject(item);
-
- if (useFallbackToWidthOrHeight && info) {
- /* This block is a bit hacky, but if we want to support using width/height
- as preferred size hints in layouts, (which we think most people expect),
- we only want to use the initial width.
- This is because the width will change due to layout rearrangement, and the preferred
- width should return the same value, regardless of the current width.
- We therefore store the width in the implicitWidth attached property.
- Since the layout listens to changes of implicitWidth, (it will
- basically cause an invalidation of the layout), we have to disable that
- notification while we set the implicit width (and height).
-
- Only use this fallback the first time the size hint is queried. Otherwise, we might
- end up picking a width that is different than what was specified in the QML.
- */
- if (prefWidth < 0 || prefHeight < 0) {
- item->blockSignals(true);
- if (prefWidth < 0) {
- prefWidth = item->width();
- item->setImplicitWidth(prefWidth);
- }
- if (prefHeight < 0) {
- prefHeight = item->height();
- item->setImplicitHeight(prefHeight);
- }
- item->blockSignals(false);
- }
- }
-
-
-
- // Normalize again after the implicit hints have been gathered
- expandSize(prefS, minS);
- boundSize(prefS, maxS);
-
- //--- GATHER DESCENT
- // Minimum descent is only applicable for the effective minimum height,
- // so we gather the descent last.
- const qreal minimumDescent = minS.height() - item->baselineOffset();
- descentS.setHeight(minimumDescent);
-
- if (info) {
- QMarginsF margins = info->qMargins();
- QSizeF extraMargins(margins.left() + margins.right(), margins.top() + margins.bottom());
- minS += extraMargins;
- prefS += extraMargins;
- maxS += extraMargins;
- descentS += extraMargins;
- }
- if (attachedInfo)
- *attachedInfo = info;
-}
-
-/*!
- \internal
-
- Assumes \a info is set (if the object has an attached property)
- */
-QLayoutPolicy::Policy QQuickGridLayoutItem::effectiveSizePolicy_helper(QQuickItem *item, Qt::Orientation orientation, QQuickLayoutAttached *info)
-{
- bool fillExtent = false;
- bool isSet = false;
- if (info) {
- if (orientation == Qt::Horizontal) {
- isSet = info->isFillWidthSet();
- if (isSet) fillExtent = info->fillWidth();
- } else {
- isSet = info->isFillHeightSet();
- if (isSet) fillExtent = info->fillHeight();
- }
- }
- if (!isSet && qobject_cast<QQuickLayout*>(item))
- fillExtent = true;
- return fillExtent ? QLayoutPolicy::Preferred : QLayoutPolicy::Fixed;
-
-}
-
void QQuickGridLayoutEngine::setAlignment(QQuickItem *quickItem, Qt::Alignment alignment)
{
if (QQuickGridLayoutItem *item = findLayoutItem(quickItem)) {
diff --git a/src/layouts/qquickgridlayoutengine_p.h b/src/layouts/qquickgridlayoutengine_p.h
index a94ef934..ce7285bf 100644
--- a/src/layouts/qquickgridlayoutengine_p.h
+++ b/src/layouts/qquickgridlayoutengine_p.h
@@ -64,23 +64,18 @@ public:
: QGridLayoutItem(row, column, rowSpan, columnSpan, alignment), m_item(item), sizeHintCacheDirty(true), useFallbackToWidthOrHeight(true) {}
- typedef qreal (QQuickLayoutAttached::*SizeGetter)() const;
-
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{
Q_UNUSED(constraint); // Quick Layouts does not support constraint atm
return effectiveSizeHints()[which];
}
- static void effectiveSizeHints_helper(QQuickItem *item, QSizeF *cachedSizeHints, QQuickLayoutAttached **info, bool useFallbackToWidthOrHeight);
- static QLayoutPolicy::Policy effectiveSizePolicy_helper(QQuickItem *item, Qt::Orientation orientation, QQuickLayoutAttached *info);
-
QSizeF *effectiveSizeHints() const
{
if (!sizeHintCacheDirty)
return cachedSizeHints;
- effectiveSizeHints_helper(m_item, cachedSizeHints, 0, useFallbackToWidthOrHeight);
+ QQuickLayout::effectiveSizeHints_helper(m_item, cachedSizeHints, 0, useFallbackToWidthOrHeight);
useFallbackToWidthOrHeight = false;
sizeHintCacheDirty = false;
@@ -103,7 +98,7 @@ public:
QLayoutPolicy::Policy sizePolicy(Qt::Orientation orientation) const
{
- return effectiveSizePolicy_helper(m_item, orientation, attachedLayoutObject(m_item, false));
+ return QQuickLayout::effectiveSizePolicy_helper(m_item, orientation, attachedLayoutObject(m_item, false));
}
void setGeometry(const QRectF &rect)
@@ -112,8 +107,7 @@ public:
const QRectF r = info ? rect.marginsRemoved(info->qMargins()) : rect;
const QSizeF oldSize(m_item->width(), m_item->height());
const QSizeF newSize = r.size();
- QPointF topLeft(qCeil(r.x()), qCeil(r.y()));
- m_item->setPosition(topLeft);
+ m_item->setPosition(r.topLeft());
if (newSize == oldSize) {
if (QQuickLayout *lay = qobject_cast<QQuickLayout *>(m_item)) {
if (lay->arrangementIsDirty())
@@ -135,7 +129,7 @@ private:
class QQuickGridLayoutEngine : public QGridLayoutEngine {
public:
- QQuickGridLayoutEngine() : QGridLayoutEngine(Qt::AlignVCenter) { }
+ QQuickGridLayoutEngine() : QGridLayoutEngine(Qt::AlignVCenter, true /*snapToPixelGrid*/) { }
int indexOf(QQuickItem *item) const {
for (int i = 0; i < q_items.size(); ++i) {
diff --git a/src/layouts/qquicklayout.cpp b/src/layouts/qquicklayout.cpp
index 759ad6f2..f28a7d07 100644
--- a/src/layouts/qquicklayout.cpp
+++ b/src/layouts/qquicklayout.cpp
@@ -38,6 +38,7 @@
#include <QEvent>
#include <QtCore/qcoreapplication.h>
#include <QtCore/qnumeric.h>
+#include <QtCore/qmath.h>
#include <limits>
/*!
@@ -50,7 +51,7 @@
An object of type Layout is attached to children of the layout to provide layout specific
information about the item.
- The properties of the attached object influences how the layout will arrange the items.
+ The properties of the attached object influence how the layout will arrange the items.
For instance, you can specify \l minimumWidth, \l preferredWidth, and
\l maximumWidth if the default values are not satisfactory.
@@ -59,18 +60,18 @@
\l{Layout::minimumWidth}{minimum size}, \l{Layout::preferredWidth}{preferred size} and a
\l{Layout::maximumWidth}{maximum size}.
- If minimum size have not been explicitly specified on an item, the size is set to \c 0.
- If maximum size have not been explicitly specified on an item, the size is set to
+ If minimum size has not been explicitly specified on an item, the size is set to \c 0.
+ If maximum size has not been explicitly specified on an item, the size is set to
\c Number.POSITIVE_INFINITY.
- For layouts, the implicit minimum and maximum size depends on the content of the layouts.
+ For layouts, the implicit minimum and maximum sizes depend on the content of the layouts.
- The \l fillWidth and \l fillHeight properties can either be \c true or \c false. If it is \c
+ The \l fillWidth and \l fillHeight properties can either be \c true or \c false. If they are \c
false, the item's size will be fixed to its preferred size. Otherwise, it will grow or shrink
between its minimum and maximum size as the layout is resized.
\note It is not recommended to have bindings to the x, y, width, or height properties of items
- in a layout, since this would conflict with the goal of the Layout, and also cause binding
+ in a layout, since this would conflict with the goals of Layout, and can also cause binding
loops.
@@ -116,10 +117,10 @@ QQuickLayoutAttached::QQuickLayoutAttached(QObject *parent)
\qmlattachedproperty real Layout::minimumWidth
This property holds the minimum width of an item in a layout.
- The default value is the items implicit minimum width.
+ The default value is the item's implicit minimum width.
If the item is a layout, the implicit minimum width will be the minimum width the layout can
- have without any of its items shrink beyond their minimum width.
+ have without any of its items shrinking below their minimum width.
The implicit minimum width for any other item is \c 0.
Setting this value to -1 will reset the width back to its implicit minimum width.
@@ -144,10 +145,11 @@ void QQuickLayoutAttached::setMinimumWidth(qreal width)
/*!
\qmlattachedproperty real Layout::minimumHeight
- The default value is the items implicit minimum height.
+ This property holds the minimum height of an item in a layout.
+ The default value is the item's implicit minimum height.
If the item is a layout, the implicit minimum height will be the minimum height the layout can
- have without any of its items shrink beyond their minimum height.
+ have without any of its items shrinking below their minimum height.
The implicit minimum height for any other item is \c 0.
Setting this value to -1 will reset the height back to its implicit minimum height.
@@ -172,7 +174,7 @@ void QQuickLayoutAttached::setMinimumHeight(qreal height)
\qmlattachedproperty real Layout::preferredWidth
This property holds the preferred width of an item in a layout.
- If the preferred width is -1 it will be ignored, and the layout
+ If the preferred width is \c -1 it will be ignored, and the layout
will use \l{Item::implicitWidth}{implicitWidth} instead.
The default is \c -1.
@@ -193,7 +195,7 @@ void QQuickLayoutAttached::setPreferredWidth(qreal width)
\qmlattachedproperty real Layout::preferredHeight
This property holds the preferred height of an item in a layout.
- If the preferred height is -1 it will be ignored, and the layout
+ If the preferred height is \c -1 it will be ignored, and the layout
will use \l{Item::implicitHeight}{implicitHeight} instead.
The default is \c -1.
@@ -214,13 +216,13 @@ void QQuickLayoutAttached::setPreferredHeight(qreal height)
\qmlattachedproperty real Layout::maximumWidth
This property holds the maximum width of an item in a layout.
- The default value is the items implicit maximum width.
+ The default value is the item's implicit maximum width.
If the item is a layout, the implicit maximum width will be the maximum width the layout can
- have without any of its items grow beyond their maximum width.
+ have without any of its items growing beyond their maximum width.
The implicit maximum width for any other item is \c Number.POSITIVE_INFINITY.
- Setting this value to -1 will reset the width back to its implicit maximum width.
+ Setting this value to \c -1 will reset the width back to its implicit maximum width.
\sa minimumWidth
\sa preferredWidth
@@ -241,13 +243,13 @@ void QQuickLayoutAttached::setMaximumWidth(qreal width)
/*!
\qmlattachedproperty real Layout::maximumHeight
- The default value is the items implicit maximum height.
+ The default value is the item's implicit maximum height.
If the item is a layout, the implicit maximum height will be the maximum height the layout can
- have without any of its items grow beyond their maximum height.
+ have without any of its items growing beyond their maximum height.
The implicit maximum height for any other item is \c Number.POSITIVE_INFINITY.
- Setting this value to -1 will reset the height back to its implicit maximum height.
+ Setting this value to \c -1 will reset the height back to its implicit maximum height.
\sa minimumHeight
\sa preferredHeight
@@ -429,7 +431,7 @@ void QQuickLayoutAttached::setAlignment(Qt::Alignment align)
\qmlattachedproperty real Layout::margins
Sets the margins outside of an item to all have the same value. The item
- itself does not evaluate its own margins. It is the parents responsibility
+ itself does not evaluate its own margins. It is the parent's responsibility
to decide if it wants to evaluate the margins.
Specifically, margins are only evaluated by ColumnLayout, RowLayout,
@@ -440,12 +442,12 @@ void QQuickLayoutAttached::setAlignment(Qt::Alignment align)
Therefore, if an item with margins is a child of another \c Item, its
position, size and implicit size will remain unchanged.
- Combining margins with alignment will align the item *including* its
- margins. For instance, a vertically-centered Item with top margin 1 and
- bottom margin 9 will cause the Items effective alignment within the cell to
- be 4 pixels above the center.
+ Combining margins with alignment will align the item \e including its
+ margins. For instance, a vertically-centered Item with a top margin of \c 1
+ and a bottom margin of \c 9 will cause the Items effective alignment within
+ the cell to be 4 pixels above the center.
- The default value is 0
+ The default value is \c 0.
\sa leftMargin
\sa topMargin
@@ -684,9 +686,6 @@ QQuickItem *QQuickLayoutAttached::item() const
}
-
-
-
QQuickLayout::QQuickLayout(QQuickLayoutPrivate &dd, QQuickItem *parent)
: QQuickItem(dd, parent),
m_dirty(false)
@@ -695,7 +694,7 @@ QQuickLayout::QQuickLayout(QQuickLayoutPrivate &dd, QQuickItem *parent)
QQuickLayout::~QQuickLayout()
{
-
+ d_func()->m_isReady = false;
}
QQuickLayoutAttached *QQuickLayout::qmlAttachedProperties(QObject *object)
@@ -710,7 +709,11 @@ void QQuickLayout::updatePolish()
void QQuickLayout::componentComplete()
{
- QQuickItem::componentComplete();
+ Q_D(QQuickLayout);
+ d->m_disableRearrange = true;
+ QQuickItem::componentComplete(); // will call our geometryChanged(), (where isComponentComplete() == true)
+ d->m_disableRearrange = false;
+ d->m_isReady = true;
}
void QQuickLayout::invalidate(QQuickItem * /*childItem*/)
@@ -726,9 +729,345 @@ void QQuickLayout::invalidate(QQuickItem * /*childItem*/)
}
}
+bool QQuickLayout::shouldIgnoreItem(QQuickItem *child, QQuickLayoutAttached *&info, QSizeF *sizeHints) const
+{
+ Q_D(const QQuickLayout);
+ bool ignoreItem = true;
+ QQuickItemPrivate *childPrivate = QQuickItemPrivate::get(child);
+ if (childPrivate->explicitVisible) {
+ effectiveSizeHints_helper(child, sizeHints, &info, true);
+ QSizeF effectiveMaxSize = sizeHints[Qt::MaximumSize];
+ if (!effectiveMaxSize.isNull()) {
+ QSizeF &prefS = sizeHints[Qt::PreferredSize];
+ if (effectiveSizePolicy_helper(child, Qt::Horizontal, info) == QLayoutPolicy::Fixed)
+ effectiveMaxSize.setWidth(prefS.width());
+ if (effectiveSizePolicy_helper(child, Qt::Vertical, info) == QLayoutPolicy::Fixed)
+ effectiveMaxSize.setHeight(prefS.height());
+ }
+ ignoreItem = effectiveMaxSize.isNull();
+ }
+
+ if (ignoreItem)
+ d->m_ignoredItems << child;
+ return ignoreItem;
+}
+
+void QQuickLayout::itemChange(ItemChange change, const ItemChangeData &value)
+{
+ if (change == ItemChildAddedChange) {
+ QQuickItem *item = value.item;
+ QObject::connect(item, SIGNAL(implicitWidthChanged()), this, SLOT(invalidateSenderItem()));
+ QObject::connect(item, SIGNAL(implicitHeightChanged()), this, SLOT(invalidateSenderItem()));
+ QObject::connect(item, SIGNAL(baselineOffsetChanged(qreal)), this, SLOT(invalidateSenderItem()));
+ QQuickItemPrivate::get(item)->addItemChangeListener(this, QQuickItemPrivate::SiblingOrder);
+ if (isReady())
+ updateLayoutItems();
+ } else if (change == ItemChildRemovedChange) {
+ QQuickItem *item = value.item;
+ QObject::disconnect(item, SIGNAL(implicitWidthChanged()), this, SLOT(invalidateSenderItem()));
+ QObject::disconnect(item, SIGNAL(implicitHeightChanged()), this, SLOT(invalidateSenderItem()));
+ QObject::disconnect(item, SIGNAL(baselineOffsetChanged(qreal)), this, SLOT(invalidateSenderItem()));
+ QQuickItemPrivate::get(item)->removeItemChangeListener(this, QQuickItemPrivate::SiblingOrder);
+ if (isReady())
+ updateLayoutItems();
+ }
+ QQuickItem::itemChange(change, value);
+}
+
+void QQuickLayout::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ Q_D(QQuickLayout);
+ QQuickItem::geometryChanged(newGeometry, oldGeometry);
+ if (d->m_disableRearrange || !isReady() || !newGeometry.isValid())
+ return;
+
+ quickLayoutDebug() << "QQuickStackLayout::geometryChanged" << newGeometry << oldGeometry;
+ rearrange(newGeometry.size());
+}
+
+void QQuickLayout::invalidateSenderItem()
+{
+ if (!isReady())
+ return;
+ QQuickItem *item = static_cast<QQuickItem *>(sender());
+ Q_ASSERT(item);
+ invalidate(item);
+}
+
+bool QQuickLayout::isReady() const
+{
+ return d_func()->m_isReady;
+}
+
+void QQuickLayout::itemSiblingOrderChanged(QQuickItem *item)
+{
+ Q_UNUSED(item);
+ updateLayoutItems();
+}
+
void QQuickLayout::rearrange(const QSizeF &/*size*/)
{
m_dirty = false;
}
+
+/*
+ The layout engine assumes:
+ 1. minimum <= preferred <= maximum
+ 2. descent is within minimum and maximum bounds (### verify)
+
+ This function helps to ensure that by the following rules (in the following order):
+ 1. If minimum > maximum, set minimum = maximum
+ 2. Clamp preferred to be between the [minimum,maximum] range.
+ 3. If descent > minimum, set descent = minimum (### verify if this is correct, it might
+ need some refinements to multiline texts)
+
+ If any values are "not set" (i.e. negative), they will be left untouched, so that we
+ know which values needs to be fetched from the implicit hints (not user hints).
+ */
+static void normalizeHints(qreal &minimum, qreal &preferred, qreal &maximum, qreal &descent)
+{
+ if (minimum >= 0 && maximum >= 0 && minimum > maximum)
+ minimum = maximum;
+
+ if (preferred >= 0) {
+ if (minimum >= 0 && preferred < minimum) {
+ preferred = minimum;
+ } else if (maximum >= 0 && preferred > maximum) {
+ preferred = maximum;
+ }
+ }
+
+ if (minimum >= 0 && descent > minimum)
+ descent = minimum;
+}
+
+static void boundSize(QSizeF &result, const QSizeF &size)
+{
+ if (size.width() >= 0 && size.width() < result.width())
+ result.setWidth(size.width());
+ if (size.height() >= 0 && size.height() < result.height())
+ result.setHeight(size.height());
+}
+
+static void expandSize(QSizeF &result, const QSizeF &size)
+{
+ if (size.width() >= 0 && size.width() > result.width())
+ result.setWidth(size.width());
+ if (size.height() >= 0 && size.height() > result.height())
+ result.setHeight(size.height());
+}
+
+static inline void combineHints(qreal &current, qreal fallbackHint)
+{
+ if (current < 0)
+ current = fallbackHint;
+}
+
+static inline void combineSize(QSizeF &result, const QSizeF &fallbackSize)
+{
+ combineHints(result.rwidth(), fallbackSize.width());
+ combineHints(result.rheight(), fallbackSize.height());
+}
+
+static inline void combineImplicitHints(QQuickLayoutAttached *info, Qt::SizeHint which, QSizeF *size)
+{
+ if (!info) return;
+
+ Q_ASSERT(which == Qt::MinimumSize || which == Qt::MaximumSize);
+
+ const QSizeF constraint(which == Qt::MinimumSize
+ ? QSizeF(info->minimumWidth(), info->minimumHeight())
+ : QSizeF(info->maximumWidth(), info->maximumHeight()));
+
+ if (!info->isExtentExplicitlySet(Qt::Horizontal, which))
+ combineHints(size->rwidth(), constraint.width());
+ if (!info->isExtentExplicitlySet(Qt::Vertical, which))
+ combineHints(size->rheight(), constraint.height());
+}
+
+typedef qreal (QQuickLayoutAttached::*SizeGetter)() const;
+
+/*!
+ \internal
+ Note: Can potentially return the attached QQuickLayoutAttached object through \a attachedInfo.
+
+ It is like this is because it enables it to be reused.
+
+ The goal of this function is to return the effective minimum, preferred and maximum size hints
+ that the layout will use for this item.
+ This function takes care of gathering all explicitly set size hints, normalizes them so
+ that min < pref < max.
+ Further, the hints _not_explicitly_ set will then be initialized with the implicit size hints,
+ which is usually derived from the content of the layouts (or items).
+
+ The following table illustrates the preference of the properties used for measuring layout
+ items. If present, the USER properties will be preferred. If USER properties are not present,
+ the HINT properties will be preferred. Finally, the FALLBACK properties will be used as an
+ ultimate fallback.
+
+ Note that one can query if the value of Layout.minimumWidth or Layout.maximumWidth has been
+ explicitly or implicitly set with QQuickLayoutAttached::isExtentExplicitlySet(). This
+ determines if it should be used as a USER or as a HINT value.
+
+ Fractional size hints will be ceiled to the closest integer. This is in order to give some
+ slack when the items are snapped to the pixel grid.
+
+ | *Minimum* | *Preferred* | *Maximum* |
++----------------+----------------------+-----------------------+--------------------------+
+|USER (explicit) | Layout.minimumWidth | Layout.preferredWidth | Layout.maximumWidth |
+|HINT (implicit) | Layout.minimumWidth | implicitWidth | Layout.maximumWidth |
+|FALLBACK | 0 | width | Number.POSITIVE_INFINITY |
++----------------+----------------------+-----------------------+--------------------------+
+ */
+void QQuickLayout::effectiveSizeHints_helper(QQuickItem *item, QSizeF *cachedSizeHints, QQuickLayoutAttached **attachedInfo, bool useFallbackToWidthOrHeight)
+{
+ for (int i = 0; i < Qt::NSizeHints; ++i)
+ cachedSizeHints[i] = QSizeF();
+ QQuickLayoutAttached *info = attachedLayoutObject(item, false);
+ // First, retrieve the user-specified hints from the attached "Layout." properties
+ if (info) {
+ struct Getters {
+ SizeGetter call[NSizes];
+ };
+
+ static Getters horGetters = {
+ {&QQuickLayoutAttached::minimumWidth, &QQuickLayoutAttached::preferredWidth, &QQuickLayoutAttached::maximumWidth},
+ };
+
+ static Getters verGetters = {
+ {&QQuickLayoutAttached::minimumHeight, &QQuickLayoutAttached::preferredHeight, &QQuickLayoutAttached::maximumHeight}
+ };
+ for (int i = 0; i < NSizes; ++i) {
+ SizeGetter getter = horGetters.call[i];
+ Q_ASSERT(getter);
+
+ if (info->isExtentExplicitlySet(Qt::Horizontal, (Qt::SizeHint)i))
+ cachedSizeHints[i].setWidth((info->*getter)());
+
+ getter = verGetters.call[i];
+ Q_ASSERT(getter);
+ if (info->isExtentExplicitlySet(Qt::Vertical, (Qt::SizeHint)i))
+ cachedSizeHints[i].setHeight((info->*getter)());
+ }
+ }
+
+ QSizeF &minS = cachedSizeHints[Qt::MinimumSize];
+ QSizeF &prefS = cachedSizeHints[Qt::PreferredSize];
+ QSizeF &maxS = cachedSizeHints[Qt::MaximumSize];
+ QSizeF &descentS = cachedSizeHints[Qt::MinimumDescent];
+
+ // For instance, will normalize the following user-set hints
+ // from: [10, 5, 60]
+ // to: [10, 10, 60]
+ normalizeHints(minS.rwidth(), prefS.rwidth(), maxS.rwidth(), descentS.rwidth());
+ normalizeHints(minS.rheight(), prefS.rheight(), maxS.rheight(), descentS.rheight());
+
+ // All explicit values gathered, now continue to gather the implicit sizes
+
+ //--- GATHER MAXIMUM SIZE HINTS ---
+ combineImplicitHints(info, Qt::MaximumSize, &maxS);
+ combineSize(maxS, QSizeF(std::numeric_limits<qreal>::infinity(), std::numeric_limits<qreal>::infinity()));
+ // implicit max or min sizes should not limit an explicitly set preferred size
+ expandSize(maxS, prefS);
+ expandSize(maxS, minS);
+
+ //--- GATHER MINIMUM SIZE HINTS ---
+ combineImplicitHints(info, Qt::MinimumSize, &minS);
+ expandSize(minS, QSizeF(0,0));
+ boundSize(minS, prefS);
+ boundSize(minS, maxS);
+
+ //--- GATHER PREFERRED SIZE HINTS ---
+ // First, from implicitWidth/Height
+ qreal &prefWidth = prefS.rwidth();
+ qreal &prefHeight = prefS.rheight();
+ if (prefWidth < 0 && item->implicitWidth() > 0)
+ prefWidth = qCeil(item->implicitWidth());
+ if (prefHeight < 0 && item->implicitHeight() > 0)
+ prefHeight = qCeil(item->implicitHeight());
+
+ // If that fails, make an ultimate fallback to width/height
+
+ if (!info && (prefWidth < 0 || prefHeight < 0))
+ info = attachedLayoutObject(item);
+
+ if (useFallbackToWidthOrHeight && info) {
+ /* This block is a bit hacky, but if we want to support using width/height
+ as preferred size hints in layouts, (which we think most people expect),
+ we only want to use the initial width.
+ This is because the width will change due to layout rearrangement, and the preferred
+ width should return the same value, regardless of the current width.
+ We therefore store the width in the implicitWidth attached property.
+ Since the layout listens to changes of implicitWidth, (it will
+ basically cause an invalidation of the layout), we have to disable that
+ notification while we set the implicit width (and height).
+
+ Only use this fallback the first time the size hint is queried. Otherwise, we might
+ end up picking a width that is different than what was specified in the QML.
+ */
+ if (prefWidth < 0 || prefHeight < 0) {
+ item->blockSignals(true);
+ if (prefWidth < 0) {
+ prefWidth = item->width();
+ item->setImplicitWidth(prefWidth);
+ }
+ if (prefHeight < 0) {
+ prefHeight = item->height();
+ item->setImplicitHeight(prefHeight);
+ }
+ item->blockSignals(false);
+ }
+ }
+
+
+
+ // Normalize again after the implicit hints have been gathered
+ expandSize(prefS, minS);
+ boundSize(prefS, maxS);
+
+ //--- GATHER DESCENT
+ // Minimum descent is only applicable for the effective minimum height,
+ // so we gather the descent last.
+ const qreal minimumDescent = minS.height() - item->baselineOffset();
+ descentS.setHeight(minimumDescent);
+
+ if (info) {
+ QMarginsF margins = info->qMargins();
+ QSizeF extraMargins(margins.left() + margins.right(), margins.top() + margins.bottom());
+ minS += extraMargins;
+ prefS += extraMargins;
+ maxS += extraMargins;
+ descentS += extraMargins;
+ }
+ if (attachedInfo)
+ *attachedInfo = info;
+}
+
+/*!
+ \internal
+
+ Assumes \a info is set (if the object has an attached property)
+ */
+QLayoutPolicy::Policy QQuickLayout::effectiveSizePolicy_helper(QQuickItem *item, Qt::Orientation orientation, QQuickLayoutAttached *info)
+{
+ bool fillExtent = false;
+ bool isSet = false;
+ if (info) {
+ if (orientation == Qt::Horizontal) {
+ isSet = info->isFillWidthSet();
+ if (isSet) fillExtent = info->fillWidth();
+ } else {
+ isSet = info->isFillHeightSet();
+ if (isSet) fillExtent = info->fillHeight();
+ }
+ }
+ if (!isSet && qobject_cast<QQuickLayout*>(item))
+ fillExtent = true;
+ return fillExtent ? QLayoutPolicy::Preferred : QLayoutPolicy::Fixed;
+
+}
+
+
+
QT_END_NAMESPACE
diff --git a/src/layouts/qquicklayout_p.h b/src/layouts/qquicklayout_p.h
index 37f6ca00..4379d7f8 100644
--- a/src/layouts/qquicklayout_p.h
+++ b/src/layouts/qquicklayout_p.h
@@ -40,6 +40,8 @@
#include <QPointer>
#include <QQuickItem>
#include <private/qquickitem_p.h>
+#include <QtQuick/private/qquickitemchangelistener_p.h>
+#include <QtGui/private/qlayoutpolicy_p.h>
QT_BEGIN_NAMESPACE
@@ -52,7 +54,8 @@ class QQuickLayoutAttached;
#endif
class QQuickLayoutPrivate;
-class QQuickLayout : public QQuickItem
+class QQuickLayout : public QQuickItem, public QQuickItemChangeListener
+
{
Q_OBJECT
public:
@@ -81,6 +84,19 @@ public:
virtual void rearrange(const QSizeF &);
bool arrangementIsDirty() const { return m_dirty; }
+
+ static void effectiveSizeHints_helper(QQuickItem *item, QSizeF *cachedSizeHints, QQuickLayoutAttached **info, bool useFallbackToWidthOrHeight);
+ static QLayoutPolicy::Policy effectiveSizePolicy_helper(QQuickItem *item, Qt::Orientation orientation, QQuickLayoutAttached *info);
+ bool shouldIgnoreItem(QQuickItem *child, QQuickLayoutAttached *&info, QSizeF *sizeHints) const;
+
+ void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ bool isReady() const;
+
+
+ /* QQuickItemChangeListener */
+ void itemSiblingOrderChanged(QQuickItem *item) Q_DECL_OVERRIDE;
+
protected:
void updatePolish() Q_DECL_OVERRIDE;
@@ -90,6 +106,9 @@ protected:
NOrientations
};
+protected slots:
+ void invalidateSenderItem();
+
private:
bool m_dirty;
@@ -102,6 +121,13 @@ private:
class QQuickLayoutPrivate : public QQuickItemPrivate
{
Q_DECLARE_PUBLIC(QQuickLayout)
+public:
+ QQuickLayoutPrivate() : m_isReady(false), m_disableRearrange(true) {}
+
+protected:
+ unsigned m_isReady : 1;
+ unsigned m_disableRearrange : 1;
+ mutable QSet<QQuickItem *> m_ignoredItems;
};
diff --git a/src/layouts/qquicklinearlayout.cpp b/src/layouts/qquicklinearlayout.cpp
index 0b9c6f54..78cc635c 100644
--- a/src/layouts/qquicklinearlayout.cpp
+++ b/src/layouts/qquicklinearlayout.cpp
@@ -323,7 +323,6 @@ void QQuickGridLayoutBase::setAlignment(QQuickItem *item, Qt::Alignment alignmen
QQuickGridLayoutBase::~QQuickGridLayoutBase()
{
Q_D(QQuickGridLayoutBase);
- d->m_isReady = false;
/* Avoid messy deconstruction, should give:
* Faster deconstruction
@@ -341,12 +340,8 @@ QQuickGridLayoutBase::~QQuickGridLayoutBase()
void QQuickGridLayoutBase::componentComplete()
{
- Q_D(QQuickGridLayoutBase);
quickLayoutDebug() << objectName() << "QQuickGridLayoutBase::componentComplete()" << parent();
- d->m_disableRearrange = true;
- QQuickLayout::componentComplete(); // will call our geometryChange(), (where isComponentComplete() == true)
- d->m_isReady = true;
- d->m_disableRearrange = false;
+ QQuickLayout::componentComplete();
updateLayoutItems();
QQuickItem *par = parentItem();
@@ -469,37 +464,16 @@ void QQuickGridLayoutBase::itemChange(ItemChange change, const ItemChangeData &v
QQuickItem *item = value.item;
QObject::connect(item, SIGNAL(destroyed()), this, SLOT(onItemDestroyed()));
QObject::connect(item, SIGNAL(visibleChanged()), this, SLOT(onItemVisibleChanged()));
- QObject::connect(item, SIGNAL(implicitWidthChanged()), this, SLOT(invalidateSenderItem()));
- QObject::connect(item, SIGNAL(implicitHeightChanged()), this, SLOT(invalidateSenderItem()));
- QObject::connect(item, SIGNAL(baselineOffsetChanged(qreal)), this, SLOT(invalidateSenderItem()));
-
- if (isReady())
- updateLayoutItems();
} else if (change == ItemChildRemovedChange) {
quickLayoutDebug() << "ItemChildRemovedChange";
QQuickItem *item = value.item;
QObject::disconnect(item, SIGNAL(destroyed()), this, SLOT(onItemDestroyed()));
QObject::disconnect(item, SIGNAL(visibleChanged()), this, SLOT(onItemVisibleChanged()));
- QObject::disconnect(item, SIGNAL(implicitWidthChanged()), this, SLOT(invalidateSenderItem()));
- QObject::disconnect(item, SIGNAL(implicitHeightChanged()), this, SLOT(invalidateSenderItem()));
- QObject::disconnect(item, SIGNAL(baselineOffsetChanged(qreal)), this, SLOT(invalidateSenderItem()));
- if (isReady())
- updateLayoutItems();
}
QQuickLayout::itemChange(change, value);
}
-void QQuickGridLayoutBase::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
-{
- Q_D(QQuickGridLayoutBase);
- QQuickLayout::geometryChanged(newGeometry, oldGeometry);
- if (d->m_disableRearrange || !isReady() || !newGeometry.isValid())
- return;
- quickLayoutDebug() << "QQuickGridLayoutBase::geometryChanged" << newGeometry << oldGeometry;
- rearrange(newGeometry.size());
-}
-
void QQuickGridLayoutBase::removeGridItem(QGridLayoutItem *gridItem)
{
Q_D(QQuickGridLayoutBase);
@@ -508,11 +482,6 @@ void QQuickGridLayoutBase::removeGridItem(QGridLayoutItem *gridItem)
d->engine.removeRows(index, 1, d->orientation);
}
-bool QQuickGridLayoutBase::isReady() const
-{
- return d_func()->m_isReady;
-}
-
void QQuickGridLayoutBase::onItemVisibleChanged()
{
if (!isReady())
@@ -535,15 +504,6 @@ void QQuickGridLayoutBase::onItemDestroyed()
}
}
-void QQuickGridLayoutBase::invalidateSenderItem()
-{
- if (!isReady())
- return;
- QQuickItem *item = static_cast<QQuickItem *>(sender());
- Q_ASSERT(item);
- invalidate(item);
-}
-
void QQuickGridLayoutBase::rearrange(const QSizeF &size)
{
Q_D(QQuickGridLayoutBase);
@@ -578,29 +538,6 @@ void QQuickGridLayoutBase::rearrange(const QSizeF &size)
}
}
-bool QQuickGridLayoutBase::shouldIgnoreItem(QQuickItem *child, QQuickLayoutAttached *&info, QSizeF *sizeHints)
-{
- Q_D(QQuickGridLayoutBase);
- bool ignoreItem = true;
- QQuickItemPrivate *childPrivate = QQuickItemPrivate::get(child);
- if (childPrivate->explicitVisible) {
- QQuickGridLayoutItem::effectiveSizeHints_helper(child, sizeHints, &info, true);
- QSizeF effectiveMaxSize = sizeHints[Qt::MaximumSize];
- if (!effectiveMaxSize.isNull()) {
- QSizeF &prefS = sizeHints[Qt::PreferredSize];
- if (QQuickGridLayoutItem::effectiveSizePolicy_helper(child, Qt::Horizontal, info) == QLayoutPolicy::Fixed)
- effectiveMaxSize.setWidth(prefS.width());
- if (QQuickGridLayoutItem::effectiveSizePolicy_helper(child, Qt::Vertical, info) == QLayoutPolicy::Fixed)
- effectiveMaxSize.setHeight(prefS.height());
- }
- ignoreItem = effectiveMaxSize.isNull();
- }
-
- if (ignoreItem)
- d->m_ignoredItems << child;
- return ignoreItem;
-}
-
/**********************************
**
** QQuickGridLayout
diff --git a/src/layouts/qquicklinearlayout_p.h b/src/layouts/qquicklinearlayout_p.h
index b6483c4e..e3522bce 100644
--- a/src/layouts/qquicklinearlayout_p.h
+++ b/src/layouts/qquicklinearlayout_p.h
@@ -39,7 +39,6 @@
#include "qquicklayout_p.h"
#include "qquickgridlayoutengine_p.h"
-#include <QtCore/qset.h>
QT_BEGIN_NAMESPACE
@@ -83,8 +82,6 @@ protected:
void rearrange(const QSizeF &size) Q_DECL_OVERRIDE;
virtual void insertLayoutItems() {}
void itemChange(ItemChange change, const ItemChangeData &data) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- bool shouldIgnoreItem(QQuickItem *child, QQuickLayoutAttached *&info, QSizeF *sizeHints);
signals:
Q_REVISION(1) void layoutDirectionChanged();
@@ -92,11 +89,9 @@ signals:
protected slots:
void onItemVisibleChanged();
void onItemDestroyed();
- void invalidateSenderItem();
private:
void removeGridItem(QGridLayoutItem *gridItem);
- bool isReady() const;
Q_DECLARE_PRIVATE(QQuickGridLayoutBase)
};
@@ -107,9 +102,7 @@ class QQuickGridLayoutBasePrivate : public QQuickLayoutPrivate
Q_DECLARE_PUBLIC(QQuickGridLayoutBase)
public:
- QQuickGridLayoutBasePrivate() : m_disableRearrange(true)
- , m_isReady(false)
- , m_rearranging(false)
+ QQuickGridLayoutBasePrivate() : m_rearranging(false)
, m_updateAfterRearrange(false)
, m_layoutDirection(Qt::LeftToRight)
{}
@@ -122,14 +115,11 @@ public:
QQuickGridLayoutEngine engine;
Qt::Orientation orientation;
- unsigned m_disableRearrange : 1;
- unsigned m_isReady : 1;
unsigned m_rearranging : 1;
unsigned m_updateAfterRearrange : 1;
QVector<QQuickItem *> m_invalidateAfterRearrange;
Qt::LayoutDirection m_layoutDirection : 2;
- QSet<QQuickItem *> m_ignoredItems;
QQuickLayoutStyleInfo *styleInfo;
};
diff --git a/src/layouts/qquickstacklayout.cpp b/src/layouts/qquickstacklayout.cpp
new file mode 100644
index 00000000..66513bfd
--- /dev/null
+++ b/src/layouts/qquickstacklayout.cpp
@@ -0,0 +1,333 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Layouts module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickstacklayout_p.h"
+#include <limits>
+
+/*!
+ \qmltype StackLayout
+ \instantiates QQuickStackLayout
+ \inherits Item
+ \inqmlmodule QtQuick.Layouts
+ \ingroup layouts
+ \brief The StackLayout class provides a stack of items where
+ only one item is visible at a time.
+
+ The current visible item can be modified by setting the \l currentIndex property.
+ The index corresponds to the order of the StackLayout's children.
+
+ In contrast to most other layouts, child Items' \l{Layout::fillWidth}{Layout.fillWidth} and \l{Layout::fillHeight}{Layout.fillHeight} properties
+ default to \c true. As a consequence, child items are by default filled to match the size of the StackLayout as long as their
+ \l{Layout::maximumWidth}{Layout.maximumWidth} or \l{Layout::maximumHeight}{Layout.maximumHeight} does not prevent it.
+
+ Items are added to the layout by reparenting the item to the layout. Similarly, removal is done by reparenting the item from the layout.
+ Both of these operations will affect the layout's \l count property.
+
+ The following code will create a StackLayout where only the 'plum' rectangle is visible.
+ \code
+ StackLayout {
+ id: layout
+ anchors.fill: parent
+ currentIndex: 1
+ Rectangle {
+ color: 'teal'
+ implicitWidth: 200
+ implicitHeight: 200
+ }
+ Rectangle {
+ color: 'plum'
+ implicitWidth: 300
+ implicitHeight: 200
+ }
+ }
+ \endcode
+
+ Items in a StackLayout support these attached properties:
+ \list
+ \li \l{Layout::minimumWidth}{Layout.minimumWidth}
+ \li \l{Layout::minimumHeight}{Layout.minimumHeight}
+ \li \l{Layout::preferredWidth}{Layout.preferredWidth}
+ \li \l{Layout::preferredHeight}{Layout.preferredHeight}
+ \li \l{Layout::maximumWidth}{Layout.maximumWidth}
+ \li \l{Layout::maximumHeight}{Layout.maximumHeight}
+ \li \l{Layout::fillWidth}{Layout.fillWidth}
+ \li \l{Layout::fillHeight}{Layout.fillHeight}
+ \endlist
+
+ Read more about attached properties \l{QML Object Attributes}{here}.
+ \sa ColumnLayout
+ \sa GridLayout
+ \sa RowLayout
+ \sa StackView
+*/
+
+QQuickStackLayout::QQuickStackLayout(QQuickItem *parent) :
+ QQuickLayout(*new QQuickStackLayoutPrivate, parent)
+{
+}
+
+/*!
+ \qmlproperty int StackLayout::count
+
+ This property holds the number of items that belong to the layout.
+
+ Only items that are children of the StackLayout will be candidates for layouting.
+*/
+int QQuickStackLayout::count() const
+{
+ Q_D(const QQuickStackLayout);
+ return d->count;
+}
+
+/*!
+ \qmlproperty int StackLayout::currentIndex
+
+ This property holds the index of the child item that is currently visible in the StackLayout.
+ By default it will be \c -1 for an empty layout, otherwise the default is \c 0 (referring to the first item).
+*/
+int QQuickStackLayout::currentIndex() const
+{
+ Q_D(const QQuickStackLayout);
+ return d->currentIndex;
+}
+
+void QQuickStackLayout::setCurrentIndex(int index)
+{
+ Q_D(QQuickStackLayout);
+ if (index != d->currentIndex) {
+ QQuickItem *prev = itemAt(d->currentIndex);
+ QQuickItem *next = itemAt(index);
+ d->currentIndex = index;
+ d->explicitCurrentIndex = true;
+ if (prev)
+ prev->setVisible(false);
+ if (next)
+ next->setVisible(true);
+
+ if (isComponentComplete()) {
+ rearrange(QSizeF(width(), height()));
+ emit currentIndexChanged();
+ }
+ }
+}
+
+void QQuickStackLayout::componentComplete()
+{
+ QQuickLayout::componentComplete(); // will call our geometryChange(), (where isComponentComplete() == true)
+
+ updateLayoutItems();
+
+ QQuickItem *par = parentItem();
+ if (qobject_cast<QQuickLayout*>(par))
+ return;
+
+ rearrange(QSizeF(width(), height()));
+}
+
+QSizeF QQuickStackLayout::sizeHint(Qt::SizeHint whichSizeHint) const
+{
+ QSizeF &askingFor = m_cachedSizeHints[whichSizeHint];
+ if (!askingFor.isValid()) {
+ QSizeF &minS = m_cachedSizeHints[Qt::MinimumSize];
+ QSizeF &prefS = m_cachedSizeHints[Qt::PreferredSize];
+ QSizeF &maxS = m_cachedSizeHints[Qt::MaximumSize];
+
+ minS = QSizeF(0,0);
+ prefS = QSizeF(0,0);
+ maxS = QSizeF(std::numeric_limits<qreal>::infinity(), std::numeric_limits<qreal>::infinity());
+
+ const int count = itemCount();
+ m_cachedItemSizeHints.resize(count);
+ for (int i = 0; i < count; ++i) {
+ SizeHints &hints = m_cachedItemSizeHints[i];
+ QQuickStackLayout::collectItemSizeHints(itemAt(i), hints.array);
+ minS = minS.expandedTo(hints.min());
+ prefS = prefS.expandedTo(hints.pref());
+ //maxS = maxS.boundedTo(hints.max()); // Can be resized to be larger than any of its items.
+ // This is the same as QStackLayout does it.
+ // Not sure how descent makes sense here...
+ }
+ }
+ return askingFor;
+}
+
+int QQuickStackLayout::indexOf(QQuickItem *childItem) const
+{
+ if (childItem) {
+ int indexOfItem = 0;
+ foreach (QQuickItem *item, childItems()) {
+ if (shouldIgnoreItem(item))
+ continue;
+ if (childItem == item)
+ return indexOfItem;
+ ++indexOfItem;
+ }
+ }
+ return -1;
+}
+
+QQuickItem *QQuickStackLayout::itemAt(int index) const
+{
+ foreach (QQuickItem *item, childItems()) {
+ if (shouldIgnoreItem(item))
+ continue;
+ if (index == 0)
+ return item;
+ --index;
+ }
+ return 0;
+}
+
+int QQuickStackLayout::itemCount() const
+{
+ int count = 0;
+ foreach (QQuickItem *item, childItems()) {
+ if (shouldIgnoreItem(item))
+ continue;
+ ++count;
+ }
+ return count;
+}
+
+void QQuickStackLayout::setAlignment(QQuickItem * /*item*/, Qt::Alignment /*align*/)
+{
+ // ### Do we have to respect alignment?
+}
+
+void QQuickStackLayout::invalidate(QQuickItem *childItem)
+{
+ Q_D(QQuickStackLayout);
+ if (d->m_ignoredItems.contains(childItem)) {
+ // If an invalid item gets a valid size, it should be included, as it was added to the layout
+ updateLayoutItems();
+ return;
+ }
+
+ const int indexOfChild = indexOf(childItem);
+ if (indexOfChild >= 0 && indexOfChild < m_cachedItemSizeHints.count()) {
+ m_cachedItemSizeHints[indexOfChild].min() = QSizeF();
+ m_cachedItemSizeHints[indexOfChild].pref() = QSizeF();
+ m_cachedItemSizeHints[indexOfChild].max() = QSizeF();
+ }
+
+ for (int i = 0; i < Qt::NSizeHints; ++i)
+ m_cachedSizeHints[i] = QSizeF();
+ QQuickLayout::invalidate(this);
+
+ QQuickLayoutAttached *info = attachedLayoutObject(this);
+
+ const QSizeF min = sizeHint(Qt::MinimumSize);
+ const QSizeF pref = sizeHint(Qt::PreferredSize);
+ const QSizeF max = sizeHint(Qt::MaximumSize);
+
+ const bool old = info->setChangesNotificationEnabled(false);
+ info->setMinimumImplicitSize(min);
+ info->setMaximumImplicitSize(max);
+ info->setChangesNotificationEnabled(old);
+ if (pref.width() == implicitWidth() && pref.height() == implicitHeight()) {
+ // In case setImplicitSize does not emit implicit{Width|Height}Changed
+ if (QQuickLayout *parentLayout = qobject_cast<QQuickLayout *>(parentItem()))
+ parentLayout->invalidate(this);
+ } else {
+ setImplicitSize(pref.width(), pref.height());
+ }
+}
+
+void QQuickStackLayout::updateLayoutItems()
+{
+ Q_D(QQuickStackLayout);
+ d->m_ignoredItems.clear();
+ const int count = itemCount();
+ int oldIndex = d->currentIndex;
+ if (!d->explicitCurrentIndex)
+ d->currentIndex = (count > 0 ? 0 : -1);
+
+ if (d->currentIndex != oldIndex)
+ emit currentIndexChanged();
+
+ if (count != d->count) {
+ d->count = count;
+ emit countChanged();
+ }
+ for (int i = 0; i < count; ++i)
+ itemAt(i)->setVisible(d->currentIndex == i);
+
+ invalidate();
+}
+
+void QQuickStackLayout::rearrange(const QSizeF &newSize)
+{
+ Q_D(QQuickStackLayout);
+ if (newSize.isNull() || !newSize.isValid())
+ return;
+ (void)sizeHint(Qt::PreferredSize); // Make sure m_cachedItemSizeHints are valid
+
+ if (d->currentIndex == -1 || d->currentIndex >= m_cachedItemSizeHints.count())
+ return;
+ QQuickStackLayout::SizeHints &hints = m_cachedItemSizeHints[d->currentIndex];
+ QQuickItem *item = itemAt(d->currentIndex);
+ Q_ASSERT(item);
+ item->setPosition(QPointF(0,0)); // ### respect alignment?
+ item->setSize(newSize.expandedTo(hints.min()).boundedTo(hints.max()));
+ QQuickLayout::rearrange(newSize);
+}
+
+void QQuickStackLayout::collectItemSizeHints(QQuickItem *item, QSizeF *sizeHints)
+{
+ QQuickLayoutAttached *info = 0;
+ QQuickLayout::effectiveSizeHints_helper(item, sizeHints, &info, true);
+ if (!info)
+ return;
+ if (info->isFillWidthSet() && !info->fillWidth()) {
+ const qreal pref = sizeHints[Qt::PreferredSize].width();
+ sizeHints[Qt::MinimumSize].setWidth(pref);
+ sizeHints[Qt::MaximumSize].setWidth(pref);
+ }
+
+ if (info->isFillHeightSet() && !info->fillHeight()) {
+ const qreal pref = sizeHints[Qt::PreferredSize].height();
+ sizeHints[Qt::MinimumSize].setHeight(pref);
+ sizeHints[Qt::MaximumSize].setHeight(pref);
+ }
+}
+
+bool QQuickStackLayout::shouldIgnoreItem(QQuickItem *item) const
+{
+ const bool ignored = QQuickItemPrivate::get(item)->isTransparentForPositioner();
+ if (ignored)
+ d_func()->m_ignoredItems << item;
+ return ignored;
+}
diff --git a/src/layouts/qquickstacklayout_p.h b/src/layouts/qquickstacklayout_p.h
new file mode 100644
index 00000000..92121400
--- /dev/null
+++ b/src/layouts/qquickstacklayout_p.h
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Layouts module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKSTACKLAYOUT_H
+#define QQUICKSTACKLAYOUT_H
+
+#include <qquicklayout_p.h>
+
+class QQuickStackLayoutPrivate;
+
+class QQuickStackLayout : public QQuickLayout
+{
+ Q_OBJECT
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
+
+public:
+ explicit QQuickStackLayout(QQuickItem *parent = 0);
+ int count() const;
+ int currentIndex() const;
+ void setCurrentIndex(int index);
+
+ void componentComplete() Q_DECL_OVERRIDE;
+ QSizeF sizeHint(Qt::SizeHint whichSizeHint) const Q_DECL_OVERRIDE;
+ void setAlignment(QQuickItem *item, Qt::Alignment align) Q_DECL_OVERRIDE;
+ void invalidate(QQuickItem *childItem = 0) Q_DECL_OVERRIDE;
+ void updateLayoutItems() Q_DECL_OVERRIDE;
+ void rearrange(const QSizeF &) Q_DECL_OVERRIDE;
+
+ // iterator
+ Q_INVOKABLE QQuickItem *itemAt(int index) const Q_DECL_OVERRIDE;
+ int itemCount() const Q_DECL_OVERRIDE;
+ int indexOf(QQuickItem *item) const;
+
+
+
+signals:
+ void currentIndexChanged();
+ void countChanged();
+
+public slots:
+
+private:
+ static void collectItemSizeHints(QQuickItem *item, QSizeF *sizeHints);
+ bool shouldIgnoreItem(QQuickItem *item) const;
+ Q_DECLARE_PRIVATE(QQuickStackLayout)
+
+ QList<QQuickItem*> m_items;
+
+ typedef struct {
+ inline QSizeF &min() { return array[Qt::MinimumSize]; }
+ inline QSizeF &pref() { return array[Qt::PreferredSize]; }
+ inline QSizeF &max() { return array[Qt::MaximumSize]; }
+ QSizeF array[Qt::NSizeHints];
+ } SizeHints;
+
+ mutable QVector<SizeHints> m_cachedItemSizeHints;
+ mutable QSizeF m_cachedSizeHints[Qt::NSizeHints];
+};
+
+class QQuickStackLayoutPrivate : public QQuickLayoutPrivate
+{
+ Q_DECLARE_PUBLIC(QQuickStackLayout)
+public:
+ QQuickStackLayoutPrivate() : count(0), currentIndex(-1), explicitCurrentIndex(false) {}
+private:
+ int count;
+ int currentIndex;
+ bool explicitCurrentIndex;
+};
+
+#endif // QQUICKSTACKLAYOUT_H
diff --git a/src/widgets/plugins.qmltypes b/src/widgets/plugins.qmltypes
index 7265bb05..a4494280 100644
--- a/src/widgets/plugins.qmltypes
+++ b/src/widgets/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,7 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtQuick.PrivateWidgets 1.1'
Module {
+ dependencies: []
Component {
name: "QQuickAbstractColorDialog"
prototype: "QQuickAbstractDialog"
@@ -104,6 +105,7 @@ Module {
Property { name: "y"; type: "int" }
Property { name: "width"; type: "int" }
Property { name: "height"; type: "int" }
+ Property { name: "__maximumDimension"; type: "int"; isReadonly: true }
Signal { name: "visibilityChanged" }
Signal { name: "geometryChanged" }
Signal { name: "accepted" }
@@ -140,6 +142,7 @@ Module {
Property { name: "selectedNameFilterIndex"; type: "int" }
Property { name: "fileUrl"; type: "QUrl"; isReadonly: true }
Property { name: "fileUrls"; type: "QList<QUrl>"; isReadonly: true }
+ Property { name: "sidebarVisible"; type: "bool" }
Signal { name: "filterSelected" }
Signal { name: "fileModeChanged" }
Signal { name: "selectionAccepted" }
@@ -179,6 +182,10 @@ Module {
name: "setSelectedNameFilterIndex"
Parameter { name: "idx"; type: "int" }
}
+ Method {
+ name: "setSidebarVisible"
+ Parameter { name: "s"; type: "bool" }
+ }
}
Component {
name: "QQuickAbstractFontDialog"
diff --git a/src/widgets/qquickqfiledialog.cpp b/src/widgets/qquickqfiledialog.cpp
index 90d1ef9e..7ebebf1f 100644
--- a/src/widgets/qquickqfiledialog.cpp
+++ b/src/widgets/qquickqfiledialog.cpp
@@ -209,6 +209,7 @@ void QFileDialogHelper::fileSelected(const QString& path)
void QFileDialogHelper::filesSelected(const QStringList& paths)
{
QList<QUrl> pathUrls;
+ pathUrls.reserve(paths.count());
foreach (const QString &path, paths)
pathUrls << QUrl::fromLocalFile(path);
emit QPlatformFileDialogHelper::filesSelected(pathUrls);
diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro
index 53208380..2e3c8164 100644
--- a/src/widgets/widgets.pro
+++ b/src/widgets/widgets.pro
@@ -1,3 +1,5 @@
+requires(contains(QT_CONFIG, accessibility))
+
CXX_MODULE = qml
TARGET = widgetsplugin
TARGETPATH = QtQuick/PrivateWidgets
diff --git a/sync.profile b/sync.profile
index 1ae99a70..686e079c 100644
--- a/sync.profile
+++ b/sync.profile
@@ -13,4 +13,5 @@
"qtbase" => "",
"qtdeclarative" => "",
"qtxmlpatterns" => "",
+ "qtgraphicaleffects" => ""
);
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 14ac7714..6b55a179 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,5 +1,5 @@
TEMPLATE = subdirs
SUBDIRS += testplugin controls activeFocusOnTab applicationwindow dialogs \
- extras paint qquicktreemodeladaptor customcontrolsstyle
+ extras qquicktreemodeladaptor customcontrolsstyle
!osx: SUBDIRS += menubar
controls.depends = testplugin
diff --git a/tests/auto/controls/data/tableview/table_buttondelegate.qml b/tests/auto/controls/data/tableview/table_buttondelegate.qml
index 3f1be964..3c347b36 100644
--- a/tests/auto/controls/data/tableview/table_buttondelegate.qml
+++ b/tests/auto/controls/data/tableview/table_buttondelegate.qml
@@ -55,15 +55,16 @@ TableView {
onClicked: ++clickCount
TableViewColumn {
+ id: column
width: 100
}
rowDelegate: Item {
height: 40
- width: parent.width
+ width: column.width
}
itemDelegate: Button {
height: 40
- width: parent.width
+ width: column.width
text: styleData.value
activeFocusOnPress: true
onClicked: ++table.buttonClickCount
diff --git a/tests/auto/controls/data/textarea/ta_editingfinished.qml b/tests/auto/controls/data/textarea/ta_editingfinished.qml
new file mode 100644
index 00000000..5d4cba2d
--- /dev/null
+++ b/tests/auto/controls/data/textarea/ta_editingfinished.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 1.5
+
+Row {
+ width: 100
+ height: 50
+ spacing: 10
+
+ property alias control1: _control1
+ property alias control2: _control2
+ TextArea {
+ id: _control1
+ text: 'A'
+ property bool myeditingfinished: false
+ onEditingFinished: myeditingfinished = true
+ }
+ TextArea {
+ id: _control2
+ text: 'B'
+ property bool myeditingfinished: false
+ onEditingFinished: myeditingfinished = true
+ }
+}
diff --git a/tests/auto/controls/data/tst_baselines.qml b/tests/auto/controls/data/tst_baselines.qml
index 85b4cab3..091fe7cb 100644
--- a/tests/auto/controls/data/tst_baselines.qml
+++ b/tests/auto/controls/data/tst_baselines.qml
@@ -65,6 +65,7 @@ Item {
function test_baselineOffset(data)
{
+ skip("Started to fail on Ubuntu 10.04 around 22/07/2015. To be fixed as soon as we can check on the VM.")
var item = Qt.createQmlObject('import QtQuick 2.1;import QtQuick.Controls 1.1;' + data.controlSpec,
container, '')
waitForRendering(item)
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index cecc3928..7db9a75e 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -774,5 +774,19 @@ TestCase {
compare(comboBox.currentText, "Pomegranate")
comboBox.destroy()
}
+
+ function test_qtBug44532() {
+ if (Qt.platform.os === "osx")
+ skip("When the menu pops up on OS X, it does not return and the test fails after time out")
+ var comboBox = Qt.createQmlObject('import QtQuick.Controls 1.2 ; ComboBox { model: ["A", "BB", "CCCCC"] }', container, '')
+ var popup = comboBox.__popup
+ verify(popup)
+ tryCompare(popup, "__popupVisible", false)
+ mouseClick(comboBox)
+ tryCompare(popup, "__popupVisible", true)
+ mouseClick(comboBox)
+ tryCompare(popup, "__popupVisible", false)
+ comboBox.destroy()
+ }
}
}
diff --git a/tests/auto/controls/data/tst_gridlayout.qml b/tests/auto/controls/data/tst_gridlayout.qml
index 2c931a7b..b6bbd7d9 100644
--- a/tests/auto/controls/data/tst_gridlayout.qml
+++ b/tests/auto/controls/data/tst_gridlayout.qml
@@ -908,9 +908,9 @@ Item {
for (var i = 0; i < 2; ++i)
compare(visualGeom[i] % 1, 0)
- // verify that x,y is is inside idealGeom
- verify(visualGeom[0] >= idealGeom[0])
- verify(visualGeom[1] >= idealGeom[1])
+ // verify that x,y is no more than one pixel from idealGeom
+ fuzzyCompare(visualGeom[0], idealGeom[0], 1)
+ fuzzyCompare(visualGeom[1], idealGeom[1], 1)
// verify that the visual size is no more than 1 pixel taller/wider than the ideal size.
verify(visualGeom[2] <= idealGeom[2] + 1)
diff --git a/tests/auto/controls/data/tst_menu.qml b/tests/auto/controls/data/tst_menu.qml
index 83411bcf..94661ed4 100644
--- a/tests/auto/controls/data/tst_menu.qml
+++ b/tests/auto/controls/data/tst_menu.qml
@@ -236,7 +236,7 @@ TestCase {
function test_popupSignals() {
if (Qt.platform.os === "osx") {
// On Mac the popup() function blocks. The signals are still
- // emitted by the QPA plugin and the relayed by QQuickMenu.
+ // emitted by the QPA plugin and the relayed by QQuickMenu1.
return;
}
menu.__popup(Qt.rect(50, 50, 20, 20))
diff --git a/tests/auto/controls/data/tst_menubar.qml b/tests/auto/controls/data/tst_menubar.qml
index bf6371e0..44238e21 100644
--- a/tests/auto/controls/data/tst_menubar.qml
+++ b/tests/auto/controls/data/tst_menubar.qml
@@ -39,6 +39,7 @@
****************************************************************************/
import QtQuick 2.2
+import QtQuick.Controls 1.4
import QtTest 1.0
TestCase {
@@ -48,8 +49,58 @@ TestCase {
width:400
height:400
+ Component {
+ id: windowComponent
+ ApplicationWindow {
+ width: 300; height: 300
+ visible: true
+ menuBar: MenuBar {
+ Menu {
+ title: "&File"; objectName: "fileMenu"
+ Menu {
+ title: "&Recent Files"; objectName: "recentFilesSubMenu"
+ MenuItem { text: "RecentFile1"; objectName: "recentFile1MenuItem" }
+ MenuItem { text: "RecentFile2"; objectName: "recentFile2MenuItem" }
+ }
+ MenuItem { text: "&Save"; objectName: "saveMenuItem" }
+ MenuItem { text: "&Load"; objectName: "loadMenuItem" }
+ MenuItem { text: "&Exit"; objectName: "exitMenuItem" }
+ }
+ Menu {
+ title: "&Edit"; objectName: "editMenu"
+ Menu {
+ title: "&Advanced"; objectName: "advancedSubMenu"
+ MenuItem { text: "advancedOption1"; objectName: "advancedOption1MenuItem" }
+ }
+ MenuItem { text: "&Preferences"; objectName: "preferencesMenuItem" }
+ }
+ }
+ }
+ }
+
function test_createMenuBar() {
var menuBar = Qt.createQmlObject('import QtQuick.Controls 1.2; MenuBar {}', testCase, '');
menuBar.destroy()
}
+
+
+ function test_qtBug47295()
+ {
+ if (Qt.platform.os === "osx")
+ skip("MenuBar cannot be reliably tested on OS X")
+
+ var window = windowComponent.createObject()
+ waitForRendering(window.contentItem)
+ var fileMenu = findChild(window, "fileMenu")
+ verify(fileMenu)
+ tryCompare(fileMenu, "__popupVisible", false)
+ mousePress(fileMenu.__visualItem)
+ wait(200);
+ tryCompare(fileMenu, "__popupVisible", true)
+ mouseMove(fileMenu.__contentItem, 0, -10)
+ wait(200)
+ mouseRelease(fileMenu.__contentItem, 0, -10)
+ tryCompare(fileMenu, "__popupVisible", true)
+ wait(200)
+ }
}
diff --git a/tests/auto/controls/data/tst_rowlayout.qml b/tests/auto/controls/data/tst_rowlayout.qml
index 286200d1..a0a6b739 100644
--- a/tests/auto/controls/data/tst_rowlayout.qml
+++ b/tests/auto/controls/data/tst_rowlayout.qml
@@ -675,6 +675,94 @@ Item {
layout.destroy();
}
+ Component {
+ id: test_distributeToPixelGrid_Component
+ RowLayout {
+ spacing: 0
+ Rectangle {
+ color: 'red'
+ Layout.minimumWidth: 10
+ Layout.preferredWidth: 50
+ Layout.maximumWidth: 90
+ Layout.fillWidth: true
+ implicitHeight: 10
+ }
+ Rectangle {
+ color: 'red'
+ Layout.minimumWidth: 10
+ Layout.preferredWidth: 20
+ Layout.maximumWidth: 90
+ Layout.fillWidth: true
+ implicitHeight: 10
+ }
+ Rectangle {
+ color: 'red'
+ Layout.minimumWidth: 10
+ Layout.preferredWidth: 70
+ Layout.maximumWidth: 90
+ Layout.fillWidth: true
+ implicitHeight: 10
+ }
+ }
+ }
+
+ function test_distributeToPixelGrid_data() {
+ return [
+ { tag: "narrow", spacing: 0, width: 60 },
+ { tag: "belowPreferred", spacing: 0, width: 130 },
+ { tag: "belowPreferredWithSpacing", spacing: 10, width: 130 },
+ { tag: "abovePreferred", spacing: 0, width: 150 },
+ { tag: "stretchSomethingToMaximum", spacing: 0, width: 240,
+ expected: [90, 60, 90] },
+ { tag: "minSizeHasFractions", spacing: 2, width: 31 + 4, hints: [{min: 10+1/3}, {min: 10+1/3}, {min: 10+1/3}],
+ /*expected: [11, 11, 11]*/ }, /* verify that nothing gets allocated a size smaller than its minimum */
+ { tag: "maxSizeHasFractions", spacing: 2, width: 271 + 4, hints: [{max: 90+1/3}, {max: 90+1/3}, {max: 90+1/3}],
+ /*expected: [90, 90, 90]*/ }, /* verify that nothing gets allocated a size larger than its maximum */
+ { tag: "fixedSizeHasFractions", spacing: 2, width: 31 + 4, hints: [{min: 10+1/3, max: 10+1/3}, {min: 10+1/3, max: 10+1/3}, {min: 10+1/3, max: 10+1/3}],
+ /*expected: [11, 11, 11]*/ }, /* verify that nothing gets allocated a size smaller than its minimum */
+ ];
+ }
+
+ function test_distributeToPixelGrid(data)
+ {
+ // CONFIGURATION
+ var layout = test_distributeToPixelGrid_Component.createObject(container)
+ layout.spacing = data.spacing
+ layout.width = data.width
+ layout.height = 10
+ var kids = layout.children
+
+ if (data.hasOwnProperty('hints')) {
+ var hints = data.hints
+ for (var i = 0; i < hints.length; ++i) {
+ var h = hints[i]
+ if (h.hasOwnProperty('min'))
+ kids[i].Layout.minimumWidth = h.min
+ if (h.hasOwnProperty('pref'))
+ kids[i].Layout.preferredWidth = h.pref
+ if (h.hasOwnProperty('max'))
+ kids[i].Layout.maximumWidth = h.max
+ }
+ }
+ waitForRendering(layout)
+
+ var sum = 2 * layout.spacing
+ // TEST
+ for (var i = 0; i < kids.length; ++i) {
+ compare(kids[i].x % 1, 0) // checks if position is a whole integer
+ // verify if the items are within the size constraints as specified
+ verify(kids[i].width >= kids[i].Layout.minimumWidth)
+ verify(kids[i].width <= kids[i].Layout.maximumWidth)
+ if (data.hasOwnProperty('expected'))
+ compare(kids[i].width, data.expected[i])
+ sum += kids[i].width
+ }
+ fuzzyCompare(sum, layout.width, 1)
+
+ layout.destroy();
+ }
+
+
Component {
id: layout_deleteLayout
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml
index 1589f2ab..83ba299e 100644
--- a/tests/auto/controls/data/tst_slider.qml
+++ b/tests/auto/controls/data/tst_slider.qml
@@ -280,6 +280,8 @@ Item {
}
function test_sliderOffset() {
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var control = Qt.createQmlObject('import QtQuick.Controls 1.2; Slider {x: 20; y: 20; width: 100; height: 50}', container, '')
// Don't move slider value if mouse is inside handle regtion
mouseMove(control, control.width/2, control.height/2)
@@ -309,6 +311,8 @@ Item {
}
function test_dragThreshold() {
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var control = Qt.createQmlObject('import QtQuick.Controls 1.2; Slider {x: 20; y: 20; width: 100; height: 50}', container, '')
var pt = { x: control.width/2, y: control.height/2 }
diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml
index a5da7b91..610aa452 100644
--- a/tests/auto/controls/data/tst_spinbox.qml
+++ b/tests/auto/controls/data/tst_spinbox.qml
@@ -39,6 +39,7 @@
****************************************************************************/
import QtQuick 2.2
+import QtQuick.Controls.Private 1.0
import QtTest 1.0
Item {
@@ -367,6 +368,8 @@ Item {
}
function test_get_active_focus_when_up_or_down_was_pressed(){
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var test_control = 'import QtQuick 2.2; \
import QtQuick.Controls 1.2; \
Column { \
diff --git a/tests/auto/controls/data/tst_stacklayout.qml b/tests/auto/controls/data/tst_stacklayout.qml
new file mode 100644
index 00000000..ba468a24
--- /dev/null
+++ b/tests/auto/controls/data/tst_stacklayout.qml
@@ -0,0 +1,448 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.2
+import QtTest 1.0
+import QtQuick.Layouts 1.3
+
+Item {
+ id: container
+ width: 200
+ height: 200
+ TestCase {
+ id: testCase
+ name: "Tests_StackLayout"
+ when: windowShown
+ width: 200
+ height: 200
+
+ function geometry(item) {
+ return [item.x, item.y, item.width, item.height]
+ }
+
+ Component {
+ id: countGeometryChanges_Component
+ StackLayout {
+ id: stack
+ property alias col: _col
+ property alias row: _row
+ width: 100
+ ColumnLayout {
+ id: _col
+ property alias r1: _r1
+ property alias r2: _r2
+ property alias r3: _r3
+ spacing: 0
+ property int counter : 0
+ onWidthChanged: { ++counter; }
+ Rectangle {
+ id: _r1
+ implicitWidth: 20
+ implicitHeight: 20
+ Layout.fillWidth: true
+ property int counter : 0
+ onWidthChanged: { ++counter; }
+ }
+ Rectangle {
+ id: _r2
+ implicitWidth: 50
+ implicitHeight: 50
+ Layout.fillWidth: true
+ property int counter : 0
+ onWidthChanged: { ++counter; }
+ }
+ Rectangle {
+ id: _r3
+ implicitWidth: 40
+ implicitHeight: 40
+ Layout.fillWidth: true
+ property int counter : 0
+ onWidthChanged: { ++counter; }
+ }
+ }
+ RowLayout {
+ id: _row
+ property alias r5: _r5
+ spacing: 0
+ property int counter : 0
+ onWidthChanged: { ++counter; }
+ Rectangle {
+ id: _r5
+ implicitWidth: 100
+ implicitHeight: 100
+ Layout.fillWidth: true
+ property int counter : 0
+ onWidthChanged: { ++counter; }
+ }
+ }
+ }
+ }
+
+ function test_countGeometryChanges() {
+
+ var stack = countGeometryChanges_Component.createObject(container)
+ compare(stack.currentIndex, 0)
+ compare(stack.col.width, 100)
+ compare(stack.col.height, 110)
+ compare(stack.row.width, 100)
+ compare(stack.row.height, 100)
+ verify(stack.col.r1.counter <= 2)
+ compare(stack.col.r2.counter, 1)
+ verify(stack.col.r3.counter <= 2)
+ verify(stack.col.counter <= 2)
+ compare(stack.row.counter, 1) // not visible, will only receive the initial geometry change
+ compare(stack.row.r5.counter, 0)
+ stack.destroy()
+ }
+
+ Component {
+ id: layoutItem_Component
+ Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+ }
+ }
+
+ Component {
+ id: emtpy_StackLayout_Component
+ StackLayout {
+ property int num_onCountChanged: 0
+ property int num_onCurrentIndexChanged: 0
+ onCountChanged: { ++num_onCountChanged; }
+ onCurrentIndexChanged: { ++num_onCurrentIndexChanged; }
+ }
+ }
+
+ function test_addAndRemoveItems()
+ {
+ var stack = emtpy_StackLayout_Component.createObject(container)
+ stack.currentIndex = 2
+ compare(stack.implicitWidth, 0)
+ compare(stack.implicitHeight, 0)
+
+ var rect0 = layoutItem_Component.createObject(stack)
+ compare(stack.implicitWidth, 20)
+ compare(stack.implicitHeight, 20)
+ compare(rect0.visible, false)
+
+ var rect1 = layoutItem_Component.createObject(stack)
+ rect1.Layout.preferredWidth = 30
+ rect1.Layout.preferredHeight = 10
+ compare(stack.implicitWidth, 30)
+ compare(stack.implicitHeight, 20)
+ compare(rect0.visible, false)
+ compare(rect1.visible, false)
+
+ var rect2 = layoutItem_Component.createObject(stack)
+ rect2.x = 42 // ### items in a stacklayout will have their x and y positions discarded.
+ rect2.y = 42
+ rect2.Layout.preferredWidth = 80
+ rect2.Layout.preferredHeight = 30
+ rect2.Layout.fillWidth = true
+ compare(stack.implicitWidth, 80)
+ compare(stack.implicitHeight, 30)
+ compare(rect0.visible, false)
+ compare(rect1.visible, false)
+ compare(rect2.visible, true)
+ compare(geometry(rect2), geometry(stack))
+
+ rect2.destroy()
+ wait(0) // this will hopefully effectuate the destruction of the object
+ compare(stack.implicitWidth, 30)
+ compare(stack.implicitHeight, 20)
+
+ rect0.destroy()
+ wait(0)
+ compare(stack.implicitWidth, 30)
+ compare(stack.implicitHeight, 10)
+
+ rect1.destroy()
+ wait(0)
+ compare(stack.implicitWidth, 0)
+ compare(stack.implicitHeight, 0)
+
+ stack.destroy()
+ }
+
+ function test_sizeHint_data() {
+ return [
+ { tag: "propagateNone", layoutHints: [10, 20, 30], childHints: [11, 21, 31], expected:[10, 20, Number.POSITIVE_INFINITY]},
+ { tag: "propagateMinimumWidth", layoutHints: [-1, 20, 30], childHints: [10, 21, 31], expected:[10, 20, Number.POSITIVE_INFINITY]},
+ { tag: "propagatePreferredWidth", layoutHints: [10, -1, 30], childHints: [11, 20, 31], expected:[10, 20, Number.POSITIVE_INFINITY]},
+ { tag: "propagateMaximumWidth", layoutHints: [10, 20, -1], childHints: [11, 21, 30], expected:[10, 20, Number.POSITIVE_INFINITY]},
+ { tag: "propagateAll", layoutHints: [-1, -1, -1], childHints: [10, 20, 30], expected:[10, 20, Number.POSITIVE_INFINITY]},
+ { tag: "propagateCrazy", layoutHints: [-1, -1, -1], childHints: [40, 21, 30], expected:[30, 30, Number.POSITIVE_INFINITY]},
+ { tag: "expandMinToExplicitPref", layoutHints: [-1, 1, -1], childHints: [11, 21, 31], expected:[ 1, 1, Number.POSITIVE_INFINITY]},
+ { tag: "expandMaxToExplicitPref", layoutHints: [-1, 99, -1], childHints: [11, 21, 31], expected:[11, 99, Number.POSITIVE_INFINITY]},
+ { tag: "expandAllToExplicitMin", layoutHints: [99, -1, -1], childHints: [11, 21, 31], expected:[99, 99, Number.POSITIVE_INFINITY]},
+ { tag: "expandPrefToExplicitMin", layoutHints: [24, -1, -1], childHints: [11, 21, 31], expected:[24, 24, Number.POSITIVE_INFINITY]},
+ { tag: "boundPrefToExplicitMax", layoutHints: [-1, -1, 19], childHints: [11, 21, 31], expected:[11, 19, Number.POSITIVE_INFINITY]},
+ { tag: "boundAllToExplicitMax", layoutHints: [-1, -1, 9], childHints: [11, 21, 31], expected:[ 9, 9, Number.POSITIVE_INFINITY]},
+ ];
+ }
+
+ function itemSizeHints(item) {
+ return [item.Layout.minimumWidth, item.implicitWidth, item.Layout.maximumWidth]
+ }
+ Component {
+ id: stacklayout_sizeHint_Component
+ StackLayout {
+ property int implicitWidthChangedCount : 0
+ onImplicitWidthChanged: { ++implicitWidthChangedCount }
+ ColumnLayout {
+ Rectangle {
+ id: r1
+ color: "red"
+ Layout.minimumWidth: 1
+ Layout.preferredWidth: 2
+ Layout.maximumWidth: 3
+
+ Layout.minimumHeight: 20
+ Layout.preferredHeight: 20
+ Layout.maximumHeight: 20
+ Layout.fillWidth: true
+ }
+ }
+ }
+ }
+
+ function test_sizeHint(data) {
+ var layout = stacklayout_sizeHint_Component.createObject(container)
+
+ var col = layout.children[0]
+ col.Layout.minimumWidth = data.layoutHints[0]
+ col.Layout.preferredWidth = data.layoutHints[1]
+ col.Layout.maximumWidth = data.layoutHints[2]
+
+ var child = col.children[0]
+ if (data.implicitWidth !== undefined) {
+ child.implicitWidth = data.implicitWidth
+ }
+ child.Layout.minimumWidth = data.childHints[0]
+ child.Layout.preferredWidth = data.childHints[1]
+ child.Layout.maximumWidth = data.childHints[2]
+
+ var effectiveSizeHintResult = [layout.Layout.minimumWidth, layout.implicitWidth, layout.Layout.maximumWidth]
+ compare(effectiveSizeHintResult, data.expected)
+ layout.destroy()
+ }
+
+ Component {
+ id: stacklayout_addIgnoredItem_Component
+ StackLayout {
+ Repeater {
+ id: rep
+ model: 1
+ Rectangle {
+ id: r
+ }
+ }
+ }
+ }
+
+ // Items with no size information is ignored.
+ function test_addIgnoredItem()
+ {
+ var stack = stacklayout_addIgnoredItem_Component.createObject(container)
+ compare(stack.count, 1)
+ compare(stack.implicitWidth, 0)
+ compare(stack.implicitHeight, 0)
+ var r = stack.children[0]
+ r.Layout.preferredWidth = 20
+ r.Layout.preferredHeight = 30
+ compare(stack.count, 1)
+ compare(stack.implicitWidth, 20)
+ compare(stack.implicitHeight, 30)
+ stack.destroy();
+ }
+
+ function test_dontCrashWhenAnchoredToAWindow() {
+ var test_layoutStr =
+ 'import QtQuick 2.2; \
+ import QtQuick.Window 2.1; \
+ import QtQuick.Layouts 1.3; \
+ Window { \
+ visible: true; \
+ width: stack.implicitWidth; \
+ height: stack.implicitHeight; \
+ StackLayout { \
+ id: stack; \
+ currentIndex: 0; \
+ anchors.fill: parent; \
+ Rectangle { \
+ color: "red"; \
+ implicitWidth: 300; \
+ implicitHeight: 200; \
+ } \
+ } \
+ } '
+
+ var lay = Qt.createQmlObject(test_layoutStr, container, '');
+ tryCompare(lay, 'width', 300);
+ lay.destroy()
+ }
+
+ Component {
+ id: test_dontCrashWhenChildIsResizedToNull_Component
+ StackLayout {
+ property alias rect : _rect
+ Rectangle {
+ id: _rect;
+ color: "red"
+ implicitWidth: 200
+ implicitHeight: 200
+ }
+ }
+ }
+
+ function test_dontCrashWhenChildIsResizedToNull() {
+ var layout = test_dontCrashWhenChildIsResizedToNull_Component.createObject(container)
+ layout.rect.width = 0
+ layout.width = 222 // trigger a rearrange with a valid size
+ layout.height = 222
+ }
+
+ Component {
+ id: test_currentIndex_Component
+ StackLayout {
+ currentIndex: 1
+ Text {
+ text: "0"
+ }
+ Text {
+ text: "1"
+ }
+ }
+ }
+
+ function test_currentIndex() {
+ var layout = test_currentIndex_Component.createObject(container)
+ var c0 = layout.children[0]
+ var c1 = layout.children[1]
+ compare(layout.currentIndex, 1)
+ tryCompare(layout, 'visible', true)
+ compare(c0.visible, false)
+ compare(c1.visible, true)
+ layout.currentIndex = 0
+ compare(c0.visible, true)
+ compare(c1.visible, false)
+ var c2 = layoutItem_Component.createObject(layout)
+ compare(c2.visible, false)
+
+ /*
+ * destroy the current item and check if visibility advances to next
+ */
+ c0.destroy()
+ tryCompare(c1, 'visible', true)
+ compare(c2.visible, false)
+ c1.destroy()
+ tryCompare(c2, 'visible', true)
+ c2.destroy()
+ tryCompare(layout, 'currentIndex', 0)
+
+ layout.destroy()
+
+ /*
+ * Test the default/implicit value of currentIndex, either -1 (if empty) or 0:
+ */
+ layout = emtpy_StackLayout_Component.createObject(container)
+ tryCompare(layout, 'visible', true)
+ compare(layout.currentIndex, -1)
+ compare(layout.num_onCurrentIndexChanged, 0)
+ // make it non-empty
+ c0 = layoutItem_Component.createObject(layout)
+ compare(layout.currentIndex, 0)
+ compare(layout.num_onCurrentIndexChanged, 1)
+ compare(c0.visible, true)
+ // make it empty again
+ c0.destroy()
+ wait(0)
+ compare(layout.currentIndex, -1)
+ //tryCompare(layout, 'currentIndex', -1)
+ compare(layout.num_onCurrentIndexChanged, 2)
+
+ /*
+ * Check that explicit value doesn't change,
+ * and that no items are visible if the index is invalid/out of range
+ */
+ layout.currentIndex = 2
+ compare(layout.currentIndex, 2)
+ compare(layout.num_onCurrentIndexChanged, 3)
+ c0 = layoutItem_Component.createObject(layout)
+ compare(layout.currentIndex, 2)
+ compare(c0.visible, false)
+
+ c1 = layoutItem_Component.createObject(layout)
+ compare(layout.currentIndex, 2)
+ compare(c0.visible, false)
+ compare(c1.visible, false)
+
+ c2 = layoutItem_Component.createObject(layout)
+ compare(layout.currentIndex, 2)
+ compare(c0.visible, false)
+ compare(c1.visible, false)
+ compare(c2.visible, true)
+
+ c2.destroy()
+ wait(0)
+ compare(layout.currentIndex, 2)
+ compare(c0.visible, false)
+ compare(c1.visible, false)
+ c1.destroy()
+ wait(0)
+ compare(layout.currentIndex, 2)
+ compare(c0.visible, false)
+ c0.destroy()
+ wait(0)
+ compare(layout.currentIndex, 2)
+ compare(layout.num_onCurrentIndexChanged, 3)
+ }
+
+ function test_count() {
+ var layout = emtpy_StackLayout_Component.createObject(container)
+ tryCompare(layout, 'visible', true)
+ compare(layout.count, 0)
+ compare(layout.currentIndex, -1)
+ compare(layout.num_onCountChanged, 0)
+ compare(layout.num_onCurrentIndexChanged, 0)
+ var c0 = layoutItem_Component.createObject(layout)
+ compare(layout.count, 1)
+ compare(layout.currentIndex, 0)
+ compare(layout.num_onCurrentIndexChanged, 1)
+ compare(layout.num_onCountChanged, 1)
+ }
+ }
+}
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index a01df56f..8a821661 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -91,7 +91,10 @@ TestCase {
model: 10; \n\
}', testCase, '')
wait(50);
- verify(table.__viewTopMargin > 0)
+ testCase.visible = true // ### FIXME Why do I need this at all?
+ verify(table.visible)
+ verify(table.__listView.headerItem.visible)
+ verify(table.__listView.headerItem.height > 0)
table.destroy()
}
diff --git a/tests/auto/controls/data/tst_textarea.qml b/tests/auto/controls/data/tst_textarea.qml
index b7043845..e8f76c85 100644
--- a/tests/auto/controls/data/tst_textarea.qml
+++ b/tests/auto/controls/data/tst_textarea.qml
@@ -156,6 +156,36 @@ TestCase {
control.destroy()
}
+ function test_editingFinished() {
+ var component = Qt.createComponent("textarea/ta_editingfinished.qml")
+ compare(component.status, Component.Ready)
+ var test = component.createObject(container);
+ verify(test !== null, "test control created is null")
+ var control1 = test.control1
+ verify(control1 !== null)
+ var control2 = test.control2
+ verify(control2 !== null)
+
+ control1.forceActiveFocus()
+ verify(control1.activeFocus)
+ verify(!control2.activeFocus)
+
+ verify(control1.myeditingfinished === false)
+ verify(control2.myeditingfinished === false)
+
+ keyPress(Qt.Key_Backtab)
+ verify(!control1.activeFocus)
+ verify(control2.activeFocus)
+ verify(control1.myeditingfinished === true)
+
+ keyPress(Qt.Key_Backtab)
+ verify(control1.activeFocus)
+ verify(!control2.activeFocus)
+ verify(control2.myeditingfinished === true)
+
+ test.destroy()
+ }
+
function test_keys() {
var component = Qt.createComponent("textarea/ta_keys.qml")
compare(component.status, Component.Ready)
diff --git a/tests/auto/controls/data/tst_treeview.qml b/tests/auto/controls/data/tst_treeview.qml
index 33e64e65..d144b9c1 100644
--- a/tests/auto/controls/data/tst_treeview.qml
+++ b/tests/auto/controls/data/tst_treeview.qml
@@ -41,6 +41,7 @@
import QtQuick 2.4
import QtTest 1.0
import QtQuick.Controls 1.4
+import QtQuick.Controls.Private 1.0
import QtQuickControlsTests 1.0
Item {
@@ -103,6 +104,8 @@ Item {
function test_clicked_signals()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -152,6 +155,8 @@ Item {
function test_headerHidden()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -175,6 +180,8 @@ Item {
function test_expand_collapse()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -239,6 +246,8 @@ Item {
function test_pressAndHold()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -263,6 +272,8 @@ Item {
function test_keys_navigation()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_2.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -317,6 +328,8 @@ Item {
function test_selection_singleSelection()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -442,6 +455,8 @@ Item {
function test_selection_multiSelection()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -551,6 +566,8 @@ Item {
function test_selection_extendedSelection()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -637,6 +654,8 @@ Item {
function test_selection_contiguousSelection()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -732,6 +751,8 @@ Item {
}
function test_indexAt() {
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -747,8 +768,8 @@ Item {
if (treeIndex.row !== modelIndex.row
|| treeIndex.column !== modelIndex.column
|| treeIndex.internalId !== modelIndex.internalId) {
- console.log("Test about to fail: row = " + row + ", __listView.count =" + __listView.count)
- console.log(" . . . . . . . . . x =" + x + ", getColumn(0).width =" + getColumn(0).width)
+ console.log("Test about to fail: row = " + row + ", __listView.count =" + tree.__listView.count)
+ console.log(" . . . . . . . . . x =" + x + ", getColumn(0).width =" + tree.getColumn(0).width)
}
compare(treeIndex.row, modelIndex.row)
compare(treeIndex.column, modelIndex.column)
@@ -800,6 +821,8 @@ Item {
function test_QTBUG_46891_selection_collapse_parent()
{
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
diff --git a/tests/auto/extras/data/tst_circulartickmarklabel.qml b/tests/auto/extras/data/tst_circulartickmarklabel.qml
index 2d1841e0..60d7ff9e 100644
--- a/tests/auto/extras/data/tst_circulartickmarklabel.qml
+++ b/tests/auto/extras/data/tst_circulartickmarklabel.qml
@@ -314,6 +314,15 @@ TestCase {
compare(label.__panel.tickmarkValueFromMinorIndex(((label.tickmarkCount - 1) * label.minorTickmarkCount) - 1), 98);
}
+ function test_labelText() {
+ for (var i = 0; i < label.labelCount; ++i) {
+ var labelDelegateLoader = findChild(label, "labelDelegateLoader" + i);
+ verify(labelDelegateLoader);
+ compare(labelDelegateLoader.styleData.index, i);
+ compare(labelDelegateLoader.styleData.value, i * label.labelStepSize);
+ }
+ }
+
function test_invalidValues() {
// Shouldn't produce warnings.
label.labelStepSize = 0;
diff --git a/tests/auto/extras/data/tst_delaybutton.qml b/tests/auto/extras/data/tst_delaybutton.qml
index ee95a09a..6c86ece4 100644
--- a/tests/auto/extras/data/tst_delaybutton.qml
+++ b/tests/auto/extras/data/tst_delaybutton.qml
@@ -55,8 +55,7 @@ TestCase {
verify(button.__style)
verify(!button.checked)
verify(!button.pressed)
- // QTBUG-44664
-// button.destroy()
+ button.destroy()
}
SignalSpy {
@@ -94,8 +93,7 @@ TestCase {
verify(!button.pressed)
compare(activationSpy.count, 1)
- // QTBUG-44664
-// button.destroy()
+ button.destroy()
}
SignalSpy {
@@ -115,8 +113,7 @@ TestCase {
tryCompare(button, "progress", 1.0)
verify(progressSpy.count > 0)
- // QTBUG-44664
-// button.destroy()
+ button.destroy()
}
SignalSpy {
@@ -171,8 +168,7 @@ TestCase {
verify(!button.checked)
compare(checkSpy.count, checkCount)
- // QTBUG-44664
-// button.destroy()
+ button.destroy()
}
function test_programmaticCheck() {
@@ -189,8 +185,7 @@ TestCase {
button.checked = false;
compare(button.progress, 0);
- // QTBUG-44664
-// button.destroy();
+ button.destroy();
}
function test_largeText() {
@@ -198,7 +193,6 @@ TestCase {
var button = Qt.createQmlObject("import QtQuick.Extras 1.4; DelayButton { "
+ "anchors.centerIn: parent; text: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' }", testcase, "");
verify(button, "DelayButton: failed to create an instance");
- // QTBUG-44664
-// button.destroy();
+ button.destroy();
}
}
diff --git a/tests/auto/extras/data/tst_piemenu.qml b/tests/auto/extras/data/tst_piemenu.qml
index 12dbe223..d709f513 100644
--- a/tests/auto/extras/data/tst_piemenu.qml
+++ b/tests/auto/extras/data/tst_piemenu.qml
@@ -41,6 +41,7 @@
import QtTest 1.0
import QtQuick 2.1
import QtQuick.Controls 1.1
+import QtQuick.Controls.Private 1.0
import QtQuick.Extras 1.4
import QtQuick.Extras.Private 1.0
import QtQuick.Extras.Private.CppUtils 1.0
@@ -354,6 +355,8 @@ Item {
}
function test_selectionAngle(data) {
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var pieMenuComponent = Qt.createComponent("PieMenu3Items.qml");
tryCompare(pieMenuComponent, "status", Component.Ready);
root = pieMenuComponent.createObject(container);
@@ -505,6 +508,8 @@ Item {
}
function test_hideItem(data) {
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var pieMenuComponent = Qt.createComponent("PieMenu3Items.qml");
tryCompare(pieMenuComponent, "status", Component.Ready);
root = pieMenuComponent.createObject(container);
@@ -605,6 +610,8 @@ Item {
}
function test_selectionItemOnMouseMove_QTRD3024() {
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
// Check when an item is hovered by the mouse, it gets made current
// as expected and the current item is cleared when the mouse moves outside the menu
var pieMenuComponent = Qt.createComponent("PieMenu3Items.qml");
@@ -676,6 +683,8 @@ Item {
function test_QTRD3027() {
// Check that an item's selection is cleared when the mouse moves outside
// its boundaries without changing the selectionAngle
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var pieMenuComponent = Qt.createComponent("PieMenu3Items.qml");
tryCompare(pieMenuComponent, "status", Component.Ready);
root = pieMenuComponent.createObject(container);
@@ -702,6 +711,8 @@ Item {
}
function test_rotatedBoundingItem() {
+ if (Settings.hasTouchScreen)
+ skip("Fails with touch screens");
var pieMenuComponent = Qt.createComponent("PieMenuRotatedBoundingItem.qml");
tryCompare(pieMenuComponent, "status", Component.Ready);
root = pieMenuComponent.createObject(container);
diff --git a/tests/auto/extras/data/tst_tumbler.qml b/tests/auto/extras/data/tst_tumbler.qml
index 9f3ecc2f..c0c20532 100644
--- a/tests/auto/extras/data/tst_tumbler.qml
+++ b/tests/auto/extras/data/tst_tumbler.qml
@@ -150,6 +150,12 @@ Item {
tumbler.setCurrentIndexAt(0, 1);
tryCompare(tumbler.__viewAt(0), "offset", 4);
compare(tumbler.currentIndexAt(0), 1);
+
+ tumbler.setCurrentIndexAt(0, 0);
+ waitForRendering(tumbler);
+ tumbler.setCurrentIndexAt(0, tumbler.getColumn(0).model.count-1, 1000);
+ tryCompare(tumbler.__viewAt(0), "offset", 1);
+ compare(tumbler.currentIndexAt(0), tumbler.getColumn(0).model.count-1);
}
function test_visible() {
diff --git a/tests/auto/extras/extras.pro b/tests/auto/extras/extras.pro
index 66ca9573..9845519d 100644
--- a/tests/auto/extras/extras.pro
+++ b/tests/auto/extras/extras.pro
@@ -2,7 +2,6 @@ TEMPLATE = app
TARGET = tst_extras
CONFIG += qmltestcase console
-CONFIG += insignificant_test # requires qtgraphicaleffects (QTBUG-35112)
SOURCES += $$PWD/tst_extras.cpp
diff --git a/tests/auto/paint/paint.pro b/tests/auto/paint/paint.pro
deleted file mode 100644
index 48ec8c02..00000000
--- a/tests/auto/paint/paint.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE = app
-TARGET = tst_paint
-QT += qml quick testlib
-CONFIG += testcase insignificant_test
-
-SOURCES += $$PWD/tst_paint.cpp
diff --git a/tests/auto/paint/tst_paint.cpp b/tests/auto/paint/tst_paint.cpp
deleted file mode 100644
index e7a99b09..00000000
--- a/tests/auto/paint/tst_paint.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest>
-#include <QtQml>
-#include <QtQuick>
-
-class tst_Paint : public QObject
-{
- Q_OBJECT
-
-private slots:
- void bounds_data();
- void bounds();
-};
-
-void tst_Paint::bounds_data()
-{
- QTest::addColumn<QString>("name");
-
- QTest::newRow("CircularGauge") << "CircularGauge";
- QTest::newRow("Dial") << "Dial";
- QTest::newRow("Gauge") << "Gauge";
- QTest::newRow("PieMenu") << "PieMenu";
- QTest::newRow("DelayButton") << "DelayButton";
- QTest::newRow("ToggleButton") << "ToggleButton";
- QTest::newRow("Tumbler") << "Tumbler";
-}
-
-void tst_Paint::bounds()
-{
- QFETCH(QString, name);
-
- QQmlEngine engine;
- QQmlComponent component(&engine);
- component.setData(QStringLiteral("import QtQuick.Extras 1.2; %1 { }").arg(name).toUtf8(), QUrl());
- QQuickItem *control = qobject_cast<QQuickItem*>(component.create());
- QVERIFY(control);
-
- const int w = control->width();
- const int h = control->height();
- QVERIFY(w > 0);
- QVERIFY(h > 0);
-
- static const int margin = 10;
- static const QColor bg = Qt::yellow;
-
- QQuickWindow window;
- window.setColor(bg);
- window.resize(w + 2 * margin, h + 2 * margin);
- control->setParentItem(window.contentItem());
- control->setPosition(QPoint(margin, margin));
- window.create();
- window.show();
-
- QTest::qWaitForWindowExposed(&window);
-
- const QRect bounds(margin, margin, w, h);
- const QImage image = window.grabWindow();
-
- for (int x = 0; x < image.width(); ++x) {
- for (int y = 0; y < image.height(); ++y) {
- if (!bounds.contains(x, y)) {
- const QByteArray msg = QString("painted outside bounds (%1,%2 %3x%4) at (%5,%6)").arg(bounds.x()).arg(bounds.y()).arg(bounds.width()).arg(bounds.height()).arg(x).arg(y).toUtf8();
- const QColor px = image.pixel(x, y);
- QVERIFY2(px == bg, msg);
- }
- }
- }
-}
-
-QTEST_MAIN(tst_Paint)
-
-#include "tst_paint.moc"
diff --git a/tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp b/tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp
index b484665d..13a92ea7 100644
--- a/tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp
+++ b/tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp
@@ -57,6 +57,8 @@ private slots:
void modelDestroyed();
void modelReset();
+ void rootIndex();
+
void dataAccess();
void dataChange();
void groupedDataChange();
@@ -96,9 +98,10 @@ void tst_QQuickTreeModelAdaptor::cleanup()
void tst_QQuickTreeModelAdaptor::compareData(int row, QQuickTreeModelAdaptor &tma, const QModelIndex &modelIdx, TestModel &model, bool expanded)
{
const QModelIndex &tmaIdx = tma.index(row);
+ const int indexDepth = model.level(modelIdx) - model.level(tma.rootIndex()) - 1;
QCOMPARE(tma.mapToModel(tmaIdx), modelIdx);
QCOMPARE(tma.data(tmaIdx, Qt::DisplayRole).toString(), model.displayData(modelIdx));
- QCOMPARE(tma.data(tmaIdx, QQuickTreeModelAdaptor::DepthRole).toInt(), model.level(modelIdx));
+ QCOMPARE(tma.data(tmaIdx, QQuickTreeModelAdaptor::DepthRole).toInt(), indexDepth);
QCOMPARE(tma.data(tmaIdx, QQuickTreeModelAdaptor::ExpandedRole).toBool(), expanded);
QCOMPARE(tma.data(tmaIdx, QQuickTreeModelAdaptor::HasChildrenRole).toBool(), model.hasChildren(modelIdx));
}
@@ -117,7 +120,7 @@ void tst_QQuickTreeModelAdaptor::expandAndTest(const QModelIndex &idx, QQuickTre
const QModelIndex &tmaIdx = tma.index(tma.itemIndex(idx));
QCOMPARE(tma.data(tmaIdx, QQuickTreeModelAdaptor::ExpandedRole).toBool(), expandable);
- if (expandable) {
+ if (expandable && expectedRowCountDifference != 0) {
// Rows were added below the parent
QCOMPARE(tma.rowCount(), oldRowCount + expectedRowCountDifference);
QCOMPARE(rowsAboutToBeInsertedSpy.count(), rowsInsertedSpy.count());
@@ -160,7 +163,7 @@ void tst_QQuickTreeModelAdaptor::collapseAndTest(const QModelIndex &idx, QQuickT
if (tmaIdx.isValid())
QCOMPARE(tma.data(tmaIdx, QQuickTreeModelAdaptor::ExpandedRole).toBool(), false);
- if (expandable) {
+ if (expandable && expectedRowCountDifference != 0) {
// Rows were removed below the parent
QCOMPARE(tma.rowCount(), oldRowCount - expectedRowCountDifference);
QCOMPARE(rowsAboutToBeRemovedSpy.count(), 1);
@@ -188,9 +191,9 @@ void tst_QQuickTreeModelAdaptor::collapseAndTest(const QModelIndex &idx, QQuickT
void tst_QQuickTreeModelAdaptor::compareModels(QQuickTreeModelAdaptor &tma, TestModel &model)
{
- QModelIndex parent;
+ QModelIndex parent = tma.rootIndex();
QStack<QModelIndex> parents;
- QModelIndex idx = model.index(0, 0);
+ QModelIndex idx = model.index(0, 0, parent);
int modelVisibleRows = model.rowCount(parent);
for (int i = 0; i < tma.rowCount(); i++) {
bool expanded = tma.isExpanded(i);
@@ -283,6 +286,40 @@ void tst_QQuickTreeModelAdaptor::modelReset()
compareModels(tma, model);
}
+void tst_QQuickTreeModelAdaptor::rootIndex()
+{
+ TestModel model(5, 1);
+
+ QQuickTreeModelAdaptor tma;
+ tma.setModel(&model);
+
+ QVERIFY(!tma.rootIndex().isValid());
+ compareModels(tma, model);
+
+ QSignalSpy rootIndexSpy(&tma, SIGNAL(rootIndexChanged()));
+ QModelIndex rootIndex = model.index(0, 0);
+ tma.setRootIndex(rootIndex);
+ QCOMPARE(tma.rootIndex(), rootIndex);
+ QCOMPARE(rootIndexSpy.count(), 1);
+ compareModels(tma, model);
+
+ rootIndexSpy.clear();
+ rootIndex = model.index(2, 2, tma.rootIndex());
+ tma.setRootIndex(rootIndex);
+ QCOMPARE(tma.rootIndex(), rootIndex);
+ QCOMPARE(rootIndexSpy.count(), 1);
+ compareModels(tma, model);
+
+ // Expand 1st visible item, business as usual
+ expandAndTest(model.index(0, 0, rootIndex), tma, true /*expandable*/, 5);
+ // Expand non root item descendant item, nothing should happen
+ expandAndTest(model.index(0, 0), tma, true /*expandable*/, 0);
+ // Collapse 1st visible item, business as usual
+ collapseAndTest(model.index(0, 0, rootIndex), tma, true /*expandable*/, 5);
+ // Collapse non root item descendant item, nothing should happen
+ collapseAndTest(model.index(0, 0), tma, true /*expandable*/, 0);
+}
+
void tst_QQuickTreeModelAdaptor::dataAccess()
{
TestModel model(5, 1);
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index 0453716e..e9bb857b 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -1,3 +1,4 @@
TEMPLATE = subdirs
SUBDIRS = \
+ objectcount \
statusindicator
diff --git a/tests/benchmarks/objectcount/objectcount.pro b/tests/benchmarks/objectcount/objectcount.pro
new file mode 100644
index 00000000..f54d72d6
--- /dev/null
+++ b/tests/benchmarks/objectcount/objectcount.pro
@@ -0,0 +1,9 @@
+TEMPLATE = app
+TARGET = tst_objectcount
+
+QT += quick testlib core-private
+CONFIG += testcase
+osx:CONFIG -= app_bundle
+
+SOURCES += \
+ tst_objectcount.cpp
diff --git a/tests/benchmarks/objectcount/tst_objectcount.cpp b/tests/benchmarks/objectcount/tst_objectcount.cpp
new file mode 100644
index 00000000..4a29733e
--- /dev/null
+++ b/tests/benchmarks/objectcount/tst_objectcount.cpp
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest>
+#include <QtQuick>
+#include <QtCore/private/qhooks_p.h>
+#include <iostream>
+
+static int qt_verbose = qgetenv("VERBOSE").toInt() != 0;
+
+Q_GLOBAL_STATIC(QObjectList, qt_qobjects)
+
+extern "C" Q_DECL_EXPORT void qt_addQObject(QObject *object)
+{
+ qt_qobjects->append(object);
+}
+
+extern "C" Q_DECL_EXPORT void qt_removeQObject(QObject *object)
+{
+ qt_qobjects->removeAll(object);
+}
+
+class tst_ObjectCount : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void init();
+ void cleanup();
+
+ void controls();
+ void controls_data();
+
+private:
+ QQmlEngine engine;
+};
+
+void tst_ObjectCount::init()
+{
+ qtHookData[QHooks::AddQObject] = reinterpret_cast<quintptr>(&qt_addQObject);
+ qtHookData[QHooks::RemoveQObject] = reinterpret_cast<quintptr>(&qt_removeQObject);
+
+ // warmup
+ QQmlComponent component(&engine);
+ component.setData("import QtQuick 2.0; import QtQuick.Controls 1.3; Button {}", QUrl());
+ delete component.create();
+}
+
+void tst_ObjectCount::cleanup()
+{
+ qtHookData[QHooks::AddQObject] = 0;
+ qtHookData[QHooks::RemoveQObject] = 0;
+}
+
+static void printItems(const QList<QQuickItem *> &items)
+{
+ std::cout << "RESULT tst_ObjectCount::" << QTest::currentTestFunction() << "():\"" << QTest::currentDataTag() << "\":" << std::endl;
+ std::cout << " QQuickItems: " << items.count() << " (total of QObjects: " << qt_qobjects->count() << ")" << std::endl;
+
+ if (qt_verbose) {
+ foreach (QObject *object, *qt_qobjects)
+ qInfo() << "\t" << object;
+ }
+}
+
+void tst_ObjectCount::controls()
+{
+ QFETCH(QByteArray, data);
+
+ QQmlComponent component(&engine);
+
+ qt_qobjects->clear();
+
+ component.setData(data, QUrl());
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY2(object.data(), qPrintable(component.errorString()));
+
+ QList<QQuickItem *> items;
+ foreach (QObject *object, *qt_qobjects()) {
+ QQuickItem *item = qobject_cast<QQuickItem *>(object);
+ if (item)
+ items += item;
+ }
+ printItems(items);
+}
+
+void tst_ObjectCount::controls_data()
+{
+ QTest::addColumn<QByteArray>("data");
+
+ QTest::newRow("ApplicationWindow")
+ << QByteArray("import QtQuick.Controls 1.3; ApplicationWindow { }");
+ QTest::newRow("BusyIndicator")
+ << QByteArray("import QtQuick.Controls 1.3; BusyIndicator { }");
+ QTest::newRow("Button")
+ << QByteArray("import QtQuick.Controls 1.3; Button { }");
+ QTest::newRow("CheckBox")
+ << QByteArray("import QtQuick.Controls 1.3; CheckBox { }");
+ QTest::newRow("Dial")
+ << QByteArray("import QtQuick.Extras 1.3; Dial { }");
+ QTest::newRow("GroupBox")
+ << QByteArray("import QtQuick.Controls 1.3; GroupBox { }");
+ QTest::newRow("Label")
+ << QByteArray("import QtQuick.Controls 1.3; Label { }");
+ QTest::newRow("ProgressBar")
+ << QByteArray("import QtQuick.Controls 1.3; ProgressBar { }");
+ QTest::newRow("RadioButton")
+ << QByteArray("import QtQuick.Controls 1.3; RadioButton { }");
+ QTest::newRow("ScrollView")
+ << QByteArray("import QtQuick.Controls 1.3; ScrollView { }");
+ QTest::newRow("Slider")
+ << QByteArray("import QtQuick.Controls 1.3; Slider { }");
+ QTest::newRow("SpinBox")
+ << QByteArray("import QtQuick.Controls 1.3; SpinBox { }");
+ QTest::newRow("StackView")
+ << QByteArray("import QtQuick.Controls 1.3; StackView { }");
+ QTest::newRow("Switch")
+ << QByteArray("import QtQuick.Controls 1.3; Switch { }");
+ QTest::newRow("TabView")
+ << QByteArray("import QtQuick.Controls 1.3; TabView { }");
+ QTest::newRow("TextArea")
+ << QByteArray("import QtQuick.Controls 1.3; TextArea { }");
+ QTest::newRow("TextField")
+ << QByteArray("import QtQuick.Controls 1.3; TextField { }");
+ QTest::newRow("ToolBar")
+ << QByteArray("import QtQuick.Controls 1.3; ToolBar { }");
+ QTest::newRow("ToolButton")
+ << QByteArray("import QtQuick.Controls 1.3; ToolButton { }");
+ QTest::newRow("Tumbler")
+ << QByteArray("import QtQuick.Extras 1.3; Tumbler { }");
+}
+
+QTEST_MAIN(tst_ObjectCount)
+
+#include "tst_objectcount.moc"
diff --git a/tests/manual/viewinqwidget/main.cpp b/tests/manual/viewinqwidget/main.cpp
new file mode 100644
index 00000000..06131641
--- /dev/null
+++ b/tests/manual/viewinqwidget/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QQuickView>
+#include <QWidget>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QQuickView *view = new QQuickView;
+ QWidget widget;
+ QWidget *container = QWidget::createWindowContainer(view, &widget);
+ container->setGeometry(100,100,300,300);
+
+ view->setSource(QUrl(QStringLiteral("main.qml")));
+ widget.show();
+
+ return app.exec();
+}
diff --git a/tests/manual/viewinqwidget/main.qml b/tests/manual/viewinqwidget/main.qml
new file mode 100644
index 00000000..29d65ae2
--- /dev/null
+++ b/tests/manual/viewinqwidget/main.qml
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.2
+import QtQuick.Controls 1.3
+
+Item {
+ visible: true
+ width: 360
+ height: 360
+
+
+ ComboBox {
+ anchors.centerIn: parent
+ model: [ "Banana", "Apple", "Coconut" ]
+ }
+}
diff --git a/tests/manual/viewinqwidget/viewinqwidget.pro b/tests/manual/viewinqwidget/viewinqwidget.pro
new file mode 100644
index 00000000..fb0f24f4
--- /dev/null
+++ b/tests/manual/viewinqwidget/viewinqwidget.pro
@@ -0,0 +1,6 @@
+QT += qml quick widgets
+TARGET = viewinqwidget
+SOURCES += $$PWD/main.cpp
+
+OTHER_FILES += \
+ qml/main.qml