Go to the documentation of this file.
28 #ifndef GRAPHICSWIDGET_H
29 #define GRAPHICSWIDGET_H
32 #include <QGraphicsView>
64 QString createEdgeName(
const int &v1,
66 const int &relation=-1);
68 void setInitNodeSize(
int);
70 void setInitZoomIndex (
int);
73 void setNodesMarked(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 getSelectedItems();
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 &number);
123 void setNodeVisibility(
const int &number,
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 &nodeNumber,
131 const QString &shape,
132 const QString &iconPath=QString());
133 bool setNodeColor(
const int &nodeNumber,
const QString &color);
135 void setNodeNumberColor(
const int &nodeNumber,
const QString &color);
136 void setNodeNumberVisibility(
const bool &toggle);
137 bool setNodeNumberSize(
const int &nodeNumber,
const int &size=0);
138 bool setNodeNumberDistance(
const int &,
const int &distance=0);
140 void setNodeLabelsVisibility(
const bool &toggle);
141 bool setNodeLabelColor(
const int &number,
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,
const int &source,
const int &target,
const bool &visible);
162 bool setEdgeDirectionType(
const int &source,
164 const int &dirType=
false);
166 bool setEdgeWeight(
const int &,
const int &,
const qreal &);
168 void setEdgeLabel(
const int &source,
const int &target,
const QString &label);
170 void setEdgeColor(
const int &,
const int&,
const QString &);
172 void setEdgeClicked(
GraphicsEdge *,
const bool &openMenu=
false);
174 void setEdgeOffsetFromNode(
const int &source,
177 void setEdgeArrowsVisibility(
const bool &toggle);
178 void setEdgeWeightNumbersVisibility (
const bool &toggle);
179 void setEdgeLabelsVisibility(
const bool &toggle);
181 void setEdgeHighlighting(
const bool &toggle);
186 void addGuideCircle(
const double&x0,
const double&y0,
const double&radius);
187 void addGuideHLine(
const double &y0);
189 void zoomIn(
int level = 1);
190 void zoomOut(
int level = 1);
193 void changeMatrixScale(
const int value);
194 void changeMatrixRotation(
int angle);
197 void setOptionsOpenGL(
const bool &enabled=
false);
198 void setOptionsAntialiasing(
const bool &toggle);
199 void setOptionsNoAntialiasingAutoAdjust(
const bool &toggle);
202 void userDoubleClickNewNode(
const QPointF &);
203 void userMiddleClicked(
const int &,
const int &);
204 void userClickOnEmptySpace(
const QPointF &p);
206 void openContextMenu(
const QPointF p);
207 void userNodeMoved(
const int &,
const int &,
const int &);
209 void userSelectedItems(
const QList<int> selectedNodes,
210 const QList<SelectedEdge> selectedEdges);
211 void userClickedNode(
const int &nodeNumber,
const QPointF &p);
212 void userClickedEdge(
const int &source,
const int &target,
const bool &openMenu=
false);
213 void zoomChanged(
const int);
214 void rotationChanged(
const int);
215 void resized(
const int,
const int);
216 void setCursor(Qt::CursorShape);
QPair< int, int > SelectedEdge
Definition: global.h:147
Definition: graphicsedgelabel.h:37
Definition: graphicsnodelabel.h:37
int type() const
Definition: graphicsedgelabel.h:44
The base window of SocNetV contains all widgets and functionality.
Definition: mainwindow.h:118
Definition: graphicsedge.h:60
Definition: graphicsnode.h:58
Definition: graphicsedgeweight.h:37
Definition: graphicsnodenumber.h:38
Definition: graphicsguide.h:41