Skip to content
Permalink
Browse files

sip update

  • Loading branch information
jef-n committed Jun 23, 2013
1 parent b53e80b commit 3854086d47d6e1256f41448749b0eca6b120d36e
Showing with 611 additions and 276 deletions.
  1. +0 −2 python/analysis/network/qgsgraphanalyzer.sip
  2. +4 −1 python/core/composer/qgsatlascomposition.sip
  3. +60 −27 python/core/composer/qgscomposeritem.sip
  4. +5 −0 python/core/composer/qgscomposeritemcommand.sip
  5. +3 −0 python/core/composer/qgscomposerlabel.sip
  6. +24 −4 python/core/composer/qgscomposerlegend.sip
  7. +14 −1 python/core/composer/qgscomposerlegenditem.sip
  8. +3 −0 python/core/composer/qgscomposerscalebar.sip
  9. +7 −0 python/core/composer/qgscomposershape.sip
  10. +41 −9 python/core/composer/qgscomposition.sip
  11. +16 −1 python/core/qgscrscache.sip
  12. +2 −1 python/core/qgsdatadefined.sip
  13. +4 −3 python/core/qgsfeaturerequest.sip
  14. +24 −23 python/core/qgsfield.sip
  15. +22 −23 python/core/qgsgeometry.sip
  16. +21 −0 python/core/qgsgmlschema.sip
  17. +1 −1 python/core/qgslabel.sip
  18. +49 −17 python/core/qgsmaplayer.sip
  19. +6 −6 python/core/qgsmaplayerregistry.sip
  20. +49 −48 python/core/qgsogcutils.sip
  21. +1 −1 python/core/qgssnapper.sip
  22. +11 −1 python/core/qgsvectorlayer.sip
  23. +4 −1 python/core/qgsvectorlayerimport.sip
  24. +5 −3 python/core/raster/qgsrasterpipe.sip
  25. +10 −2 python/core/symbology-ng/qgscategorizedsymbolrendererv2.sip
  26. +12 −0 python/core/symbology-ng/qgsfillsymbollayerv2.sip
  27. +7 −0 python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip
  28. +2 −0 python/core/symbology-ng/qgsrendererv2.sip
  29. +4 −0 python/core/symbology-ng/qgssymbollayerv2.sip
  30. +10 −0 python/core/symbology-ng/qgssymbollayerv2utils.sip
  31. +7 −1 python/core/symbology-ng/qgsvectorcolorrampv2.sip
  32. +6 −0 python/core/symbology-ng/qgsvectorfieldsymbollayer.sip
  33. +60 −5 python/gui/attributetable/qgsattributetableview.sip
  34. +2 −1 python/gui/qgisinterface.sip
  35. +24 −1 python/gui/qgsattributeeditor.sip
  36. +8 −0 python/gui/qgscomposerview.sip
  37. +5 −3 python/gui/qgsexpressionbuilderdialog.sip
  38. +4 −0 python/gui/qgsfilterlineedit.sip
  39. +2 −1 python/gui/qgsmanageconnectionsdialog.sip
  40. +1 −1 python/gui/qgsmaptool.sip
  41. +18 −20 python/gui/qgsmaptoolidentify.sip
  42. +3 −0 python/gui/qgssublayersdialog.sip
  43. +3 −0 python/gui/raster/qgsrasterminmaxwidget.sip
  44. +6 −0 python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip
  45. +3 −1 python/gui/symbology-ng/qgscptcitycolorrampv2dialog.sip
  46. +27 −1 python/gui/symbology-ng/qgssymbollayerv2widget.sip
  47. +1 −49 src/analysis/vector/qgsoverlayanalyzer.h
  48. +0 −1 src/core/composer/qgscomposerlegend.h
  49. +2 −2 src/core/composer/qgscomposerlegenditem.h
  50. +4 −2 src/core/composer/qgscomposition.h
  51. +3 −0 src/core/qgsdatadefined.h
  52. +0 −3 src/core/qgsgmlschema.h
  53. +1 −8 src/core/qgsmaplayer.h
  54. +0 −1 src/core/symbology-ng/qgscategorizedsymbolrendererv2.h
@@ -51,5 +51,3 @@ class QgsGraphAnalyzer
*/
static QgsGraph* shortestTree( const QgsGraph* source, int startVertexIdx, int criterionNum );
};


@@ -44,6 +44,9 @@ public:
bool sortAscending() const;
void setSortAscending( bool ascending );

bool filterFeatures() const;
void setFilterFeatures( bool doFilter );

