summaryrefslogtreecommitdiffstats
path: root/app/phone.h
diff options
context:
space:
mode:
Diffstat (limited to 'app/phone.h')
-rw-r--r--app/phone.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/phone.h b/app/phone.h
index 2975daf..489f1da 100644
--- a/app/phone.h
+++ b/app/phone.h
@@ -18,20 +18,38 @@
#define PHONE_H
#include <QSoundEffect>
+#include <QTimer>
#include <telephony.h>
class Phone : public QObject
{
Q_OBJECT
+ Q_PROPERTY(QString elapsedTime READ elapsedTime WRITE setElapsedTime NOTIFY elapsedTimeChanged)
public:
explicit Phone(Telephony *telephony, QObject *parent = Q_NULLPTR);
void onCallStateChanged(QString);
+ QString elapsedTime() { return m_elapsed_time; }
+ void setElapsedTime(QString elapsedTime)
+ {
+ m_elapsed_time = elapsedTime;
+ emit elapsedTimeChanged(m_elapsed_time);
+ }
+
+ public slots:
+ void updateElapsedTime();
+
+ signals:
+ void elapsedTimeChanged(QString elapsedTime);
+
private:
Telephony *m_telephony;
QSoundEffect m_ringtone;
+ QTimer m_call_timer;
+ QDateTime m_date_time;
+ QString m_elapsed_time;
};
#endif // PHONE_H