/** Copyright 2013 by Sebastian KΓΌgler <sebas@kde.org>* Copyright 2014 by Martin GrΓ€Γlin <mgraesslin@kde.org>* Copyright 2016 by Kai Uwe Broulik <kde@privat.broulik.de>* Copyright 2017 by Roman Gilg <subdiff@gmail.com>** This program is free software; you can redistribute it and/or modify* it under the terms of the GNU Library General Public License as* published by the Free Software Foundation; either version 2, or* (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the* GNU Library General Public License for more details** You should have received a copy of the GNU Library General Public* License along with this program; if not, write to the* Free Software Foundation, Inc.,* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.*/import QtQuick 2.6import QtQuick.Layouts 1.1import QtGraphicalEffects 1.0import QtQml.Models 2.2import org.kde.plasma.core 2.0 as PlasmaCoreimport org.kde.plasma.components 2.0 as PlasmaComponentsimport org.kde.plasma.extras 2.0 as PlasmaExtrasimport org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddonsimport org.kde.taskmanager 0.1 as TaskManagerPlasmaExtras.ScrollArea {property Item parentTaskproperty int parentIndexproperty string appNameproperty int pidParentproperty bool isGroupproperty var windowsreadonly property bool isWin: windows !== undefinedproperty variant iconproperty url launcherUrlproperty bool isLauncherproperty bool isMinimizedParent// Needed for generateSubtext()property string displayParentproperty string genericNameproperty int virtualDesktopParentproperty bool isOnAllVirtualDesktopsParentproperty var activitiesParent//readonly property bool isVerticalPanel: plasmoid.formFactor == PlasmaCore.Types.VerticalLayout.minimumWidth: contentItem.widthLayout.maximumWidth: Layout.minimumWidthLayout.minimumHeight: contentItem.heightLayout.maximumHeight: Layout.minimumHeightLayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeftLayoutMirroring.childrenInherit: trueproperty int textWidth: theme.mSize(theme.defaultFont).width * 20verticalScrollBarPolicy: Qt.ScrollBarAlwaysOffhorizontalScrollBarPolicy: Qt.ScrollBarAlwaysOffComponent.onCompleted: {flickableItem.interactive = Qt.binding(function() {return isVerticalPanel ? contentItem.height > viewport.height : contentItem.width > viewport.width});}Item {id: contentItemwidth: childrenRect.widthheight: childrenRect.heightToolTipInstance {visible: !isGroup}Grid {rows: !isVerticalPanelcolumns: isVerticalPanelflow: isVerticalPanel ? Grid.TopToBottom : Grid.LeftToRightspacing: units.largeSpacingvisible: isGroupRepeater {id: groupRepeatermodel: DelegateModel {model: tasksModelrootIndex: tasksModel.makeModelIndex(parentIndex, -1)delegate: ToolTipInstance {}}}}}}