diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-09-12 10:57:33 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 20:49:38 +0200 |
commit | 72072899c653430912e8fcafa82d624755d465ad (patch) | |
tree | 8031230838fe64fe8494d35ebf195e1bd5b51175 /src/controls/plugin.cpp | |
parent | afc201aaf8ebd15b72ac52138cd77c5000167d14 (diff) | |
download | qtquickcontrols-72072899c653430912e8fcafa82d624755d465ad.tar.gz |
Enable TableView multi-row selection
This adds a new read-only property selection
and selectionMode to TableView with the following features:
selection.selectAll()
selection.select(from, to)
selection.deselect(from, to)
selection.forEach(callback)
selection.contains(index)
selection.selectionChanged()
selection.count
Change-Id: I3cbd433851354bb68a6075f0b31f46dab8c83fd4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/controls/plugin.cpp')
-rw-r--r-- | src/controls/plugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp index 6e0e1b04..64386e72 100644 --- a/src/controls/plugin.cpp +++ b/src/controls/plugin.cpp @@ -47,7 +47,7 @@ #include "qquickmenubar_p.h" #include "qquickstack_p.h" #include "qquickdesktopiconprovider_p.h" - +#include "qquickselectionmode_p.h" #include "Private/qquickrangemodel_p.h" #include "Private/qquickwheelarea_p.h" #include "Private/qquicktooltip_p.h" @@ -110,6 +110,7 @@ void QtQuickControlsPlugin::registerTypes(const char *uri) QLatin1String("Do not create objects of type MenuBase")); qmlRegisterUncreatableType<QQuickStack>(uri, 1, 0, "Stack", QLatin1String("Do not create objects of type Stack")); + qmlRegisterUncreatableType<QQuickSelectionMode>(uri, 1, 1, "SelectionMode", QLatin1String("Do not create objects of type SelectionMode")); const QString filesLocation = fileLocation(); for (int i = 0; i < int(sizeof(qmldir)/sizeof(qmldir[0])); i++) |