allow mapping of animations by the app corona; useful for mapping things like the appear/disappear animations

svn path=/trunk/KDE/kdelibs/; revision=1120239
This commit is contained in:
Aaron J. Seigo 2010-04-28 17:39:44 +00:00
parent aa3ea7d964
commit a8008999c6
2 changed files with 30 additions and 0 deletions

View File

@ -40,10 +40,12 @@
#include <kaction.h>
#include <kshortcutsdialog.h>
#include "animator.h"
#include "abstracttoolbox.h"
#include "containment.h"
#include "containmentactionspluginsconfig.h"
#include "view.h"
#include "private/animator_p.h"
#include "private/applet_p.h"
#include "private/containment_p.h"
#include "tooltipmanager.h"
@ -554,6 +556,16 @@ Containment *Corona::addContainmentDelayed(const QString &name, const QVariantLi
return d->addContainment(name, args, 0, true);
}
void Corona::mapAnimation(Animator::Animation from, Animator::Animation to)
{
AnimatorPrivate::mapAnimation(from, to);
}
void Corona::mapAnimation(Animator::Animation from, const QString &to)
{
AnimatorPrivate::mapAnimation(from, to);
}
void Corona::addOffscreenWidget(QGraphicsWidget *widget)
{
foreach (QGraphicsWidget *w, d->offscreenWidgets) {

View File

@ -388,6 +388,24 @@ protected:
Containment *addContainmentDelayed(const QString &name,
const QVariantList &args = QVariantList());
/**
* Maps a stock animation to one of the semantic animations. Used to control things such
* as what animation is used to make a Plasma::Appear appear in a containment.
* @arg from the animation to map a new value to
* @arg to the animation value to map to from
* @since 4.5
*/
void mapAnimation(Animator::Animation from, Animator::Animation to);
/**
* Maps a loadable animation to one of the semantic animations. Used to control things such
* as what animation is used to make a Plasma::Appear appear in a containment.
* @arg from the animation to map a new value to
* @arg to the animation value to map to from; this must map to a Javascript animation
* @since 4.5
*/
void mapAnimation(Animator::Animation from, const QString &to);
//Reimplemented from QGraphicsScene
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);