19 #include "QDomElement" 43 if (location.
xml().hasAttribute(
"link_type"))
45 QString link_type = location.
xml().attribute(
"link_type");
46 if (link_type ==
"next_report" || link_type ==
"previous_report")
return (
new ReportElement(location, link_type, qgi, state));
47 if (link_type ==
"master")
return (
new MasterElement (location, qgi, state));
48 if (link_type ==
"slave")
return (
new SlaveElement (location, qgi, state));
49 if (link_type ==
"terminal")
return (
new TerminalElement (location, qgi, state));
The ReportElement class this class represent an element that can be linked to an other ReportElement ...
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.
The MasterElement class This class is a custom element, with extended behavior to be a master element...
Element * createElement(const ElementsLocation &, QGraphicsItem *=nullptr, int *=nullptr)
ElementFactory::createElement.
The SimpleElement class this class represente a simple element with no specific attribute.
QDomElement xml() const
ElementsLocation::xml.
static ElementFactory * factory_
bool exist() const
ElementsLocation::exist.
bool isElement() const
ElementsLocation::isElement.