#include <graphicswidget.h>

+ Inheritance diagram for GraphicsWidget:
+ Collaboration diagram for GraphicsWidget:

Public Slots

void getSelectedItems ()
 Emits selected nodes and edges to Graph and MW Called by QGraphicsScene::selectionChanged signal whenever the user makes a selection on the canvas. Emits selectedNodes and selectedEdges lists to Graph::graphSelectionChanged() which then signals to MW::slotEditSelectionChanged to display counts on app window. More...
 
void relationSet (int relation)
 Changes the current relation Called from Graph::signalRelationChangedToGW(int) signal. More...
 
void drawNode (const int &num, const int &nodeSize, const QString &nodeShape, const QString &nodeColor, const QString &numberColor, const int &numberSize, const int &numberDistance, const QString &nodeLabel, const QString &labelColor, const int &labelSize, const int &labelDistance, const QPointF &p)
 Adds a new node onto the scene Called from Graph::vertexCreate method primarily when we load files It is also called in the end when the user presses "Add Node" button or the user double clicks (mouseDoubleClickEvent() calls Graph::vertexCreate) More...
 
void removeNode (const long int &number)
 Removes a node from the scene. Called from Graph signalEraseNode(int) More...
 
void setNodeVisibility (long int, bool)
 
void setNodeClicked (GraphicsNode *)
 Called when the user clicks or double-clicks on a node. Clears clickedEdge and emits the userClickedNode signal to Graph to. More...
 
void moveNode (const int &num, const qreal &x, const qreal &y)
 Called from activeGraph to update node coordinates on the canvas. More...
 
bool setNodeSize (const long int &nodeNumber, const int &size=0)
 Changes the size of a node. More...
 
void setNodeSizeAll (const int &size=0)
 Changes the size of all nodes. More...
 
bool setNodeShape (const long int &nodeNumber, const QString &shape)
 Sets the shape of an node. Called from MW when the user changes the shape of a node. More...
 
bool setNodeColor (const long int &, const QString &color)
 Sets the color of an node. Called from MW when the user changes the color of a node (right-clicking). More...
 
void setNodeNumberVisibility (const bool &toggle)
 GraphicsWidget::setNodeNumberVisibility. More...
 
bool setNodeNumberSize (const long int &, const int &size=0)
 Changs the number size of a node. More...
 
bool setNodeNumberDistance (const long int &, const int &distance=0)
 Changes the distance of the number of a node. More...
 
void setNodeLabelsVisibility (const bool &toggle)
 GraphicsWidget::setNodeLabelsVisibility. More...
 
bool setNodeLabelColor (const long int &number, const QString &color="green")
 Changes the label color of a node to 'color'. More...
 
bool setNodeLabelSize (const long int &, const int &size=0)
 Changes the label size of a node to 'size'. More...
 
bool setNodeLabel (long int, QString)
 Sets the label of an node. Called from MW. More...
 
bool setNodeLabelDistance (const long int &, const int &distance=0)
 Changes the distance of a node label. More...
 
void drawEdge (const int &source, const int &target, const float &weight, const QString &label="", const QString &color="black", const int &type=0, const bool &drawArrows=true, const bool &bezier=false, const bool &weightNumbers=false)
 Draws an edge from source to target Node. Used when we do not have references to nodes but only nodeNumbers: a) when we load a network file b) when the user clicks on the AddLink button on the MW. More...
 
void removeEdge (const long int &source, const long int &target, const bool &removeOpposite=false)
 Remove an edge from the graphics widget. Called from MW/Graph when erasing edges using vertex numbers Also called when transforming directed edges to undirected. More...
 
void setEdgeVisibility (int relation, int, int, bool)
 Changes the visibility of an GraphicsView edge (number, label, edge, etc) More...
 
bool setEdgeDirectionType (const long int &, const long int &, const int &dirType=false)
 Changes the direction type of an existing edge. More...
 
bool setEdgeWeight (const long int &, const long int &, const float &)
 Sets the weight of an edge. Called from MW when the user changes the weight of an edge (right-clicking). More...
 
