COPASI API  4.16.103
CQLabelGraphicsItem.cpp
Go to the documentation of this file.
1 // Copyright (C) 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
8 #include <layout/CLGlyphs.h>
10 
12  : QGraphicsTextItem(textGlyph->getText().c_str())
13  , CQCopasiGraphicsItem(resolver, resolver != NULL ? resolver->resolveStyle(textGlyph) : NULL)
14 {
15  //setTextInteractionFlags(Qt::TextEditorInteraction);
16  //setFlag(QGraphicsItem::ItemIsMovable);
17  //setFlag(QGraphicsItem::ItemIsSelectable);
18 
19  setPos(textGlyph->getBoundingBox().getPosition().getX(),
20  textGlyph->getBoundingBox().getPosition().getY());
21 
22  CQRenderConverter::applyStyle(this, &textGlyph->getBoundingBox(), mpStyle == NULL ? NULL : mpStyle->getGroup(), mpResolver);
23 }
24 
26 {
27 }
const CLBoundingBox & getBoundingBox() const
const C_FLOAT64 & getX() const
Definition: CLBase.h:83
const CLPoint & getPosition() const
Definition: CLBase.h:265
const CLGroup * getGroup() const
Definition: CLStyle.cpp:91
static void applyStyle(QGraphicsTextItem *item, const CLBoundingBox *bounds, const CLGroup *style, const CLRenderResolver *resolver)
const CLRenderResolver * mpResolver
CQLabelGraphicsItem(const CLTextGlyph *textGlyph, const CLRenderResolver *resolver=NULL)
const C_FLOAT64 & getY() const
Definition: CLBase.h:84