10 #include <QListWidget>
14 #include "colorsetmanager.h"
15 #include "commonstrings.h"
16 #include "scribusapi.h"
17 #include "sclistboxpixmap.h"
18 #include "scguardedptr.h"
39 ColorPixmapUserType = UserType + 1
44 setData(Qt::UserRole, QVariant::fromValue(
ColorPixmapValue(col, doc, colName)));
48 setData(Qt::UserRole, QVariant::fromValue(col));
51 setText(CommonStrings::tr_NoneColor);
52 setData(Qt::UserRole, QVariant::fromValue(
ColorPixmapValue(
ScColor(0,0,0,0), NULL, CommonStrings::tr_NoneColor)));
55 QString colorName()
const {
return data(Qt::UserRole).value<
ColorPixmapValue>().m_name; }
84 virtual void changeEvent(QEvent *e);
86 QString currentColor()
const;
93 void updateBox(
ColorList& list, ColorListBox::PixmapType type);
99 void insertItems(
ColorList& list, ColorListBox::PixmapType type);
103 void addItem(QString text);
107 void insertSmallPixmapItems(
ColorList& list);
111 void insertWidePixmapItems(
ColorList& list);
115 void insertFancyPixmapItems(
ColorList& list);
120 void slotRightClick();
122 virtual void languageChange();
124 void showContextMenue();
126 bool viewportEvent(QEvent *event);
127 static int initialized;
129 ColorListBox::PixmapType m_type;
Definition: colorlistbox.h:36
Very nice list box with color names and samples. It's inherited from QListBox with all its methods an...
Definition: colorlistbox.h:67
ColorList * cList
Pointer to the color list displayed by this box.
Definition: colorlistbox.h:118
Definition: sccolor.h:155
the Document Class
Definition: scribusdoc.h:90
Definition: colorlistbox.h:21