QElectroTech
0.70
|
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 | |
Element * | createElement (const ElementsLocation &, QGraphicsItem *=nullptr, int *=nullptr) |
ElementFactory::createElement. More... | |
Static Public Member Functions | |
static ElementFactory * | Instance () |
static void | dropInstance () |
Private Member Functions | |
ElementFactory () | |
ElementFactory (const ElementFactory &) | |
ElementFactory | operator= (const ElementFactory &) |
~ElementFactory () | |
Static Private Attributes | |
static ElementFactory * | factory_ = nullptr |
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.
|
inlineprivate |
Definition at line 66 of file elementfactory.h.
Referenced by Instance().
|
private |
|
inlineprivate |
Definition at line 69 of file elementfactory.h.
Element * ElementFactory::createElement | ( | const ElementsLocation & | location, |
QGraphicsItem * | qgi = nullptr , |
||
int * | state = nullptr |
||
) |
ElementFactory::createElement.
location | create element at this location |
qgi | parent item for this elemnt |
state | state of the creation |
Definition at line 34 of file elementfactory.cpp.
References ElementsLocation::exist(), ElementsLocation::isElement(), and ElementsLocation::xml().
Referenced by ElementsTreeView::startElementDrag().
|
inlinestatic |
Definition at line 50 of file elementfactory.h.
References factory_.
Referenced by QETApp::~QETApp().
|
inlinestatic |
Definition at line 39 of file elementfactory.h.
References ElementFactory(), and factory_.
Referenced by DiagramEventAddElement::addElement(), DiagramEventAddElement::buildElement(), ElementsCollectionCache::fetchData(), Diagram::fromXml(), and ElementsTreeView::startElementDrag().
|
private |
|
staticprivate |
Definition at line 62 of file elementfactory.h.
Referenced by dropInstance(), and Instance().