Skip to content

Commit

Permalink
sip update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 3, 2015
1 parent 932baa9 commit abd4a04
Show file tree
Hide file tree
Showing 126 changed files with 689 additions and 239 deletions.
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposerattributetablemodel.sip
Expand Up @@ -40,7 +40,7 @@ class QgsComposerAttributeTableColumnModel: QAbstractTableModel
* @param direction direction to move the attribute table column
* @note added in 2.3
*/
bool moveRow( int row , ShiftDirection direction );
bool moveRow( int row, ShiftDirection direction );

/**Resets the attribute table's columns to match the source layer's fields. Remove all existing
* attribute table columns and column customisations.
Expand Down
3 changes: 1 addition & 2 deletions python/core/composer/qgscomposerattributetablemodelv2.sip
Expand Up @@ -15,7 +15,6 @@ class QgsComposerAttributeTableColumnModelV2: QAbstractTableModel
ShiftDown /*!< shift the row/column down */
};

/**Constructor for QgsComposerAttributeTableColumnModel.
/**Constructor for QgsComposerAttributeTableColumnModel.
* @param composerTable QgsComposerAttributeTable the model is attached to
* @param parent optional parent
Expand All @@ -41,7 +40,7 @@ class QgsComposerAttributeTableColumnModelV2: QAbstractTableModel
* @param direction direction to move the attribute table column
* @note added in 2.3
*/
bool moveRow( int row , ShiftDirection direction );
bool moveRow( int row, ShiftDirection direction );

/**Resets the attribute table's columns to match the source layer's fields. Remove all existing
* attribute table columns and column customisations.
Expand Down
7 changes: 4 additions & 3 deletions python/core/composer/qgscomposerattributetablev2.sip
Expand Up @@ -7,9 +7,7 @@ class QgsComposerAttributeTableCompareV2
%End

public:

QgsComposerAttributeTableCompareV2();

bool operator()( const QgsComposerTableRow& m1, const QgsComposerTableRow& m2 );

/**Sets column number to sort by
Expand All @@ -24,6 +22,7 @@ class QgsComposerAttributeTableCompareV2

};


/**A table that displays attributes from a vector layer*/
class QgsComposerAttributeTableV2 : QgsComposerTableV2
{
Expand All @@ -50,13 +49,15 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
/**Writes properties specific to attribute tables
* @param elem an existing QDomElement in which to store the attribute table's properties.
* @param doc QDomDocument for the destination xml.
* @param ignoreFrames ignore frames
* @see readXML
*/
virtual bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;

/**Reads the properties specific to an attribute table from xml.
* @param itemElem a QDomElement holding the attribute table's desired properties.
* @param doc QDomDocument for the source xml.
* @param ignoreFrames ignore frames
* @see writeXML
*/
virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
Expand Down Expand Up @@ -248,7 +249,7 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
//QList<QPair<int, bool> > sortAttributes() const;

/**Queries the attribute table's vector layer for attributes to show in the table.
* @param attributeMaps list of QgsAttributeMaps where the fetched feature attributes will be stored
* @param contents table content
* @returns true if attributes were successfully fetched
* @note not available in python bindings
*/
Expand Down
3 changes: 2 additions & 1 deletion python/core/composer/qgscomposerframe.sip
Expand Up @@ -5,8 +5,9 @@ class QgsComposerFrame: QgsComposerItem
#include "qgscomposerframe.h"
%End

public:
public:
QgsComposerFrame( QgsComposition* c /TransferThis/, QgsComposerMultiFrame* mf, qreal x, qreal y, qreal width, qreal height );

~QgsComposerFrame();

/**Sets the visible part of the multiframe's content which is visible within
Expand Down
4 changes: 3 additions & 1 deletion python/core/composer/qgscomposerhtml.sip
Expand Up @@ -15,7 +15,10 @@ class QgsComposerHtml: QgsComposerMultiFrame
};

QgsComposerHtml( QgsComposition* c /TransferThis/, bool createUndoCommands );

//should be private - fix for QGIS 3.0
QgsComposerHtml();

~QgsComposerHtml();

/**Sets the source mode for item's HTML content.
Expand Down Expand Up @@ -192,7 +195,6 @@ class QgsComposerHtml: QgsComposerMultiFrame

/**Recalculates the frame sizes for the current viewport dimensions*/
void recalculateFrameSizes();

void refreshExpressionContext();

virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
Expand Down
6 changes: 3 additions & 3 deletions python/core/composer/qgscomposeritem.sip
Expand Up @@ -507,7 +507,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
/**Returns a font where size is in pixel and font size is upscaled with FONT_WORKAROUND_SCALE
* @deprecated use QgsComposerUtils::scaledFontPixelSize instead
*/
QFont scaledFontPixelSize( const QFont& font ) const;
QFont scaledFontPixelSize( const QFont& font ) const /Deprecated/;

/**Locks / unlocks the item position for mouse drags
* @param lock set to true to prevent item movement and resizing via the mouse
Expand Down Expand Up @@ -672,10 +672,10 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
/**Draws arrowhead
* @deprecated use QgsComposerUtils::drawArrowHead instead
*/
void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const;
void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const /Deprecated/;

/**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
double angle( const QPointF& p1, const QPointF& p2 ) const;
double angle( const QPointF& p1, const QPointF& p2 ) const /Deprecated/;

/**Returns the current (zoom level dependent) tolerance to decide if mouse position is close enough to the
item border for resizing*/
Expand Down
5 changes: 3 additions & 2 deletions python/core/composer/qgscomposeritemcommand.sip
Expand Up @@ -28,7 +28,7 @@ class QgsComposerItemCommand: QUndoCommand
/**Returns the target item the command applies to.
* @returns target composer item
*/
QgsComposerItem* item() const;
QgsComposerItem *item() const;

protected:
void saveState( QDomDocument& stateDoc ) const;
Expand Down Expand Up @@ -94,7 +94,8 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
ItemOutlineWidth,
ItemMove,
ItemRotation,
ItemTransparency
ItemTransparency,
ItemZoomContent
};

