#include <graph_view.h>
GraphView inherits QGraphicsView and is responsible for all user interaction with the graph. GraphView updates it's GraphScene according to the user interactions.
- See Also
- http://qt-project.org/doc/qt-4.8/qgraphicsview.html
GraphView::GraphView |
( |
QWidget * |
parent = 0 | ) |
|
Constructor for the GraphView
- Parameters
-
parent | Parent widget for the GraphView, default is null |
GraphView::GraphView |
( |
GraphScene * |
scene, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
std::vector< NodeWidget * > GraphView::get_prev_marked |
( |
| ) |
|
A method for accessing all previously marked nodes.
- Returns
- A vector of all the previously marked nodes
void GraphView::item_selected_in_graph |
( |
std::string |
name, |
|
|
bool |
first |
|
) |
| |
|
signal |
Signal used for notifying MainWindow that a certain item (or several) was selected in the graph. This signal will be emitted several times if several items
- Parameters
-
name | The name of the item |
first | True if this is the first item, otherwise false |
void GraphView::itemCtrlClicked |
( |
QGraphicsItem * |
item | ) |
|
|
signal |
Signal for notifying MainWindow that a single click occurred for a certain item
- Parameters
-
item | The item that was single clicked |
void GraphView::itemDoubleClicked |
( |
QGraphicsItem * |
item | ) |
|
|
signal |
Signal for notifying MainWindow that a double click occurred for a certain item
- Parameters
-
item | The item that was double clicked |
void GraphView::mouseDoubleClickEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
This method handles mouse double click events
- Parameters
-
event | The mouse click event that was triggered |
void GraphView::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Mouse move event, used to handle rubber band actions
void GraphView::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
This method handles mouse single click events
- Parameters
-
event | The mouse click event that was triggered |
void GraphView::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Mouse release event, use to handle rubber band actions for zoom
void GraphView::onCustomContextMenu |
( |
const QPoint & |
point | ) |
|
|
slot |
Slot used for telling the MainWindow to create a right click menu on the point where the right click occurred
- Parameters
-
point | The point where the right click event occurred |
void GraphView::reset_prev_marked |
( |
| ) |
|
Resets the previously marked node(used to back focus in the MainWindow)
void GraphView::resizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
protected |
Catch resize event in order to be able to resize the graph when it happens.
void GraphView::right_click_menu |
( |
const QPoint & |
point, |
|
|
std::string |
name |
|
) |
| |
|
signal |
Signal for notifying MainWindow that it should create a right click menu at a specific point and, if the click occurred above an item, name of an item
- Parameters
-
point | The point where the right click occurred |
name | The name of the item that was below the right click |
void GraphView::set_zoom_level |
( |
uint |
value | ) |
|
Method for setting the zoom slider value to a specific value value The zoom level, a value between 1 and 100
void GraphView::setupView |
( |
| ) |
|
|
protected |
This method sets up some basic parameters for the view.
QRectF GraphView::visibleRect |
( |
| ) |
|
Gets the visible portion of the scene as a QRectF in scene coordinates.
void GraphView::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
protected |
This method handles wheel events to allow zooming
- Parameters
-
event | The mouse wheel event that was triggered |
void GraphView::zoomIn |
( |
int |
level = 1 | ) |
|
|
slot |
Slot used for zoom in events
- Parameters
-
level | The level to zoom in, defaults to 1 |
void GraphView::zoomOut |
( |
int |
level = 1 | ) |
|
|
slot |
Slot used for zoom out events
- Parameters
-
level | The level to zoom out, defaults to 1 |
The documentation for this class was generated from the following files: