Main Page | Class List | Class Members

wwCanvasView Class Reference

QCanvasView with scaling and item dragging support. More...

List of all members.

Public Slots

virtual void Double ()
 Doubles the scale of the canvas.
virtual void Halve ()
 Halves the scale of the canvas.


void clicked (QCanvasItem *)
 Signal is emitted when an item is clicked.
void dragged (QCanvasItem *, const QPoint &pt)
 Signal is emitted when an item is dragged.

Public Member Functions

virtual void addAction (QAction *a)
 Adds action to the list of actions displayed as the context menu.
virtual void removeAction (QAction *a)
 Removes an action from the list of actions displayed as the context menu.
virtual void setDragsEnabled (bool yes)
 Enables or disables dragging of objects.
virtual void setScale (double sx, double sy=0)
 Sets the scale of both X and Y axis.
virtual void setScaleX (const double sx)
 Scales the canvas in X direction.
virtual void setScaleY (const double sy)
 Scales the canvas in Y direction.


bool dragsEnabled
 Returns information if dragging is enabled.
double scaleX
 Returns the scale of X axis.
double scaleY
 Returns the scale of Y axis.

Detailed Description

Witold Wysota
This class provides possibility to click and drag items contained and scale the canvas.

Member Function Documentation

void wwCanvasView::addAction QAction *  a  )  [virtual]

a action to add

void wwCanvasView::removeAction QAction *  a  )  [virtual]

a action to remove

void wwCanvasView::setDragsEnabled bool  yes  )  [virtual]

yes boolean value stating whether dragging should be enabled

void wwCanvasView::setScale double  sx,
double  sy = 0

sx scale factor for X axis
sy scale factor for Y axis

void wwCanvasView::setScaleX const double  sx  )  [virtual]

sx scale factor

void wwCanvasView::setScaleY const double  sy  )  [virtual]

sy scale factor

Property Documentation

bool wwCanvasView::dragsEnabled [read, write]

true if dragging is enabled, false otherwise

double wwCanvasView::scaleX [read, write]

scale of X axis

double wwCanvasView::scaleY [read, write]

scale of Y axis

The documentation for this class was generated from the following files:
Generated on Mon Feb 13 22:47:49 2006 for wwWidgets by  doxygen 1.4.4