QString featureFilter() const;
void setFeatureFilter( const QString& expression );

@@ -69,7 +72,7 @@ public:

QgsComposition* composition();

signals:
signals:
/** emitted when one of the parameters changes */
void parameterChanged();
};
@@ -5,8 +5,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem
{
%TypeHeaderCode
#include <qgscomposeritem.h>
//#include <qgscomposerarrow.h>
//#include <qgscomposeritemgroup.h>
#include <qgscomposerlabel.h>
#include <qgscomposerlegend.h>
#include <qgscomposermap.h>
@@ -16,7 +14,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem
#include <qgscomposershape.h>
#include <qgscomposertable.h>
#include <qgscomposerattributetable.h>
//#include <qgscomposertexttable.h>
%End

%ConvertToSubClassCode
@@ -231,6 +228,55 @@ class QgsComposerItem: QObject, QGraphicsRectItem
*/
void setFrameEnabled( bool drawFrame );


/** Whether this item has a Background or not.
* @returns true if there is a Background around this item, otherwise false.
* @note introduced since 2.0
* @see hasBackground
*/
bool hasBackground() const;

/** Set whether this item has a Background drawn around it or not.
* @param drawBackground draw Background
* @returns nothing
* @note introduced in 2.0
* @see hasBackground
*/
void setBackgroundEnabled( bool drawBackground );

/** Gets the background color for this item
* @returns background color
* @note introduced in 2.0
*/
QColor backgroundColor() const;

/** Sets the background color for this item
* @param backgroundColor new background color
* @returns nothing
* @note introduced in 2.0
*/
void setBackgroundColor( const QColor& backgroundColor );

/** Returns the item's composition blending mode */
QPainter::CompositionMode blendMode() const;

/** Sets the item's composition blending mode*/
void setBlendMode( QPainter::CompositionMode blendMode );

/** Returns the item's transparency */
int transparency() const;
/** Sets the item's transparency */
void setTransparency( int transparency );

/** Returns true if effects (eg blend modes) are enabled for the item
* @note introduced in 2.0
*/
bool effectsEnabled() const;
/** Sets whether effects (eg blend modes) are enabled for the item
* @note introduced in 2.0
*/
void setEffectsEnabled( bool effectsEnabled );

/**Composite operations for item groups do nothing per default*/
virtual void addItem( QgsComposerItem* item );
virtual void removeItems();
@@ -269,6 +315,9 @@ class QgsComposerItem: QObject, QGraphicsRectItem
/**Returns the font ascent in Millimeters (considers upscaling and downscaling with FONT_WORKAROUND_SCALE*/
double fontAscentMillimeters( const QFont& font ) const;

/**Returns the font ascent in Millimeters (considers upscaling and downscaling with FONT_WORKAROUND_SCALE*/
double fontDescentMillimeters( const QFont& font ) const;

/**Calculates font to from point size to pixel size*/
double pixelFontSize( double pointSize ) const;

@@ -304,30 +353,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem
@note this method was added in version 2.0
@note there is not setter since one can't manually set the id*/
QString uuid() const;

/** Gets the background color for this item
* @note introduced in 2.0
*/
const QColor backgroundColor() const;

/** Sets the background color for this item
* @note introduced in 2.0
*/
void setBackgroundColor( const QColor& backgroundColor );

/* Returns the current blending mode for the composer item
@note added in version 1.9*/
const QPainter::CompositionMode blendMode() const;
/* Sets the composer item's blending mode
@note added in version 1.9*/
void setBlendMode( const QPainter::CompositionMode blendMode );

/** Returns the composer item's transparency
@note added in version 1.9*/
const int transparency() const;
/** Sets the composer item's transparency
@note added in version 1.9*/
void setTransparency( const int transparency );

public slots:
virtual void setRotation( double r );
@@ -401,6 +426,14 @@ class QgsComposerItem: QObject, QGraphicsRectItem
@param y in/out: y cooreinate before / after the rotation*/
void rotate( double angle, double& x, double& y ) const;

/**Return horizontal align snap item. Creates a new graphics line if 0*/
QGraphicsLineItem* hAlignSnapItem();
void deleteHAlignSnapItem();
/**Return vertical align snap item. Creates a new graphics line if 0*/
QGraphicsLineItem* vAlignSnapItem();
void deleteVAlignSnapItem();
void deleteAlignItems();

signals:
/**Is emitted on rotation change to notify north arrow pictures*/
void rotationChanged( double newRotation );
@@ -52,13 +52,18 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
ComposerMapAnnotationDistance,
//composer legend
ComposerLegendText,
LegendColumnCount,
LegendSplitLayer,
LegendEqualColumnWidth,
LegendSymbolWidth,
LegendSymbolHeight,
LegendTitleSpaceBottom,
LegendGroupSpace,
LegendLayerSpace,
LegendSymbolSpace,
LegendIconSymbolSpace,
LegendBoxSpace,
LegendColumnSpace,
//composer picture
ComposerPictureRotation,
// composer scalebar
@@ -22,6 +22,9 @@ class QgsComposerLabel : QgsComposerItem
QString text();
void setText( const QString& text );

int htmlState();
void setHtmlState( int state );

/**Returns the text as it appears on screen (with replaced data field)
@note this function was added in version 1.2*/
QString displayText() const;
@@ -31,18 +31,29 @@ class QgsComposerLegend : QgsComposerItem
void setTitle( const QString& t );
QString title() const;

/*
QgsComposerLegendStyle style(QgsComposerLegendStyle::Style s) const;
void setStyle(QgsComposerLegendStyle::Style s, const QgsComposerLegendStyle style);
/** Returns reference to modifiable style */
QgsComposerLegendStyle & rstyle( QgsComposerLegendStyle::Style s );
/** Returns style */
QgsComposerLegendStyle style( QgsComposerLegendStyle::Style s ) const;
void setStyle( QgsComposerLegendStyle::Style s, const QgsComposerLegendStyle style );

QFont styleFont( QgsComposerLegendStyle::Style s ) const;
/** Set style font */
void setStyleFont( QgsComposerLegendStyle::Style s, const QFont& f );

/** Set style margin*/
void setStyleMargin( QgsComposerLegendStyle::Style s, double margin );
void setStyleMargin( QgsComposerLegendStyle::Style s, QgsComposerLegendStyle::Side side, double margin );
*/

double boxSpace() const;
void setBoxSpace( double s );

double columnSpace() const;
void setColumnSpace( double s );

QColor fontColor() const;
void setFontColor( const QColor& c );

double symbolWidth() const;
void setSymbolWidth( double w );

@@ -52,6 +63,15 @@ class QgsComposerLegend : QgsComposerItem
void setWrapChar( const QString& t );
QString wrapChar() const;

int columnCount() const;
void setColumnCount( int c );

int splitLayer() const;
void setSplitLayer( bool s );

int equalColumnWidth() const;
void setEqualColumnWidth( bool s );

void setComposerMap( const QgsComposerMap* map );
const QgsComposerMap* composerMap() const;

@@ -15,7 +15,8 @@ class QgsComposerLegendItem : QStandardItem
GroupItem = QStandardItem::UserType,
LayerItem,
SymbologyV2Item,
RasterSymbolItem
RasterSymbolItem,
StyleItem
};

