Soprano 2.9.4
asyncresult.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2008-2009 Sebastian Trueg <trueg@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#ifndef _SOPRANO_ASYNC_RESULT_H_
23#define _SOPRANO_ASYNC_RESULT_H_
24
25#include <QtCore/QObject>
26#include <QtCore/QVariant>
27
28#include "error.h"
29#include "soprano_export.h"
30
31
32namespace Soprano {
33
35 class Node;
36 class NodeIterator;
38
39 namespace Util {
40
41 class AsyncModel;
42
52 class SOPRANO_EXPORT AsyncResult : public QObject, public Error::ErrorCache
53 {
54 Q_OBJECT
55
56 Q_SIGNALS:
64
65 public:
71 static AsyncResult* createResult();
72
74
91 QVariant value() const { return m_result; }
92
105
115
125
135
144 Node node() const;
145
150 void setResult( const QVariant& result, const Error::Error& error );
151
152 private Q_SLOTS:
153 void slotResultReady();
154
155 private:
156 AsyncResult();
157
158 QVariant m_result;
159
160 friend class AsyncModel;
161 };
162 }
163}
164
165#endif
Core class of Soprano's exception system.
Definition error.h:235
Represents an error in Soprano.
Definition error.h:78
An iterator that provides a stream of Nodes.
A Node represents one RDF resource.
Definition node.h:54
An iterator for query results.
An iterator that provides a stream of Statements.
Filter model that allows to perform operations asyncroneously.
Definition asyncmodel.h:68
A delayed result as returned by AsyncModel.
Definition asyncresult.h:53
QueryResultIterator queryResultIterator() const
QVariant value() const
Definition asyncresult.h:91
NodeIterator nodeIterator() const
static AsyncResult * createResult()
Error::ErrorCode errorCode() const
void resultReady(Soprano::Util::AsyncResult *)
void setResult(const QVariant &result, const Error::Error &error)
StatementIterator statementIterator() const
QObject(QObject *parent=0)
#define SOPRANO_EXPORT