25 #ifndef KCOLORDIALOG_H
26 #define KCOLORDIALOG_H
29 #include <QtGui/QPixmap>
30 #include <QtGui/QScrollArea>
31 #include <QtGui/QTableWidget>
43 Q_PROPERTY(
bool acceptDrags READ acceptDrags WRITE setAcceptDrags)
44 Q_PROPERTY(
bool shading READ shading WRITE setShading)
59 void setColor(
int index, const
QColor &col );
61 QColor color(
int index ) const;
65 void setShading(
bool shade);
68 void setAcceptDrags(
bool acceptDrags);
69 bool acceptDrags() const;
72 void setSelected(
int index);
74 int selectedIndex() const;
78 void colorSelected(
int index , const
QColor& color );
80 void colorDoubleClicked(
int index , const
QColor& color );
85 virtual
int sizeHintForColumn(
int column) const;
86 virtual
int sizeHintForRow(
int column) const;
87 virtual
void resizeEvent( QResizeEvent* event );
89 virtual
void mouseReleaseEvent( QMouseEvent * );
90 virtual
void mousePressEvent( QMouseEvent * );
91 virtual
void mouseMoveEvent( QMouseEvent * );
92 virtual
void dragEnterEvent( QDragEnterEvent * );
93 virtual
void dragMoveEvent( QDragMoveEvent * );
94 virtual
void dropEvent( QDropEvent *);
95 virtual
void mouseDoubleClickEvent( QMouseEvent * );
97 int positionToCell(const
QPoint &pos,
bool ignoreBorders=false) const;
100 class KColorCellsPrivate;
101 friend class KColorCellsPrivate;
102 KColorCellsPrivate *const d;
119 Q_PROPERTY(
QColor color READ color WRITE setColor)
135 void setColor(
const QColor &col );
142 void colorChanged(
const QColor&);
145 virtual void paintEvent ( QPaintEvent * pe );
146 virtual void mouseMoveEvent( QMouseEvent * );
147 virtual void dragEnterEvent( QDragEnterEvent *);
148 virtual void dropEvent( QDropEvent *);
151 class KColorPatchPrivate;
152 KColorPatchPrivate *
const d;
213 Q_PROPERTY(
bool isAlphaChannelEnabled READ isAlphaChannelEnabled WRITE setAlphaChannelEnabled)
214 Q_PROPERTY(
QColor defaultColor READ defaultColor WRITE setDefaultColor)
215 Q_PROPERTY(
QColor color READ color WRITE setColor)
272 void setDefaultColor( const
QColor& defaultCol );
277 QColor defaultColor() const;
284 void setAlphaChannelEnabled(
bool alpha);
290 bool isAlphaChannelEnabled() const;
296 void setColor( const
QColor &col );
304 void colorSelected( const
QColor &col );
307 Q_PRIVATE_SLOT(d,
void slotRGBChanged(
void ))
308 Q_PRIVATE_SLOT(d,
void slotAlphaChanged(
void ))
309 Q_PRIVATE_SLOT(d,
void slotHSVChanged(
void ))
310 Q_PRIVATE_SLOT(d,
void slotHtmlChanged(
void ))
311 Q_PRIVATE_SLOT(d,
void slotHSChanged(
int,
int ))
312 Q_PRIVATE_SLOT(d,
void slotVChanged(
int ))
313 Q_PRIVATE_SLOT(d,
void slotAChanged(
int ))
314 Q_PRIVATE_SLOT(d,
void slotColorSelected( const
QColor &col ))
315 Q_PRIVATE_SLOT(d,
void slotColorSelected( const
QColor &col, const
QString &
name ))
316 Q_PRIVATE_SLOT(d,
void slotColorDoubleClicked( const
QColor &col, const
QString &
name ))
317 Q_PRIVATE_SLOT(d,
void slotColorPicker())
318 Q_PRIVATE_SLOT(d,
void slotAddToCustomColors())
319 Q_PRIVATE_SLOT(d,
void slotDefaultColorClicked())
320 Q_PRIVATE_SLOT(d,
void slotModeChanged(
int id ))
325 Q_PRIVATE_SLOT(d,
void slotWriteSettings())
334 virtual
void mouseMoveEvent( QMouseEvent * );
335 virtual
void mouseReleaseEvent( QMouseEvent * );
336 virtual
void keyPressEvent( QKeyEvent * );
337 virtual
bool eventFilter(
QObject *obj, QEvent *ev );
340 class KColorDialogPrivate;
341 KColorDialogPrivate *const d;
346 #endif // KCOLORDIALOG_H
const char * name(StandardAction id)
This will return the internal name of a given standard action.
A dialog base class with standard buttons and predefined layouts.
A table of editable color cells.
QColor shade(const QColor &, qreal lumaAmount, qreal chromaAmount=0.0)
Adjust the luma and chroma components of a color.
A color selection dialog.