virtual void writeXML( QDomElement& elem, QDomDocument& doc ) const = 0;
@@ -27,6 +28,13 @@ class QgsComposerLegendItem : QStandardItem
virtual ItemType itemType() const = 0;
virtual QStandardItem* clone() const = 0;

QgsComposerLegendStyle::Style style() const;
void setStyle( QgsComposerLegendStyle::Style style );

// Get text defined by user
virtual QString userText() const;
// Set text defined by user
virtual void setUserText( const QString & text );
protected:
void writeXMLChildren( QDomElement& elem, QDomDocument& doc ) const;
};
@@ -99,6 +107,11 @@ class QgsComposerLayerItem : QgsComposerLegendItem

void setLayerID( const QString& id );
QString layerID() const;

void setShowFeatureCount( bool show );
bool showFeatureCount() const;

void setDefaultStyle();
};

class QgsComposerGroupItem : QgsComposerLegendItem
@@ -53,6 +53,9 @@ class QgsComposerScaleBar: QgsComposerItem

QFont font() const;

QColor fontColor() const;
void setFontColor( const QColor& c );

void setFont( const QFont& font );

QPen pen() const;
@@ -46,4 +46,11 @@ class QgsComposerShape: QgsComposerItem
public slots:
/**Sets item rotation and resizes item bounds such that the shape always has the same size*/
virtual void setRotation( double r );


protected:
/* reimplement drawFrame, since it's not a rect, but a custom shape */
virtual void drawFrame( QPainter* p );
/* reimplement drawBackground, since it's not a rect, but a custom shape */
virtual void drawBackground( QPainter* p );
};
@@ -106,23 +106,18 @@ class QgsComposition : QGraphicsScene
const QgsComposerHtml* getComposerHtmlByItem( QgsComposerItem *item ) const;

