KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

AsyncResult Class Reference

from PyKDE4.soprano import *

Inherits: QObject,Soprano.Error.ErrorCache
Namespace: Soprano.Util

Detailed Description

\class AsyncResult asyncmodel.h Soprano/Util/AsyncResult

A delayed result as returned by AsyncModel.

Author:
Sebastian Trueg <trueg@kde.org>

Since:
2.1


Signals

 resultReady (Soprano.Util.AsyncResult a0)

Methods

 __init__ (self)
Soprano.Error.ErrorCode errorCode (self)
Soprano.Node node (self)
Soprano.NodeIterator nodeIterator (self)
Soprano.QueryResultIterator queryResultIterator (self)
 setResult (self, QVariant result, Soprano.Error.Error error)
Soprano.StatementIterator statementIterator (self)
QVariant value (self)

Static Methods

Soprano.Util.AsyncResult createResult ()

Signal Documentation

resultReady ( Soprano.Util.AsyncResult  a0
)

Emitted once the async operation is completed and the result can be read.

The result will delete itself.

Signal syntax:
QObject.connect(source, SIGNAL("resultReady(Soprano::Util::AsyncResult*)"), target_slot)

Method Documentation

__init__ (   self )
Soprano.Error.ErrorCode errorCode (   self )

Convinience method which converts value() into a Error.ErrorCode as returned for the following AsyncModel methods:

  • AsyncModel.addStatementAsync
  • AsyncModel.removeStatementAsync
  • AsyncModel.removeAllStatementsAsync
  • \sa value()

    Since:
    2.2

    Soprano.Node node (   self )

    Convinience method which converts value() into a StatementIterator as returned AsyncModel.createBlankNodeAsync.

    \sa value()

    Since:
    2.2

    Soprano.NodeIterator nodeIterator (   self )

    Convinience method which converts value() into a StatementIterator as returned AsyncModel.listContextsAsync.

    \sa value()

    Since:
    2.2

    Soprano.QueryResultIterator queryResultIterator (   self )

    Convinience method which converts value() into a StatementIterator as returned AsyncModel.executeQueryAsync.

    \sa value()

    Since:
    2.2

    setResult (  self,
    QVariant  result,
    Soprano.Error.Error  error
    )

    Sets the final result and emits the resultReady signal. This method should never be called by clients.

    Soprano.StatementIterator statementIterator (   self )

    Convinience method which converts value() into a StatementIterator as returned AsyncModel.listStatementsAsync.

    \sa value()

    Since:
    2.2

    QVariant value (   self )

    The result of the async operation. Its type is dependent on the operation (for example Error.ErrorCode for AsyncModel.addStatementAsync or StatementIterator for AsyncModel.listStatementsAsync). Types may need to be registered with Q_DECLARE_METATYPE.

    Use Error.ErrorCache.lastError() to check for error details.

    This value is not ready before resultReady() has been emitted. Do only use this in a slot connected to resultReady.

    \sa errorCode, statementIterator, nodeIterator, queryResultIterator, node


    Static Method Documentation

    Soprano.Util.AsyncResult createResult (   )

    Constructor method to ensure binary compatibility.

    Since:
    2.2

    • Full Index

    Modules

    • akonadi
    • dnssd
    • kdecore
    • kdeui
    • khtml
    • kio
    • knewstuff
    • kparts
    • kutils
    • nepomuk
    • phonon
    • plasma
    • polkitqt
    • solid
    • soprano
    This documentation is maintained by Simon Edwards.
    KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal