mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
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:
@@ -129,9 +129,16 @@ void SlaveElement::updateLabel() {
|
|||||||
no_editable = true;
|
no_editable = true;
|
||||||
Element *elmt = linkedElements().first();
|
Element *elmt = linkedElements().first();
|
||||||
label = elmt -> elementInformations()["label"].toString();
|
label = elmt -> elementInformations()["label"].toString();
|
||||||
|
XRefProperties m_properties = elmt->diagram()->defaultXRefProperties(elmt->kindInformations()["type"].toString());
|
||||||
Xreflabel = "(";
|
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 += "-";
|
||||||
Xreflabel += elmt->diagram() -> convertPosition(elmt -> scenePos()).toString();
|
Xreflabel += elmt->diagram() -> convertPosition(elmt -> scenePos()).toString();
|
||||||
Xreflabel += ")";
|
Xreflabel += ")";
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#define SLAVEELEMENT_H
|
#define SLAVEELEMENT_H
|
||||||
|
|
||||||
#include "customelement.h"
|
#include "customelement.h"
|
||||||
|
#include"properties/xrefproperties.h"
|
||||||
|
|
||||||
class SlaveElement : public CustomElement
|
class SlaveElement : public CustomElement
|
||||||
{
|
{
|
||||||
@@ -37,6 +38,7 @@ class SlaveElement : public CustomElement
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QGraphicsTextItem *Xref_item;
|
QGraphicsTextItem *Xref_item;
|
||||||
|
//XRefProperties m_properties;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user