X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IconFactory.h;h=716007160657210cce893e7ba62c81d16dda246d;hb=561ec84c4405975d78d8cd7d50c5bfa6dba8d738;hp=3a7c99d4eaa7d9ac070edcb37aa559574b11dd00;hpb=82d3fff7d0ed2c089da5aa6b106789be076081f3;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IconFactory.h b/src/ModuleBase/ModuleBase_IconFactory.h index 3a7c99d4e..716007160 100644 --- a/src/ModuleBase/ModuleBase_IconFactory.h +++ b/src/ModuleBase/ModuleBase_IconFactory.h @@ -9,7 +9,10 @@ #include "ModuleBase.h" #include + +#include #include +#include /**\class ModuleBase_IconFactory * \ingroup GUI @@ -25,7 +28,28 @@ public: /// \param theObj an object virtual QIcon getIcon(ObjectPtr theObj); + /// 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 + /// \param theValue an icon information + /// \return a loaded or empty icon + static QIcon loadIcon(const QString& theValue); + + /// 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 + /// \param theValue a pixmap information + /// \return a loaded or empty pixmap + static QPixmap loadPixmap(const QString& theValue); + + /// 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 + /// \param theValue a image information + /// \return a loaded or empty pixmap + static QImage loadImage(const QString& theValue); + protected: + ModuleBase_IconFactory(); + /// Set the current icons factory instance /// \param theFactory a new factory static void setFactory(ModuleBase_IconFactory* theFactory);