/**************************************************************************** Copyright (C) 2012-2013 by Eike Hein <hein@kde.org> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, 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 General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the ** Free Software Foundation, Inc., ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . ****************************************************************************/import QtQuick 2.0import org.kde.plasma.core 2.0 as PlasmaCorePlasmaCore.SvgItem {id: arrowanchors {bottom: arrow.parent.bottomhorizontalCenter: iconBox.horizontalCenter}visible: parent.m.IsGroupParent === truestates: [State {name: "top"when: plasmoid.location === PlasmaCore.Types.TopEdgeAnchorChanges {target: arrowanchors.top: arrow.parent.topanchors.left: undefinedanchors.right: undefinedanchors.bottom: undefinedanchors.horizontalCenter: iconBox.horizontalCenteranchors.verticalCenter: undefined}},State {name: "left"when: plasmoid.location === PlasmaCore.Types.LeftEdgeAnchorChanges {target: arrowanchors.top: undefinedanchors.left: arrow.parent.leftanchors.right: undefinedanchors.bottom: undefinedanchors.horizontalCenter: undefinedanchors.verticalCenter: iconBox.verticalCenter}},State {name: "right"when: plasmoid.location === PlasmaCore.Types.RightEdgeAnchorChanges {target: arrowanchors.top: undefinedanchors.left: undefinedanchors.right: arrow.parent.rightanchors.bottom: undefinedanchors.horizontalCenter: undefinedanchors.verticalCenter: iconBox.verticalCenter}}]implicitWidth: Math.min(naturalSize.width, iconBox.width)implicitHeight: Math.min(naturalSize.height, iconBox.width)svg: taskSvgelementId: elementForLocation()function elementForLocation() {switch (plasmoid.location) {case PlasmaCore.Types.LeftEdge:return "group-expander-left";case PlasmaCore.Types.TopEdge:return "group-expander-top";case PlasmaCore.Types.RightEdge:return "group-expander-right";case PlasmaCore.Types.BottomEdge:default:return "group-expander-bottom";}}}