~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (4.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20140128182336-jrsv0k9u6cawc068
Tags: 1.3.0-1
* 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) 2009-2013 Savoir-Faire Linux                            *
3
 
 *   Author : Mathieu Leduc-Hamel mathieu.leduc-hamel@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, see <http://www.gnu.org/licenses/>. *
18
 
 **************************************************************************/
19
 
 
20
 
/**
21
 
 * http://doc.trolltech.com/4.5/itemviews-editabletreemodel.html
22
 
 */
23
 
 
24
 
#ifndef HISTORYTREE_ITEM_H
25
 
#define HISTORYTREE_ITEM_H
26
 
 
27
 
#include <QtGui/QWidget>
28
 
#include <QtCore/QList>
29
 
#include <Phonon/MediaObject>
30
 
 
31
 
//SFLPhone
32
 
class Call;
33
 
class Contact;
34
 
class TranslucentButtons;
35
 
 
36
 
//Qt
37
 
class QTreeWidgetItem;
38
 
class QMenu;
39
 
class QLabel;
40
 
class QToolButton;
41
 
class QGridLayout;
42
 
class QSlider;
43
 
class QMimeData;
44
 
 
45
 
//KDE
46
 
class KAction;
47
 
 
48
 
///HistoryTreeItem: Items for the history dock
49
 
class HistoryTreeItem : public QWidget
50
 
{
51
 
   Q_OBJECT
52
 
 public:
53
 
    //Constructor
54
 
    explicit HistoryTreeItem(QWidget* parent =0, QString phone = "",bool isBookmark=false);
55
 
    ~HistoryTreeItem();
56
 
 
57
 
    //Getters
58
 
    Call*            call           () const;
59
 
    uint             getTimeStamp   ();
60
 
    uint             getLength      ();
61
 
    QString          getName        ();
62
 
    QString          getPhoneNumber ();
63
 
    QTreeWidgetItem* getItem        ();
64
 
    uint             getDurWidth    ();
65
 
 
66
 
    //Setters
67
 
    void setCall     ( Call*            call );
68
 
    void setItem     ( QTreeWidgetItem* item );
69
 
 
70
 
 private:
71
 
    //Attributes
72
 
    Call*        m_pItemCall      ;
73
 
 
74
 
    QLabel*      m_pIconL         ;
75
 
    QLabel*      m_pPeerNameL     ;
76
 
    QLabel*      m_pCallNumberL   ;
77
 
    QLabel*      m_pTimeL         ;
78
 
    QLabel*      m_pLengthL       ;
79
 
 
80
 
    KAction*     m_pCallAgain     ;
81
 
    KAction*     m_pAddContact    ;
82
 
    KAction*     m_pAddToContact  ;
83
 
    KAction*     m_pCopy          ;
84
 
    KAction*     m_pEmail         ;
85
 
    KAction*     m_pBookmark      ;
86
 
    QMenu*       m_pMenu          ;
87
 
 
88
 
    QToolButton* m_pPlay          ;
89
 
    QToolButton* m_pRemove        ;
90
 
 
91
 
    uint         m_TimeStamp      ;
92
 
    uint         m_Length         ;
93
 
    uint         m_SeekPos        ;
94
 
    bool         m_Paused         ;
95
 
    QString      m_Name           ;
96
 
    QString      m_PhoneNumber    ;
97
 
    QGridLayout* m_pMainLayout    ;
98
 
    Contact*     m_pContact       ;
99
 
 
100
 
    QTreeWidgetItem* m_pItem;
101
 
 
102
 
    //Recorded call player
103
 
    QSlider*     m_pAudioSlider ;
104
 
    QLabel*      m_pTimeLeftL   ;
105
 
    QLabel*      m_pTimePlayedL ;
106
 
    QToolButton* m_pPause       ;
107
 
    QToolButton* m_pStop        ;
108
 
    QToolButton* m_pNote        ;
109
 
    QWidget*     m_pPlayer      ;
110
 
 
111
 
    TranslucentButtons* m_pBtnTrans;
112
 
 
113
 
    bool m_IsBookmark;
114
 
 
115
 
protected:
116
 
   virtual void resizeEvent(QResizeEvent* event);
117
 
   virtual void mouseDoubleClickEvent(QMouseEvent* event);
118
 
   virtual void dragEnterEvent ( QDragEnterEvent *e );
119
 
   virtual void dragMoveEvent  ( QDragMoveEvent  *e );
120
 
   virtual void dragLeaveEvent ( QDragLeaveEvent *e );
121
 
   virtual void dropEvent      ( QDropEvent      *e );
122
 
 
123
 
public Q_SLOTS:
124
 
   void updated();
125
 
   bool getContactInfo(QString phone);
126
 
 
127
 
private Q_SLOTS:
128
 
   void sendEmail        ();
129
 
   void callAgain        ();
130
 
   void copy             ();
131
 
   void addContact       ();
132
 
   void addToContact     ();
133
 
   void bookmark         ();
134
 
   void removeRecording  ();
135
 
   void showRecordPlayer ();
136
 
   void stopPlayer       ();
137
 
   void disconnectSlider ();
138
 
   void connectSlider    ();
139
 
   void playPausePlayer  ();
140
 
   void editNote         ();
141
 
   void tick(qint64 time);
142
 
   void updateSlider ( int pos, int size );
143
 
   void showContext  ( const QPoint& pos );
144
 
   void transferEvent( QMimeData* data   );
145
 
 
146
 
};
147
 
 
148
 
#endif // CALLTREE_ITEM_H