![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Stream/StreamGUIHelpers.h>
Helper class to integrate an animated gif into the UI. More...
Helper class to integrate an animated gif into the UI.
The gif file is wrapped inside a QToolButton.
Public Member Functions | |
| GifIcon (QToolButton *button, const QString &gifPath, QObject *parent=nullptr) | |
| Sets up the movie and scales the provided button to the width of the gif (fixed width). | |
| void | show () |
| Start playing the movie to update the button's icon and set the button visibility to true. | |
| void | hide () |
| Stops playing the gif moving and hides the button. | |
|
explicit |
Sets up the movie and scales the provided button to the width of the gif (fixed width).
Show or hide must be called afterwards to set the icon to the right state (visible or invisible).
| std::invalid_argument | if button is nullptr Note: The class sets the button's size policy to setRetainSizeWhenHidden(true). So, the space of the button on the layout is preserved and stays empty while hidden. |