#include <SDAGEdgeViewEl.h>
Inherits SViewEl.
Inheritance diagram for SDAGEdgeViewEl:
Public Types | |
enum | SMarkStyles { STANDARD, MARKED, MARKED1, MARKED2, MARKED3, MARKED4 } |
Public Methods | |
SDAGEdgeViewEl (STaskSystem *ts, SDAGViewEl *dagel, QColor edgecolor=QColor("black"), int edgewidth=1, Qt::PenStyle edgestyle=Qt::SolidLine) | |
~SDAGEdgeViewEl () | |
void | paint (QPaintDevice *pd, QRect rect) |
void | update () |
void | hide () |
void | show () |
bool | isVisible () |
void | appendBend (int x, int y) |
void | appendBend (QPoint p) |
void | moveSource (int x, int y) |
void | moveSource (QPoint p) |
void | moveTarget (int x, int y) |
void | moveTarget (QPoint p) |
void | moveDrag (int x, int y) |
void | moveDrag (QPoint p) |
void | moveBends (int x, int y) |
void | moveBends (QPoint p) |
SDAGNodeViewEl * | beginEdgeDrag (QPoint pos) |
void | endEdgeDrag (SDAGNodeViewEl *node) |
void | setColor (QColor c) |
void | setWidth (int w) |
void | setStyle (Qt::PenStyle s) |
void | setSource (SDAGNodeViewEl *node) |
void | setTarget (SDAGNodeViewEl *node) |
bool | isSourceNode (SDAGNodeViewEl *node) |
bool | isTargetNode (SDAGNodeViewEl *node) |
SDAGNodeViewEl * | getSource () |
SDAGNodeViewEl * | getTarget () |
QRegion | getRegion () |
const QRect & | getBoundBox () const |
bool | isDirected () |
void | setLEDAEdge (leda_edge e) |
leda_list< leda_point > | getBends () |
virtual void | setView (SView &view) |
virtual bool | isAffectedBy (QMouseEvent *ev) |
virtual bool | mouseEvent (QMouseEvent *ev) |
virtual void | setPos (QPoint p) |
virtual void | update (const SEvent &event)=0 |
Protected Methods | |
QColor | lighterGray () |
void | draw3DRect (QPainter &p, int x, int y, int w, int h) |
void | draw3DRect (QPainter &p, const QRect &r) |
SView & | getView () |
void | requestRepaint () |
void | requestRepaint (const QRect &rect) |
virtual void | update (const class SEvent &) |
Protected Attributes | |
STaskSystem * | _pTaskSystem |
|
Mark styles influence the style how the ViewEl is displayed. The styles are stored in SVis...-objects. Identical mark styles should produce similar (NOT HARDCODED) effects in different ViewEls. |
|
Constructs a new SDAGEdgeViewEl.
|
|
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Appends a point in _bends. This function can be used to add bends to the edge. |
|
This function has to be called if you want to drag the edge. This is the first thing you have to do when dragging a edge. It uses _dragIndex to determine the point to drag.
|
|
|
|
paint a 3D Rectangle use current Brush as color |
|
This function has to be called, when the drag is to be finished. It is the last thing you have to do to finish the drag of the edge.
|
|
Use this function to get a list of points that are the bends of the edge. For now this is only used internally in SDAGEdgeViewEl.
|
|
calculate the bounding box DIRTY! Reimplemented from SViewEl. |
|
Gets the region that is covered by the edge. Implements SViewEl. |
|
|
|
|
|
Get the view which is responsible for this view element. This is useful for setting new cursors etc. .
|
|
Sets _visible to FALSE, so that this edge isn't repainted until _visible is set to TRUE (show() !) again. |
|
The isAffectedBy function checks if an element is affected by a particular mouse event.
Reimplemented in SDAGViewEl. |
|
|
|
|
|
|
|
|
|
|
|
This virtual function handles the mouse event. You can feed it with the captured mouse event from your view.
Reimplemented in SDAGViewEl. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Translates all waypoints of the edge to a new position. This is useful if you want to place the hole dag to a new position.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
If you want to drag the edge, call this function. It uses _dragIndex ( which is set by beginEdgeDrag() ) to determine which point is to be dragged.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Moves the first point of the edge.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Moves the last point of the edge.
|
|
Paints the edge to the paintdevice with the visible rect rect. Implements SViewEl. |
|
|
|
If something in the view element has changed and you want to make the changes visible, then request a repaint for the view element. CAUTION: repaints everything! |
|
Sets the color of the edge.
|
|
Set the LEDA edge that is represented by this edge. For this LEDA edge the SVisPrecDAG coordinates are set.
|
|
Here you can set the position of the view element.
Reimplemented in SDAGNodeViewEl, and SDAGViewEl. |
|
Sets the source node of the edge.
|
|
Sets the style (dashed etc. ) of the edge.
|
|
Sets the target node of the edge.
|
|
Set the view which accepts the repaint-requests.
Reimplemented in SDAGViewEl. |
|
Sets the width of the edge.
|
|
Sets _visible to TRUE, so that this edge is repainted. |
|
Here the class is informed of an event, when an observed component has sent an event by SObservable::notifyObservers()
Implemented in SGanttLog, SLogger, SJobArray, and STaskSystem. |
|
This update function gets the project specific events for updating the view element. Reimplemented in SDAGNodeViewEl, SDAGViewEl, and SMeshTopViewEl. |
|
Calculates the first ( the point next to the source node ) and the last point ( the point next to the target node ) of the edge and shows it. |
|
@supplierCardinality 1 @label displays part of SHOULDN'T BE USED!! WILL BE REMOVED (AH) |