graphicsnodelabel.h
Go to the documentation of this file.
1 /***************************************************************************
2  SocNetV: Social Network Visualizer
3  version: 3.1
4  Written in Qt
5 
6  graphicsnodelabel.h - description
7  -------------------
8  copyright : (C) 2005-2023 by Dimitris B. Kalamaras
9  project site : https://socnetv.org
10 
11  ***************************************************************************/
12 
13 /*******************************************************************************
14 * This program is free software: you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation, either version 3 of the License, or *
17 * (at your option) any later version. *
18 * *
19 * This program is distributed in the hope that it will be useful, *
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22 * GNU General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU General Public License *
25 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
26 ********************************************************************************/
27 
28 #ifndef GRAPHICSNODELABEL_H
29 #define GRAPHICSNODELABEL_H
30 
31 #include <QGraphicsTextItem>
32 class GraphicsNode;
33 
34 static const int TypeLabel = QGraphicsItem::UserType+4;
35 static const int ZValueNodeLabel = 80;
36 
37 class GraphicsNodeLabel : public QGraphicsTextItem{
38 public:
39  GraphicsNodeLabel(GraphicsNode * , const QString &text, const int &size );
40 
41  void removeRefs();
42  enum { Type = UserType + 4 };
43  int type() const { return Type; }
44  void setSize(const int &size);
46  GraphicsNode* node() { return source; }
47 private:
49 };
50 
51 #endif
Definition: graphicsnodelabel.h:37
void setSize(const int &size)
Definition: graphicsnodelabel.cpp:47
GraphicsNode * node()
Definition: graphicsnodelabel.h:46
~GraphicsNodeLabel()
Definition: graphicsnodelabel.cpp:58
@ Type
Definition: graphicsnodelabel.h:42
GraphicsNode * source
Definition: graphicsnodelabel.h:48
GraphicsNodeLabel(GraphicsNode *, const QString &text, const int &size)
Definition: graphicsnodelabel.cpp:34
void removeRefs()
Definition: graphicsnodelabel.cpp:53
int type() const
Definition: graphicsnodelabel.h:43
Definition: graphicsnode.h:58
static const int TypeLabel
Definition: graphicsnodelabel.h:34
static const int ZValueNodeLabel
Definition: graphicsnodelabel.h:35