+\r
+ /**********************************************************\r
+ 0 : getting parameters\r
+ ***********************************************************/\r
+ int width = 0;\r
+ int height = 0;\r
+ int lineLength = 0;\r
+ int gapLength = 0;\r
+ QString fontName="";\r
+ int fontSize;\r
+ QString autoConn="";\r
+ QDomNode paramsNode = root.elementsByTagName("parameters").at(0);\r
+\r
+ QDomElement blocksElt = paramsNode.firstChildElement("block_view");\r
+ width = blocksElt.attribute("width","none").toInt(&ok);\r
+ if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));\r
+ height = blocksElt.attribute("height","none").toInt(&ok);\r
+ if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));\r
+ fontName = blocksElt.attribute("font","none");\r
+ if(fontName == "none") throw(Exception(PROJECTFILE_CORRUPTED));\r
+ fontSize = blocksElt.attribute("font_size","none").toInt(&ok);\r
+ if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));\r
+ defaultBlockWidth = width;\r
+ defaultBlockHeight = height;\r
+ defaultBlockFontName = fontName;\r
+ defaultBlockFontSize = fontSize;\r
+ defaultBlockFont = QFont(defaultBlockFontName, defaultBlockFontSize);\r
+\r
+ QDomElement ifacesElt = paramsNode.firstChildElement("interface_view");\r
+ lineLength = ifacesElt.attribute("line_length","none").toInt(&ok);\r
+ if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));\r
+ width = ifacesElt.attribute("width","none").toInt(&ok);\r
+ if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));\r
+ height = ifacesElt.attribute("height","none").toInt(&ok);\r
+ if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));\r
+ fontName = ifacesElt.attribute("font","none");\r
+ if(fontName == "none") throw(Exception(PROJECTFILE_CORRUPTED));\r
+ fontSize = ifacesElt.attribute("font_size","none").toInt(&ok);\r
+ if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));\r
+ arrowLineLength = lineLength;\r
+ arrowWidth = width;\r
+ arrowHeight = height;\r
+ defaultIfaceFontName = fontName;\r
+ defaultIfaceFontSize = fontSize;\r
+ defaultIfaceFont = QFont(defaultIfaceFontName, defaultIfaceFontSize);\r
+\r
+ QDomElement connsElt = paramsNode.firstChildElement("connection_view");\r
+ gapLength = connsElt.attribute("gap_length","none").toInt(&ok);\r
+ if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));\r
+ autoConn = connsElt.attribute("auto_conn","none");\r
+ if (autoConn == "false") {\r
+ autoConnMainClk = false;\r
+ }\r
+ else {\r
+ autoConnMainClk = true;\r
+ }\r
+ connGapLength = gapLength;\r
+\r