Warning, /frameworks/kcmutils/src/qml/components/ScrollViewKCM.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.7 0008 import org.kde.kcmutils as KCM 0009 0010 /** 0011 * This component is intended to be used as the root item for KCMs that are based upon a list view or another vertical flickable. 0012 * It contains a ScrollView as its main item. 0013 * It is possible to specify a header and footer component. 0014 * @code 0015 * import org.kde.kcmutils as KCM 0016 * KCM.ScrollViewKCM { 0017 * header: Item {...} 0018 * view: ListView { 0019 * ... 0020 * } 0021 * footer: Item {...} 0022 * } 0023 * @endcode 0024 */ 0025 KCM.AbstractKCM { 0026 id: root 0027 0028 /** 0029 * view: ScrollView 0030 * Exposes the internal flickable 0031 */ 0032 property alias view: scroll.view 0033 0034 /** 0035 * framedView: bool 0036 * Whether to draw a frame around the KCM's inner scrollable list view. 0037 * Default: false 0038 * 0039 * @since 5.90 0040 */ 0041 framedView: false 0042 0043 onViewChanged: { 0044 if (view) { 0045 // Deliberately don't take separators into account, because those are opaque anyway 0046 view.clip = Qt.binding(() => __headerContentVisible() || __footerContentVisible()); 0047 } 0048 } 0049 0050 KCM.ScrollView { 0051 id: scroll 0052 anchors.fill: parent 0053 framedView: root.framedView 0054 } 0055 }