21 #ifndef _COLOR_LISTBOX_H_
22 #define _COLOR_LISTBOX_H_
24 #include <tdelistbox.h>
26 class ColorListBox : public TDEListBox
32 ColorListBox( TQWidget *parent=0, const char * name=0, WFlags f=0 );
33 void setColor( uint index, const TQColor &color );
34 TQColor color( uint index ) const;
37 virtual void setEnabled( bool state );
40 void dragEnterEvent( TQDragEnterEvent *e );
41 void dragLeaveEvent( TQDragLeaveEvent *e );
42 void dragMoveEvent( TQDragMoveEvent *e );
43 void dropEvent( TQDropEvent *e );
46 void newColor( int index );
49 int mCurrentOnDragEnter;
54 class ColorListItem : public TQListBoxItem
57 ColorListItem( const TQString &text, const TQColor &color=TQt::black );
58 const TQColor &color( void );
59 void setColor( const TQColor &color );
62 virtual void paint( TQPainter * );
63 virtual int height( const TQListBox * ) const;
64 virtual int width( const TQListBox * ) const;
|