mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-15 22:49:57 +01:00
Add ability to store informations for element like label, manufacturer, ref etc....
Add widget to edit it, save/load works Informations are stored in a diagramcontext, this class was modified (new feature) to store information but keep compatibilty with older version. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2850 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -337,6 +337,36 @@ 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 << "label"
|
||||
<< "comment"
|
||||
<< "manufacturer"
|
||||
<< "manufacturer-reference"
|
||||
<< "machine-manufacturer-reference";
|
||||
return info_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementsProperties::translatedInfo
|
||||
* Return the translated information key given by @info
|
||||
* If @info don't match, return an empty string
|
||||
* @param info the key to be translated
|
||||
* @return
|
||||
*/
|
||||
QString QETApp::elementTranslatedInfoKey(QString &info) {
|
||||
if (info == "label") return tr("Label");
|
||||
else if (info == "comment") return tr("Commentaire");
|
||||
else if (info == "manufacturer") return tr("Fabriquant");
|
||||
else if (info == "manufacturer-reference") return tr("R\351f\351rence fabriquant");
|
||||
else if (info == "machine-manufacturer-reference") return tr("R\351f\351rence fabriquant machine");
|
||||
return (info);
|
||||
}
|
||||
|
||||
/**
|
||||
@return the common title block templates collection, i.e. the one provided
|
||||
by QElecrotTech
|
||||
|
||||
Reference in New Issue
Block a user