28 #ifndef GRAPHICSWIDGET_H
29 #define GRAPHICSWIDGET_H
32 #include <QGraphicsView>
63 QString createEdgeName(
const int &v1,
65 const int &relation=-1);
67 void setInitNodeSize(
int);
69 void setInitZoomIndex (
const int &);
70 void setMaxZoomIndex (
const int &);
73 void setSelectedNodes(QList<int> list);
75 QList<QGraphicsItem *> selectedItems();
76 QList<int> selectedNodes();
77 QList<SelectedEdge> selectedEdges();
89 void setNumbersInsideNodes(
const bool &toggle);
91 void setAllItemsVisibility(
int,
bool);
93 void removeAllItems(
int);
97 void wheelEvent(QWheelEvent *event);
98 void mouseDoubleClickEvent ( QMouseEvent * e );
99 void mousePressEvent ( QMouseEvent * e );
100 void mouseReleaseEvent(QMouseEvent * e );
101 void resizeEvent( QResizeEvent *e );
105 void handleSelectionChanged();
107 void relationSet(
int relation);
109 void drawNode(
const QPointF &p,
112 const QString &nodeShape,
113 const QString &nodeIconPath,
114 const QString &nodeColor,
115 const QString &numberColor,
116 const int &numberSize,
117 const int &numberDistance,
118 const QString &nodeLabel,
119 const QString &labelColor,
120 const int &labelSize,
121 const int &labelDistance);
122 void removeNode(
const int &nodeNum);
123 void setNodeVisibility(
const int &nodeNum,
const bool &toggle );
125 void moveNode(
const int &num,
const qreal &x,
const qreal &y);
127 bool setNodeSize(
const int &nodeNumber,
const int &size=0);
128 void setNodeSizeAll(
const int &size=0);
130 bool setNodeShape(
const int &nodeNum,
131 const QString &shape,
132 const QString &iconPath=QString());
133 bool setNodeColor(
const int &nodeNum,
const QString &color);
135 void setNodeNumberColor(
const int &nodeNum,
const QString &color);
136 void setNodeNumberVisibility(
const bool &toggle);
137 bool setNodeNumberSize(
const int &nodeNum,
const int &size=0);
138 bool setNodeNumberDistance(
const int &,
const int &distance=0);
140 void setNodeLabelsVisibility(
const bool &toggle);
141 bool setNodeLabelColor(
const int &nodeNum,
const QString &color=
"green");
142 bool setNodeLabelSize(
const int &,
const int &size=0);
143 bool setNodeLabel(
const int & ,
const QString &label);
144 bool setNodeLabelDistance(
const int &,
const int &distance=0);
146 void drawEdge(
const int &source,
149 const QString &label=
"",
150 const QString &color=
"black",
152 const bool &drawArrows=
true,
153 const bool &bezier=
false,
154 const bool &weightNumbers=
false);
156 void removeEdge(
const int &source,
158 const bool &removeOpposite=
false);
160 void setEdgeVisibility (
const int &relation,
161 const int &sourceNum,
162 const int &targetNum,
164 const bool &preserveReverseEdge=
false,
165 const int &edgeWeight=1,
166 const int &reverseEdgeWeight=1);
168 bool setEdgeDirectionType(
const int &source,
170 const int &dirType=
false);
172 bool setEdgeWeight(
const int &,
const int &,
const qreal &);
174 void setEdgeLabel(
const int &source,
const int &target,
const QString &label);
176 void setEdgeColor(
const int &,
const int&,
const QString &);
178 void setEdgeClicked(
GraphicsEdge *,
const bool &openMenu=
false);
180 void setEdgeOffsetFromNode(
const int &source,
183 void setEdgeArrowsVisibility(
const bool &toggle);
184 void setEdgeWeightNumbersVisibility (
const bool &toggle);
185 void setEdgeLabelsVisibility(
const bool &toggle);
187 void setEdgeHighlighting(
const bool &toggle);
192 void addGuideCircle(
const double&x0,
const double&y0,
const double&radius);
193 void addGuideHLine(
const double &y0);
195 void zoomIn(
const int step = 1);
196 void zoomOut(
const int step = 1);
199 void changeMatrixScale(
const int value);
200 void changeMatrixRotation(
int angle);
203 void setOptionsOpenGL(
const bool &enabled=
false);
204 void setOptionsAntialiasing(
const bool &toggle);
205 void setOptionsNoAntialiasingAutoAdjust(
const bool &toggle);
216 const QList<SelectedEdge> selectedEdges);
218 void userClickedEdge(
const int &source,
const int &target,
const bool &openMenu=
false);
Definition: graphicsedgelabel.h:38
int type() const
Definition: graphicsedgelabel.h:44
Definition: graphicsedgeweight.h:38
Definition: graphicsedge.h:60
Definition: graphicsguide.h:41
Definition: graphicsnodelabel.h:37
Definition: graphicsnodenumber.h:38
Definition: graphicsnode.h:58
The base window of SocNetV contains all widgets and functionality.
Definition: mainwindow.h:115
QPair< int, int > SelectedEdge
Definition: global.h:147