Scribus
Open source desktop publishing at your fingertips
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>

Inheritance diagram for ColorListBox:
Collaboration diagram for ColorListBox:

Public Types

enum  PixmapType { smallPixmap, widePixmap, fancyPixmap }
 

Signals

void showContextMenue ()
 

Public Member Functions

 ColorListBox (QWidget *parent=0)
 Standard QListBox like constructor. Just there are initialized pixmaps for icon drawing.
 
virtual void changeEvent (QEvent *e)
 
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.). More...
 
void insertItems (ColorList &list, ColorListBox::PixmapType type)
 Fill the list box with values taken from list. The list is not cleared before items insertion. More...
 
void addItem (ColorPixmapItem *item, ColorListBox::PixmapType type)
 
void addItem (ColorPixmapItem *item)
 
void addItem (QString text)
 
void insertSmallPixmapItems (ColorList &list)
 Insert ColorSmallPixmapItems into the list. More...
 
void insertWidePixmapItems (ColorList &list)
 Insert ColorWidePixmapItems into the list. More...
 
void insertFancyPixmapItems (ColorList &list)
 Insert ColorFancyPixmapItems into the list. More...
 

Public Attributes

ColorListcList
 Pointer to the color list displayed by this box.
 

Protected Slots

virtual void languageChange ()
 

Protected Member Functions

bool viewportEvent (QEvent *event)
 

Protected Attributes

ColorListBox::PixmapType m_type
 

Static Protected Attributes

static int initialized
 
static int sortRule
 

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.

Author
Petr Vanek petr@.nosp@m.yarp.nosp@m.en.cz

Member Function Documentation

void ColorListBox::insertFancyPixmapItems ( ColorList list)

Insert ColorFancyPixmapItems into the list.

Parameters
lista ColorList to present.
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
lista ColorList to present.
thepixmap type to use
void ColorListBox::insertSmallPixmapItems ( ColorList list)

Insert ColorSmallPixmapItems into the list.

Parameters
lista ColorList to present.
void ColorListBox::insertWidePixmapItems ( ColorList list)

Insert ColorWidePixmapItems into the list.

Parameters
lista ColorList to present.
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
lista ColorList to present.
thepixmap type to use

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