void setEdgeLabel (const long int &, const long int &, const QString &)
 GraphicsWidget::setEdgeLabel Sets the label of an edge. Called from MW when the user changes the label of an edge (right-clicking). More...
 
void setEdgeColor (const long int &, const long int &, const QString &)
 Sets the color of an edge. Called from MW when the user changes the color of an edge (right-clicking). Also called from Graph when all edge colors need to be changed. More...
 
void setEdgeClicked (GraphicsEdge *, const bool &openMenu=false)
 Called when the user clicks on an edge. Emits the userClickedEdge signal to Graph which is used to: More...
 
void setEdgeOffsetFromNode (const long int &source, const long int &target, const int &offset)
 Changes the offset of an edge (or all edges) from source and target nodes. More...
 
void setEdgeArrowsVisibility (const bool &toggle)
 Toggles the visibility of all edge arrows. More...
 
void setEdgeWeightNumbersVisibility (const bool &toggle)
 Toggles all edge weight numbers visibility. More...
 
void setEdgeLabelsVisibility (const bool &toggle)
 Toggles all edge labels visibility. More...
 
void setEdgeHighlighting (const bool &toggle)
 Toggles edge highlighting when hovering over a single edge or all edges connected to a node when the user hovers over that node. Called from MW. More...
 
void startEdge (GraphicsNode *node)
 Creates a new edge, when the user middle-clicks on two nodes consecutively On the first middle-click, it saves the first node (source). On the second middle-click, it saves the second node as target and emits the signal userMiddleClicked() to MW which will notify activeGraph, which in turn will signal back to drawEdge(). More...
 
void clearGuides ()
 
void addGuideCircle (const double &x0, const double &y0, const double &radius)
 
void addGuideHLine (const double &y0)
 
void zoomIn (int level=1)
 Changes the zoom level of the scene. Called from MW magnifier button. More...
 
void zoomOut (int level=1)
 Called from MW magnifier button. More...
 
void rotateLeft ()
 GraphicsWidget::rotateLeft. More...
 
void rotateRight ()
 GraphicsWidget::rotateRight. More...
 
void changeMatrixScale (const int value)
 Initiated from MW zoomSlider and rotateSlider widgets. More...
 
void changeMatrixRotation (int angle)
 GraphicsWidget::changeMatrixRotation. More...
 
void reset ()
 Resets the transformation matrix to the identity matrix ( default zoom and scale ) More...
 

Signals

void userDoubleClickNewNode (const QPointF &)
 
void userMiddleClicked (const int &, const int &)
 
void userClickOnEmptySpace (const QPointF &p)
 
void openNodeMenu ()
 
void openContextMenu (const QPointF p)
 
void userNodeMoved (const int &, const int &, const int &)
 
void userSelectedItems (const QList< int > selectedNodes, const QList< SelectedEdge > selectedEdges)
 
void userClickedNode (const int &nodeNumber)
 
void userClickedEdge (const int &source, const int &target, const bool &openMenu=false)
 
void zoomChanged (const int)
 
void rotationChanged (const int)
 
void resized (const int, const int)
 
void setCursor (Qt::CursorShape)
 

Public Member Functions

 GraphicsWidget (QGraphicsScene *m_scene, MainWindow *m_parent)
 
 ~GraphicsWidget ()
 
void clear ()
 Clears the scene and all hashes, lists, var etc. More...
 
QString createEdgeName (const int &v1, const int &v2, const int &relation=-1)
 creates a QString of the edge name - used for indexing edgesHash More...
 
void setInitNodeSize (int)
 
void setInitZoomIndex (int)
 Passes initial zoom setting Called from MW on startup. More...
 
GraphicsNodehasNode (QString text)
 Checks if a node with label or number 'text' exists and returns it. More...
 
void setNodesMarked (QList< int > list)
 Highlights all nodes in list Called by MW:slotEditNodeFind() More...
 
QList< QGraphicsItem * > selectedItems ()
 Returns a QList of all selected QGraphicsItem(s) More...
 
QList< int > selectedNodes ()
 Returns a QList of selected node numbers Called by GW::getSelectedItems and MW::selectedNodes. More...
 
