QGIS API Documentation 3.99.0-Master (7d2ca374f2d)
Loading...
Searching...
No Matches
qgschunkqueuejob.h
Go to the documentation of this file.
1/***************************************************************************
2 qgschunkqueuejob.h
3 --------------------------------------
4 Date : July 2017
5 Copyright : (C) 2017 by Martin Dobias
6 Email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSCHUNKQUEUEJOB_H
17#define QGSCHUNKQUEUEJOB_H
18
20
21//
22// W A R N I N G
23// -------------
24//
25// This file is not part of the QGIS API. It exists purely as an
26// implementation detail. This header file may change from version to
27// version without notice, or even be removed.
28//
29
30class QgsChunkNode;
31
32namespace Qt3DCore
33{
34 class QEntity;
35}
36
37
38#include <QObject>
39
40#define SIP_NO_FILE
41
57class QgsChunkQueueJob : public QObject
58{
59 Q_OBJECT
60 public:
62 QgsChunkQueueJob( QgsChunkNode *node );
63
68 virtual void start() = 0;
69
71 QgsChunkNode *chunk() { return mNode; }
72
81 virtual void cancel();
82
88 bool isFinished() const;
89
90 signals:
92 void finished();
93
94 protected:
95 QgsChunkNode *mNode = nullptr;
96 bool mFinished = false;
97};
98
105class QgsChunkQueueJobFactory
106{
107 public:
108 virtual ~QgsChunkQueueJobFactory() = default;
109
111 virtual QgsChunkQueueJob *createJob( QgsChunkNode *chunk ) = 0;
112};
113
115
116#endif // QGSCHUNKQUEUEJOB_H