Replace function by another one.

Replace function QETApp::elementInfoKeys() and
QETApp::elementInfoToVar(const QString &info) by function provided by
QETInformation.
This commit is contained in:
Claveau Joshua
2020-11-14 19:09:40 +01:00
parent c87fe8df2f
commit af7d1df5ab
14 changed files with 111 additions and 119 deletions

View File

@@ -386,47 +386,6 @@ ElementsCollectionCache *QETApp::collectionCache()
return(collections_cache_);
}
/**
@brief QETApp::elementInfoKeys
@return all available key for describe an element
*/
QStringList QETApp::elementInfoKeys()
{
QStringList info_list;
info_list << "formula"
<< "label"
<< "plant"
<< "location"
<< "comment"
<< "function"
<< "auxiliary1"
<< "auxiliary2"
<< "description"
<< "designation"
<< "manufacturer"
<< "manufacturer_reference"
<< "machine_manufacturer_reference"
<< "supplier"
<< "quantity"
<< "unity";
return info_list;
}
/**
@brief QETApp::elementInfoToVar
@param info
@return var in form %{my-var} corresponding to the info,
if there is not available var for the given info
the returned var is %{void}
@see QETApp::elementInfoKeys for list
*/
QString QETApp::elementInfoToVar(const QString &info)
{
if (elementInfoKeys().contains(info))
return QString("%{")+info+QString("}");
return (QString ("%{void}"));
}
/**
@brief QETApp::commonTitleBlockTemplatesCollection
@return the common title block templates collection,