QList< SelectedEdgeselectedEdges ()
 Returns a QList of selected directed edges structs in the form of v1,v2. More...
 
void selectAll ()
 Clears any clickedNode info and sets a selection rectangle in the scene, which signals QGraphicsScene::selectionChanged signal to update selectedNodes and selectedEdges. Called from MW. More...
 
void selectNone ()
 Clears any clickedNode info and any previous selection rect in the scene, which again signals selectionChanged() to update selectedNodes and selectedEdges to zero. Called from MW. More...
 
void removeItem (GraphicsEdge *)
 Removes an edge item from the scene. Called from GraphicsEdge::~GraphicsEdge() to remove itself from edgesHash and scene and be deleted. More...
 
void removeItem (GraphicsEdgeWeight *edgeWeight)
 Removes an edge weight number item from the scene. More...
 
void removeItem (GraphicsEdgeLabel *edgeLabel)
 Removes an edge label item from the scene. More...
 
void removeItem (GraphicsNode *)
 Removes a node item from the scene. Called from GraphicsNode::~GraphicsNode() to remove itself from nodeHash, scene and be deleted. More...
 
void removeItem (GraphicsNodeNumber *)
 Removes a node number item from the scene. More...
 
void removeItem (GraphicsNodeLabel *)
 Removes a node label item from the scene. More...
 
void setNumbersInsideNodes (const bool &toggle)
 Toggles node numbers displayed inside or out of nodes Called from MW. More...
 
void setAllItemsVisibility (int, bool)
 Changes the visibility of all items of certain type (i.e. number, label, edge, etc) More...
 
void removeAllItems (int)
 

Protected Member Functions

void wheelEvent (QWheelEvent *event)
 
void mouseDoubleClickEvent (QMouseEvent *e)
 Starts the new node creation process when the user double-clicks somewhere: Emits userDoubleClicked to Graph::vertexCreate(), which in turn calls this->drawNode() to create and displays node info on MW status bar Yes, it's a full circle! More...
 
void mousePressEvent (QMouseEvent *e)
 
void mouseReleaseEvent (QMouseEvent *e)
 Called when user releases a mouse button, after a click. First sees what was in the canvas position where the user clicked If a node was underneath, it calls userNodeMoved() signal for every node in scene selectedItems. More...
 
void resizeEvent (QResizeEvent *e)
 Repositions guides then emits resized() signal to MW and eventually Graph which does the node repositioning maintaining proportions. More...
 
void paintEvent (QPaintEvent *event)
 

Private Attributes

H_NumToNode nodeHash
 
H_StrToEdge edgesHash
 
QList< int > m_selectedNodes
 
QList< SelectedEdgem_selectedEdges
 
int m_curRelation
 
int m_nodeSize
 
int m_currentRotationAngle
 
int m_zoomIndex
 
int markedEdgeSourceOrigSize
 
int markedEdgeTargetOrigSize
 
int m_edgeMinOffsetFromNode
 
double m_currentScaleFactor
 
qreal fX
 
qreal fY
 
qreal factor
 
QString m_nodeLabel
 
QString m_numberColor
 
QString m_labelColor
 
QString edgeName
 
bool transformationActive
 
bool secondDoubleClick
 
bool clickedEdgeExists
 
bool m_nodeNumbersInside
 
bool m_nodeNumberVisibility
 
bool m_nodeLabelVisibility
 
bool m_edgeHighlighting
 
GraphicsNodefirstNode
 
GraphicsNodesecondNode
 
GraphicsNodemarkedEdgeSource
 
GraphicsNodemarkedEdgeTarget
 
GraphicsEdgeclickedEdge
 

Constructor & Destructor Documentation

GraphicsWidget::GraphicsWidget ( QGraphicsScene *  sc,
MainWindow m_parent 
)

Constructor method. Called when a GraphicsWidget object is created in MW

GraphicsWidget::~GraphicsWidget ( )

Destructor.

Member Function Documentation

