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

OColorPanelButton Class Reference

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

#include </home/clem/local/src/opie/noncore/unsupported/libopie/colorpopupmenu.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 52 of file colorpopupmenu.h.


Constructor & Destructor Documentation

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 39 of file colorpopupmenu.cpp.

References FALSE, m_color, and setActive().

OColorPanelButton::~OColorPanelButton  ) 
 

Object destructor.

Definition at line 48 of file colorpopupmenu.cpp.


Member Function Documentation

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 63 of file colorpopupmenu.cpp.

References m_active.

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 70 of file colorpopupmenu.cpp.

References m_active.

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 89 of file colorpopupmenu.cpp.

References m_color, and selected().

OColorPanelButton::paintEvent QPaintEvent *  e  ) 
 

Reimplemented for internal reasons.

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

Definition at line 77 of file colorpopupmenu.cpp.

References Qt::black, and m_color.

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().

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 52 of file colorpopupmenu.cpp.

References m_active.

Referenced by OColorPanelButton().


Member Data Documentation

ColorPanelButtonPrivate* OColorPanelButton::d [private]
 

Definition at line 148 of file colorpopupmenu.h.

bool OColorPanelButton::m_active [private]
 

Definition at line 147 of file colorpopupmenu.h.

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

QColor OColorPanelButton::m_color [private]
 

Definition at line 146 of file colorpopupmenu.h.

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


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:41:50 2005 for OPIE by  doxygen 1.4.2