KPixmapSequence
#include <KPixmapSequence>
Public Member Functions | |
KPixmapSequence () | |
KPixmapSequence (const KPixmapSequence &other) | |
KPixmapSequence (const QPixmap &pixmap, const QSize &frameSize=QSize()) | |
KPixmapSequence (const QString &fullPath, int size) | |
~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.
- Since
- 4.4
Definition at line 31 of file kpixmapsequence.h.
Constructor & Destructor Documentation
◆ KPixmapSequence() [1/4]
KPixmapSequence::KPixmapSequence | ( | ) |
Create an empty sequence.
Definition at line 52 of file kpixmapsequence.cpp.
◆ KPixmapSequence() [2/4]
KPixmapSequence::KPixmapSequence | ( | const KPixmapSequence & | other | ) |
Copy constructor.
Definition at line 57 of file kpixmapsequence.cpp.
◆ KPixmapSequence() [3/4]
|
explicit |
Create 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.
Definition at line 62 of file kpixmapsequence.cpp.
◆ KPixmapSequence() [4/4]
KPixmapSequence::KPixmapSequence | ( | const QString & | fullPath, |
int | size ) |
Create a sequence from an icon name.
- Parameters
-
fullPath The full path of the icon size The icon/frame size
Definition at line 68 of file kpixmapsequence.cpp.
◆ ~KPixmapSequence()
KPixmapSequence::~KPixmapSequence | ( | ) |
Destructor.
Definition at line 74 of file kpixmapsequence.cpp.
Member Function Documentation
◆ frameAt()
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 108 of file kpixmapsequence.cpp.
◆ frameCount()
int KPixmapSequence::frameCount | ( | ) | const |
The number of frames in this sequence.
Definition at line 103 of file kpixmapsequence.cpp.
◆ frameSize()
QSize KPixmapSequence::frameSize | ( | ) | const |
- Returns
- The size of an individual frame in the sequence.
Definition at line 94 of file kpixmapsequence.cpp.
◆ isEmpty()
bool KPixmapSequence::isEmpty | ( | ) | const |
- Returns
true
if no sequence was loaded successfully.
- See also
- isValid
Definition at line 89 of file kpixmapsequence.cpp.
◆ isValid()
bool KPixmapSequence::isValid | ( | ) | const |
- Returns
true
if a sequence was loaded successfully.
- See also
- isEmpty
Definition at line 84 of file kpixmapsequence.cpp.
◆ operator=()
KPixmapSequence & KPixmapSequence::operator= | ( | const KPixmapSequence & | other | ) |
Create a copy of other
.
The data is implicitly shared.
Definition at line 78 of file kpixmapsequence.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:05:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.