QgsComposerMergeCommand( Context c, QgsComposerItem* item, const QString& text );
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposeritemgroup.sip
Expand Up @@ -7,7 +7,7 @@ class QgsComposerItemGroup: QgsComposerItem
QgsComposerItemGroup( QgsComposition* c /TransferThis/ );
~QgsComposerItemGroup();

/** return correct graphics item type. Added in v1.7 */
/** return correct graphics item type. */
virtual int type() const;

/**Adds an item to the group. All the group members are deleted
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposermap.sip
Expand Up @@ -521,7 +521,7 @@ class QgsComposerMap : QgsComposerItem
*/
QgsComposerMapGrid* grid();

/**Returns the map item's overview stack, which is used to control how over
/**Returns the map item's overview stack, which is used to control how overviews
* are drawn over the map's contents.
* @returns pointer to overview stack
* @see overview()
Expand Down
8 changes: 7 additions & 1 deletion python/core/composer/qgscomposermapgrid.sip
Expand Up @@ -105,6 +105,10 @@ class QgsComposerMapGridStack : QgsComposerMapItemStack

};

//
// QgsComposerMapGrid
//

/**\ingroup MapComposer
* \class QgsComposerMapGrid
* \brief An individual grid which is drawn above the map content in a
Expand Down Expand Up @@ -226,7 +230,7 @@ class QgsComposerMapGrid : QgsComposerMapItem

/**Constructor for QgsComposerMapGrid.
* @param name friendly display name for grid
* @parm map QgsComposerMap the grid stack is attached to
* @param map QgsComposerMap the grid is attached to
*/
QgsComposerMapGrid( const QString& name, QgsComposerMap* map );

Expand Down Expand Up @@ -275,6 +279,8 @@ class QgsComposerMapGrid : QgsComposerMapItem
*/
QPainter::CompositionMode blendMode() const;

bool usesAdvancedEffects() const;

