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
71 displayName += QString(
" [%1]").arg(packageName);
73 QList<QString> proxies;
77 proxies.append(QString::fromUtf8(proxyNode.attribute_value(
"value").c_str()));
80 QMap<QString, QString> statechartGroupConfigurations;
83 auto profileName = QString::fromUtf8(configNode.attribute_value(
"profileName").c_str());
84 auto configuration = QString::fromUtf8(configNode.value().c_str());
85 statechartGroupConfigurations[profileName] = configuration;
88 bool generateContext =
92 QString::fromUtf8(groupPath.parent_path().c_str()),
98 statechartGroupConfigurations,
102 ReadChildren(xmlGroupNode, rootNode, group);
103 group->setRootNode(rootNode);
113 if (!f.open(QFile::ReadOnly | QFile::Text))
129 QString basename = QString::fromUtf8(xmlFolderNode.attribute_value(
"basename").c_str());
132 parentNode->appendChild(folderNode);
133 ReadChildren(xmlFolderNode, folderNode, group);
138 QString
filename = QString::fromUtf8(xmlStateNode.attribute_value(
"filename").c_str());
140 xmlStateNode.attribute_as_optional_bool(
"visibility",
"public",
"private",
false);
143 parentNode->appendChild(stateNode);