ColorListBox Class Reference
Very nice list box with color names and samples. It's inherited from QListBox with all its methods and properties. I create it as separate class because it's used now in ColorManager and ColorWheel too. You can see it in Extras/Color Wheel or in Edit/Colors dialogs in action. More...
#include <colorlistbox.h>

Public Types | |
| enum | PixmapType { smallPixmap, widePixmap, fancyPixmap } |
Public Member Functions | |
| ColorListBox (QWidget *parent=0) | |
| Standard QListBox like constructor. Just there are initialized pixmaps for icon drawing. | |
| QString | currentColor () const |
| void | updateBox (ColorList &list, ColorListBox::PixmapType type) |
| Fill the list box with values taken from list. The list is cleared itself. Then is rendered an icon with color attributes (RGB/CMYK/Spot etc.). | |
| void | insertItems (ColorList &list, ColorListBox::PixmapType type) |
| Fill the list box with values taken from list. The list is not cleared before items insertion. | |
| void | insertSmallPixmapItems (ColorList &list) |
| Insert ColorSmallPixmapItems into the list. | |
| void | insertWidePixmapItems (ColorList &list) |
| Insert ColorWidePixmapItems into the list. | |
| void | insertFancyPixmapItems (ColorList &list) |
| Insert ColorFancyPixmapItems into the list. | |
Public Attributes | |
| ColorList * | cList |
| Pointer to the color list displayed by this box. | |
Protected Member Functions | |
| bool | event (QEvent *event) |
Protected Attributes | |
| int | m_selectedRow |
Detailed Description
Very nice list box with color names and samples. It's inherited from QListBox with all its methods and properties. I create it as separate class because it's used now in ColorManager and ColorWheel too. You can see it in Extras/Color Wheel or in Edit/Colors dialogs in action.
Definition at line 67 of file colorlistbox.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
| ColorListBox::ColorListBox | ( | QWidget * | parent = 0 |
) |
Standard QListBox like constructor. Just there are initialized pixmaps for icon drawing.
Definition at line 189 of file colorlistbox.cpp.
References cList.
Member Function Documentation
| QString ColorListBox::currentColor | ( | ) | const |
| void ColorListBox::updateBox | ( | ColorList & | list, | |
| ColorListBox::PixmapType | type | |||
| ) |
Fill the list box with values taken from list. The list is cleared itself. Then is rendered an icon with color attributes (RGB/CMYK/Spot etc.).
- Parameters:
-
list a ColorList to present. the pixmap type to use
Definition at line 206 of file colorlistbox.cpp.
References insertItems().
Referenced by ColorManager::updateCList().
| void ColorListBox::insertItems | ( | ColorList & | list, | |
| ColorListBox::PixmapType | type | |||
| ) |
Fill the list box with values taken from list. The list is not cleared before items insertion.
- Parameters:
-
list a ColorList to present. the pixmap type to use
Definition at line 213 of file colorlistbox.cpp.
References cList, fancyPixmap, insertFancyPixmapItems(), insertSmallPixmapItems(), insertWidePixmapItems(), smallPixmap, and widePixmap.
Referenced by ColorCombo::insertItems(), updateBox(), ColorCombo::updateBox(), and Cpalette::updateCList().
| void ColorListBox::insertSmallPixmapItems | ( | ColorList & | list | ) |
Insert ColorSmallPixmapItems into the list.
- Parameters:
-
list a ColorList to present.
Definition at line 224 of file colorlistbox.cpp.
References doc, ColorList::document(), CommonStrings::None, and CommonStrings::tr_NoneColor.
Referenced by insertItems().
| void ColorListBox::insertWidePixmapItems | ( | ColorList & | list | ) |
Insert ColorWidePixmapItems into the list.
- Parameters:
-
list a ColorList to present.
Definition at line 239 of file colorlistbox.cpp.
References doc, ColorList::document(), CommonStrings::None, and CommonStrings::tr_NoneColor.
Referenced by insertItems().
| void ColorListBox::insertFancyPixmapItems | ( | ColorList & | list | ) |
Insert ColorFancyPixmapItems into the list.
- Parameters:
-
list a ColorList to present.
Definition at line 254 of file colorlistbox.cpp.
References doc, ColorList::document(), CommonStrings::None, and CommonStrings::tr_NoneColor.
Referenced by insertItems(), and CMYKChoose::SelSwatch().
| bool ColorListBox::event | ( | QEvent * | event | ) | [protected] |
Definition at line 269 of file colorlistbox.cpp.
References cList, colorModelCMYK, ScColor::getCMYK(), ScColor::getColorModel(), and ScColor::getRawRGBColor().
Member Data Documentation
Pointer to the color list displayed by this box.
Definition at line 112 of file colorlistbox.h.
Referenced by ColorListBox(), event(), insertItems(), Cpalette::setDocument(), and Cpalette::ToggleColorDisplay().
int ColorListBox::m_selectedRow [protected] |
Definition at line 116 of file colorlistbox.h.
The documentation for this class was generated from the following files:
