QElectroTech  0.70
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
ElementFactory Class Reference

The ElementFactory class this class is a pattern factory and also a singleton factory. this class create new instance of herited class element like simple element or report element. More...

#include <elementfactory.h>

Public Member Functions

ElementcreateElement (const ElementsLocation &, QGraphicsItem *=nullptr, int *=nullptr)
 ElementFactory::createElement. More...
 

Static Public Member Functions

static ElementFactoryInstance ()
 
static void dropInstance ()
 

Private Member Functions

 ElementFactory ()
 
 ElementFactory (const ElementFactory &)
 
ElementFactory operator= (const ElementFactory &)
 
 ~ElementFactory ()
 

Static Private Attributes

static ElementFactoryfactory_ = nullptr
 

Detailed Description

The ElementFactory class this class is a pattern factory and also a singleton factory. this class create new instance of herited class element like simple element or report element.

Definition at line 34 of file elementfactory.h.

Constructor & Destructor Documentation

◆ ElementFactory() [1/2]

ElementFactory::ElementFactory ( )
inlineprivate

Definition at line 66 of file elementfactory.h.

Referenced by Instance().

◆ ElementFactory() [2/2]

ElementFactory::ElementFactory ( const ElementFactory )
private

◆ ~ElementFactory()

ElementFactory::~ElementFactory ( )
inlineprivate

Definition at line 69 of file elementfactory.h.

Member Function Documentation

◆ createElement()

Element * ElementFactory::createElement ( const ElementsLocation location,
QGraphicsItem *  qgi = nullptr,
int *  state = nullptr 
)

ElementFactory::createElement.

Parameters
locationcreate element at this location
qgiparent item for this elemnt
statestate of the creation
Returns
the element or 0

Definition at line 34 of file elementfactory.cpp.

References ElementsLocation::exist(), ElementsLocation::isElement(), and ElementsLocation::xml().

Referenced by ElementsTreeView::startElementDrag().

◆ dropInstance()

static void ElementFactory::dropInstance ( )
inlinestatic

Definition at line 50 of file elementfactory.h.

References factory_.

Referenced by QETApp::~QETApp().

◆ Instance()

static ElementFactory* ElementFactory::Instance ( )
inlinestatic

◆ operator=()

ElementFactory ElementFactory::operator= ( const ElementFactory )
private

Member Data Documentation

◆ factory_

ElementFactory * ElementFactory::factory_ = nullptr
staticprivate

Definition at line 62 of file elementfactory.h.

Referenced by dropInstance(), and Instance().


The documentation for this class was generated from the following files: