24 #ifndef CONTACTLISTVIEW_H
25 #define CONTACTLISTVIEW_H
29 #include <tqtooltip.h>
32 #include <tdelistview.h>
34 #include <tdeabc/field.h>
38 class ContactListView;
50 void maybeTip(
const TQPoint & );
55 class ContactListViewItem :
public TDEListViewItem
59 ContactListViewItem(
const TDEABC::Addressee &a, ContactListView* parent,
60 TDEABC::AddressBook *doc,
const TDEABC::Field::List &fields, KIMProxy *proxy );
61 const TDEABC::Addressee &addressee()
const {
return mAddressee; }
62 virtual void refresh();
63 virtual ContactListView* parent();
64 virtual TQString key (
int,
bool )
const;
65 void setHasIM(
bool hasIM );
69 virtual void paintCell(TQPainter * p,
const TQColorGroup & cg,
70 int column,
int width,
int align );
73 TDEABC::Addressee mAddressee;
74 TDEABC::Field::List mFields;
75 ContactListView *parentListView;
76 TDEABC::AddressBook *mDocument;
85 class ContactListView :
public TDEListView
92 TDEABC::AddressBook *doc,
94 const char *name = 0L );
95 virtual ~ContactListView() {}
100 bool tooltips()
const {
return mToolTips; }
101 void setToolTipsEnabled(
bool enabled) { mToolTips = enabled; }
103 bool alternateBackground()
const {
return mABackground; }
104 void setAlternateBackgroundEnabled(
bool enabled);
106 bool singleLine()
const {
return mSingleLine; }
107 void setSingleLineEnabled(
bool enabled) { mSingleLine = enabled; }
109 const TQColor &alternateColor()
const {
return mAlternateColor; }
115 void setBackgroundPixmap(
const TQString &filename);
120 void setShowIM(
bool enabled );
133 void setIMColumn(
int column );
144 virtual void paintEmptyArea( TQPainter * p,
const TQRect & rect );
145 virtual void contentsMousePressEvent(TQMouseEvent*);
146 void contentsMouseMoveEvent( TQMouseEvent *e );
147 void contentsDropEvent( TQDropEvent *e );
148 virtual bool acceptDrag(TQDropEvent *e)
const;
151 void itemDropped(TQDropEvent *e);
156 void startAddresseeDrag();
157 void addresseeDropped(TQDropEvent *);
170 TQColor mAlternateColor;
173 int mInstantMsgColumn;
The whole tooltip design needs a lot of work.
This class is the table view for kaddressbook.