18 #ifndef __KDUALCOLORBTN_H
19 #define __KDUALCOLORBTN_H
25 #include <tdelibs_export.h>
52 TQ_PROPERTY( TQColor foreground READ foreground WRITE setForeground )
53 TQ_PROPERTY( TQColor background READ background WRITE setBackground )
54 TQ_PROPERTY( TQColor currentColor READ currentColor WRITE setCurrentColor STORED
false DESIGNABLE
false )
55 TQ_PROPERTY( DualColor current READ current WRITE setCurrent )
59 enum DualColor { Foreground, Background };
67 KDualColorButton(TQWidget *parent=0,
const char *name=0, TQWidget* dialogParent=0);
74 TQWidget *parent=0,
const char *name=0, TQWidget* dialogParent=0);
80 TQColor foreground()
const;
84 TQColor background()
const;
88 DualColor current()
const;
92 TQColor currentColor()
const;
97 virtual TQSize sizeHint()
const;
102 void setForeground(
const TQColor &c);
106 void setBackground(
const TQColor &c);
110 void setCurrent(DualColor s);
114 void setCurrentColor(
const TQColor &c);
136 virtual void metrics(TQRect &fgRect, TQRect &bgRect);
137 virtual void paintEvent(TQPaintEvent *ev);
138 virtual void mousePressEvent(TQMouseEvent *ev);
139 virtual void mouseMoveEvent(TQMouseEvent *ev);
140 virtual void mouseReleaseEvent(TQMouseEvent *ev);
142 virtual void dragEnterEvent(TQDragEnterEvent *ev);
143 virtual void dropEvent(TQDropEvent *ev);
145 TQBitmap *arrowBitmap;
146 TQPixmap *resetPixmap;
149 bool dragFlag, miniCtlFlag;
150 DualColor curColor, tmpColor;
153 virtual void virtual_hook(
int id,
void* data );
155 class KDualColorPrivate;
156 KDualColorPrivate *d;