/**Returns a composer item given its text identifier.
Ids are not necessarely unique, but this function returns only one element.
Ids are not necessarely unique, but this function returns only one element.
@note added in 2.0
@param theId - A QString representing the identifier of the item to
retrieve.
@return QgsComposerItem pointer or 0 pointer if no such item exists.
**/
const QgsComposerItem* getComposerItemById( QString theId ) const;


/**Returns a composer item given its unique identifier.
Warning : ids are not necessarely unique, but this function returns only one element.
@note added in 2.0
@param theId - A QString representing the UUID of the item to retrieve.
@param inAllComposers - Whether the search should be done in all composers of the project
@return QgsComposerItem pointer or 0 pointer if no such item exists.
@param theUuid A QString representing the UUID of the item to
**/
//const QgsComposerItem* getComposerItemByUuid( QString theUuid, bool inAllComposers = false ) const;
const QgsComposerItem* getComposerItemByUuid( QString theUuid ) const;

int printResolution() const;
@@ -131,6 +126,13 @@ class QgsComposition : QGraphicsScene
bool printAsRaster() const;
void setPrintAsRaster( bool enabled );

/**Returns true if a composition should use advanced effects such as blend modes
@note added in 1.9*/
bool useAdvancedEffects() const;
/**Used to enable or disable advanced effects such as blend modes in a composition
@note: added in version 1.9*/
void setUseAdvancedEffects( bool effectsEnabled );

double selectionTolerance() const;
void setSelectionTolerance( double tol );

@@ -167,11 +169,12 @@ class QgsComposition : QGraphicsScene
@param mapsToRestore for reading from project file: set preview move 'rectangle' to all maps and save the preview states to show composer maps on demand
@param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
@param pos item position. Optional, take position from xml if 0
@param pasteInPlace whether the position should be kept but mapped to the page origin. (the page is the page under to the mouse cursor)
@note not available in python bindings
*/
/*
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0,
bool addUndoCommands = false, QPointF* pos = 0 );
bool addUndoCommands = false, QPointF* pos = 0, bool pasteInPlace = false );
*/

/**Adds item to z list. Usually called from constructor of QgsComposerItem*/
@@ -204,6 +207,34 @@ class QgsComposition : QGraphicsScene
/**Snaps a scene coordinate point to grid*/
QPointF snapPointToGrid( const QPointF& scenePoint ) const;

/**Snaps item position to align with other items (left / middle / right or top / middle / bottom
@param item current item
@param alignX x-coordinate of align or -1 if not aligned to x
@param alignY y-coordinate of align or -1 if not aligned to y
@param dx item shift in x direction
@param dy item shift in y direction
@return new upper left point after the align*/
QPointF alignItem( const QgsComposerItem* item, double& alignX, double& alignY, double dx = 0, double dy = 0 );

/**Snaps position to align with the boundaries of other items
@param pos position to snap
@param excludeItem item to exclude
@param alignX snapped x coordinate or -1 if not snapped
@param alignY snapped y coordinate or -1 if not snapped
@return snapped position or original position if no snap*/
QPointF alignPos( const QPointF& pos, const QgsComposerItem* excludeItem, double& alignX, double& alignY );

/**Add a custom snap line (can be horizontal or vertical)*/
QGraphicsLineItem* addSnapLine();
/**Remove custom snap line (and delete the object)*/
void removeSnapLine( QGraphicsLineItem* line );
/**Get nearest snap line
* @note not availabel in python bindings
*/
// QGraphicsLineItem* nearestSnapLine( bool horizontal, double x, double y, double tolerance, QList< QPair< QgsComposerItem*, QgsComposerItem::ItemPositionMode > >& snappedItems );
/**Hides / shows custom snap lines*/
void setSnapLinesVisible( bool visible );

/**Allocates new item command and saves initial state in it
@param item target item
@param commandText descriptive command text
@@ -222,7 +253,8 @@ class QgsComposition : QGraphicsScene
void addMultiFrame( QgsComposerMultiFrame* multiFrame );
/**Removes multi frame (but does not delete it)*/
void removeMultiFrame( QgsComposerMultiFrame* multiFrame );
/**Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal)*/
/**Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal)
@note not available in python bindings*/
void addComposerArrow( QgsComposerArrow* arrow );
/**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/
void addComposerLabel( QgsComposerLabel* label );

0 comments on commit 3854086

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