• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • Animation
Public Types | Public Member Functions | Protected Member Functions | Properties | List of all members
Plasma::Animation Class Referenceabstract

#include <animation.h>

Inheritance diagram for Plasma::Animation:
QAbstractAnimation

Public Types

enum  MovementDirectionFlag {
  MoveAny = 0 , MoveUp = 0x1 , MoveRight = 0x2 , MoveDown = 0x4 ,
  MoveLeft = 0x8
}
 
enum  ReferenceFlag {
  Center = 0 , Up = 0x1 , Down = 0x2 , Left = 0x4 ,
  Right = 0x8
}
 

Public Member Functions

 Animation (QObject *parent=0)
 
 ~Animation ()=0
 
int duration () const
 
QEasingCurve easingCurve () const
 
void setEasingCurve (const QEasingCurve &curve)
 
void setTargetWidget (QGraphicsWidget *widget)
 
QGraphicsWidget * targetWidget () const
 

Protected Member Functions

virtual void setDuration (int duration=250)
 
virtual void updateCurrentTime (int currentTime)
 

Properties

int duration
 
QEasingCurve easingCurve
 
QGraphicsWidget * targetWidget
 

Detailed Description

Abstract representation of a single animation.

Since
4.4

Definition at line 46 of file animation.h.

Member Enumeration Documentation

◆ MovementDirectionFlag

enum Plasma::Animation::MovementDirectionFlag

Animation movement direction.

Enumerator
MoveAny 
MoveUp 
MoveRight 
MoveDown 
MoveLeft 

Definition at line 79 of file animation.h.

◆ ReferenceFlag

enum Plasma::Animation::ReferenceFlag

Animation movement reference (used by RotationAnimation).

Enumerator
Center 
Up 
Down 
Left 
Right 

Definition at line 66 of file animation.h.

Constructor & Destructor Documentation

◆ Animation()

Plasma::Animation::Animation ( QObject *  parent = 0)
explicit

Default constructor.

Parameters
parentObject parent (might be set when using Animator::create factory).

Definition at line 41 of file animation.cpp.

◆ ~Animation()

Plasma::Animation::~Animation ( )
pure virtual

Destructor.

Definition at line 47 of file animation.cpp.

Member Function Documentation

◆ duration()

int Plasma::Animation::duration ( ) const

Get the animation duration.

It can be set using the property duration.

Returns
duration in ms.

Definition at line 52 of file animation.cpp.

◆ easingCurve()

QEasingCurve Plasma::Animation::easingCurve ( ) const

Get the animation easing curve type.

Definition at line 80 of file animation.cpp.

◆ setDuration()

void Plasma::Animation::setDuration ( int  duration = 250)
protectedvirtual

Change the animation duration.

Default is 250ms.

Parameters
durationThe new duration of the animation.

Definition at line 57 of file animation.cpp.

◆ setEasingCurve()

void Plasma::Animation::setEasingCurve ( const QEasingCurve &  curve)

Set the animation easing curve type.

Definition at line 75 of file animation.cpp.

◆ setTargetWidget()

void Plasma::Animation::setTargetWidget ( QGraphicsWidget *  widget)

Set the widget on which the animation is to be performed.

Parameters
widgetThe QGraphicsWidget to be animated.

Definition at line 62 of file animation.cpp.

◆ targetWidget()

QGraphicsWidget * Plasma::Animation::targetWidget ( ) const
Returns
The widget that the animation will be performed upon

Definition at line 70 of file animation.cpp.

◆ updateCurrentTime()

void Plasma::Animation::updateCurrentTime ( int  currentTime)
protectedvirtual

QAbstractAnimation will call this method while the animation is running.

Each specialized animation class should implement the correct behavior for it.

Parameters
currentTimeSlapsed time using the duration as reference (it will be from duration up to zero if the animation is running backwards).

Definition at line 85 of file animation.cpp.

Property Documentation

◆ duration

int Plasma::Animation::duration
readwrite

Definition at line 1 of file animation.h.

◆ easingCurve

QEasingCurve Plasma::Animation::easingCurve
readwrite

Definition at line 1 of file animation.h.

◆ targetWidget

QGraphicsWidget * Plasma::Animation::targetWidget
readwrite

Definition at line 1 of file animation.h.


The documentation for this class was generated from the following files:
  • animation.h
  • animation.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal