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