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:
blacksun
2013-12-29 18:37:34 +00:00
parent ea5902fe38
commit 5fe7286998
4 changed files with 12 additions and 0 deletions

View File

@@ -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;
}