コード例 #1
0
ファイル: personslistjob.cpp プロジェクト: KDE/gluon
void PersonsListJob::startSocialService()
{
    //Attica uses some weird stuff called id2 which can be "0" for our uses
    Attica::ListJob<Attica::Person> *job = provider()->requestPersonSearchByName( d->id );
    connect( job, SIGNAL(finished(Attica::BaseJob*)), SLOT(processFetchedPersonList(Attica::BaseJob*)) );
    job->start();
}
コード例 #2
0
ファイル: friendrequestlistjob.cpp プロジェクト: KDE/gluon
void FriendRequestListJob::startSocialService()
{
    //Attica uses some weird stuff called id2 which can be "0" for our uses
    Attica::ListJob<Attica::Person> *job = provider()->requestReceivedInvitations( 0, 999);
    connect( job, SIGNAL(finished(Attica::BaseJob*)), SLOT(processFetchedPersonList(Attica::BaseJob*)) );
    job->start();
}
コード例 #3
0
ファイル: commentslistjob.cpp プロジェクト: KDE/gluon
void CommentsListJob::startSocialService()
{
    //Attica uses some weird stuff called id2 which can be "0" for our uses
    Attica::ListJob<Attica::Comment> *job = provider()->requestComments( Attica::Comment::ContentComment,
                                            d->id, "0", d->page, d->pageSize );
    connect( job, SIGNAL(finished(Attica::BaseJob*)), SLOT(processFetchedCommentList(Attica::BaseJob*)) );
    job->start();
}
コード例 #4
0
ファイル: personslistjob.cpp プロジェクト: KDE/gluon
void PersonsListJob::processFetchedPersonList( Attica::BaseJob* job )
{
    Attica::ListJob<Attica::Person> *personsJob = static_cast<Attica::ListJob<Attica::Person> *>( job );
    if( personsJob->metadata().error() == Attica::Metadata::NoError )
    {
        foreach( const Attica::Person & person, personsJob->itemList() )
        {
            PersonItem* newPerson = new PersonItem( person.id(), person.firstName(), person.lastName(), this );
            d->personsList.append( newPerson );
        }

        emitSucceeded();
    }
コード例 #5
0
ファイル: commentlistjob.cpp プロジェクト: pranavrc/gluon
void CommentListJob::processFetchedCommentList(Attica::BaseJob* job)
{
    QList<CommentItem*> list;

    Attica::ListJob<Attica::Comment> *commentsJob = static_cast<Attica::ListJob<Attica::Comment> *>( job );
    if( commentsJob->metadata().error() == Attica::Metadata::NoError ) {
        foreach(const Attica::Comment& comment, commentsJob->itemList()) {
            CommentItem *newComment = new CommentItem(comment.id(), comment.subject(), comment.text(),
                                                      comment.user(), comment.date(), comment.score(), this);
            list.append(newComment);
            if (comment.childCount()) {
                addChildren(newComment, comment);
            }
        }

        emit commentListFetchFinished(list);
    } else {