void GraphicsWidget::addGuideCircle ( const double &  x0,
const double &  y0,
const double &  radius 
)
slot
void GraphicsWidget::addGuideHLine ( const double &  y0)
slot
void GraphicsWidget::changeMatrixRotation ( int  angle)
slot
void GraphicsWidget::changeMatrixScale ( const int  value)
slot

Initiated from MW zoomSlider and rotateSlider widgets.

Parameters
value
void GraphicsWidget::clear ( )

Clears the scene and all hashes, lists, var etc.

void GraphicsWidget::clearGuides ( )
slot
QString GraphicsWidget::createEdgeName ( const int &  v1,
const int &  v2,
const int &  relation = -1 
)

creates a QString of the edge name - used for indexing edgesHash

Parameters
v1
v2
relation
Returns
void GraphicsWidget::drawEdge ( const int &  source,
const int &  target,
const float &  weight,
const QString &  label = "",
const QString &  color = "black",
const int &  type = 0,
const bool &  drawArrows = true,
const bool &  bezier = false,
const bool &  weightNumbers = false 
)
slot

Draws an edge from source to target Node. Used when we do not have references to nodes but only nodeNumbers: a) when we load a network file b) when the user clicks on the AddLink button on the MW.

Parameters
source
target
weight
reciprocal
drawArrows
color
bezier
void GraphicsWidget::drawNode ( const int &  num,
const int &  nodeSize,
const QString &  nodeShape,
const QString &  nodeColor,
const QString &  numberColor,
const int &  numberSize,
const int &  numberDistance,
const QString &  nodeLabel,
const QString &  labelColor,
const int &  labelSize,
const int &  labelDistance,
const QPointF &  p 
)
slot

Adds a new node onto the scene Called from Graph::vertexCreate method primarily when we load files It is also called in the end when the user presses "Add Node" button or the user double clicks (mouseDoubleClickEvent() calls Graph::vertexCreate)

Parameters
num
nodeSize
nodeColor
numberColor
numberSize
nodeLabel
labelColor
labelSize
p
nodeShape
showLabels
numberInsideNode
showNumbers
void GraphicsWidget::getSelectedItems ( )
slot

Emits selected nodes and edges to Graph and MW Called by QGraphicsScene::selectionChanged signal whenever the user makes a selection on the canvas. Emits selectedNodes and selectedEdges lists to Graph::graphSelectionChanged() which then signals to MW::slotEditSelectionChanged to display counts on app window.

GraphicsNode * GraphicsWidget::hasNode ( QString  text)

Checks if a node with label or number 'text' exists and returns it.

Parameters
text
Returns
void GraphicsWidget::mouseDoubleClickEvent ( QMouseEvent *  e)
protected

Starts the new node creation process when the user double-clicks somewhere: Emits userDoubleClicked to Graph::vertexCreate(), which in turn calls this->drawNode() to create and displays node info on MW status bar Yes, it's a full circle!

Parameters
e
void GraphicsWidget::mousePressEvent ( QMouseEvent *  e)
protected
void GraphicsWidget::mouseReleaseEvent ( QMouseEvent *  e)
protected

Called when user releases a mouse button, after a click. First sees what was in the canvas position where the user clicked If a node was underneath, it calls userNodeMoved() signal for every node in scene selectedItems.

Parameters
e
void GraphicsWidget::moveNode ( const int &  num,
const qreal &  x,
const qreal &  y 
)
slot

Called from activeGraph to update node coordinates on the canvas.

Parameters
num
x
y
void GraphicsWidget::openContextMenu ( const QPointF  p)
signal
void GraphicsWidget::openNodeMenu ( )
signal
void GraphicsWidget::paintEvent ( QPaintEvent *  event)
protected
void GraphicsWidget::relationSet ( int  relation)
slot

Changes the current relation Called from Graph::signalRelationChangedToGW(int) signal.

Parameters
relation
void GraphicsWidget::removeAllItems ( int  type)

Removes all items of certain type (i.e. number, label, edge, etc)

void GraphicsWidget::removeEdge ( const long int &  source,
const long int &  target,
const bool &  removeOpposite = false 
)
slot

