COPASI API  4.16.103
CQConnectionGraphicsItem.h
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 
6 #ifndef QCONNECTION_GRAPHICS_ITEM
7 #define QCONNECTION_GRAPHICS_ITEM
8 
9 #include <QtGui/QGraphicsItemGroup>
10 #include <QtGui/QPainterPath>
11 #include <QtCore/QSharedPointer>
12 #include <QtGui/QStyleOptionGraphicsItem>
13 #include <layout/CLCurve.h>
15 
16 class CLGlyphWithCurve;
17 class CLStyle;
18 class CQConnectionGraphicsItem : public QObject, public CQCopasiGraphicsItem, public QGraphicsItemGroup
19 {
20  Q_OBJECT
21 public:
22  CQConnectionGraphicsItem(const CLGlyphWithCurve* glyph, const CLRenderResolver* resolver = NULL);
23  virtual ~CQConnectionGraphicsItem();
24  static QSharedPointer<QPainterPath> getPath(const CLCurve& curve);
25 
26 protected:
27  virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option = new QStyleOptionGraphicsItem() , QWidget *widget = 0);
28  void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
29  virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
30 
31  bool mWasMoved;
32 };
33 
34 #endif
CQConnectionGraphicsItem(const CLGlyphWithCurve *glyph, const CLRenderResolver *resolver=NULL)
static QSharedPointer< QPainterPath > getPath(const CLCurve &curve)
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option=new QStyleOptionGraphicsItem(), QWidget *widget=0)
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)