/**Calculates the maximum distance the grid extends beyond the QgsComposerMap's
* item rect
* @returns maximum extension in millimetres
Expand Down
5 changes: 3 additions & 2 deletions python/core/composer/qgscomposermapitem.sip
Expand Up @@ -86,6 +86,7 @@ class QgsComposerMapItem : QgsComposerObject
};



/**\ingroup MapComposer
* \class QgsComposerMapItemStack
* \brief A collection of map items which are drawn above the map content in a
Expand Down Expand Up @@ -154,7 +155,7 @@ class QgsComposerMapItemStack
void addItem( QgsComposerMapItem* item /Transfer/);

/**Removes an item from the stack and deletes the corresponding QgsComposerMapItem
* @param QgsComposerMapItem id for the QgsComposerMapItem to remove
* @param itemId id for the QgsComposerMapItem to remove
* @note after removing an item from the stack, update()
* should be called for the QgsComposerMap to prevent rendering artifacts
* @see addItem
Expand Down Expand Up @@ -205,7 +206,7 @@ class QgsComposerMapItemStack
* @see item
* @note not available in python bindings
*/
//QgsComposerMapItem &operator[]( int idx );
// QgsComposerMapItem &operator[]( int idx );

/**Returns a list of QgsComposerMapItems contained by the stack
* @returns list of items
Expand Down
3 changes: 1 addition & 2 deletions python/core/composer/qgscomposermapoverview.sip
Expand Up @@ -98,7 +98,6 @@ class QgsComposerMapOverviewStack : QgsComposerMapItemStack

};


/**\ingroup MapComposer
* \class QgsComposerMapOverview
* \brief An individual overview which is drawn above the map content in a
Expand Down Expand Up @@ -173,7 +172,7 @@ class QgsComposerMapOverview : QgsComposerMapItem
QPainter::CompositionMode blendMode() const;

/**Sets the blending mode used for drawing the overview.
* @param mode blending mode for overview
* @param blendMode blending mode for overview
* @see blendMode
*/
void setBlendMode( const QPainter::CompositionMode blendMode );
Expand Down
20 changes: 19 additions & 1 deletion python/core/composer/qgscomposermodel.sip
Expand Up @@ -24,7 +24,8 @@ class QgsComposerModel : QAbstractItemModel
public:

/**Constructor
* @param composition parent composition
* @param composition composition to attach to
* @param parent parent object
*/
explicit QgsComposerModel( QgsComposition* composition, QObject* parent = 0 );

Expand All @@ -39,6 +40,11 @@ class QgsComposerModel : QAbstractItemModel
Qt::ItemFlags flags( const QModelIndex & index ) const;
bool setData( const QModelIndex & index, const QVariant & value, int role );
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
Qt::DropActions supportedDropActions() const;
virtual QStringList mimeTypes() const;
virtual QMimeData* mimeData( const QModelIndexList &indexes ) const;
bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
bool removeRows( int row, int count, const QModelIndex & parent = QModelIndex() );

/**Clears all items from z-order list and resets the model
* @note added in QGIS 2.5
Expand Down Expand Up @@ -164,6 +170,7 @@ class QgsComposerModel : QAbstractItemModel
* @param item item to update
* @see updateItemLockStatus
* @see updateItemVisibility
* @see updateItemSelectStatus
* @note added in QGIS 2.5
*/
void updateItemDisplayName( QgsComposerItem *item );
Expand All @@ -172,6 +179,7 @@ class QgsComposerModel : QAbstractItemModel
* @param item item to update
* @see updateItemDisplayName
* @see updateItemVisibility
* @see updateItemSelectStatus
* @note added in QGIS 2.5
*/
void updateItemLockStatus( QgsComposerItem *item );
Expand All @@ -180,10 +188,20 @@ class QgsComposerModel : QAbstractItemModel
* @param item item to update
* @see updateItemDisplayName
* @see updateItemLockStatus
* @see updateItemSelectStatus
* @note added in QGIS 2.5
*/
void updateItemVisibility( QgsComposerItem *item );

/**Must be called when an item's selection status changes
* @param item item to update
* @see updateItemDisplayName
* @see updateItemVisibility
* @see updateItemLockStatus
* @note added in QGIS 2.5
*/
void updateItemSelectStatus( QgsComposerItem *item );

public slots:

