summaryrefslogtreecommitdiffstats
path: root/src/gui/historyform.h
blob: 76ea161703623c51681b5331ed6427878c5fac2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef HISTORYFORM_H
#define HISTORYFORM_H
#include "phone.h"
#include <QMenu>
#include <QStandardItemModel>
#include <QPixmap>
#include "user.h"
#include "ui_historyform.h"

class HistoryForm : public QDialog, public Ui::HistoryForm
{
	Q_OBJECT

public:
    HistoryForm(QWidget* parent = 0);
	~HistoryForm();

public slots:
	virtual void loadHistory();
	virtual void update();
	virtual void show();
	virtual void closeEvent( QCloseEvent * e );
    virtual void showCallDetails( QModelIndex item );
    virtual void popupMenu( QPoint pos );
    virtual void call( QModelIndex index );
	virtual void call( void );
	virtual void deleteEntry( void );
	virtual void clearHistory();

signals:
	void call(t_user *, const QString &, const QString &, bool);

protected slots:
	virtual void languageChange();

private:
	time_t timeLastViewed;
    QMenu *histPopupMenu;
    QStandardItemModel *m_model;
    QAction* itemCall;
    QPixmap m_pixmapIn, m_pixmapOut;
    QPixmap m_pixmapOk, m_pixmapCancel;
    QList<t_call_record> m_history;

	void init();
	void destroy();

};


#endif