mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
44 lines
809 B
C++
44 lines
809 B
C++
#ifndef NOTIFICATION_H_
|
|
#define NOTIFICATION_H_
|
|
|
|
#include <QMutex>
|
|
#include <QObject>
|
|
#include <QQmlComponent>
|
|
|
|
// ===================================================================
|
|
|
|
class Notification : public QObject {
|
|
Q_OBJECT;
|
|
|
|
public:
|
|
Notification (QObject *parent = Q_NULLPTR);
|
|
virtual ~Notification ();
|
|
|
|
enum Type {
|
|
Call,
|
|
MaxNbTypes
|
|
};
|
|
Q_ENUM(Type);
|
|
|
|
void setEdge (Qt::Edges edge) {
|
|
m_edge = edge;
|
|
}
|
|
|
|
void setScreenNumber (int screen_number) {
|
|
m_screen_number = screen_number;
|
|
}
|
|
|
|
public slots:
|
|
void showCallMessage (int timeout, const QString &sip_address);
|
|
|
|
private:
|
|
Qt::Edges m_edge = Qt::RightEdge | Qt::TopEdge;
|
|
QQmlComponent *m_components[MaxNbTypes];
|
|
|
|
int m_screen_number = 0;
|
|
|
|
int m_n_instances = 0;
|
|
QMutex m_mutex;
|
|
};
|
|
|
|
#endif // NOTIFICATION_H_
|