~noskcaj/ubuntu/saucy/sflphone/merge-1.2.3-2

« back to all changes in this revision

Viewing changes to kde/src/lib/Contact.h

  • Committer: Package Import Robot
  • Author(s): Francois Marier
  • Date: 2012-02-18 21:47:09 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120218214709-6362d71gqdsdkrj5
Tags: 1.0.2-1
* New upstream release
  - remove logging patch (applied upstream)
  - update s390 patch since it was partially applied upstream
* Include the Evolution plugin as a separate binary package

* Fix compilation issues on SH4 (closes: #658987)
* Merge Ubuntu's binutils-gold linking fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2009-2012 by Savoir-Faire Linux                         *
 
3
 *   Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>         *
 
4
 *            Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
 
5
 *                                                                         *
 
6
 *   This program is free software; you can redistribute it and/or modify  *
 
7
 *   it under the terms of the GNU General Public License as published by  *
 
8
 *   the Free Software Foundation; either version 3 of the License, or     *
 
9
 *   (at your option) any later version.                                   *
 
10
 *                                                                         *
 
11
 *   This program is distributed in the hope that it will be useful,       *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU General Public License for more details.                          *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU General Public License     *
 
17
 *   along with this program; if not, write to the                         *
 
18
 *   Free Software Foundation, Inc.,                                       *
 
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 
20
 **************************************************************************/
 
21
#ifndef CONTACT_H
 
22
#define CONTACT_H
 
23
 
 
24
#include <QObject>
 
25
 
 
26
//Qt
 
27
class QListWidgetItem;
 
28
class QWidget;
 
29
class QPixmap;
 
30
 
 
31
//KDE
 
32
namespace KABC {
 
33
   class Addressee   ;
 
34
   class Picture     ;
 
35
   class PhoneNumber ;
 
36
}
 
37
 
 
38
#include "typedefs.h"
 
39
 
 
40
///@class Contact Abstract version of a contact
 
41
class LIB_EXPORT Contact : public QObject{
 
42
   Q_OBJECT
 
43
public:
 
44
   class PhoneNumber {
 
45
   public:
 
46
      PhoneNumber(QString number, QString type)
 
47
      : m_Number(number),m_Type(type){}
 
48
      QString& getNumber() {
 
49
         return m_Number ;
 
50
      }
 
51
      QString& getType() {
 
52
         return m_Type   ;
 
53
      }
 
54
      
 
55
   private:
 
56
      QString m_Number   ;
 
57
      QString m_Type     ;
 
58
   };
 
59
   
 
60
   typedef QList<Contact::PhoneNumber*> PhoneNumbers;
 
61
   
 
62
private:
 
63
   QString      m_FirstName      ;
 
64
   QString      m_SecondName     ;
 
65
   QString      m_NickName       ;
 
66
   QPixmap*     m_pPhoto         ;
 
67
   QString      m_Type           ;
 
68
   QString      m_FormattedName  ;
 
69
   QString      m_PreferredEmail ;
 
70
   QString      m_Organization   ;
 
71
   QString      m_Uid            ;
 
72
   bool         m_DisplayPhoto   ;
 
73
   PhoneNumbers m_Numbers        ;
 
74
   
 
75
public:
 
76
   //Constructors & Destructors
 
77
   explicit Contact();
 
78
   virtual ~Contact();
 
79
   virtual void initItem();
 
80
   
 
81
   //Getters
 
82
   virtual PhoneNumbers   getPhoneNumbers()    const;
 
83
   virtual const QString& getNickName()        const;
 
84
   virtual const QString& getFirstName()       const;
 
85
   virtual const QString& getSecondName()      const;
 
86
   virtual const QString& getFormattedName()   const;
 
87
   virtual const QString& getOrganization()    const;
 
88
   virtual const QString& getUid()             const;
 
89
   virtual const QString& getPreferredEmail()  const;
 
90
   virtual const QPixmap* getPhoto()           const;
 
91
   virtual const QString& getType()            const;
 
92
 
 
93
   //Setters
 
94
   virtual void setPhoneNumbers   (PhoneNumbers          );
 
95
   virtual void setFormattedName  (const QString& name   );
 
96
   virtual void setNickName       (const QString& name   );
 
97
   virtual void setFirstName      (const QString& name   );
 
98
   virtual void setFamilyName     (const QString& name   );
 
99
   virtual void setOrganization   (const QString& name   );
 
100
   virtual void setPreferredEmail (const QString& name   );
 
101
   virtual void setUid            (const QString& id     );
 
102
   virtual void setPhoto          (QPixmap* photo        );
 
103
   
 
104
protected:
 
105
   virtual void initItemWidget();
 
106
 
 
107
};
 
108
typedef Contact::PhoneNumbers PhoneNumbers;
 
109
 
 
110
#endif