~ubuntu-branches/ubuntu/quantal/sflphone/quantal

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-27 08:22:22 UTC
  • mfrom: (4.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120527082222-fs3ojksqvt0ol6rl
Tags: 1.1.0-2
* Drop unsupported CELT codec (Build-Depends)
  - Fixes "Spurious build dependency on libcelt-dev" (Closes: #674644)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Author : Mathieu Leduc-Hamel mathieu.leduc-hamel@savoirfairelinux.com *
3
 
 *            Emmanuel Lepage Vallee <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
 
 
21
 
#ifndef CONTACTITEMWIDGET_H
22
 
#define CONTACTITEMWIDGET_H
23
 
 
24
 
#include <QtGui/QWidget>
25
 
#include "lib/Contact.h"
26
 
 
27
 
//Qt
28
 
class QLabel;
29
 
class QTreeWidgetItem;
30
 
class QMenu;
31
 
 
32
 
//KDE
33
 
class KAction;
34
 
class KIcon;
35
 
 
36
 
namespace KABC {
37
 
   class Addressee;
38
 
}
39
 
 
40
 
//SFLPhone
41
 
class Contact;
42
 
 
43
 
///@class ContactItemWidget Item for the contact tree
44
 
class ContactItemWidget : public QWidget
45
 
{
46
 
   Q_OBJECT
47
 
 public:
48
 
    //Constructor
49
 
    ContactItemWidget(QWidget* parent =0);
50
 
    ~ContactItemWidget();
51
 
 
52
 
    //Getters
53
 
    KABC::Addressee*  contact()         const;
54
 
    const QString&    getContactName()  const;
55
 
    PhoneNumbers      getCallNumbers()  const;
56
 
    const QString&    getOrganization() const;
57
 
    const QString&    getEmail()        const;
58
 
    QPixmap*          getPicture()      const;
59
 
    QTreeWidgetItem*  getItem()         const;
60
 
    Contact*          getContact()      const;
61
 
 
62
 
    //Setters
63
 
    void setContact ( Contact*         contact );
64
 
    void setItem    ( QTreeWidgetItem* item    );
65
 
 
66
 
    //Const
67
 
    static const char * callStateIcons[12];
68
 
 
69
 
 private:
70
 
    //Attributes
71
 
    Contact* m_pContactKA    ;
72
 
    QLabel*  m_pIconL        ;
73
 
    QLabel*  m_pContactNameL ;
74
 
    QLabel*  m_pCallNumberL  ;
75
 
    QLabel*  m_pOrganizationL;
76
 
    QLabel*  m_pEmailL       ;
77
 
    QTreeWidgetItem* m_pItem ;
78
 
 
79
 
    //Actions
80
 
    KAction* m_pCallAgain   ;
81
 
    KAction* m_pEditContact ;
82
 
    KAction* m_pCopy        ;
83
 
    KAction* m_pEmail       ;
84
 
    KAction* m_pAddPhone    ;
85
 
    KAction* m_pBookmark    ;
86
 
    QMenu*   m_pMenu        ;
87
 
 
88
 
public slots:
89
 
   void updated();
90
 
 
91
 
private slots:
92
 
   void showContext(const QPoint& pos);
93
 
   void sendEmail   ();
94
 
   void callAgain   ();
95
 
   void copy        ();
96
 
   void editContact ();
97
 
   void addPhone    ();
98
 
   void bookmark    ();
99
 
 };
100
 
 
101
 
#endif // CALLTREE_ITEM_H