예제 #1
0
파일: metaPlugin.cpp 프로젝트: nfrey/qreal
void MetaPlugin::changeElement(const QString &diagramName, const QString &element, const QString &elementDisplayName,
							   ElementImpl* impl, QDomElement elementForIcon)
{
	QString normalizedName = NameNormalizer::normalize(getQualifiedName(diagramName, element));
	mElementsNameMap[diagramName][normalizedName] = elementDisplayName;
	mGraphicalObjects[diagramName][normalizedName] = dynamic_cast<MetaElementImpl*>(impl);
	mIconMap[diagramName][normalizedName] = elementForIcon;
}
예제 #2
0
// Returns qualified names of symbols with any of IDs in the index.
std::vector<std::string> lookup(const SymbolIndex &I, ArrayRef<SymbolID> IDs) {
  LookupRequest Req;
  Req.IDs.insert(IDs.begin(), IDs.end());
  std::vector<std::string> Results;
  I.lookup(Req, [&](const Symbol &Sym) {
    Results.push_back(getQualifiedName(Sym));
  });
  return Results;
}
예제 #3
0
파일: metaPlugin.cpp 프로젝트: nfrey/qreal
void MetaPlugin::addElement(const QString &diagramName, const QString &element, const QString &elementDisplayName,
							ElementImpl* impl, QDomElement elementForIcon)
{
	QString normalizedName = NameNormalizer::normalize(getQualifiedName(diagramName, element));
	if (mElementsNameMap[diagramName].contains(normalizedName))
		mElementsNameMap[diagramName].insert(normalizedName + "Copy", elementDisplayName + "Copy");
	else
		mElementsNameMap[diagramName].insert(normalizedName, elementDisplayName);

	mGraphicalObjects[diagramName].insert(normalizedName, dynamic_cast<MetaElementImpl*>(impl));
	mIconMap[diagramName].insert(normalizedName, elementForIcon);
}
예제 #4
0
파일: metaPlugin.cpp 프로젝트: nfrey/qreal
void MetaPlugin::addProperty(const QString &diagramName, const QString &element, const QString &property, const QString &defaultValue)
{
	QString normalizedName = NameNormalizer::normalize(getQualifiedName(diagramName, element));
	if (mPropertiesDescriptionMap[diagramName].contains(normalizedName))
	{
		mPropertiesDescriptionMap[diagramName][normalizedName].insert(property, defaultValue);
		mPropertyDefault[normalizedName].insert(property, defaultValue);
	}
	else
	{
		QMap<QString, QString> map;
		map.insert(property, defaultValue);
		mPropertiesDescriptionMap[diagramName].insert(normalizedName, map);
		mPropertyDefault.insert(normalizedName, map);
	}
}
 String Attribute::getStringValue() const
 {
     return getQualifiedName() + "=" + getQuotedValue();
 }