A concrete factory that builds a graphic widget used to configure a graphic associate with an external graphic element that references a local image. e.g. a SVG file, a PNG file, etc. More...
#include <LocalGraphicWidgetFactory.h>
Public Types | |
typedef FactoryDictionary < AbstractFactory < AbstractGraphicWidget, std::string, TKEYCOMPARE > , std::string, TKEYCOMPARE > | dictionary_type |
typedef AbstractFactory | factory_type |
Public Member Functions | |
const std::string & | getKey () const |
It returns the factory key associated to the concreate factory. More... | |
Public Destructor | |
Destructor. | |
~LocalGraphicWidgetFactory () | |
Destructor. More... | |
Static Public Member Functions | |
static const factory_type * | find (const std::string &factoryKey) |
static dictionary_type & | getDictionary () |
It returns a reference to the internal dictionary of concrete factories. More... | |
static AbstractGraphicWidget * | make (const std::string &factoryKey) |
It creates an object with the appropriated factory. More... | |
static void | RegisteredWidgets (std::vector< std::string > &keys) |
It informs the key of each registered graphic widget factory. More... | |
Public Initializer | |
Methods for the control of the factory singleton. | |
static void | initialize () |
It initializes the factory: the singleton instance will be registered in the abstract factory AbstractGraphicWidgetFactory. More... | |
static void | finalize () |
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory AbstractGraphicWidgetFactory. More... | |
Protected Member Functions | |
Re-implementation of Pure Virtual Method | |
Concrete factory methods. | |
AbstractGraphicWidget * | build () |
Concrete factories (derived from this one) must implement this method in order to create objects. More... | |
Protected Initializers | |
Initializers. | |
LocalGraphicWidgetFactory () | |
It creates the factory. More... | |
Protected Attributes | |
std::string | m_factoryKey |
The key that identifies the concrete factory: it will be used for unregistering the factory during destruction. More... | |
Static Private Attributes | |
static LocalGraphicWidgetFactory * | sm_factory |
A pointer to the global factory. More... | |
static std::string | sm_factoryKey |
The factory key. More... | |
A concrete factory that builds a graphic widget used to configure a graphic associate with an external graphic element that references a local image. e.g. a SVG file, a PNG file, etc.
Definition at line 48 of file LocalGraphicWidgetFactory.h.
|
inherited |
Definition at line 73 of file AbstractFactory.h.
|
inherited |
Definition at line 77 of file AbstractFactory.h.
te::qt::widgets::LocalGraphicWidgetFactory::~LocalGraphicWidgetFactory | ( | ) |
Destructor.
Definition at line 49 of file LocalGraphicWidgetFactory.cpp.
|
protected |
It creates the factory.
The key of a LocalGraphicWidgetFactory is a string.
factoryKey | The key that identifies the factory. |
Definition at line 58 of file LocalGraphicWidgetFactory.cpp.
Referenced by initialize().
|
protectedvirtual |
Concrete factories (derived from this one) must implement this method in order to create objects.
Implements te::common::AbstractFactory< AbstractGraphicWidget, std::string >.
Definition at line 53 of file LocalGraphicWidgetFactory.cpp.
|
static |
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory AbstractGraphicWidgetFactory.
Definition at line 43 of file LocalGraphicWidgetFactory.cpp.
Referenced by te::qt::widgets::Module::finalize(), and initialize().
|
staticinherited |
|
staticinherited |
It returns a reference to the internal dictionary of concrete factories.
The dictionary is a singleton.
|
inherited |
It returns the factory key associated to the concreate factory.
|
static |
It initializes the factory: the singleton instance will be registered in the abstract factory AbstractGraphicWidgetFactory.
Definition at line 37 of file LocalGraphicWidgetFactory.cpp.
References finalize(), LocalGraphicWidgetFactory(), and sm_factory.
Referenced by te::qt::widgets::Module::initialize().
|
staticinherited |
It creates an object with the appropriated factory.
factoryKey | A key that identifies the factory used to build the object. |
Exception | If the concrete factory is not specified or the object can not be built for any reason this methiod may throws an exception. |
Referenced by te::qt::widgets::GraphicSelectorWidget::GraphicSelectorWidget().
|
staticinherited |
It informs the key of each registered graphic widget factory.
keys | A pre-created vector of string that will be filled with the keys of each registered graphic widget factory. |
Definition at line 33 of file AbstractGraphicWidgetFactory.cpp.
References te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::begin(), te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::end(), and te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::getDictionary().
Referenced by te::qt::widgets::GraphicSelectorWidget::GraphicSelectorWidget().
|
protectedinherited |
The key that identifies the concrete factory: it will be used for unregistering the factory during destruction.
Definition at line 136 of file AbstractFactory.h.
|
staticprivate |
A pointer to the global factory.
Definition at line 111 of file LocalGraphicWidgetFactory.h.
Referenced by initialize().
|
staticprivate |
The factory key.
Definition at line 110 of file LocalGraphicWidgetFactory.h.