QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
Animated icon is keeping an animation running if there are listeners connected to frameChanged. More...
#include <qgsanimatedicon.h>
Signals | |
void | frameChanged () |
Emitted when the icon changed. | |
Public Member Functions | |
QgsAnimatedIcon (const QString &iconPath=QString(), QObject *parent=nullptr) | |
Create a new animated icon. | |
bool | connectFrameChanged (const QObject *receiver, const char *method) |
Connect a slot that will be notified repeatedly whenever a frame changes and which should request the current icon and trigger UI updates. | |
template<typename Func1 > | |
bool | connectFrameChanged (const typename QtPrivate::FunctionPointer< Func1 >::Object *receiver, Func1 slot) |
Connect a slot that will be notified repeatedly whenever a frame changes and which should request the current icon and trigger UI updates. | |
bool | disconnectFrameChanged (const QObject *receiver, const char *method) |
Convenience function to disconnect the same style that the frame change connection was established. | |
template<typename Func1 > | |
bool | disconnectFrameChanged (const typename QtPrivate::FunctionPointer< Func1 >::Object *receiver, Func1 slot) |
Convenience function to disconnect the same style that the frame change connection was established. | |
int | height () const |
The native height of the icon. | |
QIcon | icon () const |
Gets the icons representation in the current frame. | |
QString | iconPath () const |
Path to a movie, e.g. | |
void | setIconPath (const QString &iconPath) |
Path to a movie, e.g. | |
int | width () const |
The native width of the icon. | |
Animated icon is keeping an animation running if there are listeners connected to frameChanged.
Definition at line 30 of file qgsanimatedicon.h.
QgsAnimatedIcon::QgsAnimatedIcon | ( | const QString & | iconPath = QString() , |
QObject * | parent = nullptr |
||
) |
Create a new animated icon.
Optionally, the iconPath can already be specified.
Definition at line 19 of file qgsanimatedicon.cpp.
bool QgsAnimatedIcon::connectFrameChanged | ( | const QObject * | receiver, |
const char * | method | ||
) |
Connect a slot that will be notified repeatedly whenever a frame changes and which should request the current icon and trigger UI updates.
Connect to the frame changed signal with this method and not directly. This method makes sure the annimation is started.
Definition at line 46 of file qgsanimatedicon.cpp.
|
inline |
Connect a slot that will be notified repeatedly whenever a frame changes and which should request the current icon and trigger UI updates.
Connect to the frame changed signal with this method and not directly. This method makes sure the annimation is started.
Definition at line 71 of file qgsanimatedicon.h.
bool QgsAnimatedIcon::disconnectFrameChanged | ( | const QObject * | receiver, |
const char * | method | ||
) |
Convenience function to disconnect the same style that the frame change connection was established.
Definition at line 57 of file qgsanimatedicon.cpp.
|
inline |
Convenience function to disconnect the same style that the frame change connection was established.
Definition at line 90 of file qgsanimatedicon.h.
|
signal |
Emitted when the icon changed.
You should use connectFrameChanged instead of connecting to this signal directly. Connecting to this signal directly will cause the animation not to be started.
int QgsAnimatedIcon::height | ( | ) | const |
QIcon QgsAnimatedIcon::icon | ( | ) | const |
Gets the icons representation in the current frame.
This will need to be called repeatedly, whenever a frameChanged() signal is emitted.
Definition at line 41 of file qgsanimatedicon.cpp.
QString QgsAnimatedIcon::iconPath | ( | ) | const |
void QgsAnimatedIcon::setIconPath | ( | const QString & | iconPath | ) |
int QgsAnimatedIcon::width | ( | ) | const |