The IconManager loads images or animations and caches them. The IconManager has a search path list. When requestiong a file only the subPath (suffix) needs to be provided. When checking every search path and suffix combination the first existing file (FIFO) will be imported. The imported files are stored internally and will returned when requesting the same file.
More...
#include "IconManager.h"
|
static IconManager & | instance (void) |
| Returns the global instance.
|
|
static bool | addSearchPath (const QString &_path) |
|
static const QStringList & | searchPaths (void) |
|
static const QIcon & | getIcon (const QString &_subPath) |
| Return or import and return the icon.
|
|
static const QPixmap & | getPixmap (const QString &_subPath) |
| Return or import and return the pixmap.
|
|
static std::shared_ptr< QMovie > | getMovie (const QString &_subPath) |
| Return or import and return the movie.
|
|
static const QByteArray & | getSvgData (const QString &_subPath) |
| Return or import and return the pixmap.
|
|
static void | setApplicationIcon (const QIcon &_icon) |
| Stores the application icon.
|
|
static const QIcon & | getApplicationIcon (void) |
| Returns the main application icon. This icon may be used for windows and dialogs to let them all have the same icon.
|
|
The IconManager loads images or animations and caches them. The IconManager has a search path list. When requestiong a file only the subPath (suffix) needs to be provided. When checking every search path and suffix combination the first existing file (FIFO) will be imported. The imported files are stored internally and will returned when requesting the same file.
◆ addSearchPath()
bool ot::IconManager::addSearchPath |
( |
const QString & | _path | ) |
|
|
static |
◆ getApplicationIcon()
const QIcon & ot::IconManager::getApplicationIcon |
( |
void | | ) |
|
|
static |
Returns the main application icon. This icon may be used for windows and dialogs to let them all have the same icon.
◆ getIcon()
const QIcon & ot::IconManager::getIcon |
( |
const QString & | _subPath | ) |
|
|
static |
Return or import and return the icon.
◆ getMovie()
std::shared_ptr< QMovie > ot::IconManager::getMovie |
( |
const QString & | _subPath | ) |
|
|
static |
Return or import and return the movie.
◆ getPixmap()
const QPixmap & ot::IconManager::getPixmap |
( |
const QString & | _subPath | ) |
|
|
static |
Return or import and return the pixmap.
◆ getSvgData()
const QByteArray & ot::IconManager::getSvgData |
( |
const QString & | _subPath | ) |
|
|
static |
Return or import and return the pixmap.
◆ instance()
Returns the global instance.
◆ searchPaths()
const QStringList & ot::IconManager::searchPaths |
( |
void | | ) |
|
|
static |
◆ setApplicationIcon()
void ot::IconManager::setApplicationIcon |
( |
const QIcon & | _icon | ) |
|
|
static |
Stores the application icon.
◆ ~IconManager()
ot::IconManager::~IconManager |
( |
| ) |
|
|
privatevirtual |
The documentation for this class was generated from the following files: