Skip to content
Permalink
Browse files

spatial query plugin: fix warnings, reindent, include in debian package

git-svn-id: http://svn.osgeo.org/qgis/trunk@13360 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Apr 24, 2010
1 parent e0ec67b commit 3d2b1771431bd5ede1bb4eaa845249b2bc28621e
@@ -5,8 +5,9 @@ qgis (1.5.0) UNRELEASED; urgency=low
* require CMake >2.6 and Qt 4.4 for sid
* remove circular dependencies
* integrate new GRASS raster provider
* add spatialquery plugin

-- Jürgen E. Fischer <jef@norbit.de> Thu, 04 Feb 2010 23:20:29 +0100
-- Jürgen E. Fischer <jef@norbit.de> Sat, 24 Apr 2010 10:57:21 +0200

qgis (1.4.0) UNRELEASED; urgency=low

@@ -26,6 +26,7 @@ usr/lib/qgis/libevis.so
usr/lib/qgis/libosmprovider.so
usr/lib/qgis/librasterterrainplugin.so
usr/lib/qgis/liblabelingplugin.so
usr/lib/qgis/libspatialqueryplugin.so
usr/share/pixmaps/qgis-icon.xpm
usr/share/pixmaps/qgis-mime-icon.png
usr/share/pixmaps/qgis-mime-icon.png usr/share/icons/crystalsvg/128x128/mimetypes
@@ -10,7 +10,7 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

DISTRIBUTION := $(shell dpkg-parsechangelog --format rfc822 | sed -ne "s/^Distribution: //p")
ifneq ($(DISTRIBUTION),$(findstring $(DISTRIBUTION),"lenny hardy intrepid jaunty karmic"))
ifneq ($(DISTRIBUTION),$(findstring $(DISTRIBUTION),"lenny hardy intrepid jaunty karmic lucid"))
DISTRIBUTION := sid
endif