Remove an edge from the graphics widget. Called from MW/Graph when erasing edges using vertex numbers Also called when transforming directed edges to undirected.

Parameters
sourceNode
targetNode
void GraphicsWidget::removeItem ( GraphicsEdge edge)

Removes an edge item from the scene. Called from GraphicsEdge::~GraphicsEdge() to remove itself from edgesHash and scene and be deleted.

Parameters
edge
void GraphicsWidget::removeItem ( GraphicsEdgeWeight edgeWeight)

Removes an edge weight number item from the scene.

Parameters
edgeWeight
void GraphicsWidget::removeItem ( GraphicsEdgeLabel edgeLabel)

Removes an edge label item from the scene.

Parameters
edgeLabel
void GraphicsWidget::removeItem ( GraphicsNode node)

Removes a node item from the scene. Called from GraphicsNode::~GraphicsNode() to remove itself from nodeHash, scene and be deleted.

Parameters
node
void GraphicsWidget::removeItem ( GraphicsNodeNumber nodeNumber)

Removes a node number item from the scene.

Parameters
nodeNumber
void GraphicsWidget::removeItem ( GraphicsNodeLabel nodeLabel)

Removes a node label item from the scene.

Parameters
nodeLabel
void GraphicsWidget::removeNode ( const long int &  number)
slot

Removes a node from the scene. Called from Graph signalEraseNode(int)

Parameters
number
void GraphicsWidget::reset ( )
slot

Resets the transformation matrix to the identity matrix ( default zoom and scale )

void GraphicsWidget::resized ( const int  ,
const int   
)
signal
void GraphicsWidget::resizeEvent ( QResizeEvent *  e)
protected

Repositions guides then emits resized() signal to MW and eventually Graph which does the node repositioning maintaining proportions.

Parameters
e
void GraphicsWidget::rotateLeft ( )
slot
void GraphicsWidget::rotateRight ( )
slot
void GraphicsWidget::rotationChanged ( const int  )
signal
void GraphicsWidget::selectAll ( )

Clears any clickedNode info and sets a selection rectangle in the scene, which signals QGraphicsScene::selectionChanged signal to update selectedNodes and selectedEdges. Called from MW.

QList< SelectedEdge > GraphicsWidget::selectedEdges ( )

Returns a QList of selected directed edges structs in the form of v1,v2.

Returns
a QList of selected directed edges structs
QList< QGraphicsItem * > GraphicsWidget::selectedItems ( )

Returns a QList of all selected QGraphicsItem(s)

Returns
a QList of all selected QGraphicsItem(s)
QList< int > GraphicsWidget::selectedNodes ( )

Returns a QList of selected node numbers Called by GW::getSelectedItems and MW::selectedNodes.

Returns
a QList of integers: the selected node numbers
void GraphicsWidget::selectNone ( )

Clears any clickedNode info and any previous selection rect in the scene, which again signals selectionChanged() to update selectedNodes and selectedEdges to zero. Called from MW.

void GraphicsWidget::setAllItemsVisibility ( int  type,
bool  visible 
)

Changes the visibility of all items of certain type (i.e. number, label, edge, etc)

Parameters
type
visible
void GraphicsWidget::setCursor ( Qt::CursorShape  )
signal
void GraphicsWidget::setEdgeArrowsVisibility ( const bool &  toggle)
slot

Toggles the visibility of all edge arrows.

Parameters
toggle
void GraphicsWidget::setEdgeClicked ( GraphicsEdge edge,
const bool &  openMenu = false 
)
slot

Called when the user clicks on an edge. Emits the userClickedEdge signal to Graph which is used to:

  • display edge info on the status bar
  • notify context menus for the clicked edge.
    Parameters
    edge
void GraphicsWidget::setEdgeColor ( const long int &  source,
const long int &  target,
const QString &  color 
)
slot

Sets the color of an edge. Called from MW when the user changes the color of an edge (right-clicking). Also called from Graph when all edge colors need to be changed.

Parameters
source
target
color
bool GraphicsWidget::setEdgeDirectionType ( const long int &  source,
const long int &  target,
const int &  dirType = false 
)
slot

