View mode works with Slave Element

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4494 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
dfochi
2016-05-21 20:28:25 +00:00
parent aa45a98ad5
commit a72c5beed1
2 changed files with 11 additions and 2 deletions

View File

@@ -129,9 +129,16 @@ void SlaveElement::updateLabel() {
no_editable = true;
Element *elmt = linkedElements().first();
label = elmt -> elementInformations()["label"].toString();
XRefProperties m_properties = elmt->diagram()->defaultXRefProperties(elmt->kindInformations()["type"].toString());
Xreflabel = "(";
Xreflabel += QString::number(elmt->diagram()->folioIndex()+1);
XRefProperties::ViewMode vw = m_properties.viewMode();
if (vw == XRefProperties::Index)
{
Xreflabel += QString::number(elmt->diagram()->folioIndex()+1);
}
else if (vw == XRefProperties::FolioLabel){
Xreflabel += elmt->diagram()->border_and_titleblock.folio();
}
Xreflabel += "-";
Xreflabel += elmt->diagram() -> convertPosition(elmt -> scenePos()).toString();
Xreflabel += ")";

View File

@@ -19,6 +19,7 @@
#define SLAVEELEMENT_H
#include "customelement.h"
#include"properties/xrefproperties.h"
class SlaveElement : public CustomElement
{
@@ -37,6 +38,7 @@ class SlaveElement : public CustomElement
private:
QGraphicsTextItem *Xref_item;
//XRefProperties m_properties;
};