COPASI API  4.16.103
CGraphNode.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/layoutUI/CGraphNode.h,v $
3 // $Revision: 1.10 $
4 // $Name: $
5 // $Author: gauges $
6 // $Date: 2010/01/24 11:33:17 $
7 // End CVS Header
8 
9 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
11 // and The University of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 #ifndef CGRAPHNODE_H_
19 #define CGRAPHNODE_H_
20 
21 #include <vector>
22 
23 #include "copasi.h"
24 
25 #include "layout/CLGlyphs.h"
26 #include "layout/CLCurve.h"
27 
28 class CGraphNode : public CLMetabGlyph
29 {
30 private:
32  std::string morigNodeKey;
33  std::string mObjectKey; // corresponding sbml object key
34 
35  std::string mLabelText; // if node has a label, the string content should be stored here (additionally to label)
36 
38  //std::vector<int> mConnectedCurveIndices; // indices of curves in CQGLNetworkPainter viewerNodes attached to the node
39 
40 public:
41 
42  CGraphNode(const std::string & name = "GraphNode",
43  const CCopasiContainer * pParent = NULL);
44 
45  CGraphNode(const CLMetabGlyph & src,
46  const CCopasiContainer * pParent = NULL);
47 
48  CGraphNode(const CGraphNode & src,
49 
50  const CCopasiContainer * pParent = NULL);
51 
52  C_FLOAT64 getSize() {return this->msize;}
53  //void setSize(C_FLOAT64 newSize, std::vector<CLCurve> *viewerCurves);
54  void setSize(C_FLOAT64 newSize);
55 
56  std::string getObjectKey() {return this->mObjectKey;}
57  void setObjectKey(std::string key) {mObjectKey = key;}
58 
59  //void adaptCurvesForRectangles(std::vector<CLCurve> *viewerCurves);
60 
61  std::string getOrigNodeKey() {return this->morigNodeKey;}
62 
63  std::string getLabelText() {return this->mLabelText;}
64  void setLabelText(std::string name);
65 
66  //std::vector<int> getCurveIndices(){return this->mConnectedCurveIndices;}
67 
68  // void addCurveIndex(int indx)
69  // {
70  // this->mConnectedCurveIndices.push_back(indx);
71  //}
72  //
73  // void addArrowIndex(int indx)
74  // {
75  // this->mConnectedCurveIndices.push_back(indx);
76  //}
77  // void addCurveIndex(int indx)
78  // {
79  // this->mConnectedCurveIndices.push_back(indx);
80  //}
81 
82  virtual void scale(const double & scaleFactor)
83  {
84  this->mBBox.scale(scaleFactor);
85  this->msize = this->msize * scaleFactor;
86  }
87 
88  virtual void scale(const double & scaleFactor, bool changeSizeP)
89  {
90  this->mBBox.scale(scaleFactor);
91 
92  if (changeSizeP)
93  this->msize = this->msize * scaleFactor;
94  }
95 
96  friend std::ostream & operator<<(std::ostream &os, const CGraphNode & gn);
97 };
98 
99 #endif
std::string getObjectKey()
Definition: CGraphNode.h:56
CGraphNode(const std::string &name="GraphNode", const CCopasiContainer *pParent=NULL)
Definition: CGraphNode.cpp:31
std::string mLabelText
Definition: CGraphNode.h:35
CLPoint getPointOnRectangle(CLBoundingBox r, CLPoint p)
void scale(const double &scaleFactor)
Definition: CLBase.h:285
C_FLOAT64 getSize()
Definition: CGraphNode.h:52
void setLabelText(std::string name)
Definition: CGraphNode.cpp:79
Definition: CLBase.h:54
CLBoundingBox mBBox
virtual void scale(const double &scaleFactor, bool changeSizeP)
Definition: CGraphNode.h:88
virtual void scale(const double &scaleFactor)
Definition: CGraphNode.h:82
C_FLOAT64 msize
Definition: CGraphNode.h:31
std::string getOrigNodeKey()
Definition: CGraphNode.h:61
std::string morigNodeKey
Definition: CGraphNode.h:32
void setSize(C_FLOAT64 newSize)
Definition: CGraphNode.cpp:61
friend std::ostream & operator<<(std::ostream &os, const CGraphNode &gn)
Definition: CGraphNode.cpp:67
#define C_FLOAT64
Definition: copasi.h:92
std::string mObjectKey
Definition: CGraphNode.h:33
void setObjectKey(std::string key)
Definition: CGraphNode.h:57
std::string getLabelText()
Definition: CGraphNode.h:63