Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::OColorPanelButton Class Reference

The OColorPanelButton class provides a button for color selection. More...

#include </home/clem/local/src/opie/libqtaux/ocolorpopupmenu.h>

List of all members.

Signals

void selected (const QColor &)
 Signal to indicate button has been pressed.

Public Member Functions

 OColorPanelButton (const QColor &color, QWidget *parent=0, const char *name=0)
 Object constructor.
 ~OColorPanelButton ()
 Object destructor.
void setActive (bool active)
 Sets button selection state.
void enterEvent (QEvent *e)
 Reimplemented for internal reasons.
void leaveEvent (QEvent *e)
 Reimplemented for internal reasons.
void paintEvent (QPaintEvent *e)
 Reimplemented for internal reasons.
void mouseReleaseEvent (QMouseEvent *e)
 Slot executed when button is pressed.

Private Attributes

QColor m_color
bool m_active: 1
ColorPanelButtonPrivate * d


Detailed Description

The OColorPanelButton class provides a button for color selection.

See also:
OColorPopupMenu
The OColorPanelButton class provides a button for color selection. The button is drawn with the desired color and no border. This class is used internally by the OColorPopupMenu class to displaying colors in its menu.

Definition at line 57 of file ocolorpopupmenu.h.


Constructor & Destructor Documentation

Opie::OColorPanelButton::OColorPanelButton const QColor &  color,
QWidget *  parent = 0,
const char *  name = 0
 

Object constructor.

Parameters:
color Desired color.
parent Pointer to parent of this control.
name Name of control.
Constructs a new ColorPanelButton control with parent, name and desired color.

Definition at line 42 of file ocolorpopupmenu.cpp.

References FALSE, m_color, and setActive().

Opie::OColorPanelButton::~OColorPanelButton  ) 
 

Object destructor.

Definition at line 51 of file ocolorpopupmenu.cpp.


Member Function Documentation

Opie::OColorPanelButton::enterEvent QEvent *  e  ) 
 

Reimplemented for internal reasons.

Parameters:
e Event currently being processed.
Reimplemented to ensure correct display of button based on whether it is active or not.

Definition at line 66 of file ocolorpopupmenu.cpp.

References m_active.

Opie::OColorPanelButton::leaveEvent QEvent *  e  ) 
 

Reimplemented for internal reasons.

Parameters:
e Event currently being processed.
Reimplemented to ensure correct display of button based on whether it is active or not.

Definition at line 73 of file ocolorpopupmenu.cpp.

References m_active.

Opie::OColorPanelButton::mouseReleaseEvent QMouseEvent *  e  ) 
 

Slot executed when button is pressed.

Parameters:
e Mouse event currently being processed.
See also:
selected()
This slot executes when the button has been pressed. It emits the selected signal as notification that it has been pressed.

Definition at line 92 of file ocolorpopupmenu.cpp.

References m_color, and selected().

Opie::OColorPanelButton::paintEvent QPaintEvent *  e  ) 
 

Reimplemented for internal reasons.

Parameters:
e Event currently being processed. Reimplemented to ensure correct display of button.

Definition at line 80 of file ocolorpopupmenu.cpp.

References Qt::black, and m_color.

Opie::OColorPanelButton::selected const QColor &  color  )  [signal]
 

Signal to indicate button has been pressed.

Parameters:
color Button color.
This signal is emitted when the button is pressed. It provides the color associated to this button.

Referenced by mouseReleaseEvent().

Opie::OColorPanelButton::setActive bool  active  ) 
 

Sets button selection state.

Parameters:
active Boolean indicator of new button state.
Changes button selection state. If button is selected, a highlighted border is drawn.

Definition at line 55 of file ocolorpopupmenu.cpp.

References m_active.

Referenced by OColorPanelButton().


Member Data Documentation

ColorPanelButtonPrivate* Opie::OColorPanelButton::d [private]
 

Definition at line 153 of file ocolorpopupmenu.h.

bool Opie::OColorPanelButton::m_active [private]
 

Definition at line 152 of file ocolorpopupmenu.h.

Referenced by enterEvent(), leaveEvent(), and setActive().

QColor Opie::OColorPanelButton::m_color [private]
 

Definition at line 151 of file ocolorpopupmenu.h.

Referenced by mouseReleaseEvent(), OColorPanelButton(), and paintEvent().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:00:16 2005 for OPIE by  doxygen 1.4.2