Changes the direction type of an existing edge.

Parameters
source
target
directionType
Returns
void GraphicsWidget::setEdgeHighlighting ( const bool &  toggle)
slot

Toggles edge highlighting when hovering over a single edge or all edges connected to a node when the user hovers over that node. Called from MW.

Parameters
numIn
void GraphicsWidget::setEdgeLabel ( const long int &  source,
const long int &  target,
const QString &  label 
)
slot

GraphicsWidget::setEdgeLabel Sets the label of an edge. Called from MW when the user changes the label of an edge (right-clicking).

Parameters
source
target
label
void GraphicsWidget::setEdgeLabelsVisibility ( const bool &  toggle)
slot

Toggles all edge labels visibility.

Parameters
toggle
void GraphicsWidget::setEdgeOffsetFromNode ( const long int &  source,
const long int &  target,
const int &  offset 
)
slot

Changes the offset of an edge (or all edges) from source and target nodes.

Parameters
source
target
offset
void GraphicsWidget::setEdgeVisibility ( int  relation,
int  source,
int  target,
bool  toggle 
)
slot

Changes the visibility of an GraphicsView edge (number, label, edge, etc)

Parameters
relation
source
target
toggle
bool GraphicsWidget::setEdgeWeight ( const long int &  source,
const long int &  target,
const float &  weight 
)
slot

Sets the weight of an edge. Called from MW when the user changes the weight of an edge (right-clicking).

Parameters
source
target
weight
Returns
void GraphicsWidget::setEdgeWeightNumbersVisibility ( const bool &  toggle)
slot

Toggles all edge weight numbers visibility.

Parameters
toggle
void GraphicsWidget::setInitNodeSize ( int  size)

Sets initial node size from MW. It is Called from MW on startup and when user changes it.

void GraphicsWidget::setInitZoomIndex ( int  zoomIndex)

Passes initial zoom setting Called from MW on startup.

Parameters
zoomIndex
void GraphicsWidget::setNodeClicked ( GraphicsNode node)
slot

Called when the user clicks or double-clicks on a node. Clears clickedEdge and emits the userClickedNode signal to Graph to.

  • display node info on the status bar
  • notify context menus for the clicked node.
    Parameters
    node
bool GraphicsWidget::setNodeColor ( const long int &  nodeNumber,
const QString &  color 
)
slot

Sets the color of an node. Called from MW when the user changes the color of a node (right-clicking).

Parameters
nodeNumber
color
Returns
bool GraphicsWidget::setNodeLabel ( long int  nodeNumber,
QString  label 
)
slot

Sets the label of an node. Called from MW.

Parameters
nodeNumber
label
Returns
bool GraphicsWidget::setNodeLabelColor ( const long int &  number,
const QString &  color = "green" 
)
slot

Changes the label color of a node to 'color'.

Parameters
number
color
bool GraphicsWidget::setNodeLabelDistance ( const long int &  number,
const int &  distance = 0 
)
slot

Changes the distance of a node label.

Parameters
number
distance
bool GraphicsWidget::setNodeLabelSize ( const long int &  number,
const int &  size = 0 
)
slot

Changes the label size of a node to 'size'.

Parameters
number
size
void GraphicsWidget::setNodeLabelsVisibility ( const bool &  toggle)
slot
bool GraphicsWidget::setNodeNumberDistance ( const long int &  number,
const int &  distance = 0 
)
slot

Changes the distance of the number of a node.

Parameters
number
distance
bool GraphicsWidget::setNodeNumberSize ( const long int &  number,
const int &  size = 0 
)
slot

Changs the number size of a node.

Parameters
number
size
void GraphicsWidget::setNodeNumberVisibility ( const bool &  toggle)
slot
bool GraphicsWidget::setNodeShape ( const long int &  nodeNumber,
const QString &  shape 
)
slot

Sets the shape of an node. Called from MW when the user changes the shape of a node.

Parameters
nodeNumber
shape
Returns
bool GraphicsWidget::setNodeSize ( const long int &  number,
const int &  size = 0 
)
slot

Changes the size of a node.

