QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgspointlocatorinittask.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgspointlocatorinittask.cpp
3  --------------------------------------
4  Date : September 2019
5  Copyright : (C) 2019 by Julien Cabieces
6  Email : julien dot cabieces at oslandia 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 
17 #include "qgspointlocator.h"
18 #include "qgsvectorlayer.h"
19 
21 
22 QgsPointLocatorInitTask::QgsPointLocatorInitTask( QgsPointLocator *loc )
23  : QgsTask( tr( "Indexing %1" ).arg( loc->layer()->id() ), QgsTask::Flags() )
24  , mLoc( loc )
25 {}
26 
27 bool QgsPointLocatorInitTask::isBuildOK() const
28 {
29  return mBuildOK;
30 }
31 
32 bool QgsPointLocatorInitTask::run()
33 {
34  mBuildOK = mLoc->rebuildIndex();
35  return true;
36 }
37 
qgsvectorlayer.h
QgsPointLocator
The class defines interface for querying point location:
Definition: qgspointlocator.h:99
qgspointlocatorinittask.h
qgspointlocator.h
QgsTask
Abstract base class for long running background tasks. Tasks can be controlled directly,...
Definition: qgstaskmanager.h:52