autoLoadCheckBox.diff
src/plugins/heatmap/heatmap.cpp | ||
---|---|---|
109 | 109 |
int rows = d.rows(); |
110 | 110 |
float cellsize = d.cellSizeX(); // or d.cellSizeY(); both have the same value |
111 | 111 |
float myDecay = d.decayRatio(); |
112 |
bool loadRaster = d.autoLoad(); |
|
112 | 113 | |
113 | 114 |
// Getting the rasterdataset in place |
114 | 115 |
GDALAllRegister(); |
... | ... | |
289 | 290 |
//Finally close the dataset |
290 | 291 |
GDALClose(( GDALDatasetH ) heatmapDS ); |
291 | 292 | |
292 |
// Open the file in QGIS window |
|
293 |
mQGisIface->addRasterLayer( d.outputFilename(), QFileInfo( d.outputFilename() ).baseName() ); |
|
293 |
if ( loadRaster ) |
|
294 |
{ |
|
295 |
// Open the file in QGIS window |
|
296 |
mQGisIface->addRasterLayer( d.outputFilename(), QFileInfo( d.outputFilename() ).baseName() ); |
|
297 |
} |
|
294 | 298 |
} |
295 | 299 |
} |
296 | 300 |
src/plugins/heatmap/heatmapgui.cpp | ||
---|---|---|
449 | 449 |
return inputLayer; |
450 | 450 |
} |
451 | 451 | |
452 |
bool HeatmapGui::autoLoad() |
|
453 |
{ |
|
454 |
return mLoadRasterCheck->isChecked(); |
|
455 |
} |
src/plugins/heatmap/heatmapgui.h | ||
---|---|---|
81 | 81 |
/** Return the BBox */ |
82 | 82 |
QgsRectangle bbox() { return mBBox; } |
83 | 83 | |
84 |
/** returns the autoload rater checkbox value **/ |
|
85 |
bool autoLoad(); |
|
86 | ||
84 | 87 |
private: |
85 | 88 |
QMap<QString, QString> mExtensionMap; |
86 | 89 |
src/plugins/heatmap/heatmapguibase.ui | ||
---|---|---|
7 | 7 |
<x>0</x> |
8 | 8 |
<y>0</y> |
9 | 9 |
<width>430</width> |
10 |
<height>380</height>
|
|
10 |
<height>393</height>
|
|
11 | 11 |
</rect> |
12 | 12 |
</property> |
13 | 13 |
<property name="sizePolicy"> |
... | ... | |
244 | 244 |
</layout> |
245 | 245 |
</widget> |
246 | 246 |
</item> |
247 |
<item row="7" column="0" colspan="2"> |
|
248 |
<widget class="QCheckBox" name="mLoadRasterCheck"> |
|
249 |
<property name="text"> |
|
250 |
<string>Load generated raster to map view</string> |
|
251 |
</property> |
|
252 |
</widget> |
|
253 |
</item> |
|
247 | 254 |
</layout> |
248 | 255 |
</widget> |
249 | 256 |
<resources/> |