[qet] [4494] View mode works with Slave Element |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4494
Author: dfochi
Date: 2016-05-21 22:28:25 +0200 (Sat, 21 May 2016)
Log Message:
-----------
View mode works with Slave Element
Modified Paths:
--------------
trunk/sources/qetgraphicsitem/slaveelement.cpp
trunk/sources/qetgraphicsitem/slaveelement.h
Modified: trunk/sources/qetgraphicsitem/slaveelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/slaveelement.cpp 2016-05-20 20:31:55 UTC (rev 4493)
+++ trunk/sources/qetgraphicsitem/slaveelement.cpp 2016-05-21 20:28:25 UTC (rev 4494)
@@ -129,9 +129,16 @@
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 += ")";
Modified: trunk/sources/qetgraphicsitem/slaveelement.h
===================================================================
--- trunk/sources/qetgraphicsitem/slaveelement.h 2016-05-20 20:31:55 UTC (rev 4493)
+++ trunk/sources/qetgraphicsitem/slaveelement.h 2016-05-21 20:28:25 UTC (rev 4494)
@@ -19,6 +19,7 @@
#define SLAVEELEMENT_H
#include "customelement.h"
+#include"properties/xrefproperties.h"
class SlaveElement : public CustomElement
{
@@ -37,6 +38,7 @@
private:
QGraphicsTextItem *Xref_item;
+ //XRefProperties m_properties;
};