/**************************************************************************** ** ** Copyright (C) 2011 Nokia Institute of Technology. ** All rights reserved. ** Contact: Manager (renato.chencarek@openbossa.org) ** ** This file is part of the Incredible Circus project. ** ** GNU Lesser General Public License Usage ** ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ****************************************************************************/ import QtQuick 1.1 Image { id: indicator property bool active: true source: "image://cache/widgets/lifeindicator/life.png" states: [ State { name: "shown"; when: indicator.active PropertyChanges { target: indicator; opacity: 1.0; visible: true; } }, State { name: "hidden"; when: !indicator.active PropertyChanges { target: indicator; opacity: 0.0; visible: false; } } ] transitions: Transition { from: "shown"; to: "hidden"; SequentialAnimation { NumberAnimation { target: indicator; property: "opacity"; duration: 200; from: 1.0; to: 0.0; } NumberAnimation { target: indicator; property: "opacity"; duration: 200; from: 0.0; to: 1.0; } NumberAnimation { target: indicator; property: "opacity"; duration: 200; from: 1.0; to: 0.0; } PropertyAction { target: indicator; properties: "visible"; } } } }