summaryrefslogtreecommitdiffstats
path: root/src/gui/incoming_call_popup.h
blob: 461e610db5f160a809b72f5c2daab24d8ade3568 (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
#ifndef T_INCOMING_CALL_POPUP_H
#define T_INCOMING_CALL_POPUP_H

#include <QDeclarativeItem>
#include <QDeclarativeView>

class IncomingCallPopup : public QObject
{
	Q_OBJECT
public:
	explicit IncomingCallPopup(QObject *parent = 0);
	virtual ~IncomingCallPopup();

	void setCallerName(const QString& name);
	void show();
	void hide();
	void setVisible(bool v) { if (v) show(); else hide(); }
    void move(int x, int y);

private:
	void positionWindow();
signals:
	void answerClicked();
	void rejectClicked();
public slots:
	void onAnswerClicked();
	void onRejectClicked();
	void saveState();
private:
	QDeclarativeView* m_view;
	QDeclarativeItem* m_callerText;
};

#endif // T_INCOMING_CALL_POPUP_H