Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
4,074 additions
and
1,752 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class QgsComposerEffect : QGraphicsEffect | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscomposereffect.h> | ||
%End | ||
public: | ||
QgsComposerEffect(); | ||
~QgsComposerEffect(); | ||
|
||
void setCompositionMode( const QPainter::CompositionMode compositionMode ); | ||
|
||
protected: | ||
/** Called whenever source needs to be drawn */ | ||
virtual void draw( QPainter *painter ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
class QgsComposerLegendStyle | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscomposerlegendstyle.h> | ||
%End | ||
public: | ||
enum Style | ||
{ | ||
Undefined, // should not happen, only if corrupted project file | ||
Hidden, // special style, item is hidden includeing margins around | ||
Title, | ||
Group, | ||
Subgroup, // layer | ||
Symbol, // symbol without label | ||
SymbolLabel | ||
}; | ||
enum Side // margin side | ||
{ | ||
Top = 0, | ||
Bottom = 1, | ||
Left = 2, | ||
Right = 3 | ||
}; | ||
QgsComposerLegendStyle(); | ||
~QgsComposerLegendStyle(); | ||
|
||
QFont font() const; | ||
QFont & rfont(); | ||
void setFont( const QFont & font ); | ||
|
||
double margin( Side side ); | ||
void setMargin( Side side, double margin ); | ||
|
||
// set all margins | ||
void setMargin( double margin ); | ||
|
||
void writeXML( QString name, QDomElement& elem, QDomDocument & doc ) const; | ||
|
||
void readXML( const QDomElement& elem, const QDomDocument& doc ); | ||
|
||
/** Get name for style, used in project file */ | ||
static QString styleName( Style s ); | ||
|
||
/** Get style from name, used in project file */ | ||
static Style styleFromName( QString styleName ); | ||
|
||
/** Get style label, translated, used in UI */ | ||
static QString styleLabel( Style s ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
class QgsCachedFeatureIterator : QgsAbstractFeatureIterator | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscachedfeatureiterator.h> | ||
%End | ||
public: | ||
/** | ||
* @brief | ||
* This constructor creates a feature iterator, that delivers only cached information, based on the | ||
* @link QgsFeatureIds @endlink. No request is made to the backend. | ||
* | ||
* @param vlCache The vector layer cache to use | ||
* @param featureRequest The feature request to answer | ||
* @param featureIds The feature ids to return | ||
*/ | ||
QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest, QgsFeatureIds featureIds ); | ||
|
||
/** | ||
* @brief | ||
* | ||
* @param f | ||
* @return bool | ||
*/ | ||
virtual bool nextFeature( QgsFeature& f ); | ||
|
||
/** | ||
* @brief | ||
* | ||
* @return bool | ||
*/ | ||
virtual bool rewind(); | ||
|
||
/** | ||
* @brief | ||
* | ||
* @return bool | ||
*/ | ||
virtual bool close(); | ||
}; | ||
|
||
class QgsCachedFeatureWriterIterator : QgsAbstractFeatureIterator | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscachedfeatureiterator.h> | ||
%End | ||
public: | ||
/** | ||
* @brief | ||
* This constructor creates a feature iterator, which queries the backend and caches retrieved features. | ||
* | ||
* @param vlCache The vector layer cache to use | ||
* @param featureRequest The feature request to answer | ||
*/ | ||
QgsCachedFeatureWriterIterator( QgsVectorLayerCache* vlCache, QgsFeatureRequest featureRequest ); | ||
|
||
/** | ||
* @brief | ||
* | ||
* @param f | ||
* @return bool | ||
*/ | ||
virtual bool nextFeature( QgsFeature& f ); | ||
|
||
/** | ||
* @brief | ||
* | ||
* @return bool | ||
*/ | ||
virtual bool rewind(); | ||
|
||
/** | ||
* @brief | ||
* | ||
* @return bool | ||
*/ | ||
virtual bool close(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
class QgsAbstractCacheIndex | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscacheindex.h> | ||
%End | ||
public: | ||
QgsAbstractCacheIndex(); | ||
virtual ~QgsAbstractCacheIndex(); | ||
|
||
/** | ||
* Is called, whenever a feature is removed from the cache. You should update your indexes, so | ||
* they become invalid in case this feature was required to successfuly answer a request. | ||
*/ | ||
virtual void flushFeature( const QgsFeatureId fid ) = 0; | ||
|
||
/** | ||
* Sometimes, the whole cache changes its state and its easier to just withdraw everything. | ||
* In this case, this method is issued. Be sure to clear all cache information in here. | ||
*/ | ||
virtual void flush() = 0; | ||
|
||
/** | ||
* @brief | ||
* Implement this method to update the the indices, in case you need information contained by the request | ||
* to properly index. (E.g. spatial index) | ||
* Does nothing by default | ||
* | ||
* @param featureRequest The feature request that was answered | ||
* @param fids The feature ids that have been returned | ||
*/ | ||
virtual void requestCompleted( QgsFeatureRequest featureRequest, QgsFeatureIds fids ); | ||
|
||
/** | ||
* Is called, when a feature request is issued on a cached layer. | ||
* If this cache index is able to completely answer the feature request, it will return true | ||
* and write the list of feature ids of cached features to cachedFeatures. If it is not able | ||
* it will return false and the cachedFeatures state is undefined. | ||
* | ||
* @param featureIterator A reference to a {@link QgsFeatureIterator}. A valid featureIterator will | ||
* be assigned in case this index is able to answer the request and the return | ||
* value is true. | ||
* @param featureRequest The feature request, for which this index is queried. | ||
* | ||
* @return True, if this index holds the information to answer the request. | ||
* | ||
*/ | ||
virtual bool getCacheIterator( QgsFeatureIterator& featureIterator, const QgsFeatureRequest& featureRequest ) = 0; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
class QgsCacheIndexFeatureId : QgsAbstractCacheIndex | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscacheindexfeatureid.h> | ||
%End | ||
public: | ||
QgsCacheIndexFeatureId( QgsVectorLayerCache* ); | ||
|
||
/** | ||
* Is called, whenever a feature is removed from the cache. You should update your indexes, so | ||
* they become invalid in case this feature was required to successfuly answer a request. | ||
*/ | ||
virtual void flushFeature( const QgsFeatureId fid ); | ||
|
||
/** | ||
* Sometimes, the whole cache changes its state and its easier to just withdraw everything. | ||
* In this case, this method is issued. Be sure to clear all cache information in here. | ||
*/ | ||
virtual void flush(); | ||
|
||
/** | ||
* @brief | ||
* Implement this method to update the the indices, in case you need information contained by the request | ||
* to properly index. (E.g. spatial index) | ||
* Does nothing by default | ||
* | ||
* @param featureRequest The feature request that was answered | ||
* @param fids The feature ids that have been returned | ||
*/ | ||
virtual void requestCompleted( QgsFeatureRequest featureRequest, QgsFeatureIds fids ); | ||
|
||
/** | ||
* Is called, when a feature request is issued on a cached layer. | ||
* If this cache index is able to completely answer the feature request, it will return true | ||
* and write the list of feature ids of cached features to cachedFeatures. If it is not able | ||
* it will return false and the cachedFeatures state is undefined. | ||
* | ||
* @param featureIterator A reference to a {@link QgsFeatureIterator}. A valid featureIterator will | ||
* be assigned in case this index is able to answer the request and the return | ||
* value is true. | ||
* @param featureRequest The feature request, for which this index is queried. | ||
* | ||
* @return True, if this index holds the information to answer the request. | ||
* | ||
*/ | ||
virtual bool getCacheIterator( QgsFeatureIterator& featureIterator, const QgsFeatureRequest& featureRequest ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class QgsCentralPointPositionManager : QgsOverlayObjectPositionManager | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscentralpointpositionmanager.h> | ||
%End | ||
public: | ||
QgsCentralPointPositionManager(); | ||
~QgsCentralPointPositionManager(); | ||
void addLayer( QgsVectorLayer* vl, QList<QgsVectorOverlay*>& overlays ); | ||
/**Removes all the overlays*/ | ||
void removeLayers(); | ||
void findObjectPositions( const QgsRenderContext& context, QGis::UnitType unitType ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
class QgsFeatureStore | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsfeaturestore.h> | ||
%End | ||
public: | ||
//! Constructor | ||
QgsFeatureStore(); | ||
|
||
//! Constructor | ||
QgsFeatureStore( const QgsFeatureStore &rhs ); | ||
|
||
//! Constructor | ||
QgsFeatureStore( const QgsFields& fields, const QgsCoordinateReferenceSystem& crs ); | ||
|
||
//! Destructor | ||
~QgsFeatureStore(); | ||
|
||
/** Get fields list */ | ||
QgsFields& fields(); | ||
|
||
/** Set fields */ | ||
void setFields( const QgsFields & fields ); | ||
|
||
/** Get crs */ | ||
QgsCoordinateReferenceSystem crs() const; | ||
|
||
/** Set crs */ | ||
void setCrs( const QgsCoordinateReferenceSystem& crs ); | ||
|
||
/** Get features list reference */ | ||
QgsFeatureList& features(); | ||
|
||
/** Set map of optional parameters */ | ||
void setParams( const QMap<QString, QVariant> &theParams ); | ||
|
||
/** Get map of optional parameters */ | ||
QMap<QString, QVariant> params() const; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
class QgsGeometryCache | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsgeometrycache.h> | ||
%End | ||
public: | ||
QgsGeometryCache( QgsVectorLayer* layer ); | ||
~QgsGeometryCache(); | ||
|
||
QgsGeometryMap& cachedGeometries(); | ||
|
||
//! fetch geometry from cache, return true if successful | ||
bool geometry( QgsFeatureId fid, QgsGeometry& geometry ); | ||
|
||
//! store a geometry in the cache | ||
void cacheGeometry( QgsFeatureId fid, const QgsGeometry& geom ); | ||
|
||
//! get rid of the cached geometry | ||
void removeGeometry( QgsFeatureId fid ); | ||
|
||
|
||
/** Deletes the geometries in mCachedGeometries */ | ||
void deleteCachedGeometries(); | ||
|
||
void setCachedGeometriesRect( const QgsRectangle& extent ); | ||
const QgsRectangle& cachedGeometriesRect(); | ||
|
||
protected: | ||
QgsVectorLayerEditBuffer *editBuffer(); | ||
}; |
Oops, something went wrong.