Warning, /libraries/kirigami-addons/src/formcard/FormArrow.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2022 Devin Lin <devin@kde.org> 0003 * SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 import QtQuick 2.15 0007 import QtQuick.Controls 2.15 0008 import QtQuick.Layouts 1.15 0009 0010 import org.kde.kirigami 2.19 as Kirigami 0011 0012 /** 0013 * @brief An arrow UI component used in Form delegates. 0014 * 0015 * This component can be used to decorate existing or custom Form delegates. 0016 * It is used, for instance, as the trailing property of FormButtonDelegate. 0017 * 0018 * Each FormArrow instance corresponds to a single arrow that may point 0019 * upwards, downwards, to the left or to the right. 0020 * 0021 * @since KirigamiAddons 0.11.0 0022 * 0023 * @inherit Kirigami.Icon 0024 */ 0025 0026 Kirigami.Icon { 0027 /** 0028 * @brief The direction the FormArrow will point towards. 0029 * 0030 * Set this to any Qt::ArrowType enum value. 0031 * 0032 * default: `Qt.RightArrow` 0033 */ 0034 property int direction: Qt.RightArrow 0035 0036 source: { 0037 switch (direction) { 0038 case Qt.UpArrow: 0039 return "arrow-up"; 0040 case Qt.DownArrow: 0041 return "arrow-down"; 0042 case Qt.LeftArrow: 0043 return "arrow-left"; 0044 case Qt.RightArrow: 0045 return "arrow-right"; 0046 } 0047 } 0048 implicitWidth: Math.round(Kirigami.Units.iconSizes.small * 0.75) 0049 implicitHeight: Math.round(Kirigami.Units.iconSizes.small * 0.75) 0050 }