#include <ScrollView.h>
Inheritance diagram for ScrollView::
Public Slots | |
void | zoomIn (QPoint=QPoint(-1,-1)) |
Zoom in the view at point p. More... | |
void | zoomOut (QPoint=QPoint(-1,-1)) |
Zoom out the view at point p If p = (-1,-1) the middle of the view is taken. | |
void | zoomReset () |
Set Zoom to 100%. | |
void | updateCanvasSize () |
Updates canvas size. More... | |
void | objectsPasted () |
Called when several objects have been pasted into this scrollview. | |
void | allSelected () |
Called when all objects have been selected. | |
void | contextMenuHiding () |
Called when the context menu is closing. | |
Signals | |
void | setMode (int) |
Emited when the mode of the document changes. | |
void | updateCanvasSize (int, int, double) |
Emited when the canvas size changed. | |
void | zoomedToPercentage (int) |
Emited when zoomed to a certain percentage. | |
Public Methods | |
ScrollView (QWidget *parent=0, const char *name=0) | |
Constructor. | |
~ScrollView () | |
Destructor. | |
void | resetState () |
Resets all variables storing the state of the view. | |
void | reset () |
Resets the scrollview (by reseting the state and deselecting all objects). | |
void | updateBackground () |
Updates the background. | |
void | setDragMultiple (bool dm=TRUE) |
Sets the state to dragging multiple objects. | |
bool | getDragMultiple () |
Returns TRUE if user drags several objects at once otherwise FALSE. | |
Selection * | getSelection () |
Returns current selection. | |
double | getScale () |
Returns the current scale. | |
DRect | getSelectionRect () |
Returns the current selection rectangle. | |
void | setSelectionRect (DRect r) |
Sets the current seleciton rectangle. | |
void | drawTransition (GTransition *, bool clear=FALSE) |
Draw a transition. More... | |
void | drawInitialTransition (GITransition *, bool clear=FALSE) |
Draw initial transition. More... | |
QRect | tooltipRect (const QPoint &p, QString &info) |
Returns the tooltip rectangle of the point p. | |
void | showContext (QPoint p) |
Shows the context menu for point point. | |
GObject * | getContextObject (int &type) |
Returns the context object (when right clicked on an object). More... | |
void | resetContext () |
Resets the context (used for context menu). | |
Private Methods | |
void | contentsMousePressEvent (QMouseEvent *) |
Invoked when user presses a mouse button. | |
void | contentsMouseMoveEvent (QMouseEvent *) |
Invoked when user moves the mouse. | |
void | contentsMouseReleaseEvent (QMouseEvent *) |
Invoked when user releases a mouse button. | |
void | contentsMouseDoubleClickEvent (QMouseEvent *) |
Invoked when users double clicks with the mouse. | |
void | viewportPaintEvent (QPaintEvent *) |
Invoked when viewport needs to be repainted. | |
Private Attributes | |
QPoint | lastLClicked |
Position where the left mouse button was clicked most recently. | |
bool | left_down |
TRUE if the left mouse button is down. | |
bool | drag |
If TRUE mouse dragging is initiated. | |
double | dragStartX |
X coordinate of drag start position. | |
double | dragStartY |
Y coordinate of drag start position. | |
double | lastMovePosX |
X coordinate of the last mouse position (with snap to grid). | |
double | lastMovePosY |
Y coordinate of the last mouse position (with snap to grid). | |
double | lastMousePosX |
X coordinate of the last mouse position (without snap to grid). | |
double | lastMousePosY |
Y coordinate of the last mouse position (without snap to grid). | |
double | lastMovePosCont1X |
X coordinate of the last position of the first control point of a transition. | |
double | lastMovePosCont1Y |
Y coordinate of the last position of the first control point of a transition. | |
double | lastMovePosCont2X |
X coordinate of the last position of the second control point of a transition. | |
double | lastMovePosCont2Y |
Y coordinate of the last position of the second control point of a transition. | |
GState * | lastStateClicked |
Pointer to the state that was clicked most recently (with the left mouse button). | |
GObject * | lastObjectRClicked |
Pointer to the object that was clicked most recently (with the right mouse button). | |
GTransition * | lastTransitionDragged |
Pointer to the transition that was dragged most recently. | |
GTransition * | lastTransitionClicked |
Pointer to the transition that was clicked most recently. | |
GTransition * | dragTransition |
Temporary transition (when dragging). | |
GITransition * | dragITransition |
Temporary initial transition (when dragging). | |
GState | savedState |
Saved Objects for undo. | |
GITransition | savedITrans |
Saved initial transition. | |
int | lastTransitionControl |
Control of the transition that was clicked most recently. | |
bool | firstTransitionDraw |
If TRUE, this is the first step when dragging a transition. | |
bool | drawControlLines |
If TRUE, the (dotted) control lines of a transition are drawn (when dragging). | |
bool | dragRect |
If TRUE, a rectangle is being dragged. | |
bool | dragMultiple |
If TRUE, a multiple selection has been made. | |
bool | onSelection |
If TRUE, the user has clicked on the selection. | |
DRect | selectionRect |
Selection rectangle. | |
MainWindow * | main |
Main window. | |
Zoom * | zoom |
Zoom object. | |
Selection * | selection |
Selection. | |
Draw * | draw |
Draw object. | |
Grid * | grid |
Grid object. | |
ToolTipSV * | tooltip |
Tooltip window. |
|
Draw initial transition.
|
|
Draw a transition.
|
|
Returns the context object (when right clicked on an object).
|
|
Updates canvas size. Updates the size of the scroll view according to the canvas size stored in the machine |
|
Zoom in the view at point p. If p = (-1,-1) the middle of the view is taken. |