VisLU Flow 0.1
Public Slots | Signals | Public Member Functions | Protected Member Functions

QtColorTriangle Class Reference

The QtColorTriangle class provides a triangular color selection widget. More...

List of all members.

Public Slots

void setColor (const QColor &col)

Signals

void colorChanged (const QColor &col)

Public Member Functions

 QtColorTriangle (QWidget *parent=0)
 ~QtColorTriangle ()
QSize sizeHint () const
int heightForWidth (int w) const
void polish ()
QColor color () const

Protected Member Functions

void paintEvent (QPaintEvent *)
void mouseMoveEvent (QMouseEvent *)
void mousePressEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void keyPressEvent (QKeyEvent *e)
void resizeEvent (QResizeEvent *)
void drawTrigon (QImage *p, const QPointF &a, const QPointF &b, const QPointF &c, const QColor &color)

Detailed Description

The QtColorTriangle class provides a triangular color selection widget.

This widget uses the HSV color model, and is therefore useful for selecting colors by eye.

The triangle in the center of the widget is used for selecting saturation and value, and the surrounding circle is used for selecting hue.

Use setColor() and color() to set and get the current color.

colortriangle.png


Constructor & Destructor Documentation

QtColorTriangle::QtColorTriangle ( QWidget *  parent = 0)

Constructs a color triangle widget with the given parent.

QtColorTriangle::~QtColorTriangle ( )

Destructs the color triangle.


Member Function Documentation

QtColorTriangle::colorChanged ( const QColor &  color) [signal]

Whenever the color triangles color changes this signal is emitted with the new color.

int QtColorTriangle::heightForWidth ( int  w) const

Forces the triangle widget to always be square. Returns the value w.

void QtColorTriangle::paintEvent ( QPaintEvent *  e) [protected]

First copies a background image of the hue donut and its background color onto the frame, then draws the color triangle, and finally the selectors.

QSize QtColorTriangle::sizeHint ( ) const

The documentation for this class was generated from the following files:
 All Classes Functions Variables