QwwTwoColorIndicator Class Reference

A widget allowing to choose a foreground and background colour. More...

Inherits QWidget.

List of all members.

Public Slots

void setActive (bool)
void setBgColor (const QColor &)
 Sets the background colour.
void setFgColor (const QColor &)
 Sets the foreground colour.
void switchColors ()
 Swaps foreground and background colours.

Signals

void bgChanged (const QColor &)
 background colour changed
void bgClicked ()
 background button was clicked
void bgPressed ()
 background button was pressed
void fgChanged (const QColor &)
 foreground colour changed
void fgClicked ()
 foreground button was clicked
void fgPressed ()
 foreground button was pressed

Public Member Functions

bool isActive () const
 
Returns:

QSize minimumSizeHint () const
 QwwTwoColorIndicator (QWidget *parent=0)
QSize sizeHint () const
 ~QwwTwoColorIndicator ()

Protected Member Functions

void mousePressEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void paintEvent (QPaintEvent *)
virtual void paintSection (QPainter *p, const QRect &rect, const QColor &color)

Properties

bool active []
 whether mouse click enables colour select
QColor bgColor []
 background colour
QColor fgColor []
 foreground colour


Detailed Description

A widget allowing to choose a foreground and background colour.

Definition at line 21 of file qwwtwocolorindicator.h.


Constructor & Destructor Documentation

QwwTwoColorIndicator::QwwTwoColorIndicator ( QWidget parent = 0  ) 

Parameters:
parent 

Definition at line 86 of file qwwtwocolorindicator.cpp.


Member Function Documentation

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

Parameters:
painter 
rect 
color 

Definition at line 117 of file qwwtwocolorindicator.cpp.

void QwwTwoColorIndicator::setActive ( bool  a  )  [slot]

See also:
isActive, active

Definition at line 189 of file qwwtwocolorindicator.cpp.

void QwwTwoColorIndicator::setBgColor ( const QColor b  )  [slot]

Sets the background colour.

Parameters:
b colour to set

Definition at line 142 of file qwwtwocolorindicator.cpp.

void QwwTwoColorIndicator::setFgColor ( const QColor f  )  [slot]

Sets the foreground colour.

Parameters:
f colour to set

Definition at line 154 of file qwwtwocolorindicator.cpp.


Property Documentation

const QColor & QwwTwoColorIndicator::bgColor [read, write]

background colour

See also:
setBgColor, bgColor

Definition at line 25 of file qwwtwocolorindicator.h.

const QColor & QwwTwoColorIndicator::fgColor [read, write]

foreground colour

See also:
setFgColor, fgColor

Definition at line 24 of file qwwtwocolorindicator.h.


Generated on Sat Apr 21 21:54:36 2007 for wwWidgets by  doxygen 1.5.1