Autonumerotation: Auto numbering isn't increased through the terminal Elements

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3229 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-07-23 19:54:25 +00:00
parent bfa610db89
commit 32938655d7
6 changed files with 118 additions and 46 deletions

View File

@@ -20,10 +20,11 @@
#include "elementscollectionitem.h"
#include "qetapp.h"
#include "QDomElement"
#include "qetgraphicsitem/simpleelement.h"
#include "qetgraphicsitem/reportelement.h"
#include "qetgraphicsitem/masterelement.h"
#include "qetgraphicsitem/slaveelement.h"
#include "simpleelement.h"
#include "reportelement.h"
#include "masterelement.h"
#include "slaveelement.h"
#include "terminalelement.h"
ElementFactory* ElementFactory::factory_ = 0;
/**
@@ -48,8 +49,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));
if (link_type == "slave") return (new SlaveElement (location, qgi, s, state));
if (link_type == "master") return (new MasterElement (location, qgi, s, state));
if (link_type == "slave") return (new SlaveElement (location, qgi, s, state));
if (link_type == "terminal") return (new TerminalElement (location, qgi, s, state));
}
//default if nothing match for link_type