summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/colorlistbox.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/views/colorlistbox.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/views/colorlistbox.h') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/views/colorlistbox.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h
index bb91484..31a8085 100644
--- a/kaddressbook/views/colorlistbox.h
+++ b/kaddressbook/views/colorlistbox.h
@@ -19,24 +19,29 @@
19 */ 19 */
20 20
21#ifndef _COLOR_LISTBOX_H_ 21#ifndef _COLOR_LISTBOX_H_
22#define _COLOR_LISTBOX_H_ 22#define _COLOR_LISTBOX_H_
23 23
24#include <klistbox.h> 24#include <klistbox.h>
25//Added by qt3to4:
26#include <QDragMoveEvent>
27#include <QDragLeaveEvent>
28#include <QDropEvent>
29#include <QDragEnterEvent>
25 30
26class QDragEnterEvent; 31class QDragEnterEvent;
27class QDragLeaveEvent; 32class QDragLeaveEvent;
28class QDragMoveEvent; 33class QDragMoveEvent;
29class QDropEvent; 34class QDropEvent;
30 35
31class ColorListBox : public KListBox 36class ColorListBox : public KListBox
32{ 37{
33 Q_OBJECT 38 Q_OBJECT
34 39
35 public: 40 public:
36 ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); 41 ColorListBox( QWidget *parent=0, const char * name=0, Qt::WFlags f=0 );
37 void setColor( uint index, const QColor &color ); 42 void setColor( uint index, const QColor &color );
38 QColor color( uint index ) const; 43 QColor color( uint index ) const;
39 44
40 public slots: 45 public slots:
41 virtual void setEnabled( bool state ); 46 virtual void setEnabled( bool state );
42 47
@@ -45,31 +50,31 @@ class ColorListBox : public KListBox
45 void dragLeaveEvent( QDragLeaveEvent *e ); 50 void dragLeaveEvent( QDragLeaveEvent *e );
46 void dragMoveEvent( QDragMoveEvent *e ); 51 void dragMoveEvent( QDragMoveEvent *e );
47 void dropEvent( QDropEvent *e ); 52 void dropEvent( QDropEvent *e );
48 53
49 private slots: 54 private slots:
50 void newColor( int index ); 55 void newColor( int index );
51 void slotNewColor(QListBoxItem * i); 56 void slotNewColor(Q3ListBoxItem * i);
52 57
53 private: 58 private:
54 int mCurrentOnDragEnter; 59 int mCurrentOnDragEnter;
55 60
56}; 61};
57 62
58 63
59class ColorListItem : public QListBoxItem 64class ColorListItem : public Q3ListBoxItem
60{ 65{
61 public: 66 public:
62 ColorListItem( const QString &text, const QColor &color=Qt::black ); 67 ColorListItem( const QString &text, const QColor &color=Qt::black );
63 const QColor &color( void ); 68 const QColor &color( void );
64 void setColor( const QColor &color ); 69 void setColor( const QColor &color );
65 70
66 protected: 71 protected:
67 virtual void paint( QPainter * ); 72 virtual void paint( QPainter * );
68 virtual int height( const QListBox * ) const; 73 virtual int height( const Q3ListBox * ) const;
69 virtual int width( const QListBox * ) const; 74 virtual int width( const Q3ListBox * ) const;
70 75
71 private: 76 private:
72 QColor mColor; 77 QColor mColor;
73 int mBoxWidth; 78 int mBoxWidth;
74}; 79};
75 80