Skip to content

Commit

Permalink
more interface fixes (missing GUI_EXPORT and sip)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 24, 2013
1 parent 0992180 commit f1e2fce
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 31 deletions.
45 changes: 23 additions & 22 deletions python/core/qgsgeometry.sip
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ class QgsGeometry
/**
* Returns the size of the WKB in asWkb().
*/
size_t wkbSize() const;
size_t wkbSize();

/** Returns type of wkb (point / linestring / polygon etc.) */
QGis::WkbType wkbType() const;
QGis::WkbType wkbType();

/** Returns type of the vector */
QGis::GeometryType type();
Expand Down Expand Up @@ -124,7 +124,7 @@ class QgsGeometry
Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
and the indices of the vertices before/after. The vertices before/after are -1 if not present
*/
QgsPoint closestVertex( const QgsPoint& point, int& atVertex /Out/, int& beforeVertex /Out/, int& afterVertex /Out/, double& sqrDist /Out/ ) const;
QgsPoint closestVertex( const QgsPoint& point, int& atVertex /Out/, int& beforeVertex /Out/, int& afterVertex /Out/, double& sqrDist /Out/ );


/**
Expand Down Expand Up @@ -253,41 +253,41 @@ class QgsGeometry
QgsRectangle boundingBox();

/** Test for intersection with a rectangle (uses GEOS) */
bool intersects( const QgsRectangle& r ) const;
bool intersects( const QgsRectangle& r );

/** Test for intersection with a geometry (uses GEOS) */
bool intersects( const QgsGeometry* geometry ) const;
bool intersects( QgsGeometry* geometry );

/** Test for containment of a point (uses GEOS) */
bool contains( const QgsPoint* p ) const;
bool contains( QgsPoint* p );

/** Test for if geometry is contained in an other (uses GEOS)
* @note added in 1.5 */
bool contains( const QgsGeometry* geometry ) const;
bool contains( QgsGeometry* geometry );

/** Test for if geometry is disjoint of an other (uses GEOS)
* @note added in 1.5 */
bool disjoint( const QgsGeometry* geometry ) const;
bool disjoint( QgsGeometry* geometry );

/** Test for if geometry equals an other (uses GEOS)
* @note added in 1.5 */
bool equals( const QgsGeometry* geometry ) const;
bool equals( QgsGeometry* geometry );

/** Test for if geometry touch an other (uses GEOS)
* @note added in 1.5 */
bool touches( const QgsGeometry* geometry ) const;
bool touches( QgsGeometry* geometry );

/** Test for if geometry overlaps an other (uses GEOS)
* @note added in 1.5 */
bool overlaps( const QgsGeometry* geometry ) const;
bool overlaps( QgsGeometry* geometry );

/** Test for if geometry is within an other (uses GEOS)
* @note added in 1.5 */
bool within( const QgsGeometry* geometry ) const;
bool within( QgsGeometry* geometry );

/** Test for if geometry crosses an other (uses GEOS)
* @note added in 1.5 */
bool crosses( const QgsGeometry* geometry ) const;
bool crosses( QgsGeometry* geometry );

/** Returns a buffer region around this geometry having the given width and with a specified number
of segments used to approximate curves */
Expand Down Expand Up @@ -326,44 +326,44 @@ class QgsGeometry
/** Exports the geometry to mWkt
* @return true in case of success and false else
*/
QString exportToWkt() const;
QString exportToWkt();

/** Exports the geometry to mGeoJSON
* @return true in case of success and false else
* @note added in 1.8
* @note python binding added in 1.9
*/
QString exportToGeoJSON() const;
QString exportToGeoJSON();

/* Accessor functions for getting geometry data */

/** return contents of the geometry as a point
if wkbType is WKBPoint, otherwise returns [0,0] */
QgsPoint asPoint() const;
QgsPoint asPoint();

/** return contents of the geometry as a polyline
if wkbType is WKBLineString, otherwise an empty list */
QgsPolyline asPolyline() const;
QgsPolyline asPolyline();

