QGIS API Documentation  3.6.0-Noosa (5873452)
qgschunkqueuejob_p.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgschunkqueuejob_p.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_P_H
17 #define QGSCHUNKQUEUEJOB_P_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 
30 class QgsChunkNode;
31 
32 namespace Qt3DCore
33 {
34  class QEntity;
35 }
36 
37 #include <QObject>
38 
52 class QgsChunkQueueJob : public QObject
53 {
54  Q_OBJECT
55  public:
57  QgsChunkQueueJob( QgsChunkNode *node )
58  : mNode( node )
59  {
60  }
61 
63  QgsChunkNode *chunk() { return mNode; }
64 
70  virtual void cancel();
71 
72  signals:
74  void finished();
75 
76  protected:
77  QgsChunkNode *mNode = nullptr;
78 };
79 
86 class QgsChunkQueueJobFactory
87 {
88  public:
89  virtual ~QgsChunkQueueJobFactory() = default;
90 
92  virtual QgsChunkQueueJob *createJob( QgsChunkNode *chunk ) = 0;
93 };
94 
96 
97 #endif // QGSCHUNKQUEUEJOB_P_H