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

« back to all changes in this revision

Viewing changes to kde/src/implementation.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2013-2014 by Savoir-Faire Linux                         *
 
3
 *   Author : 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, see <http://www.gnu.org/licenses/>. *
 
17
 **************************************************************************/
 
18
#ifndef IMPLEMENTATION_H
 
19
#define IMPLEMENTATION_H
 
20
 
 
21
#include <lib/visitors/accountlistcolorvisitor.h>
 
22
#include <lib/visitors/pixmapmanipulationvisitor.h>
 
23
#include <lib/visitors/presenceserializationvisitor.h>
 
24
#include <lib/call.h>
 
25
#include <lib/account.h>
 
26
 
 
27
#include <QtGui/QPalette>
 
28
#include <QtGui/QColor>
 
29
 
 
30
//Implement all client dependant libqtsflphone abstract interfaces
 
31
 
 
32
class ColorVisitor : public AccountListColorVisitor {
 
33
public:
 
34
   ColorVisitor(QPalette pal);
 
35
 
 
36
   virtual QVariant getColor(const Account* a);
 
37
 
 
38
   virtual QVariant getIcon(const Account* a);
 
39
private:
 
40
   QPalette m_Pal;
 
41
   QColor   m_Green;
 
42
   QColor   m_Yellow;
 
43
   QColor   m_Red;
 
44
};
 
45
 
 
46
class KDEPixmapManipulation : public PixmapManipulationVisitor {
 
47
public:
 
48
   KDEPixmapManipulation();
 
49
   QVariant contactPhoto(Contact* c, QSize size, bool displayPresence = true);
 
50
 
 
51
   virtual QVariant callPhoto(const PhoneNumber* n, QSize size, bool displayPresence = true);
 
52
 
 
53
   virtual QVariant callPhoto(Call* c, QSize size, bool displayPresence = true);
 
54
 
 
55
   QVariant numberCategoryIcon(const QPixmap* p, QSize size, bool displayPresence = false, bool isPresent = false);
 
56
 
 
57
private:
 
58
   static const TypedStateMachine< const char* , Call::State > callStateIcons;
 
59
 
 
60
   static const char* icnPath[4];
 
61
 
 
62
   //Helper
 
63
   QPixmap drawDefaultUserPixmap(QSize size, bool displayPresence, bool isPresent);
 
64
};
 
65
 
 
66
class KDEPresenceSerializationVisitor : public PresenceSerializationVisitor {
 
67
public:
 
68
   virtual void serialize();
 
69
   virtual void load();
 
70
   virtual ~KDEPresenceSerializationVisitor();
 
71
};
 
72
 
 
73
#endif