KPixmapSequence Class
Loads and gives access to the frames of a typical multi-row pixmap as often used for spinners. More...
- Header:
#include <KPixmapSequence> - CMake:
find_package(KF6 REQUIRED COMPONENTS WidgetsAddons)
target_link_libraries(mytarget PRIVATE KF6::WidgetsAddons)
List of all members, including inherited members
Public Functions
- KPixmapSequence()
- KPixmapSequence(const QPixmap &pixmap, const QSize &frameSize = QSize())
- KPixmapSequence(const QString &fullPath, int size)
- QPixmap frameAt(int index) const
- int frameCount() const
- QSize frameSize() const
- bool isEmpty() const
- bool isValid() const
- KPixmapSequence &KPixmapSequence::operator=(const KPixmapSequence &other)
Detailed Description
KPixmapSequence is implicitly shared. Copying is fast.
Member Function Documentation
KPixmapSequence::KPixmapSequence()
Create an empty sequence
[explicit] KPixmapSequence::KPixmapSequence(const QPixmap &pixmap, const QSize &frameSize = QSize())
Create a sequence from a pixmap.
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.
KPixmapSequence::KPixmapSequence(const QString &fullPath, int size)
Create a sequence from an icon name.
fullPath The full path of the icon
size The icon/frame size
QPixmap KPixmapSequence::frameAt(int index) const
Retrieve the frame at index.
index The index of the frame in question starting at 0.
int KPixmapSequence::frameCount() const
The number of frames in this sequence.
QSize KPixmapSequence::frameSize() const
Returns The size of an individual frame in the sequence.
bool KPixmapSequence::isEmpty() const
Returns true if no sequence was loaded successfully.
See also isValid()
bool KPixmapSequence::isValid() const
Returns true if a sequence was loaded successfully.
See also isEmpty()
KPixmapSequence &KPixmapSequence::operator=(const KPixmapSequence &other)
Create a copy of other. The data is implicitly shared.