1
/***************************************************************************
2
* Copyright (C) 2013-2014 by Savoir-Faire Linux *
3
* Author : Emmanuel Lepage Vallee <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, see <http://www.gnu.org/licenses/>. *
17
**************************************************************************/
18
#ifndef IMPLEMENTATION_H
19
#define IMPLEMENTATION_H
21
#include <lib/visitors/accountlistcolorvisitor.h>
22
#include <lib/visitors/pixmapmanipulationvisitor.h>
23
#include <lib/visitors/presenceserializationvisitor.h>
25
#include <lib/account.h>
27
#include <QtGui/QPalette>
28
#include <QtGui/QColor>
30
//Implement all client dependant libqtsflphone abstract interfaces
32
class ColorVisitor : public AccountListColorVisitor {
34
ColorVisitor(QPalette pal);
36
virtual QVariant getColor(const Account* a);
38
virtual QVariant getIcon(const Account* a);
46
class KDEPixmapManipulation : public PixmapManipulationVisitor {
48
KDEPixmapManipulation();
49
QVariant contactPhoto(Contact* c, QSize size, bool displayPresence = true);
51
virtual QVariant callPhoto(const PhoneNumber* n, QSize size, bool displayPresence = true);
53
virtual QVariant callPhoto(Call* c, QSize size, bool displayPresence = true);
55
QVariant numberCategoryIcon(const QPixmap* p, QSize size, bool displayPresence = false, bool isPresent = false);
58
static const TypedStateMachine< const char* , Call::State > callStateIcons;
60
static const char* icnPath[4];
63
QPixmap drawDefaultUserPixmap(QSize size, bool displayPresence, bool isPresent);
66
class KDEPresenceSerializationVisitor : public PresenceSerializationVisitor {
68
virtual void serialize();
70
virtual ~KDEPresenceSerializationVisitor();