32 #include <boost/regex.hpp>
36 #include <QTextStream>
44 GuiStatechartGroupXmlReader::GuiStatechartGroupXmlReader()
54 QString name = QString::fromUtf8(xmlGroupNode.
attribute_value(
"name").c_str());
57 QString packageName = QString::fromUtf8(xmlGroupNode.
attribute_value(
"package").c_str());
59 QString displayName = name;
60 boost::regex projectNameRegex(
"(\\w+)/statecharts/\\w+/?$");
61 boost::match_results<std::string::const_iterator> match;
62 std::filesystem::path groupPath(groupDefinitionFile.toUtf8().data());
63 const std::string groupPathStr(groupPath.parent_path().c_str());
65 QFileInfo(QString::fromStdString(groupPath.string())).permissions() & QFile::WriteUser
70 displayName += QString(
" [%1]").arg(packageName);
72 QList<QString> proxies;
76 proxies.append(QString::fromUtf8(proxyNode.attribute_value(
"value").c_str()));
79 QMap<QString, QString> statechartGroupConfigurations;
82 auto profileName = QString::fromUtf8(configNode.attribute_value(
"profileName").c_str());
83 auto configuration = QString::fromUtf8(configNode.value().c_str());
84 statechartGroupConfigurations[profileName] = configuration;
87 bool generateContext =
91 QString::fromUtf8(groupPath.parent_path().c_str()),
97 statechartGroupConfigurations,
101 ReadChildren(xmlGroupNode, rootNode, group);
102 group->setRootNode(rootNode);
112 if (!f.open(QFile::ReadOnly | QFile::Text))
128 QString basename = QString::fromUtf8(xmlFolderNode.attribute_value(
"basename").c_str());
131 parentNode->appendChild(folderNode);
132 ReadChildren(xmlFolderNode, folderNode, group);
137 QString
filename = QString::fromUtf8(xmlStateNode.attribute_value(
"filename").c_str());
139 xmlStateNode.attribute_as_optional_bool(
"visibility",
"public",
"private",
false);
142 parentNode->appendChild(stateNode);