/*!
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)));
}
示例#2
0
void TSock::serverConnection()
{
    emit eventAvailable(objectName(), te_socklisten, QStringList()<<objectName());
}
示例#3
0
void TSock::socketDataReady()
{
    emit eventAvailable(objectName(), te_sockread, QStringList()<<objectName());
}
示例#4
0
void TSock::socketDisconnected()
{
    emit eventAvailable(objectName(), te_sockclose, QStringList()<<objectName());
}
示例#5
0
void TSock::socketConnected()
{
    emit eventAvailable(objectName(), te_sockopen, QStringList()<<objectName());
}
示例#6
0
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);
}