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>*
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. *
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. *
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
**************************************************************************/
21
* http://doc.trolltech.com/4.5/itemviews-editabletreemodel.html
24
#ifndef HISTORYTREE_ITEM_H
25
#define HISTORYTREE_ITEM_H
27
#include <QtGui/QWidget>
28
#include <QtCore/QList>
29
#include <Phonon/MediaObject>
34
class TranslucentButtons;
37
class QTreeWidgetItem;
48
///HistoryTreeItem: Items for the history dock
49
class HistoryTreeItem : public QWidget
54
explicit HistoryTreeItem(QWidget* parent =0, QString phone = "",bool isBookmark=false);
62
QString getPhoneNumber ();
63
QTreeWidgetItem* getItem ();
67
void setCall ( Call* call );
68
void setItem ( QTreeWidgetItem* item );
75
QLabel* m_pPeerNameL ;
76
QLabel* m_pCallNumberL ;
80
KAction* m_pCallAgain ;
81
KAction* m_pAddContact ;
82
KAction* m_pAddToContact ;
85
KAction* m_pBookmark ;
88
QToolButton* m_pPlay ;
89
QToolButton* m_pRemove ;
96
QString m_PhoneNumber ;
97
QGridLayout* m_pMainLayout ;
100
QTreeWidgetItem* m_pItem;
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 ;
111
TranslucentButtons* m_pBtnTrans;
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 );
125
bool getContactInfo(QString phone);
132
void addToContact ();
134
void removeRecording ();
135
void showRecordPlayer ();
137
void disconnectSlider ();
138
void connectSlider ();
139
void playPausePlayer ();
141
void tick(qint64 time);
142
void updateSlider ( int pos, int size );
143
void showContext ( const QPoint& pos );
144
void transferEvent( QMimeData* data );
148
#endif // CALLTREE_ITEM_H