X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/848abc5922167a467bb73107ee6b72e9af3c8317..3bf471e0:/src/kitemviews/private/kitemlistviewanimation.cpp diff --git a/src/kitemviews/private/kitemlistviewanimation.cpp b/src/kitemviews/private/kitemlistviewanimation.cpp index 7c6782b7a..0c16c8b0a 100644 --- a/src/kitemviews/private/kitemlistviewanimation.cpp +++ b/src/kitemviews/private/kitemlistviewanimation.cpp @@ -1,25 +1,11 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz * - * * - * 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 * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2011 Peter Penz + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistviewanimation.h" - -#include +#include "kitemviews/kitemlistview.h" #include @@ -160,7 +146,15 @@ void KItemListViewAnimation::start(QGraphicsWidget* widget, AnimationType type, break; } + case IconResizeAnimation: { + propertyAnim = new QPropertyAnimation(widget, QByteArrayLiteral("iconSize")); + propertyAnim->setDuration(animationDuration); + propertyAnim->setEndValue(endValue); + break; + } + default: + Q_UNREACHABLE(); break; } @@ -188,7 +182,7 @@ void KItemListViewAnimation::stop(QGraphicsWidget* widget, AnimationType type) m_animation[type].remove(widget); delete propertyAnim; - emit finished(widget, type); + Q_EMIT finished(widget, type); } } @@ -227,7 +221,7 @@ void KItemListViewAnimation::slotFinished() it.remove(); finishedAnim->deleteLater(); - emit finished(widget, static_cast(type)); + Q_EMIT finished(widget, static_cast(type)); return; } }