mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-26 05:34:34 +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 <QDebug>
|
||||
|
||||
namespace QmlNotificationService {
|
||||
|
||||
NotificationService::NotificationService(QObject * ptr): QObject (ptr) {
|
||||
@ -116,4 +116,8 @@ void NotificationService::showHistory() {
|
||||
emit sigShowHistory();
|
||||
}
|
||||
|
||||
int NotificationService::notificationsCount() const {
|
||||
return _history->rowCount({});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -127,6 +127,12 @@ public:
|
||||
|
||||
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();
|
||||
|
||||
signals:
|
||||
|
Loading…
x
Reference in New Issue
Block a user