示例#1
0
/* ContactDocument */
ContactDocument::ContactDocument(QObject* parent)
    : QObject(parent)
{
#if defined(QTOPIA_TELEPHONY)
    bDialer = true;
#else
    bDialer = false;
#endif

#ifdef QTOPIA_VOIP
    mPresence = new QPresence(QString(), this);
    if ( mPresence->available() ) {
        connect(mPresence, SIGNAL(monitoredPresence(QString,QPresence::Status)),
                this, SLOT(monitoredPresence(QString,QPresence::Status)) );
    }
    mOnlinePixmap = NULL;
    mOfflinePixmap = NULL;
    voipDialer = bDialer;
#else
    voipDialer = false;
#endif
    mRtl = qApp->layoutDirection() == Qt::RightToLeft;
    mDocument = new QTextDocument(this);
    mDocument->setUndoRedoEnabled(false);
}
示例#2
0
/*!
    Called from server implementations to update the monitoring \a status
    of \a uri.  This function will update the global state as seen by
    monitoredUriStatus() and then emits monitoredPresence().

    \sa monitoredPresence(), startMonitoring(), stopMonitoring()
*/
void QPresence::updateMonitoredPresence
        ( const QString& uri, QPresence::Status status )
{
    if ( mode() != Server )
        return;
    if ( status == Unavailable )
        removeValue( makeSafe( uri ) );
    else
        setValue( makeSafe( uri ), (int)status );
    emit monitoredPresence( uri, status );
}