QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
#include <qgsanimatedicon.h>
Signals | |
void | frameChanged () |
Emitted when the icon changed. More... | |
Public Member Functions | |
QgsAnimatedIcon (const QString &iconPath=QString(), QObject *parent=nullptr) | |
Create a new animated icon. More... | |
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. More... | |
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. More... | |
bool | disconnectFrameChanged (const QObject *receiver, const char *method) |
Convenience function to disconnect the same style that the frame change connection was established. More... | |
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. More... | |
int | height () const |
The native height of the icon. More... | |
QIcon | icon () const |
Gets the icons representation in the current frame. More... | |
QString | iconPath () const |
Path to a movie, e.g. More... | |
void | setIconPath (const QString &iconPath) |
Path to a movie, e.g. More... | |
int | width () const |
The native width of the icon. More... | |
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 85 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 104 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 |