KDE PIM / Developers / API Docs / kalarm

ColourCombo Class Reference

The ColourCombo class is a combo box allowing the user to select a colour. Colour combo box with read-only option. More...

#include <colourcombo.h>

Inherits QComboBox.

List of all members.

Public Slots

Signals

Public Member Functions

Protected Member Functions

Properties


Detailed Description

The ColourCombo class is a combo box allowing the user to select a colour. Colour combo box with read-only option.

It is similar to KColorCombo but allows the list of colours to be restricted to those which are specified. The first item in the list is a custom colour entry, which allows the user to define an arbitrary colour. The remaining entries in the list are preset by the program.

The widget may be set as read-only. This has the same effect as disabling it, except that its appearance is unchanged.

Author:
David Jarvie <software@astrojar.org.uk>


Constructor & Destructor Documentation

ColourCombo::ColourCombo (  QWidget *  parent = 0,
const char *  name = 0,
const QColor &  defaultColour = 0xFFFFFF
) 
 

Constructor.

Parameters:
parent The parent object of this widget.
name The name of this widget.
defaultColour The colour which is selected by default.

Member Function Documentation

QColor ColourCombo::color (   )  const [inline]
 

Returns the selected colour.

QColor ColourCombo::colour (   )  const [inline]
 

Returns the selected colour.

void ColourCombo::setColor (  const QColor &  c  )  [inline]
 

Sets the selected colour to c.

void ColourCombo::setColour (  const QColor &  c  ) 
 

Sets the selected colour to c.

void ColourCombo::setColours (  const ColourList &  list  ) 
 

Initialises the list of colours to list.

bool ColourCombo::isCustomColour (   )  const [inline]
 

Returns true if the first entry in the list, i.e.

the custom colour, is selected.

bool ColourCombo::isReadOnly (   )  const [inline]
 

Returns true if the widget is read only.

void ColourCombo::setReadOnly (  bool  readOnly  ) 
 

Sets whether the combo box can be changed by the user.

Parameters:
readOnly True to set the widget read-only, false to set it read-write.

void ColourCombo::activated (  const QColor &   )  [signal]
 

Signal emitted when a new colour has been selected.

void ColourCombo::highlighted (  const QColor &   )  [signal]
 

Signal emitted when a new colour has been highlighted.

void ColourCombo::setEnabled (  bool  enabled  )  [virtual, slot]
 

Enables or disables the widget.


The documentation for this class was generated from the following files: