VPTissue Reference Manual
NodeItem.h
Go to the documentation of this file.
1 #ifndef NODEITEM_H_
2 #define NODEITEM_H_
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "bio/Node.h"
23 #include "bio/Cell.h"
24 
25 #include <QGraphicsScene>
26 #include <QGraphicsItem>
27 
28 namespace SimPT_Shell {
29 
33 class NodeItem: public QGraphicsItem
34 {
35 public:
36  NodeItem(SimPT_Sim::Node* n, double node_magnification);
37 
38  ~NodeItem() {}
39 
40  SimPT_Sim::Node& getNode() const { return *m_node; }
41 
42  QRectF boundingRect() const;
43 
44  void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
45 
46  QPainterPath shape() const;
47 
48  void setBrush(QBrush newbrush) { brush = newbrush; }
49 
50  void setColor();
51 
52 protected:
53  QBrush brush;
54  QRectF ellipsesize;
55 
56 private:
57  SimPT_Sim::Node* m_node;
58 };
59 
60 } // namespace
61 
62 #endif // end_of_include_guard
Node in cell wall.
Definition: Node.h:39
Namespace for SimPT shell package.
Definition: Client.cpp:50
Interface for Cell.
Interface for Node.
see the online Qt documentation
Graphic wrapper for Node.
Definition: NodeItem.h:33
see the online Qt documentation