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.

Signals

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.

Properties

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

Author:
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]
 

Parameters:
a action to add

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

Parameters:
a action to remove

void wwCanvasView::setDragsEnabled bool  yes  )  [virtual]
 

Parameters:
yes boolean value stating whether dragging should be enabled

void wwCanvasView::setScale double  sx,
double  sy = 0
[virtual]
 

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

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

Parameters:
sx scale factor

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

Parameters:
sy scale factor


Property Documentation

bool wwCanvasView::dragsEnabled [read, write]
 

Returns:
true if dragging is enabled, false otherwise

double wwCanvasView::scaleX [read, write]
 

Returns:
scale of X axis

double wwCanvasView::scaleY [read, write]
 

Returns:
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