/*! Create a new instance of the GoogleService class. */ GoogleService::GoogleService(QObject *parent) : QObject(parent), authService(this), calendarService(this, &authService), eventService(this, &authService) { connect(&calendarService, SIGNAL(error(const QString &)), this, SLOT(onError(const QString &))); connect(&eventService, SIGNAL(error(const QString &)), this, SLOT(onError(const QString &))); connect(&calendarService, SIGNAL(calendarAvailable(CalendarItem)), this, SLOT(onCalendarAvailable(CalendarItem))); connect(&eventService, SIGNAL(eventAvailable(EventItem)), this, SLOT(onEventAvailable(EventItem))); }
void TSock::serverConnection() { emit eventAvailable(objectName(), te_socklisten, QStringList()<<objectName()); }
void TSock::socketDataReady() { emit eventAvailable(objectName(), te_sockread, QStringList()<<objectName()); }
void TSock::socketDisconnected() { emit eventAvailable(objectName(), te_sockclose, QStringList()<<objectName()); }
void TSock::socketConnected() { emit eventAvailable(objectName(), te_sockopen, QStringList()<<objectName()); }
void TSock::socketError(QAbstractSocket::SocketError error) { QString eid = QString::number(error+100); emit eventAvailable(objectName(), te_sockerror, QStringList()<<objectName()<<eid); }
/*! Event handler for event available. */ void GoogleService::onEventAvailable(EventItem eventItem) { emit eventAvailable(eventItem); }