mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-04 19:40:53 +01:00
Added position and folios variables handling to Elements (Master, Slave and Simple) Label
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4514 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "elementdefinition.h"
|
||||
#include <iostream>
|
||||
#include "terminal.h"
|
||||
#include "diagramposition.h"
|
||||
|
||||
/**
|
||||
Constructeur de la classe CustomElement. Permet d'instancier un element
|
||||
@@ -986,3 +987,11 @@ ElementTextItem* CustomElement::taggedText(const QString &tagg) const {
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
QString CustomElement::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