#ifndef _TelepathyQt_examples_roster_roster_widget_h_HEADER_GUARD_
#define _TelepathyQt_examples_roster_roster_widget_h_HEADER_GUARD_
#include <QWidget>
#include <TelepathyQt/Contact>
#include <TelepathyQt/Connection>
namespace Tp {
class Connection;
class PendingOperation;
}
class RosterItem;
class RosterWidget :
public QWidget
{
Q_OBJECT
public:
virtual ~RosterWidget();
Tp::ConnectionPtr connection() const { return mConn; }
void setConnection(const Tp::ConnectionPtr &conn);
void unsetConnection();
protected:
virtual RosterItem *createItemForContact(
const Tp::ContactPtr &contact,
bool &exists);
virtual void updateActions(RosterItem *item) { }
private Q_SLOTS:
void onPresencePublicationRequested(const Tp::Contacts &);
void onItemSelectionChanged();
void onAddButtonClicked();
void onAuthActionTriggered(bool);
void onDenyActionTriggered(bool);
void onRemoveActionTriggered(bool);
void onBlockActionTriggered(bool);
void updateActions();
private:
void createActions();
void setupGui();
Tp::ConnectionPtr mConn;
};
#endif