2007-06-08 07:24:19 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 Aaron Seigo <aseigo@kde.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation
|
|
|
|
*
|
|
|
|
* 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 Library 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "animator.h"
|
|
|
|
|
2007-06-19 23:53:19 +02:00
|
|
|
#include <QPainter>
|
|
|
|
|
2007-06-08 07:24:19 +02:00
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
|
|
|
Animator::Animator(QObject *parent, const QStringList& list)
|
|
|
|
: QObject(parent)
|
|
|
|
{
|
|
|
|
Q_UNUSED(list)
|
|
|
|
}
|
|
|
|
|
|
|
|
Animator::~Animator()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2007-06-19 23:53:19 +02:00
|
|
|
int Animator::frameCount(Plasma::Phase::Animation animation)
|
2007-06-08 07:24:19 +02:00
|
|
|
{
|
2007-06-19 23:53:19 +02:00
|
|
|
Q_UNUSED(animation)
|
2007-06-08 07:24:19 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-06-19 23:53:19 +02:00
|
|
|
int Animator::elementFrameCount(Plasma::Phase::ElementAnimation animation)
|
|
|
|
{
|
|
|
|
Q_UNUSED(animation)
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap Animator::elementAppear(qreal frame, const QPixmap& pixmap)
|
2007-06-08 07:24:19 +02:00
|
|
|
{
|
|
|
|
Q_UNUSED(frame)
|
2007-06-19 23:53:19 +02:00
|
|
|
Q_UNUSED(pixmap)
|
|
|
|
return pixmap;
|
2007-06-08 07:24:19 +02:00
|
|
|
}
|
|
|
|
|
2007-06-19 23:53:19 +02:00
|
|
|
QPixmap Animator::elementDisappear(qreal frame, const QPixmap& pixmap)
|
|
|
|
{
|
|
|
|
Q_UNUSED(frame)
|
|
|
|
Q_UNUSED(pixmap)
|
|
|
|
QPixmap alpha(pixmap.size());
|
|
|
|
{
|
|
|
|
QPainter painter(&alpha);
|
2007-06-20 00:06:05 +02:00
|
|
|
painter.fillRect(alpha.rect(), Qt::black);
|
2007-06-19 23:53:19 +02:00
|
|
|
}
|
|
|
|
QPixmap pix(pixmap.size());
|
|
|
|
pix.setAlphaChannel(alpha);
|
|
|
|
|
|
|
|
return pix;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Animator::appear(qreal frame, QGraphicsItem* item)
|
2007-06-10 09:09:07 +02:00
|
|
|
{
|
2007-06-19 23:53:19 +02:00
|
|
|
Q_UNUSED(frame)
|
2007-06-10 09:09:07 +02:00
|
|
|
Q_UNUSED(item)
|
|
|
|
}
|
|
|
|
|
2007-06-19 23:53:19 +02:00
|
|
|
void Animator::appearCompleted(QGraphicsItem* item)
|
2007-06-08 07:24:19 +02:00
|
|
|
{
|
2007-06-19 23:53:19 +02:00
|
|
|
Q_UNUSED(item)
|
2007-06-08 07:24:19 +02:00
|
|
|
}
|
|
|
|
|
2007-06-10 09:09:07 +02:00
|
|
|
void Animator::disappear(qreal frame, QGraphicsItem* item)
|
2007-06-08 07:24:19 +02:00
|
|
|
{
|
|
|
|
Q_UNUSED(frame)
|
|
|
|
Q_UNUSED(item)
|
|
|
|
}
|
|
|
|
|
2007-06-10 09:09:07 +02:00
|
|
|
void Animator::disappearCompleted(QGraphicsItem* item)
|
|
|
|
{
|
|
|
|
Q_UNUSED(item)
|
|
|
|
}
|
|
|
|
|
|
|
|
void Animator::activate(qreal frame, QGraphicsItem* item)
|
2007-06-08 07:24:19 +02:00
|
|
|
{
|
|
|
|
Q_UNUSED(frame)
|
|
|
|
Q_UNUSED(item)
|
|
|
|
}
|
|
|
|
|
2007-06-10 09:09:07 +02:00
|
|
|
void Animator::activateCompleted(QGraphicsItem* item)
|
|
|
|
{
|
|
|
|
Q_UNUSED(item)
|
|
|
|
}
|
|
|
|
|
|
|
|
void Animator::frameAppear(qreal frame, QGraphicsItem* item, const QRegion& drawable)
|
2007-06-08 07:24:19 +02:00
|
|
|
{
|
|
|
|
Q_UNUSED(frame)
|
|
|
|
Q_UNUSED(item)
|
|
|
|
Q_UNUSED(drawable)
|
|
|
|
}
|
|
|
|
|
2007-06-10 09:09:07 +02:00
|
|
|
void Animator::frameAppearCompleted(QGraphicsItem* item, const QRegion& drawable)
|
|
|
|
{
|
|
|
|
Q_UNUSED(item)
|
|
|
|
Q_UNUSED(drawable)
|
|
|
|
}
|
|
|
|
|
2007-06-08 07:24:19 +02:00
|
|
|
void Animator::renderBackground(QImage& background)
|
|
|
|
{
|
|
|
|
Q_UNUSED(background)
|
|
|
|
}
|
|
|
|
|
2007-06-08 09:23:09 +02:00
|
|
|
} // Plasma namespace
|
2007-06-08 07:24:19 +02:00
|
|
|
|
|
|
|
#include "animator.moc"
|