void Contact::slotAccountIsConnectedChanged() { if ( this == account()->myself() ) return; if ( account()->isConnected() ) emit onlineStatusChanged( this, d->onlineStatus, protocol()->accountOfflineStatus() ); else emit onlineStatusChanged( this, protocol()->accountOfflineStatus(), d->onlineStatus ); }
void Kopete::ChatSession::setContactOnlineStatus( const Kopete::Contact *contact, const Kopete::OnlineStatus &status ) { Kopete::OnlineStatus oldStatus = d->contactStatus[ contact ]; d->contactStatus[ contact ] = status; disconnect( contact, SIGNAL(onlineStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)), this, SIGNAL(onlineStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)) ); emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldStatus ); }
ContactInfoWindow::ContactInfoWindow(Contact *contact, QWidget *parent) : QMainWindow(parent), ui(new Ui::ContactInfoWindow) { this->contact = contact; ui->setupUi(this); ui->phoneNumberLabel->setText(contact->phone); setContactPhoto(); setContactName(); setContactStatus(); connect(ui->contactPhotoButton,SIGNAL(clicked()), this,SLOT(showPhoto())); connect(ui->copyButton,SIGNAL(clicked()), this,SLOT(copyPhoneToClipboard())); connect(ui->dialButton,SIGNAL(clicked()), this,SLOT(dialPhone())); QDir home = QDir::home(); QString fileName = home.path() + CACHE_DIR"/"PHOTOS_DIR"/" + contact->jid + "/" + contact->photoId + ".png"; QFile file(fileName); photoDownloaded = (file.exists()); isDownloading = false; connect(Client::mainWin,SIGNAL(previewPhotoReceived(QString)), this,SLOT(previewPhotoReceived(QString))); connect(Client::mainWin,SIGNAL(largePhotoReceived(QString,QImage,QString)), this,SLOT(photoReceived(QString,QImage,QString))); connect(Client::mainWin,SIGNAL(onlineStatusChanged(QString)), this,SLOT(onlineStatusChanged(QString))); connect(Client::mainWin,SIGNAL(userStatusUpdated(QString)), this,SLOT(userStatusUpdated(QString))); connect(this,SIGNAL(photoUpdate(QString,QString,bool)), Client::mainWin,SLOT(requestPhotoUpdate(QString,QString,bool))); }
void Kopete::ChatSession::slotOnlineStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus ) { slotUpdateDisplayName(); emit onlineStatusChanged((Kopete::Contact*)c, status, oldStatus); }