~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to kde/src/widgets/ContactDock.h

  • Committer: Package Import Robot
  • Author(s): Whoopie
  • Date: 2012-03-22 10:29:10 UTC
  • mfrom: (4.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120322102910-tb8hugi2su1tguwh
Tags: 1.0.2-1ubuntu1
* Apply some upstream patches to fix FTBFS (LP: #913018):
  - debian/patches/05_glib_includes.patch: fix glib includes.
  - debian/patches/06_use_XkbKeycodeToKeysym.patch: use 
    XkbKeycodeToKeysym instead of (deprecated) XKeycodeToKeysym.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2009-2012 by Savoir-Faire Linux                         *
 
3
 *   Author : Emmanuel Lepage Valle <emmanuel.lepage@savoirfairelinux.com >*
 
4
 *                                                                         *
 
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.                                   *
 
9
 *                                                                         *
 
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.                          *
 
14
 *                                                                         *
 
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
 
22
 
 
23
#include <QtGui/QDockWidget>
 
24
#include <QtGui/QTreeWidget>
 
25
 
 
26
//Qt
 
27
class QSplitter;
 
28
class QListWidget;
 
29
class QComboBox;
 
30
class QTreeWidgetItem;
 
31
class QCheckBox;
 
32
 
 
33
//KDE
 
34
class KLineEdit;
 
35
 
 
36
namespace Akonadi {
 
37
   class EntityTreeView;
 
38
   class ItemView;
 
39
   class CollectionCombobox;
 
40
   namespace Contact {
 
41
      class ContactsTreeModel;
 
42
   }
 
43
}
 
44
 
 
45
namespace KABC {
 
46
   class Addressee;
 
47
}
 
48
 
 
49
///SFLPhone
 
50
class ContactTree;
 
51
class ContactItemWidget;
 
52
 
 
53
///@class ContactDock Dock to access contacts
 
54
class ContactDock : public QDockWidget
 
55
{
 
56
   Q_OBJECT
 
57
public:
 
58
   //Constructor
 
59
   ContactDock(QWidget* parent);
 
60
   virtual ~ContactDock();
 
61
 
 
62
private:
 
63
   //Attributes
 
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;
 
71
 
 
72
public slots:
 
73
   virtual void keyPressEvent(QKeyEvent* event);
 
74
 
 
75
private slots:
 
76
   void reloadContact();
 
77
   void loadContactHistory(QTreeWidgetItem* item);
 
78
   void filter(const QString& text);
 
79
   void setHistoryVisible(bool visible);
 
80
};
 
81
 
 
82
///@class ContactTree tree view with additinal drag and drop
 
83
class ContactTree : public QTreeWidget {
 
84
   Q_OBJECT
 
85
public:
 
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);
 
89
};
 
90
 
 
91
///@class KeyPressEaterC keygrabber
 
92
class KeyPressEaterC : public QObject
 
93
{
 
94
   Q_OBJECT
 
95
public:
 
96
   KeyPressEaterC(ContactDock* parent) : QObject(parent) {
 
97
      m_pDock =  parent;
 
98
   }
 
99
 
 
100
protected:
 
101
   bool eventFilter(QObject *obj, QEvent *event);
 
102
 
 
103
private:
 
104
   ContactDock* m_pDock;
 
105
 
 
106
};
 
107
 
 
108
#endif
 
 
b'\\ No newline at end of file'