Reserve one name outside a pattern data base.
--HG-- branch : develop
This commit is contained in:
parent
3934a6e9b6
commit
b7f731802d
|
@ -1749,7 +1749,13 @@ void VPattern::SetAuthor(const QString &text)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VPattern::GenerateLabel(const LabelType &type) const
|
||||
/**
|
||||
* @brief GenerateLabel create label for pattern piece of point.
|
||||
* @param type type of the label.
|
||||
* @param reservedName reversed point name. Use when need reserve name, but point is not in data base yet.
|
||||
* @return unique name for current pattern piece.
|
||||
*/
|
||||
QString VPattern::GenerateLabel(const LabelType &type, const QString &reservedName) const
|
||||
{
|
||||
QDomNodeList drawList = elementsByTagName(TagDraw);
|
||||
|
||||
|
@ -1805,7 +1811,7 @@ QString VPattern::GenerateLabel(const LabelType &type) const
|
|||
{
|
||||
break;
|
||||
}
|
||||
} while (data->IsUnique(name) == false);
|
||||
} while (data->IsUnique(name) == false || name == reservedName);
|
||||
qCDebug(vXML, "Point label: %s", name.toUtf8().constData());
|
||||
return name;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
QString GetAuthor() const;
|
||||
void SetAuthor(const QString &text);
|
||||
|
||||
virtual QString GenerateLabel(const LabelType &type)const;
|
||||
virtual QString GenerateLabel(const LabelType &type, const QString &reservedName = QString())const;
|
||||
|
||||
public slots:
|
||||
void LiteParseTree(const Document &parse);
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
virtual void IncrementReferens(quint32 id) const=0;
|
||||
virtual void DecrementReferens(quint32 id) const=0;
|
||||
|
||||
virtual QString GenerateLabel(const LabelType &type)const=0;
|
||||
virtual QString GenerateLabel(const LabelType &type, const QString &reservedName = QString())const=0;
|
||||
|
||||
virtual void UpdateToolData(const quint32 &id, VContainer *data)=0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user