1
/***************************************************************************
2
* Copyright (C) 2009-2012 by Savoir-Faire Linux *
3
* Author : Emmanuel Lepage Valle <emmanuel.lepage@savoirfairelinux.com >*
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 3 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
**************************************************************************/
20
#ifndef CONTACT_DOCK_H
21
#define CONTACT_DOCK_H
23
#include <QtGui/QDockWidget>
24
#include <QtGui/QTreeWidget>
30
class QTreeWidgetItem;
39
class CollectionCombobox;
41
class ContactsTreeModel;
51
class ContactItemWidget;
53
///@class ContactDock Dock to access contacts
54
class ContactDock : public QDockWidget
59
ContactDock(QWidget* parent);
60
virtual ~ContactDock();
64
KLineEdit* m_pFilterLE;
65
QSplitter* m_pSplitter;
66
ContactTree* m_pContactView;
67
QListWidget* m_pCallView;
68
QComboBox* m_pSortByCBB;
69
QCheckBox* m_pShowHistoCK;
70
QList<ContactItemWidget*> m_Contacts;
73
virtual void keyPressEvent(QKeyEvent* event);
77
void loadContactHistory(QTreeWidgetItem* item);
78
void filter(const QString& text);
79
void setHistoryVisible(bool visible);
82
///@class ContactTree tree view with additinal drag and drop
83
class ContactTree : public QTreeWidget {
86
ContactTree(QWidget* parent) : QTreeWidget(parent) {}
87
virtual QMimeData* mimeData( const QList<QTreeWidgetItem *> items) const;
88
bool dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action);
91
///@class KeyPressEaterC keygrabber
92
class KeyPressEaterC : public QObject
96
KeyPressEaterC(ContactDock* parent) : QObject(parent) {
101
bool eventFilter(QObject *obj, QEvent *event);
104
ContactDock* m_pDock;
b'\\ No newline at end of file'