mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
add base for master element feature
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2863 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "QDomElement"
|
||||
#include "qetgraphicsitem/simpleelement.h"
|
||||
#include "qetgraphicsitem/reportelement.h"
|
||||
#include "qetgraphicsitem/masterelement.h"
|
||||
|
||||
ElementFactory* ElementFactory::factory_ = 0;
|
||||
/**
|
||||
@@ -46,7 +47,9 @@ Element * ElementFactory::createElement(const ElementsLocation &location, QGraph
|
||||
if (element_definition->xml().hasAttribute("link_type")) {
|
||||
QString link_type = element_definition->xml().attribute("link_type");
|
||||
if (link_type == "next_report" || link_type == "previous_report") return (new ReportElement(location, link_type, qgi, s, state));
|
||||
if (link_type == "master") return (new MasterElement(location, qgi, s, state));
|
||||
}
|
||||
|
||||
//default if nothing match for link_type
|
||||
return (new SimpleElement(location, qgi, s, state));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user