Warning, /plasma/qqc2-breeze-style/style/qtquickcontrols/HorizontalHeaderView.qml is written in an unsupported language. File is not indexed.

0001 // NOTE: replace this
0002 /****************************************************************************
0003 **
0004 ** Copyright (C) 2020 The Qt Company Ltd.
0005 ** Contact: http://www.qt.io/licensing/
0006 **
0007 ** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
0008 **
0009 ** $QT_BEGIN_LICENSE:LGPL3$
0010 ** Commercial License Usage
0011 ** Licensees holding valid commercial Qt licenses may use this file in
0012 ** accordance with the commercial license agreement provided with the
0013 ** Software or, alternatively, in accordance with the terms contained in
0014 ** a written agreement between you and The Qt Company. For licensing terms
0015 ** and conditions see http://www.qt.io/terms-conditions. For further
0016 ** information use the contact form at http://www.qt.io/contact-us.
0017 **
0018 ** GNU Lesser General Public License Usage
0019 ** Alternatively, this file may be used under the terms of the GNU Lesser
0020 ** General Public License version 3 as published by the Free Software
0021 ** Foundation and appearing in the file LICENSE.LGPLv3 included in the
0022 ** packaging of this file. Please review the following information to
0023 ** ensure the GNU Lesser General Public License version 3 requirements
0024 ** will be met: https://www.gnu.org/licenses/lgpl.html.
0025 **
0026 ** GNU General Public License Usage
0027 ** Alternatively, this file may be used under the terms of the GNU
0028 ** General Public License version 2.0 or later as published by the Free
0029 ** Software Foundation and appearing in the file LICENSE.GPL included in
0030 ** the packaging of this file. Please review the following information to
0031 ** ensure the GNU General Public License version 2.0 requirements will be
0032 ** met: http://www.gnu.org/licenses/gpl-2.0.html.
0033 **
0034 ** $QT_END_LICENSE$
0035 **
0036 ****************************************************************************/
0037 
0038 import QtQuick
0039 import QtQuick.Controls
0040 import QtQuick.Templates as T
0041 
0042 T.HorizontalHeaderView {
0043     id: control
0044 
0045     implicitWidth: syncView ? syncView.width : 0
0046     implicitHeight: contentHeight
0047 
0048     delegate: Rectangle {
0049         // Qt6: add cellPadding (and font etc) as public API in headerview
0050         readonly property real cellPadding: 8
0051 
0052         implicitWidth: text.implicitWidth + (cellPadding * 2)
0053         implicitHeight: Math.max(control.height, text.implicitHeight + (cellPadding * 2))
0054         color: "#f6f6f6"
0055         border.color: "#e4e4e4"
0056 
0057         Text {
0058             id: text
0059             text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole]
0060                                         : model[control.textRole])
0061                                    : modelData
0062             width: parent.width
0063             height: parent.height
0064             horizontalAlignment: Text.AlignHCenter
0065             verticalAlignment: Text.AlignVCenter
0066             color: "#ff26282a"
0067         }
0068     }
0069 }