summaryrefslogtreecommitdiffstats
path: root/src/gui/incoming_call_popup.h
blob: abfab183b19aa2d010fbc87f69ae02f22c057c2d (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 <QQuickItem>
#include <QQuickView>

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:
	QQuickView* m_view;
	QQuickItem* m_callerText;
};

#endif // T_INCOMING_CALL_POPUP_H