kalarm/lib
ColourCombo Class Reference
A colour selection combo box whose colour list can be specified. More...
#include <colourcombo.h>
Inherits TQComboBox.
Public Slots | |
virtual void | setEnabled (bool enabled) |
Signals | |
void | activated (const TQColor &) |
void | highlighted (const TQColor &) |
Public Member Functions | |
ColourCombo (TQWidget *parent=0, const char *name=0, const TQColor &defaultColour=0xFFFFFF) | |
TQColor | color () const |
TQColor | colour () const |
void | setColor (const TQColor &c) |
void | setColour (const TQColor &c) |
void | setColours (const ColourList &list) |
bool | isCustomColour () const |
bool | isReadOnly () const |
virtual void | setReadOnly (bool readOnly) |
Protected Member Functions | |
virtual void | resizeEvent (TQResizeEvent *) |
virtual void | mousePressEvent (TQMouseEvent *) |
virtual void | mouseReleaseEvent (TQMouseEvent *) |
virtual void | mouseMoveEvent (TQMouseEvent *) |
virtual void | keyPressEvent (TQKeyEvent *) |
virtual void | keyReleaseEvent (TQKeyEvent *) |
Detailed Description
A colour selection combo box whose colour list can be specified.
The ColourCombo class is a combo box allowing the user to select a colour.
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.
Definition at line 43 of file colourcombo.h.
Constructor & Destructor Documentation
ColourCombo::ColourCombo | ( | TQWidget * | parent = 0 , |
|
const char * | name = 0 , |
|||
const TQColor & | defaultColour = 0xFFFFFF | |||
) | [explicit] |
Constructor.
- Parameters:
-
parent The parent object of this widget. name The name of this widget. defaultColour The colour which is selected by default.
Definition at line 33 of file colourcombo.cpp.
Member Function Documentation
void ColourCombo::activated | ( | const TQColor & | ) | [signal] |
Signal emitted when a new colour has been selected.
TQColor ColourCombo::color | ( | ) | const [inline] |
Returns the selected colour.
Definition at line 38 of file colourcombo.h.
TQColor ColourCombo::colour | ( | ) | const [inline] |
Returns the selected colour.
Definition at line 40 of file colourcombo.h.
void ColourCombo::highlighted | ( | const TQColor & | ) | [signal] |
Signal emitted when a new colour has been highlighted.
bool ColourCombo::isCustomColour | ( | ) | const [inline] |
Returns true if the first entry in the list, i.e.
the custom colour, is selected.
Definition at line 48 of file colourcombo.h.
bool ColourCombo::isReadOnly | ( | ) | const [inline] |
Returns true if the widget is read only.
Definition at line 50 of file colourcombo.h.
void ColourCombo::setColor | ( | const TQColor & | c | ) | [inline] |
Sets the selected colour to c
.
Definition at line 42 of file colourcombo.h.
void ColourCombo::setColour | ( | const TQColor & | c | ) |
Sets the selected colour to c
.
Definition at line 47 of file colourcombo.cpp.
void ColourCombo::setColours | ( | const ColourList & | list | ) |
Initialises the list of colours to list
.
Definition at line 56 of file colourcombo.cpp.
void ColourCombo::setEnabled | ( | bool | enabled | ) | [virtual, slot] |
Enables or disables the widget.
Definition at line 83 of file colourcombo.cpp.
void ColourCombo::setReadOnly | ( | bool | readOnly | ) | [virtual] |
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.
Definition at line 195 of file colourcombo.cpp.
The documentation for this class was generated from the following files: