SHAPER  9.12.0
ModuleBase_IconFactory Class Reference

This is a class which provides icons of objects for object browser. More...

Inheritance diagram for ModuleBase_IconFactory:
Inheritance graph

Public Member Functions

virtual QIcon getIcon (ObjectPtr theObj)
 Returns Icon for the given object. More...
 

Static Public Member Functions

static ModuleBase_IconFactoryget ()
 Returns icons factory instance. More...
 
static QIcon loadIcon (const QString &theValue)
 Finds an icon for the given value. More...
 
static QPixmap loadPixmap (const QString &theValue)
 Finds a pixmap for the given value. More...
 
static QImage loadImage (const QString &theValue)
 Finds an image for the given value. More...
 

Static Protected Member Functions

static void setFactory (ModuleBase_IconFactory *theFactory)
 Set the current icons factory instance. More...
 

Detailed Description

This is a class which provides icons of objects for object browser.

Member Function Documentation

◆ get()

ModuleBase_IconFactory * ModuleBase_IconFactory::get ( )
static

Returns icons factory instance.

◆ getIcon()

QIcon ModuleBase_IconFactory::getIcon ( ObjectPtr  theObj)
virtual

Returns Icon for the given object.

Parameters
theObjan object

Reimplemented in PartSet_IconFactory.

◆ loadIcon()

QIcon ModuleBase_IconFactory::loadIcon ( const QString &  theValue)
static

Finds an icon for the given value.

The icon is loaded: firstly from qrc file, then by the icon path. If the path contains ":" , it will be treated as absolute path to the icon, or relative path from the plugin library

Parameters
theValuean icon information
Returns
a loaded or empty icon

◆ loadPixmap()

QPixmap ModuleBase_IconFactory::loadPixmap ( const QString &  theValue)
static

Finds a pixmap for the given value.

It is loaded: firstly from qrc file, then by the absolute path. If the pixmap is not loaded, it is searched in relative plugin path

Parameters
theValuea pixmap information
Returns
a loaded or empty pixmap

◆ loadImage()

QImage ModuleBase_IconFactory::loadImage ( const QString &  theValue)
static

Finds an image for the given value.

It is loaded: firstly from qrc file, then by the absolute path. If the image is not loaded, it is searched in relative plugin path

Parameters
theValuea image information
Returns
a loaded or empty pixmap

◆ setFactory()

void ModuleBase_IconFactory::setFactory ( ModuleBase_IconFactory theFactory)
staticprotected

Set the current icons factory instance.

Parameters
theFactorya new factory