summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/colorlistbox.h
Unidiff
Diffstat (limited to 'kaddressbook/views/colorlistbox.h') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/views/colorlistbox.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h
index 4a0e705..bb91484 100644
--- a/kaddressbook/views/colorlistbox.h
+++ b/kaddressbook/views/colorlistbox.h
@@ -27,48 +27,49 @@ class QDragEnterEvent;
27class QDragLeaveEvent; 27class QDragLeaveEvent;
28class QDragMoveEvent; 28class QDragMoveEvent;
29class QDropEvent; 29class QDropEvent;
30 30
31class ColorListBox : public KListBox 31class ColorListBox : public KListBox
32{ 32{
33 Q_OBJECT 33 Q_OBJECT
34 34
35 public: 35 public:
36 ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); 36 ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 );
37 void setColor( uint index, const QColor &color ); 37 void setColor( uint index, const QColor &color );
38 QColor color( uint index ) const; 38 QColor color( uint index ) const;
39 39
40 public slots: 40 public slots:
41 virtual void setEnabled( bool state ); 41 virtual void setEnabled( bool state );
42 42
43 protected: 43 protected:
44 void dragEnterEvent( QDragEnterEvent *e ); 44 void dragEnterEvent( QDragEnterEvent *e );
45 void dragLeaveEvent( QDragLeaveEvent *e ); 45 void dragLeaveEvent( QDragLeaveEvent *e );
46 void dragMoveEvent( QDragMoveEvent *e ); 46 void dragMoveEvent( QDragMoveEvent *e );
47 void dropEvent( QDropEvent *e ); 47 void dropEvent( QDropEvent *e );
48 48
49 private slots: 49 private slots:
50 void newColor( int index ); 50 void newColor( int index );
51 void slotNewColor(QListBoxItem * i);
51 52
52 private: 53 private:
53 int mCurrentOnDragEnter; 54 int mCurrentOnDragEnter;
54 55
55}; 56};
56 57
57 58
58class ColorListItem : public QListBoxItem 59class ColorListItem : public QListBoxItem
59{ 60{
60 public: 61 public:
61 ColorListItem( const QString &text, const QColor &color=Qt::black ); 62 ColorListItem( const QString &text, const QColor &color=Qt::black );
62 const QColor &color( void ); 63 const QColor &color( void );
63 void setColor( const QColor &color ); 64 void setColor( const QColor &color );
64 65
65 protected: 66 protected:
66 virtual void paint( QPainter * ); 67 virtual void paint( QPainter * );
67 virtual int height( const QListBox * ) const; 68 virtual int height( const QListBox * ) const;
68 virtual int width( const QListBox * ) const; 69 virtual int width( const QListBox * ) const;
69 70
70 private: 71 private:
71 QColor mColor; 72 QColor mColor;
72 int mBoxWidth; 73 int mBoxWidth;
73}; 74};
74 75