Skip to content

Commit

Permalink
spatial query plugin: fix warnings, reindent, include in debian package
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13360 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 24, 2010
1 parent f6473c3 commit 76885d6
Show file tree
Hide file tree
Showing 18 changed files with 1,042 additions and 1,040 deletions.
3 changes: 2 additions & 1 deletion debian/changelog
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions debian/qgis.install
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Expand Up @@ -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

Expand Down
5 changes: 0 additions & 5 deletions src/plugins/spatialquery/CMakeLists.txt
Expand Up @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions src/plugins/spatialquery/qgsgeometrycoordinatetransform.cpp
Expand Up @@ -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)
18 changes: 9 additions & 9 deletions src/plugins/spatialquery/qgsgeometrycoordinatetransform.h
Expand Up @@ -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
22 changes: 11 additions & 11 deletions src/plugins/spatialquery/qgsmngprogressbar.cpp
Expand Up @@ -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()
16 changes: 8 additions & 8 deletions src/plugins/spatialquery/qgsmngprogressbar.h
Expand Up @@ -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 76885d6

Please sign in to comment.