mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
folio report can be linked (basic)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2680 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
#include "reportelement.h"
|
||||
#include "elementtextitem.h"
|
||||
#include "diagramposition.h"
|
||||
|
||||
ReportElement::ReportElement(const ElementsLocation &location, QGraphicsItem *qgi, Diagram *s, int *state) :
|
||||
CustomElement(location, qgi, s, state)
|
||||
@@ -24,6 +25,11 @@ ReportElement::ReportElement(const ElementsLocation &location, QGraphicsItem *qg
|
||||
texts().at(0)->setNoEditable();
|
||||
}
|
||||
|
||||
void ReportElement::linkToElement(Element * elmt) {
|
||||
texts().at(0)->setPlainText(QString ("%1-%2").arg(elmt->diagram()->folioIndex() + 1)
|
||||
.arg(elmt->diagram() -> convertPosition(elmt -> scenePos()).toString()));
|
||||
}
|
||||
|
||||
int ReportElement::linkType() const {
|
||||
return REPORT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user