72
* An improved version of KColorAction, which also features a delayed popupmenu
73
* for changing the color (make sure to test color() in your slot).
75
class KSelectColorAction : public KColorAction
67
class KSelectColorAction : public KAction
79
77
KSelectColorAction( const QString& text, Type type,
80
int accel = 0, QObject* parent = 0, const char* name = 0 );
81
KSelectColorAction( const QString& text, Type type, int accel,
82
QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
84
~KSelectColorAction();
86
virtual int plug( QWidget* widget, int index = -1 );
87
KPopupMenu* popupMenu() { return m_popup; }
91
* Displays the color chooser dialog
105
* Simple toolbar with little color buttons. This Bar can be placed like a normal toolbar.
107
* @short Toolbar with color buttons.
109
class KColorBar : public QWidget
117
* Initializes the color bar with a list of colors.
119
KColorBar( const QValueList<QColor> &cols, QWidget *parent, const char *name );
121
Orientation orientation() const { return orient; }
124
void orientationChanged( Orientation o );
127
void mousePressEvent( QMouseEvent *e );
128
void paintEvent( QPaintEvent *e );
131
QValueList<QColor> colors;
136
* This signal gets emitted when the left mouse button is clicked on a color button.
138
void leftClicked( const QColor &c );
140
* This signal gets emitted when the right mouse button is clicked on a color button.
142
void rightClicked( const QColor &c );
146
class KColorBarAction : public KAction
151
KColorBarAction( const QString &text, int accel,
152
QObject *receiver, const char *leftClickSlot, const char *rightClickSlot,
153
const QValueList<QColor> &cols, QObject *parent, const char *name );
155
int plug( QWidget*, int index = -1 );
158
void leftClicked( const QColor &c );
159
void rightClicked( const QColor &c );
162
QValueList<QColor> colors;
164
QCString leftClickSlot;
165
QCString rightClickSlot;
78
const QObject* receiver, const char* slot,
79
KActionCollection* parent, const char* name );
80
virtual ~KSelectColorAction();
82
virtual int plug( QWidget* w, int index = -1 );
88
virtual void setColor( const QColor &c );
89
virtual void setType( Type t );
92
void colorSelected( const QColor& color );
95
QString whatsThisWithIcon() const; // duplicated, as it's private in kaction