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 QIcon & getIcon (const QString &_subPath)
 Create and return the icon.
 
static QPixmap & getPixmap (const QString &_subPath)
 Create and return the pixmap.
 
static QMovie & getMovie (const QString &_subPath)
 Create and return the movie.
 
static QByteArray & getSvgData (const QString &_subPath)
 Create and return the svg data.
 
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()

QIcon & ot::IconManager::getIcon ( const QString & _subPath)
static

Create and return the icon.

◆ getMovie()

QMovie & ot::IconManager::getMovie ( const QString & _subPath)
static

Create and return the movie.

◆ getPixmap()

QPixmap & ot::IconManager::getPixmap ( const QString & _subPath)
static

Create and return the pixmap.

◆ getSvgData()

QByteArray & ot::IconManager::getSvgData ( const QString & _subPath)
static

Create and return the svg data.

◆ 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: