ContactDock.h 1.32 KB
Newer Older
1 2 3 4
#ifndef CONTACT_DOCK_H
#define CONTACT_DOCK_H

#include <QtGui/QDockWidget>
5
#include <QtGui/QTreeWidget>
6 7 8 9 10 11 12 13 14
#include <QSplitter>

#include <akonadi/entitytreeview.h>
#include <akonadi/itemview.h>
#include <klineedit.h>
#include <kabc/addressee.h>
#include <akonadi/contact/contactstreemodel.h>
#include <akonadi/collectioncombobox.h>

15
class QListWidget;
16
class QComboBox;
17 18 19
class QTreeWidgetItem;
class QCheckBox;
class ContactItemWidget;
20
class ContactTree;
21 22 23 24 25 26 27

class ContactDock : public QDockWidget {
   Q_OBJECT
public:
   ContactDock(QWidget* parent);
   virtual ~ContactDock();
private:
28
   //Attributes
29 30
   KLineEdit*                   m_pFilterLE;
   QSplitter*                   m_pSplitter;
31
   ContactTree*                 m_pContactView;
32
   QListWidget*                 m_pCallView;
33
   QComboBox*                   m_pSortByCBB;
34 35
   QCheckBox*                   m_pShowHistoCK;
   QList<ContactItemWidget*>    m_pContacts;
36

37 38
private slots:
   void reloadContact();
39 40
   void loadContactHistory(QTreeWidgetItem* item);
   void filter(QString text);
41 42
};

43 44 45 46 47 48 49 50
class ContactTree : public QTreeWidget {
   Q_OBJECT
public:
   ContactTree(QWidget* parent) : QTreeWidget(parent) {}
   virtual QMimeData* mimeData( const QList<QTreeWidgetItem *> items) const;
   bool dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action);
};

51
#endif