@@ -14,11 +14,6 @@ SET (SPATIALQUERY_SRCS
SET (SPATIALQUERY_MOC_HDRS
qgsspatialqueryplugin.h
qgsspatialquerydialog.h
qgsspatialquery.h
qgsreaderfeatures.h
qgsrubberselectid.h
qgsgeometrycoordinatetransform.h
qgsmngprogressbar.h
)

SET( SPATIALQUERY_UIS qgsspatialquerydialogbase.ui)
@@ -23,33 +23,33 @@

QgsGeometryCoordinateTransform::~QgsGeometryCoordinateTransform()
{
delete mCoordTransform;
delete mCoordTransform;

} // QgsGeometryCoordinateTransform::~QgsGeometryCoordinateTransform()

void QgsGeometryCoordinateTransform::setCoordinateTransform(QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference)
void QgsGeometryCoordinateTransform::setCoordinateTransform( QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference )
{
// Transform Forward: Target to Reference
// * Use srs() to use old versions QGis - will be deprecited in 2.0 (after use crs())
QgsCoordinateReferenceSystem srsTarget = lyrTarget->srs();
QgsCoordinateReferenceSystem srsReference = lyrReference->srs();
// Transform Forward: Target to Reference
// * Use srs() to use old versions QGis - will be deprecited in 2.0 (after use crs())
QgsCoordinateReferenceSystem srsTarget = lyrTarget->srs();
QgsCoordinateReferenceSystem srsReference = lyrReference->srs();

mCoordTransform = new QgsCoordinateTransform(srsTarget, srsReference);
mCoordTransform = new QgsCoordinateTransform( srsTarget, srsReference );

mFuncTransform = ( srsTarget != srsReference)
mFuncTransform = ( srsTarget != srsReference )
? &QgsGeometryCoordinateTransform::setGeomTransform
: &QgsGeometryCoordinateTransform::setNoneGeomTransform;

} // void QgsGeometryCoordinateTransform::setCoordinateTransform(QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference)

void QgsGeometryCoordinateTransform::transform(QgsGeometry *geom)
void QgsGeometryCoordinateTransform::transform( QgsGeometry *geom )
{
(this->*mFuncTransform)(geom);
( this->*mFuncTransform )( geom );

} // void QgsGeometryCoordinateTransform::transformCoordenate()

void QgsGeometryCoordinateTransform::setGeomTransform(QgsGeometry *geom)
void QgsGeometryCoordinateTransform::setGeomTransform( QgsGeometry *geom )
{
geom->transform(*mCoordTransform);
geom->transform( *mCoordTransform );

} // void QgsGeometryCoordinateTransform::setGeomTransform(QgsGeometry *geom)
@@ -29,44 +29,44 @@
*/
class QgsGeometryCoordinateTransform
{
public:
public:
/**
* \brief Constructor for a Geometry Coordinate Transform.
*
*/
QgsGeometryCoordinateTransform () {};
QgsGeometryCoordinateTransform() {};

/**
* \brief Destructor
*/
~QgsGeometryCoordinateTransform ();
~QgsGeometryCoordinateTransform();

/**
* \brief Sets the coordinate reference system the target and reference layer
* \param lyrTarget target layer.
* \param lyrReference reference layer.
*/
void setCoordinateTransform(QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference);
void setCoordinateTransform( QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference );

/**
* \brief Transform the coordinates reference system of the geometry, if target have the different system of reference
* \param geom Geometry
*/
void transform(QgsGeometry *geom);
private:
void transform( QgsGeometry *geom );
private:
/**
* \brief Transform the coordinates reference system of the geometry (use by transform)
* \param geom Geometry
*/
void setGeomTransform(QgsGeometry *geom);
void setGeomTransform( QgsGeometry *geom );
/**
* \brief None transform the coordinates reference system of the geometry (use by transform)
* \param geom Geometry
*/
void setNoneGeomTransform(QgsGeometry *geom) {};
void setNoneGeomTransform( QgsGeometry *geom ) {};

QgsCoordinateTransform * mCoordTransform;
void (QgsGeometryCoordinateTransform::* mFuncTransform)(QgsGeometry *);
void ( QgsGeometryCoordinateTransform::* mFuncTransform )( QgsGeometry * );
};

#endif // GEOMETRYCOORDINATETRANSFORM_H
@@ -19,32 +19,32 @@

#include "qgsmngprogressbar.h"

MngProgressBar::MngProgressBar(QProgressBar *pb)
MngProgressBar::MngProgressBar( QProgressBar *pb )
{
mPb = pb;
mPb->reset();
mPb = pb;
mPb->reset();
} // MngProgressBar::MngProgressBar(QProgressBar *pb)

void MngProgressBar::init(int minimum, int maximum)
void MngProgressBar::init( int minimum, int maximum )
{
mPb->reset();
mPb->setRange(minimum, maximum);
mPb->reset();
mPb->setRange( minimum, maximum );

} // void MngProgressBar::init(int minimum, int maximum)

void MngProgressBar::setFormat(QString format)
void MngProgressBar::setFormat( QString format )
{
// special caracters:
// %p - is replaced by the percentage completed.
// %v - is replaced by the current value.
// %m - is replaced by the total number of steps.
mPb->setFormat(format);
mPb->setFormat( format );

} // void MngProgressBar::setFormat(QString format)

void MngProgressBar::step(int step)
void MngProgressBar::step( int step )
{
mPb->setValue(step);
mPb->repaint();
mPb->setValue( step );
mPb->repaint();

} // void MngProgressBar::step()
@@ -27,39 +27,39 @@
*/
class MngProgressBar
{
public:
public:
/**
* \brief Constructor for a MngProgressBar.
* \param pb Pointer to the MngProgressBar object.
*/
MngProgressBar(QProgressBar *pb);
MngProgressBar( QProgressBar *pb );
/**
* \brief Destructor
*/
~MngProgressBar() { mPb->reset(); };

/**
* \brief Sets the progress bar's minimum and maximum values to minimum and maximum respectively
* \param minimum minimun value.
* \param maximum maximum value.
*/
void init(int minimum, int maximum);
void init( int minimum, int maximum );

/**
* \brief Sets the format the current text.
* \param format This property holds the string used to generate the current text.
*/
void setFormat(QString format);
void setFormat( QString format );

/**
* \brief Sets current value progress bar's
* \param step current value
*/
void step(int step );
void step( int step );

private:
private:
QProgressBar * mPb;

};

#endif // QGSMNGPROGRESSBAR_H

0 comments on commit 3d2b177

Please sign in to comment.
You can’t perform that action at this time.