/**Sets an item as the current selection from a QModelIndex
Expand Down
1 change: 0 additions & 1 deletion python/core/composer/qgscomposermultiframecommand.sip
Expand Up @@ -29,7 +29,6 @@ class QgsComposerMultiFrameCommand : QUndoCommand
bool checkFirstRun();
};


/**A composer command that merges together with other commands having the same context (=id)
* for multi frame items. Keeps the oldest previous state and uses the newest after state.
* The purpose is to avoid too many micro changes in the history*/
Expand Down
10 changes: 6 additions & 4 deletions python/core/composer/qgscomposerobject.sip
Expand Up @@ -15,6 +15,7 @@ class QgsComposerObject : QObject
{
NoProperty = 0, /*< no property */
AllProperties, /*< all properties for item */
TestProperty, /*< dummy property with no effect on item*/
//composer page properties
PresetPaperSize, /*< preset paper size for composition */
PaperWidth, /*< paper width */
Expand All @@ -40,7 +41,9 @@ class QgsComposerObject : QObject
MapYMax, /*< map extent y maximum */
MapAtlasMargin, /*< map atlas margin*/
//composer picture
PictureSource /*< picture source url */
PictureSource, /*< picture source url */
//html item
SourceUrl /*< html source url */
};

/** Specifies whether the value returned by a function should be the original, user
Expand All @@ -57,7 +60,6 @@ class QgsComposerObject : QObject
* @param composition parent composition
*/
QgsComposerObject( QgsComposition* composition );

virtual ~QgsComposerObject();

/**Returns the composition the item is attached to.
Expand All @@ -66,7 +68,7 @@ class QgsComposerObject : QObject
const QgsComposition* composition() const;

/**Stores item state in DOM element
* @param elem is DOM element corresponding to 'Composer' tag
* @param elem is DOM element corresponding to item tag
* @param doc is the DOM document
*/
virtual bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
Expand All @@ -88,7 +90,7 @@ class QgsComposerObject : QObject
* @param active true if data defined property is active, false if it is disabled
* @param useExpression true if the expression should be used
* @param expression expression for data defined property
* @field field name if the data defined property should take its value from a field
* @param field field name if the data defined property should take its value from a field
* @note this method was added in version 2.5
*/
void setDataDefinedProperty( const DataDefinedProperty property, const bool active, const bool useExpression, const QString &expression, const QString &field );
Expand Down
7 changes: 4 additions & 3 deletions python/core/composer/qgscomposerpicture.sip
Expand Up @@ -33,7 +33,7 @@ class QgsComposerPicture: QgsComposerItem
QgsComposerPicture( QgsComposition *composition /TransferThis/);
~QgsComposerPicture();

/** return correct graphics item type. Added in v1.7 */
/** return correct graphics item type. */
virtual int type() const;

/**Reimplementation of QCanvasItem::paint*/
Expand All @@ -57,7 +57,7 @@ class QgsComposerPicture: QgsComposerItem
*/
QString pictureFile() const /Deprecated/;

/**Sets the source path of the image (may be svg or a raster format). Data defined
/**Sets the source path of the image (may be svg or a raster format). Data defined
* picture source may override this value. The path can either be a local path
* or a remote (http) path.
* @param path path for the source image
Expand All @@ -76,7 +76,6 @@ class QgsComposerPicture: QgsComposerItem
*/
QString picturePath() const;


/**Sets this items bound in scene coordinates such that 1 item size units
* corresponds to 1 scene size unit and resizes the svg symbol / image
*/
Expand Down Expand Up @@ -263,6 +262,8 @@ class QgsComposerPicture: QgsComposerItem
*/
void recalculateSize();

virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );

signals:
/**Is emitted on picture rotation change*/
void pictureRotationChanged( double newRotation );
Expand Down
4 changes: 1 addition & 3 deletions python/core/composer/qgscomposertable.sip
Expand Up @@ -20,7 +20,7 @@ class QgsComposerTable: QgsComposerItem
QgsComposerTable( QgsComposition* composition /TransferThis/ );
virtual ~QgsComposerTable();

/** return correct graphics item type. Added in v1.7 */
/** return correct graphics item type. */
virtual int type() const;

/** \brief Reimplementation of QCanvasItem::paint*/
Expand Down Expand Up @@ -219,8 +219,6 @@ class QgsComposerTable: QgsComposerItem
virtual void adjustFrameToSize();

protected:
/**Retrieves feature attributes*/
// virtual bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps );
/**Calculates the maximum width of text shown in columns.
* @param maxWidthMap QMap of int to double in which to store the maximum widths. The int will be filled
* with the column number and the double with the maximum width of text present in the column.
Expand Down

0 comments on commit abd4a04

Please sign in to comment.