Parameters
number
size
Returns
void GraphicsWidget::setNodeSizeAll ( const int &  size = 0)
slot

Changes the size of all nodes.

Parameters
size
Returns
void GraphicsWidget::setNodesMarked ( QList< int >  list)

Highlights all nodes in list Called by MW:slotEditNodeFind()

Parameters
list
void GraphicsWidget::setNodeVisibility ( long int  number,
bool  toggle 
)
slot

Changes the visibility of a Node

void GraphicsWidget::setNumbersInsideNodes ( const bool &  toggle)

Toggles node numbers displayed inside or out of nodes Called from MW.

Parameters
numIn
void GraphicsWidget::startEdge ( GraphicsNode node)
slot

Creates a new edge, when the user middle-clicks on two nodes consecutively On the first middle-click, it saves the first node (source). On the second middle-click, it saves the second node as target and emits the signal userMiddleClicked() to MW which will notify activeGraph, which in turn will signal back to drawEdge().

Parameters
node
void GraphicsWidget::userClickedEdge ( const int &  source,
const int &  target,
const bool &  openMenu = false 
)
signal
void GraphicsWidget::userClickedNode ( const int &  nodeNumber)
signal
void GraphicsWidget::userClickOnEmptySpace ( const QPointF &  p)
signal
void GraphicsWidget::userDoubleClickNewNode ( const QPointF &  )
signal
void GraphicsWidget::userMiddleClicked ( const int &  ,
const int &   
)
signal
void GraphicsWidget::userNodeMoved ( const int &  ,
const int &  ,
const int &   
)
signal
void GraphicsWidget::userSelectedItems ( const QList< int >  selectedNodes,
const QList< SelectedEdge selectedEdges 
)
signal
void GraphicsWidget::wheelEvent ( QWheelEvent *  e)
protected

Calls the scaleView() when the user spins the mouse wheel It passes delta as new m_scale

void GraphicsWidget::zoomChanged ( const int  )
signal
void GraphicsWidget::zoomIn ( int  level = 1)
slot

Changes the zoom level of the scene. Called from MW magnifier button.

Parameters
level
void GraphicsWidget::zoomOut ( int  level = 1)
slot

Called from MW magnifier button.

Parameters
level

Member Data Documentation

GraphicsEdge* GraphicsWidget::clickedEdge
private
bool GraphicsWidget::clickedEdgeExists
private
QString GraphicsWidget::edgeName
private
H_StrToEdge GraphicsWidget::edgesHash
private
qreal GraphicsWidget::factor
private
GraphicsNode* GraphicsWidget::firstNode
private
qreal GraphicsWidget::fX
private
qreal GraphicsWidget::fY
private
int GraphicsWidget::m_curRelation
private
int GraphicsWidget::m_currentRotationAngle
private
double GraphicsWidget::m_currentScaleFactor
private
bool GraphicsWidget::m_edgeHighlighting
private
int GraphicsWidget::m_edgeMinOffsetFromNode
private
QString GraphicsWidget::m_labelColor
private
QString GraphicsWidget::m_nodeLabel
private
bool GraphicsWidget::m_nodeLabelVisibility
private
bool GraphicsWidget::m_nodeNumbersInside
private
bool GraphicsWidget::m_nodeNumberVisibility
private
int GraphicsWidget::m_nodeSize
private
QString GraphicsWidget::m_numberColor
private
QList<SelectedEdge> GraphicsWidget::m_selectedEdges
private
QList<int> GraphicsWidget::m_selectedNodes
private
int GraphicsWidget::m_zoomIndex
private
GraphicsNode* GraphicsWidget::markedEdgeSource
private
int GraphicsWidget::markedEdgeSourceOrigSize
private
GraphicsNode* GraphicsWidget::markedEdgeTarget
private
int GraphicsWidget::markedEdgeTargetOrigSize
private
H_NumToNode GraphicsWidget::nodeHash
private
bool GraphicsWidget::secondDoubleClick
private
GraphicsNode * GraphicsWidget::secondNode
private
bool GraphicsWidget::transformationActive
private

The documentation for this class was generated from the following files: