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

« back to all changes in this revision

Viewing changes to kde/src/widgets/HistoryTreeItem.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 Nokia Corporation and/or its subsidiary(-ies).     *
 
3
 *   All rights reserved.                                                  *
 
4
 *   Contact: Nokia Corporation (qt-info@nokia.com)                        *
 
5
 *   Author : Mathieu Leduc-Hamel mathieu.leduc-hamel@savoirfairelinux.com *
 
6
 *            Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
 
7
 *                                                                         *
 
8
 *   This program is free software; you can redistribute it and/or modify  *
 
9
 *   it under the terms of the GNU General Public License as published by  *
 
10
 *   the Free Software Foundation; either version 3 of the License, or     *
 
11
 *   (at your option) any later version.                                   *
 
12
 *                                                                         *
 
13
 *   This program is distributed in the hope that it will be useful,       *
 
14
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
15
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
16
 *   GNU General Public License for more details.                          *
 
17
 *                                                                         *
 
18
 *   You should have received a copy of the GNU General Public License     *
 
19
 *   along with this program; if not, write to the                         *
 
20
 *   Free Software Foundation, Inc.,                                       *
 
21
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 
22
 ***************************************************************************/
 
23
 
 
24
/**
 
25
 * http://doc.trolltech.com/4.5/itemviews-editabletreemodel.html
 
26
 */
 
27
 
 
28
#ifndef HISTORYTREE_ITEM_H
 
29
#define HISTORYTREE_ITEM_H
 
30
 
 
31
#include <QtGui/QWidget>
 
32
 
 
33
//SFLPhone
 
34
class Call;
 
35
 
 
36
//Qt
 
37
class QTreeWidgetItem;
 
38
class QMenu;
 
39
class QLabel;
 
40
 
 
41
//KDE
 
42
class KAction;
 
43
 
 
44
///@class HistoryTreeItem Items for the history dock
 
45
class HistoryTreeItem : public QWidget
 
46
{
 
47
   Q_OBJECT
 
48
 public:
 
49
    //Constructor
 
50
    HistoryTreeItem(QWidget* parent =0, QString phone = "");
 
51
    ~HistoryTreeItem();
 
52
 
 
53
    //Getters
 
54
    Call*            call           () const;
 
55
    uint             getTimeStamp   ();
 
56
    uint             getDuration    ();
 
57
    QString          getName        ();
 
58
    QString          getPhoneNumber ();
 
59
    QTreeWidgetItem* getItem        ();
 
60
 
 
61
    //Setters
 
62
    void setCall (Call*            call);
 
63
    void setItem (QTreeWidgetItem* item);
 
64
 
 
65
    //Const
 
66
    static const char * callStateIcons[12];
 
67
 
 
68
 private:
 
69
    //Attributes
 
70
    Call*    m_pItemCall      ;
 
71
 
 
72
    QLabel*  m_pIconL         ;
 
73
    QLabel*  m_pPeerNameL     ;
 
74
    QLabel*  m_pCallNumberL   ;
 
75
    QLabel*  m_pTimeL         ;
 
76
    QLabel*  m_pDurationL     ;
 
77
 
 
78
    KAction* m_pCallAgain     ;
 
79
    KAction* m_pAddContact    ;
 
80
    KAction* m_pAddToContact  ;
 
81
    KAction* m_pCopy          ;
 
82
    KAction* m_pEmail         ;
 
83
    KAction* m_pBookmark      ;
 
84
    QMenu*   m_pMenu          ;
 
85
 
 
86
    uint     m_TimeStamp      ;
 
87
    uint     m_Duration       ;
 
88
    QString  m_Name           ;
 
89
    QString  m_PhoneNumber    ;
 
90
 
 
91
    QTreeWidgetItem* m_pItem;
 
92
 
 
93
public slots:
 
94
   void updated();
 
95
 
 
96
private slots:
 
97
   void showContext(const QPoint& pos);
 
98
   void sendEmail();
 
99
   void callAgain();
 
100
   void copy();
 
101
   void addContact();
 
102
   void addToContact();
 
103
   void bookmark();
 
104
   bool getContactInfo(QString phone);
 
105
 
 
106
signals:
 
107
   void over(Call*);
 
108
};
 
109
 
 
110
#endif // CALLTREE_ITEM_H