SHAPER  9.12.0
PartSet_IconFactory Class Reference

This is a class is redefined in order to provide icons of objects for object browser specific for PartSetModule. More...

Inheritance diagram for PartSet_IconFactory:
Inheritance graph

Public Member Functions

 PartSet_IconFactory (PartSet_Module *theModule)
 Constructor. More...
 
virtual QIcon getIcon (ObjectPtr theObj)
 Returns Icon for the given object. More...
 
virtual void processEvent (const std::shared_ptr< Events_Message > &theMessage)
 Event Listener method. More...
 
virtual EVENTS_EXPORT bool groupMessages ()
 Listener that needs mostly grouped messages received returns true in this method. 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...
 

Protected Member Functions

void groupWhileFlush (const std::shared_ptr< Events_Message > &theMessage)
 Allows to group messages while they are flushed (for flush for groupMessages=true listeners) More...
 
EVENTS_EXPORT void flushGrouped (const Events_ID &theID)
 Sends myGroups on flush finish. More...
 

Static Protected Member Functions

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

Detailed Description

This is a class is redefined in order to provide icons of objects for object browser specific for PartSetModule.

Constructor & Destructor Documentation

◆ PartSet_IconFactory()

PartSet_IconFactory::PartSet_IconFactory ( PartSet_Module theModule)

Constructor.

Member Function Documentation

◆ getIcon()

QIcon PartSet_IconFactory::getIcon ( ObjectPtr  theObj)
virtual

Returns Icon for the given object.

Parameters
theObjan object

Reimplemented from ModuleBase_IconFactory.

◆ processEvent()

void PartSet_IconFactory::processEvent ( const std::shared_ptr< Events_Message > &  theMessage)
virtual

Event Listener method.

Parameters
theMessagean event message

Implements Events_Listener.

◆ get()

ModuleBase_IconFactory * ModuleBase_IconFactory::get ( )
staticinherited

Returns icons factory instance.

◆ loadIcon()

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

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)
staticinherited

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)
staticinherited

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)
staticprotectedinherited

Set the current icons factory instance.

Parameters
theFactorya new factory

◆ groupMessages()

virtual EVENTS_EXPORT bool Events_Listener::groupMessages ( )
inlinevirtualinherited

Listener that needs mostly grouped messages received returns true in this method.

In this case during the message is flushed, all the new messages are grouped, not sended immideately and then sent in the end of flush.

Reimplemented in SketchSolver_Manager, and SketchPlugin_OverConstraintsResolver.

◆ groupWhileFlush()

void Events_Listener::groupWhileFlush ( const std::shared_ptr< Events_Message > &  theMessage)
protectedinherited

Allows to group messages while they are flushed (for flush for groupMessages=true listeners)

◆ flushGrouped()

void Events_Listener::flushGrouped ( const Events_ID theID)
protectedinherited

Sends myGroups on flush finish.