HoverPoints Class Reference

#include <hoverpoints.h>

List of all members.

Public Types

enum  PointShape
enum  LockType
enum  SortType
enum  ConnectionType

Public Slots

void setEnabled (bool enabled)
void setDisabled (bool disabled)

Signals

void pointsChanged (const QPolygonF &points)
void chooseColor (int index)
void alphaChanged (int index, qreal newXPos)
void alphaPointCreated (int index, qreal xPos)
void alphaPointDeleted (int index)

Public Member Functions

 HoverPoints (QWidget *widget, PointShape shape)
bool eventFilter (QObject *object, QEvent *event)
void paintPoints ()
QRectF boundingRect () const
void setBoundingRect (const QRectF &boundingRect)
QPolygonF points () const
void setPoints (const QPolygonF &points)
QSizeF pointSize () const
void setPointSize (const QSizeF &size)
SortType sortType () const
void setSortType (SortType sortType)
ConnectionType connectionType () const
void setConnectionType (ConnectionType connectionType)
void setConnectionPen (const QPen &pen)
void setShapePen (const QPen &pen)
void setShapeBrush (const QBrush &brush)
void setPointLock (int pos, LockType lock)
void setEditable (bool editable)
bool editable () const
void firePointChange ()
void movePoint (int i, const QPointF &newPos)

Private Slots

void newPoint ()
void deletePoint ()
void fireChooseColor ()


Detailed Description

The hoverpoints class represents the points which are used in the ShadeWidget.

Member Enumeration Documentation

Enumerates the PointShape options.

Enumerates the LockType options.

Enumerates the SortType options.

Enumerates the ConnectionType options.


Constructor & Destructor Documentation

HoverPoints::HoverPoints ( QWidget *  widget,
PointShape  shape 
)

Constructor that creates the HoverPoints.

Returns:
The pointer to the created HoverPoints.


Member Function Documentation

bool HoverPoints::eventFilter ( QObject *  object,
QEvent *  event 
)

Filters the events and takes appropriate actions.

Parameters:
object is the QObject which caused the QEvent.
event is the QEvent which happend.
Returns:
True if it was a valid object and a valid event, false otherwise.

void HoverPoints::paintPoints (  ) 

Paints the points and connections.

QRectF HoverPoints::boundingRect (  )  const [inline]

Returns:
The bounding rectangle for this hover points.

void HoverPoints::setBoundingRect ( const QRectF &  boundingRect  )  [inline]

Sets the new bounding rectangle for this hover points.

Parameters:
boundingRect is the new bounding rectangle which should be set.

QPolygonF HoverPoints::points (  )  const [inline]

Returns:
The hover points.

void HoverPoints::setPoints ( const QPolygonF &  points  ) 

Sets points position from the given points.

Parameters:
points are the points which should be set.

QSizeF HoverPoints::pointSize (  )  const [inline]

Returns:
The pixel size of one hover point (for drawing).

void HoverPoints::setPointSize ( const QSizeF &  size  )  [inline]

Sets the new pixel size for this hover points.

Parameters:
size is the new pixel size which should be set.

SortType HoverPoints::sortType (  )  const [inline]

Returns:
The sort type, in which the hover points should be sorted.

void HoverPoints::setSortType ( SortType  sortType  )  [inline]

Sets the way, in which the hover points should be sorted.

Parameters:
sortType is the new sortType which should be set.

ConnectionType HoverPoints::connectionType (  )  const [inline]

Returns:
The way in which the point connections ar drawn.

void HoverPoints::setConnectionType ( ConnectionType  connectionType  )  [inline]

Sets the way, in which the point connections should be drawn.

Parameters:
connectionType is the new connectionType which should be set.

void HoverPoints::setConnectionPen ( const QPen &  pen  )  [inline]

Sets the pen, which draws the point connections.

Parameters:
pen is the new pen which should be set.

void HoverPoints::setShapePen ( const QPen &  pen  )  [inline]

Sets the pen, which draws the shape of the points.

Parameters:
pen is the new pen which should be set.

void HoverPoints::setShapeBrush ( const QBrush &  brush  )  [inline]

Sets the brush, which fills the shape of the points.

Parameters:
brush is the new brush which should be set.

void HoverPoints::setPointLock ( int  pos,
LockType  lock 
) [inline]

Sets the point lock for a point.

Parameters:
pos is the index of the point from which the lock should be set.
lock is the typ of lock which should be set.

void HoverPoints::setEditable ( bool  editable  )  [inline]

Sets this points editable state.

Parameters:
editable is true if the points are editable and flase otherwise.

bool HoverPoints::editable (  )  const [inline]

Returns:
true if the points are editable and flase otherwise.

void HoverPoints::setEnabled ( bool  enabled  )  [slot]

Enables or disables these HoverPints.

Parameters:
enabled is true if the points are enabled and flase otherwise.

void HoverPoints::setDisabled ( bool  disabled  )  [inline, slot]

Enables or disables these HoverPints.

Parameters:
disabled is true if the points are disabled and flase otherwise.

void HoverPoints::pointsChanged ( const QPolygonF &  points  )  [signal]

A signal that is send on change of the points.

Parameters:
points are the new points.

void HoverPoints::chooseColor ( int  index  )  [signal]

A signal that is send to initiate a color dialog.

Parameters:
index is the index of the point for which the color should be changed.

void HoverPoints::alphaChanged ( int  index,
qreal  newXPos 
) [signal]

A signal that is send if an alpha point got moved.

Parameters:
index is the index of the points which should be moved.
newXPos is the new x position to which the corresponding points should be moved.

void HoverPoints::alphaPointCreated ( int  index,
qreal  xPos 
) [signal]

A signal that is send if an alpha point got created.

Parameters:
index is the index where the points should be saved.
xPos is the x position where the points should be created.

void HoverPoints::alphaPointDeleted ( int  index  )  [signal]

A signal that is send if an alpha point got deleted.

Parameters:
index is the index where the points should be deleted.

void HoverPoints::firePointChange (  ) 

Sorts the points.

void HoverPoints::movePoint ( int  index,
const QPointF &  point 
)

Moves the given point.

Parameters:
index is the index of the point which should be moved.
point is the point which contains the new position.

void HoverPoints::newPoint (  )  [private, slot]

Creates a new point. Emits an alphaPointCreated.

void HoverPoints::deletePoint (  )  [private, slot]

Deletes a point. Emits an alphaPointDeleted.

void HoverPoints::fireChooseColor (  )  [private, slot]

Emits a chooseColor.


The documentation for this class was generated from the following files:

Generated on Mon Jan 19 03:19:32 2009 by  doxygen 1.5.6