kopete/libkopete
Kopete::AvatarQueryJob Class Reference
#include <kopeteavatarmanager.h>
Inheritance diagram for Kopete::AvatarQueryJob:
Detailed Description
Job to query avatar on disk.First create the job:
Kopete::AvatarQueryJob *queryJob = new Kopete::AvatarQueryJob(parent); queryJob->setQueryFilter(Kopete::AvatarManager::User); connect(queryJob, SIGNAL(result(KJob*)), this, SLOT(queryResult(KJob*))); queryJob->start();
Then get the avatar list in the resulting slot:
void SwallowAndCoconut::queryResult(KJob* job) { Kopete::AvatarQueryJob *queryJob = static_cast<Kopete::AvatarQueryJob*>(job); if(queryJob && !queryJob->error()) { QList<Kopete::AvatarManager::AvatarManager> list = queryJob->avatarList(); // Iterate over list } }
- See also:
- Kopete::AvatarManager
Definition at line 234 of file kopeteavatarmanager.h.
Public Member Functions | |
| AvatarQueryJob (QObject *parent=0) | |
| ~AvatarQueryJob () | |
| void | setQueryFilter (Kopete::AvatarManager::AvatarCategory category) |
| virtual void | start () |
| QList < Kopete::AvatarManager::AvatarEntry > | avatarList () const |
Constructor & Destructor Documentation
| Kopete::AvatarQueryJob::AvatarQueryJob | ( | QObject * | parent = 0 |
) |
Definition at line 282 of file kopeteavatarmanager.cpp.
| Kopete::AvatarQueryJob::~AvatarQueryJob | ( | ) |
Definition at line 288 of file kopeteavatarmanager.cpp.
Member Function Documentation
| void Kopete::AvatarQueryJob::setQueryFilter | ( | Kopete::AvatarManager::AvatarCategory | category | ) |
Set the filter for the avatar job.
This is used to only list the user defined avatars or contact avatar.
Definition at line 293 of file kopeteavatarmanager.cpp.
| void Kopete::AvatarQueryJob::start | ( | ) | [virtual] |
| QList< Kopete::AvatarManager::AvatarEntry > Kopete::AvatarQueryJob::avatarList | ( | ) | const |
Get the avatar list based on the query.
- Returns:
- List of AvatarManager::AvatarEntry
Definition at line 324 of file kopeteavatarmanager.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference