mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-05-04 09:19:37 +00:00
There was added notifications count method
This commit is contained in:
parent
8fe1d46df8
commit
a5d21cb350
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "notificationservice.h"
|
#include "notificationservice.h"
|
||||||
#include <QDebug>
|
|
||||||
namespace QmlNotificationService {
|
namespace QmlNotificationService {
|
||||||
|
|
||||||
NotificationService::NotificationService(QObject * ptr): QObject (ptr) {
|
NotificationService::NotificationService(QObject * ptr): QObject (ptr) {
|
||||||
@ -116,4 +116,8 @@ void NotificationService::showHistory() {
|
|||||||
emit sigShowHistory();
|
emit sigShowHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int NotificationService::notificationsCount() const {
|
||||||
|
return _history->rowCount({});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,12 @@ public:
|
|||||||
|
|
||||||
Q_INVOKABLE void showHistory();
|
Q_INVOKABLE void showHistory();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief notificationsCount - This method used for return count of history notifications.
|
||||||
|
* @return count of history notifications.
|
||||||
|
*/
|
||||||
|
Q_INVOKABLE int notificationsCount() const;
|
||||||
|
|
||||||
~NotificationService();
|
~NotificationService();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user