mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 17:13:47 +02:00
2018-03-21 Fred Gleason <fredg@paravelsystems.com>
* Added support for notifications to rdlibrary(1).
This commit is contained in:
@@ -20,6 +20,15 @@
|
||||
|
||||
#include "rdnotification.h"
|
||||
|
||||
RDNotification::RDNotification(RDNotification::Type type,
|
||||
RDNotification::Action action,unsigned cartnum)
|
||||
{
|
||||
notify_type=type;
|
||||
notify_action=action;
|
||||
notify_id=QVariant(cartnum);
|
||||
}
|
||||
|
||||
|
||||
RDNotification::RDNotification()
|
||||
{
|
||||
notify_type=RDNotification::NullType;
|
||||
@@ -84,7 +93,7 @@ bool RDNotification::read(const QString &str)
|
||||
RDNotification::Type type=(RDNotification::Type)i;
|
||||
if(args[1]==RDNotification::typeString(type)) {
|
||||
notify_type=type;
|
||||
notify_id=QVariant(args[2].toUInt());
|
||||
notify_id=QVariant(args[3].toUInt());
|
||||
}
|
||||
}
|
||||
if(notify_type==RDNotification::NullType) {
|
||||
|
@@ -30,6 +30,7 @@ class RDNotification
|
||||
enum Type {NullType=0,CartType=1,LastType=2};
|
||||
enum Action {NoAction=0,AddAction=1,DeleteAction=2,ModifyAction=3,
|
||||
LastAction=4};
|
||||
RDNotification(Type type,Action action,unsigned cartnum);
|
||||
RDNotification();
|
||||
Type type() const;
|
||||
void setType(Type type);
|
||||
|
Reference in New Issue
Block a user