2007-03-30 21:54:18 +00:00
|
|
|
/* This file is part of the KDE project
|
|
|
|
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public
|
2007-11-08 18:50:58 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-03-30 21:54:18 +00:00
|
|
|
*/
|
|
|
|
#ifndef INVITATIONMANAGER_H
|
|
|
|
#define INVITATIONMANAGER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QList>
|
|
|
|
#include "invitation.h"
|
|
|
|
|
|
|
|
|
2007-09-15 13:11:12 +00:00
|
|
|
class InvitationManagerPrivate;
|
2007-03-30 21:54:18 +00:00
|
|
|
/**
|
|
|
|
@author Alessandro Praduroux <pradu@pradu.it>
|
|
|
|
*/
|
|
|
|
class InvitationManager : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2007-09-15 13:11:12 +00:00
|
|
|
friend class InvitationManagerPrivate;
|
2007-03-30 21:54:18 +00:00
|
|
|
public:
|
|
|
|
static InvitationManager *self();
|
|
|
|
|
|
|
|
~InvitationManager();
|
|
|
|
|
|
|
|
Invitation addInvitation();
|
|
|
|
|
2007-04-10 20:40:44 +00:00
|
|
|
int activeInvitations();
|
|
|
|
|
|
|
|
void removeInvitation(const Invitation &inv);
|
2007-04-18 21:42:12 +00:00
|
|
|
void removeAllInvitations();
|
2007-04-10 20:40:44 +00:00
|
|
|
|
2007-04-02 20:44:39 +00:00
|
|
|
const QList<Invitation> &invitations();
|
|
|
|
|
2007-03-30 21:54:18 +00:00
|
|
|
signals:
|
|
|
|
void invitationNumChanged(int);
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
|
|
|
|
void loadInvitations();
|
2007-04-02 20:44:39 +00:00
|
|
|
void saveInvitations();
|
2007-03-30 21:54:18 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void invalidateOldInvitations();
|
|
|
|
InvitationManager();
|
|
|
|
static InvitationManager *_self;
|
|
|
|
|
|
|
|
QList<Invitation> invitationList;
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|