diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-05-02 18:18:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-08 21:42:37 +0200 |
commit | 2416927b67dcb4021edd38231295c13fe1b5a580 (patch) | |
tree | f7d31bc4c1640d867ef59c4109766c3cc0a336a6 /src/styles/TableViewStyle.qml | |
parent | 2ae89b14d8dcc7176af3d475b38d3c023a1897a2 (diff) | |
download | qtquickcontrols-2416927b67dcb4021edd38231295c13fe1b5a580.tar.gz |
Refactor and clean up public style API
Change-Id: I10271c860abd9b45a262e3548628e6a3026e1a4f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/styles/TableViewStyle.qml')
-rw-r--r-- | src/styles/TableViewStyle.qml | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/styles/TableViewStyle.qml b/src/styles/TableViewStyle.qml index 86678f97..e2d3c0c7 100644 --- a/src/styles/TableViewStyle.qml +++ b/src/styles/TableViewStyle.qml @@ -41,17 +41,31 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +/*! + \qmltype TableViewStyle + \inqmlmodule QtQuick.Controls.Styles 1.0 + \since QtQuick.Controls.Styles 1.0 + \brief Provides custom styling for TableView + + Note that this class derives from \l ScrollViewStyle + and supports all of the properties defined there. +*/ ScrollViewStyle { id: root - property bool activateItemOnSingleClick: false + /*! The \l TableView attached to this style. */ + readonly property TableView control: __control + + /*! The text color. */ property color textColor: __syspal.text + + /*! The text highlight color, used behind selections. */ property color highlightedTextColor: "white" - property SystemPalette __syspal: SystemPalette { - colorGroup: control.enabled ? SystemPalette.Active : SystemPalette.Disabled - } + /*! Activates items on single click. */ + property bool activateItemOnSingleClick: false + /* Delegate for header. This delegate is described in \l TableView::headerDelegate */ property Component headerDelegate: Rectangle { gradient: Gradient { GradientStop {position: 0 ; color: "#eee"} @@ -85,6 +99,7 @@ ScrollViewStyle { } } + /* Delegate for header. This delegate is described in \l TableView::rowDelegate */ property Component rowDelegate: Rectangle { implicitHeight: 20 implicitWidth: 80 @@ -107,7 +122,8 @@ ScrollViewStyle { } } - property Component standardDelegate: Item { + /* Delegate for header. This delegate is described in \l TableView::itemDelegate */ + property Component itemDelegate: Item { height: Math.max(16, label.implicitHeight) property int implicitWidth: sizehint.paintedWidth + 4 |