summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-03-11 19:51:07 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-11 20:35:35 +0100
commit57f8095ed7ed57bbcf93912df89280850904e66c (patch)
tree07679cae20c11c5c5a889e88e8368b60beca8c6f /src
parentb611ad6b3a51a383b67d44bc310e0ef4425eeda5 (diff)
Rename TableView::sortIndicatorDirection to sortIndicatorOrder
And use the Qt.SortOrder values: Qt.Ascending/DescendingOrder Change-Id: Ifc02666a0ef80bc9bc0c3367a7e53cee60210940 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/controls/TableView.qml16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml
index b246e6a35..d178e4981 100644
--- a/src/controls/TableView.qml
+++ b/src/controls/TableView.qml
@@ -88,7 +88,7 @@ import QtQuick.Controls.Private 1.0
\list
\li sortColumn - The index of the currently selected sort header
\li sortIndicatorVisible - If sort indicators should be enabled
- \li sortIndicatorDirection - "up" or "down" depending on state
+ \li sortIndicatorOrder - Qt.AscendingOrder or Qt.DescendingOrder depending on state
\endlist
*/
@@ -178,13 +178,13 @@ ScrollView {
\note The view itself does not sort the data. */
property bool sortIndicatorVisible: false
- /*! This sets the sorting direction of the sort indicator
+ /*! This sets the sorting order of the sort indicator
The allowed values are:
\list
- \li "up"
- \li "down" - the default
+ \li Qt.AscendingOrder - the default
+ \li Qt.DescendingOrder
\endlist */
- property string sortIndicatorDirection: "down"
+ property string sortIndicatorOrder: Qt.AscendingOrder
/*! \qmlproperty Component TableView::header
This property contains the TableViewHeader items */
@@ -460,7 +460,7 @@ ScrollView {
anchors.left: parent.left
anchors.right: parent.right
property string itemValue: header[index].title
- property string itemSort: (sortIndicatorVisible && index == sortColumn) ? (sortIndicatorDirection == "up" ? "up" : "down") : "";
+ property string itemSort: (sortIndicatorVisible && index == sortColumn) ? (sortIndicatorOrder == Qt.AscendingOrder ? "up" : "down") : "";
property bool itemPressed: headerClickArea.pressed
property bool itemContainsMouse: headerClickArea.containsMouse
property string itemPosition: header.length === 1 ? "only" :
@@ -483,7 +483,7 @@ ScrollView {
anchors.fill: parent
onClicked: {
if (sortColumn == index)
- sortIndicatorDirection = sortIndicatorDirection === "up" ? "down" : "up"
+ sortIndicatorOrder = sortIndicatorOrder == Qt.AscendingOrder ? Qt.DescendingOrder : Qt.AscendingOrder
sortColumn = index
}
// Here we handle moving header sections
@@ -527,7 +527,7 @@ ScrollView {
Loader {
id: draghandle
property string itemValue: header[index].title
- property string itemSort: (sortIndicatorVisible && index == sortColumn) ? (sortIndicatorDirection == "up" ? "up" : "down") : "";
+ property string itemSort: (sortIndicatorVisible && index == sortColumn) ? (sortIndicatorOrder == Qt.AscendingOrder ? "up" : "down") : "";
property bool itemPressed: headerClickArea.pressed
property bool itemContainsMouse: headerClickArea.containsMouse
property string itemPosition