OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::IconManager Class Reference

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 Public Member Functions

static IconManagerinstance (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.
 

Private Member Functions

virtual ~IconManager ()
 

Detailed Description

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.

Member Function Documentation

◆ 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()

ot::IconManager & ot::IconManager::instance ( void )
static

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: