mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Move kernelShape enum to heatmap.h
This commit is contained in:
parent
80c39816a6
commit
7423e9aad7
@ -338,19 +338,19 @@ double Heatmap::calculateKernelValue( double distance, int bandwidth, int kernel
|
||||
{
|
||||
switch ( kernelShape )
|
||||
{
|
||||
case HeatmapGui::Triangular:
|
||||
case Heatmap::Triangular:
|
||||
return triangularKernel( distance , bandwidth );
|
||||
|
||||
case HeatmapGui::Uniform:
|
||||
case Heatmap::Uniform:
|
||||
return uniformKernel( distance, bandwidth );
|
||||
|
||||
case HeatmapGui::Quartic:
|
||||
case Heatmap::Quartic:
|
||||
return quarticKernel( distance, bandwidth );
|
||||
|
||||
case HeatmapGui::Triweight:
|
||||
case Heatmap::Triweight:
|
||||
return triweightKernel( distance, bandwidth );
|
||||
|
||||
case HeatmapGui::Epanechnikov:
|
||||
case Heatmap::Epanechnikov:
|
||||
return epanechnikovKernel( distance, bandwidth );
|
||||
}
|
||||
return 0;
|
||||
|
@ -69,6 +69,16 @@ class Heatmap: public QObject, public QgisPlugin
|
||||
Heatmap( QgisInterface * theInterface );
|
||||
//! Destructor
|
||||
virtual ~Heatmap();
|
||||
|
||||
// Kernel shape type
|
||||
enum kernelShape
|
||||
{
|
||||
Quartic,
|
||||
Triangular,
|
||||
Uniform,
|
||||
Triweight,
|
||||
Epanechnikov
|
||||
};
|
||||
|
||||
public slots:
|
||||
//! init the gui
|
||||
|
@ -12,6 +12,7 @@
|
||||
// qgis includes
|
||||
#include "qgis.h"
|
||||
#include "heatmapgui.h"
|
||||
#include "heatmap.h"
|
||||
#include "qgscontexthelp.h"
|
||||
#include "qgsmaplayer.h"
|
||||
#include "qgsmaplayerregistry.h"
|
||||
@ -230,7 +231,7 @@ void HeatmapGui::on_kernelShapeCombo_currentIndexChanged( int index )
|
||||
{
|
||||
Q_UNUSED( index );
|
||||
// Only enable the decay edit if the kernel shape is set to triangular
|
||||
mDecayLineEdit->setEnabled( index == HeatmapGui::Triangular );
|
||||
mDecayLineEdit->setEnabled( index == Heatmap::Triangular );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -36,15 +36,6 @@ class HeatmapGui : public QDialog, private Ui::HeatmapGuiBase
|
||||
MapUnits
|
||||
};
|
||||
|
||||
enum kernelShape
|
||||
{
|
||||
Quartic,
|
||||
Triangular,
|
||||
Uniform,
|
||||
Triweight,
|
||||
Epanechnikov
|
||||
};
|
||||
|
||||
/** Returns whether to apply weighted heat */
|
||||
bool weighted();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user