/** return contents of the geometry as a polygon
if wkbType is WKBPolygon, otherwise an empty list */
QgsPolygon asPolygon() const;
QgsPolygon asPolygon();

/** return contents of the geometry as a multi point
if wkbType is WKBMultiPoint, otherwise an empty list */
QgsMultiPoint asMultiPoint() const;
QgsMultiPoint asMultiPoint();

/** return contents of the geometry as a multi linestring
if wkbType is WKBMultiLineString, otherwise an empty list */
QgsMultiPolyline asMultiPolyline() const;
QgsMultiPolyline asMultiPolyline();

/** return contents of the geometry as a multi polygon
if wkbType is WKBMultiPolygon, otherwise an empty list */
QgsMultiPolygon asMultiPolygon() const;
QgsMultiPolygon asMultiPolygon();

/** return contents of the geometry as a list of geometries
@note added in version 1.1 */
QList<QgsGeometry*> asGeometryCollection() const /Factory/;
QList<QgsGeometry*> asGeometryCollection() /Factory/;

/** delete a ring in polygon or multipolygon.
Ring 0 is outer ring and can't be deleted.
Expand All @@ -386,6 +386,7 @@ class QgsGeometry
* 1 if geometry is not of polygon type,
* 2 if avoid intersection would change the geometry type,
* 3 other error during intersection removal
* @param ignoreFeatures possibility to give a list of features where intersections should be ignored (not available in python bindings)
* @note added in 1.5
*/
int avoidIntersections();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
// info from table to application
connect( this, SIGNAL( saveEdits( QgsMapLayer * ) ), QgisApp::instance(), SLOT( saveEdits( QgsMapLayer * ) ) );

connect( mMainView, SIGNAL( currentChanged( int ) ), mMainViewButtonGroup, SLOT() );
connect( mMainView, SIGNAL( currentChanged( int ) ), mMainViewButtonGroup, SLOT( currentChanged( int ) ) );

bool myDockFlag = settings.value( "/qgis/dockAttributeTable", false ).toBool();
if ( myDockFlag )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsgeometrycache.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "qgsvectorlayer.h"

class QgsGeometryCache
class CORE_EXPORT QgsGeometryCache
{
public:
QgsGeometryCache( QgsVectorLayer* layer );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsattributetabledelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class QgsAttributeTableView;
* QItemDelegate).
*/

class QgsAttributeTableDelegate : public QItemDelegate
class GUI_EXPORT QgsAttributeTableDelegate : public QItemDelegate
{
Q_OBJECT;

Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsdualview.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas
friend class TestQgsDualView;
};

class QgsAttributeTableAction : public QAction
class GUI_EXPORT QgsAttributeTableAction : public QAction
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsfeaturelistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class QgsAttributeTableFilterModel;
class QgsAttributeTableModel;
class QgsVectorLayerCache;

class QgsFeatureListModel : public QAbstractProxyModel, public QgsFeatureModel
class GUI_EXPORT QgsFeatureListModel : public QAbstractProxyModel, public QgsFeatureModel
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsfeaturelistviewdelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class QgsFeatureListModel;
class QgsFeatureSelectionModel;
class QPosition;

class QgsFeatureListViewDelegate : public QItemDelegate
class GUI_EXPORT QgsFeatureListViewDelegate : public QItemDelegate
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsfeatureselectionmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class QgsVectorLayer;
class QgsFeatureModel;

class QgsFeatureSelectionModel : public QItemSelectionModel
class GUI_EXPORT QgsFeatureSelectionModel : public QItemSelectionModel
{
Q_OBJECT
public:
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsattributeeditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class GUI_EXPORT QgsAttributeEditor : public QObject
int mIdx;
};

class QgsStringRelay : public QObject
class GUI_EXPORT QgsStringRelay : public QObject
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology-ng/qgscolorrampcombobox.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class QgsStyleV2;
class QgsVectorColorRampV2;

class QgsColorRampComboBox : public QComboBox
class GUI_EXPORT QgsColorRampComboBox : public QComboBox
{
Q_OBJECT
public:
Expand Down

0 comments on commit f1e2fce

Please sign in to comment.