QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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 "moc_qgspointlocatorinittask.cpp"
18#include "qgspointlocator.h"
19#include "qgsvectorlayer.h"
20
22
23QgsPointLocatorInitTask::QgsPointLocatorInitTask( QgsPointLocator *loc )
24 : QgsTask( tr( "Indexing %1" ).arg( loc->layer()->id() ), QgsTask::Silent )
25 , mLoc( loc )
26{}
27
28bool QgsPointLocatorInitTask::isBuildOK() const
29{
30 return mBuildOK;
31}
32
33bool QgsPointLocatorInitTask::run()
34{
35 mBuildOK = mLoc->rebuildIndex();
36 return true;
37}
38
The class defines interface for querying point location:
Abstract base class for long running background tasks.