bool AIMInfo::processEvent(Event *e) { if (e->type() == eEventContact){ EventContact *ec = static_cast<EventContact*>(e); if(ec->action() != EventContact::eChanged) return false; Contact *contact = ec->contact(); if (contact->have(m_data)) fill(); } else if ((e->type() == eEventMessageReceived) && m_data){ EventMessage *em = static_cast<EventMessage*>(e); Message *msg = em->msg(); if (msg->type() == MessageStatus){ if (m_client->dataName(m_data) == msg->client()) fill(); } } else if ((e->type() == eEventClientChanged) && (m_data == 0)){ EventClientChanged *ecc = static_cast<EventClientChanged*>(e); if (ecc->client() == m_client) fill(); } return false; }
bool LoginDialog::processEvent(Event *e) { switch (e->type()) { case eEventClientChanged: { EventClientChanged *ecc = static_cast<EventClientChanged*>(e); if (m_bLogin && (m_client == NULL || ecc->client() == m_client)){ if (ecc->client()->getState() == Client::Connected) { QTimer::singleShot(0, this, SLOT(loginComplete())); return false; } } break; } case eEventClientNotification: if (m_bLogin) { EventClientNotification *ee = static_cast<EventClientNotification*>(e); const EventNotification::ClientNotificationData &client_notification_data = ee->data(); if (!m_client) { for (int i = 0; i < passwords.size(); i++){ Client *client = getContacts()->getClient(i); if (client->getState() != Client::Error) return true; } } else if (client_notification_data.client != m_client) return false; stopLogin(); QString msg; if (!client_notification_data.text.isEmpty()) msg = i18n(client_notification_data.text).arg(client_notification_data.args); else msg = i18n("Login failed"); if (msg.length()) { raiseWindow(this); BalloonMsg::message(msg, buttonOk); } return true; } break; default: break; } return false; }
bool ICQSecure::processEvent(Event *e) { if (e->type() == eEventClientChanged){ EventClientChanged *ecc = static_cast<EventClientChanged*>(e); if (ecc->client() == m_client) fill(); } else if (e->type() == eEventContact){ EventContact *ec = static_cast<EventContact*>(e); if(ec->action() != EventContact::eChanged) return false; fillListView(lstVisible, &ICQUserData::VisibleId); fillListView(lstInvisible, &ICQUserData::InvisibleId); } return false; }
bool PastInfo::processEvent(Event *e) { if (e->type() == eEventContact){ EventContact *ec = static_cast<EventContact*>(e); if(ec->action() != EventContact::eChanged) return false; Contact *contact = ec->contact(); if (contact->clientData.have(m_data)) fill(); } else if ((e->type() == eEventClientChanged) && (m_data == 0)){ EventClientChanged *ecc = static_cast<EventClientChanged*>(e); if (ecc->client() == m_client) fill(); } return false; }
bool JabberWorkInfo::processEvent(Event *e) { if (e->type() == eEventContact){ EventContact *ec = static_cast<EventContact*>(e); if(ec->action() != EventContact::eChanged) return false; Contact *contact = ec->contact(); if (contact->have(m_data)) fill(m_data); } else if ((e->type() == eEventClientChanged) && (m_data == 0)){ EventClientChanged *ecc = static_cast<EventClientChanged*>(e); if (ecc->client() == m_client) fill(m_data); } else if (m_data && (e->type() == eEventVCard)){ EventVCard *evc = static_cast<EventVCard*>(e); JabberUserData *data = evc->data(); if (m_data->getId() == data->getId() && m_data->getNode() == data->getNode()) fill(data); } return false; }