wwWidgets Home · All Classes · Main Classes · Grouped Classes · Functions

QwwTwoColorIndicator Class Reference
[wwWidgets module]

The QwwTwoColorIndicator class provides a widget allowing to choose a foreground and background colour. More...

 #include <QwwTwoColorIndicator>

This class is not part of the Qt GUI Framework Edition.

Inherits QWidget.


Properties


Public Functions

QwwTwoColorIndicator ( QWidget * parent = 0 )
const QColor & bgColor () const
bool dragEnabled () const
const QColor & fgColor () const
bool isActive () const
void setDragEnabled ( bool )

Public Slots

void setActive ( bool )
void setBgColor ( const QColor & b )
void setFgColor ( const QColor & f )
void switchColors ()

Signals

void bgChanged ( const QColor & color )
void bgClicked ()
void bgPressed ()
void fgChanged ( const QColor & color )
void fgClicked ()
void fgPressed ()

Protected Functions

virtual void paintSection ( QPainter * painter, const QRect & rect, const QColor & color )

Additional Inherited Members


Detailed Description

The QwwTwoColorIndicator class provides a widget allowing to choose a foreground and background colour.

QwwTwoColorIndicator


Property Documentation

active : bool

This property holds whether mouse click enables colour select.

Access functions:

bool isActive () const
void setActive ( bool )

bgColor : QColor

This property holds background colour.

Access functions:

const QColor & bgColor () const
void setBgColor ( const QColor & b )

dragEnabled : bool

This property holds whether dragging from the widget is enabled.

Access functions:

bool dragEnabled () const
void setDragEnabled ( bool )

fgColor : QColor

This property holds foreground colour.

Access functions:

const QColor & fgColor () const
void setFgColor ( const QColor & f )

Member Function Documentation

QwwTwoColorIndicator::QwwTwoColorIndicator ( QWidget * parent = 0 )

Constructs a two color indicator with a given parent.

void QwwTwoColorIndicator::bgChanged ( const QColor & color )   [signal]

This signal is emitted when background colour changes to color.

See also fgChanged().

void QwwTwoColorIndicator::bgClicked ()   [signal]

This signal is emitted when the background button was clicked.

See also fgClicked() and bgPressed().

void QwwTwoColorIndicator::bgPressed ()   [signal]

This signal is emitted when the background button was pressed.

See also fgPressed() and bgClicked().

void QwwTwoColorIndicator::fgChanged ( const QColor & color )   [signal]

This signal is emitted when foreground colour changes to color.

See also bgChanged().

void QwwTwoColorIndicator::fgClicked ()   [signal]

This signal is emitted when the foreground button was clicked.

See also bgClicked() and fgPressed().

void QwwTwoColorIndicator::fgPressed ()   [signal]

This signal is emitted when the foreground button was pressed.

See also bgPressed() and fgClicked().

void QwwTwoColorIndicator::paintSection ( QPainter * painter, const QRect & rect, const QColor & color )   [virtual protected]

Paints a single section of the indicator.

The method paints to the rectangle rect with color using painter.

Reimplement to modify how the indicator looks.

void QwwTwoColorIndicator::switchColors ()   [slot]

Swaps foreground and background colors.


Copyright © 2007-2010 Witold Wysota Trademarks
wwWidgets 1.0.0