1
/***************************************************************************
2
* Copyright (C) 2009-2012 by Savoir-Faire Linux *
3
* Author : Emmanuel Lepage Valle <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, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
**************************************************************************/
20
#ifndef HISTORY_DOCK_H
21
#define HISTORY_DOCK_H
23
#include <QtGui/QDockWidget>
24
#include <QtGui/QTreeWidget>
25
#include <QtCore/QDate>
28
class QTreeWidgetItem;
42
class HistoryTreeItem;
46
typedef QList<HistoryTreeItem*> HistoryList;
48
///@class HistoryDock Dock to see the previous SFLPhone calls
49
class HistoryDock : public QDockWidget {
54
friend class KeyPressEater;
57
HistoryDock(QWidget* parent);
58
virtual ~HistoryDock();
70
QString getIdentity(HistoryTreeItem* item);
73
HistoryTree* m_pItemView ;
74
KLineEdit* m_pFilterLE ;
75
QComboBox* m_pSortByCBB ;
79
KDateWidget* m_pFromDW ;
80
KDateWidget* m_pToDW ;
81
QCheckBox* m_pAllTimeCB ;
82
QPushButton* m_pLinkPB ;
83
HistoryList m_History ;
84
QDate m_CurrentFromDate ;
85
QDate m_CurrentToDate ;
88
void updateLinkedDate(KDateWidget* item, QDate& prevDate, QDate& newDate);
91
void enableDateRange(bool enable);
92
virtual void keyPressEvent(QKeyEvent* event);
95
void filter (QString text );
96
void updateLinkedFromDate (QDate date );
97
void updateLinkedToDate (QDate date );
99
void updateContactInfo ( );
103
///@class HistoryTree Simple tree view with additional keybpard filter
104
class HistoryTree : public QTreeWidget {
107
HistoryTree(QWidget* parent) : QTreeWidget(parent) {}
108
virtual QMimeData* mimeData( const QList<QTreeWidgetItem *> items) const;
109
bool dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action);
112
class KeyPressEater : public QObject
116
KeyPressEater(HistoryDock* parent) : QObject(parent) {
120
bool eventFilter(QObject *obj, QEvent *event);
122
HistoryDock* m_pDock;
b'\\ No newline at end of file'