• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KPixmapSequence Class Reference

Loads and gives access to the frames of a typical multi-row pixmap as often used for spinners. More...

#include <KPixmapSequence>

List of all members.

Public Member Functions

 KPixmapSequence (const QString &xdgIconName, int size=KIconLoader::SizeSmall)
 KPixmapSequence (const QPixmap &pixmap, const QSize &frameSize=QSize())
 KPixmapSequence (const KPixmapSequence &other)
 KPixmapSequence ()
 ~KPixmapSequence ()
QPixmap frameAt (int index) const
int frameCount () const
QSize frameSize () const
bool isEmpty () const
bool isValid () const
KPixmapSequence & operator= (const KPixmapSequence &other)

Detailed Description

Loads and gives access to the frames of a typical multi-row pixmap as often used for spinners.

KPixmapSequence is implicitly shared. Copying is fast.

Once typically uses the static methods loadFromPath and loadFromPixmap to create an instance of KPixmapSequence.

Author:
Aurélien Gâteau <agateau@kde.org>
Sebastian Trueg <trueg@kde.org>
Since:
4.4

Definition at line 47 of file kpixmapsequence.h.


Constructor & Destructor Documentation

KPixmapSequence::KPixmapSequence (  ) 

Create an empty sequence.

Definition at line 73 of file kpixmapsequence.cpp.

KPixmapSequence::KPixmapSequence ( const KPixmapSequence &  other  ) 

Copy constructor.

Definition at line 79 of file kpixmapsequence.cpp.

KPixmapSequence::KPixmapSequence ( const QPixmap &  pixmap,
const QSize &  frameSize = QSize() 
) [explicit]

Load a sequence from a pixmap.

Parameters:
pixmap Pixmap to load
frameSize The size of the frames to load. The width of the file has to be a multiple of the frame width; the same is true for the height. If an invalid size is specified the file is considered to be one column of square frames.
Returns:
The sequence loaded from path or an invalid sequence if an error occured (file could not be opened or frameSize does not match the file's size)

Definition at line 85 of file kpixmapsequence.cpp.

KPixmapSequence::KPixmapSequence ( const QString &  xdgIconName,
int  size = KIconLoader::SizeSmall 
) [explicit]

Create a sequence from an xdg animation pixmap.

Parameters:
xdgIconName The name of the icon (example: process-working)
size The icon/frame size

Definition at line 92 of file kpixmapsequence.cpp.

KPixmapSequence::~KPixmapSequence (  ) 

Destructor.

Definition at line 99 of file kpixmapsequence.cpp.


Member Function Documentation

QPixmap KPixmapSequence::frameAt ( int  index  )  const

Retrieve the frame at index.

Parameters:
index The index of the frame in question starting at 0.

Definition at line 139 of file kpixmapsequence.cpp.

int KPixmapSequence::frameCount (  )  const

The number of frames in this sequence.

Definition at line 133 of file kpixmapsequence.cpp.

QSize KPixmapSequence::frameSize (  )  const
Returns:
The size of an individual frame in the sequence. Be aware that frames are always taken to be squared.

Definition at line 123 of file kpixmapsequence.cpp.

bool KPixmapSequence::isEmpty (  )  const
Returns:
true if no sequence was loaded successfully.
See also:
isValid

Definition at line 117 of file kpixmapsequence.cpp.

bool KPixmapSequence::isValid (  )  const
Returns:
true if a sequence was loaded successfully.
See also:
isEmpty

Definition at line 111 of file kpixmapsequence.cpp.

KPixmapSequence & KPixmapSequence::operator= ( const KPixmapSequence &  other  ) 

Create a copy of other.

The data is implicitly shared.

Definition at line 104 of file kpixmapsequence.cpp.


The documentation for this class was generated from the following files:
  • kpixmapsequence.h
  • kpixmapsequence.cpp

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
  • KUtils
  • Nepomuk
  • Plasma
  •     Sodep
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal