mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
Nomenclature export(all fields exported to csv) and Comment field(displayed on editor) handle position and folio variables
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4521 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -635,3 +635,17 @@ void Element::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) {
|
||||
m_mouse_over = false;
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Element::assignVariables()
|
||||
* Assign variables values
|
||||
* @param label, string to be changed
|
||||
* @param elmt, element to extract variables values
|
||||
*/
|
||||
QString Element::assignVariables(QString label, Element *elmt){
|
||||
label.replace("%f", QString::number(elmt->diagram()->folioIndex()+1));
|
||||
label.replace("%F", elmt->diagram() -> border_and_titleblock.folio());
|
||||
label.replace("%c", QString::number(elmt->diagram() -> convertPosition(elmt -> scenePos()).number()));
|
||||
label.replace("%l", elmt->diagram() -> convertPosition(elmt -> scenePos()).letter());
|
||||
return label;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user