forked from 2600hz/kazoo-popup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
informerdialog.h
61 lines (44 loc) · 1.15 KB
/
informerdialog.h
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
52
53
54
55
56
57
58
59
60
61
#ifndef INFORMERDIALOG_H
#define INFORMERDIALOG_H
#include <QDialog>
namespace Ui {
class InformerDialog;
}
class QMouseEvent;
class Caller;
class InformerDialog : public QDialog
{
Q_OBJECT
public:
enum State
{
kStateRinging,
kStateAnswered,
kStateAnsweredAnother
};
explicit InformerDialog(QWidget *parent = 0);
~InformerDialog();
void setState(State state);
bool isAnsweredAnother() const;
bool isAttached() const;
void setCaller(const Caller &caller);
void setCallee(const QString &calleeNumber, const QString &calleeName);
public slots:
void openCallerUrl();
signals:
void dialogAttached(bool attached);
protected:
// for moving frameless window
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
private:
Ui::InformerDialog *ui;
QString m_callerUrl;
// for moving frameless window
QPoint m_dragPosition;
bool m_dragging;
private slots:
void processAttach(bool checked);
};
#endif // INFORMERDIALOG_H