mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-18 00:04:02 -04:00
sync some sip bindings
This commit is contained in:
parent
b66ee237ef
commit
bbdf7cd220
@ -12,7 +12,7 @@ class QgsComposerAttributeTableCompare
|
||||
public:
|
||||
QgsComposerAttributeTableCompare();
|
||||
// bool operator()( const QgsAttributeMap& m1, const QgsAttributeMap& m2 );
|
||||
|
||||
|
||||
/**Sets column number to sort by
|
||||
* @param col column number for sorting
|
||||
*/
|
||||
@ -47,7 +47,7 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @see readXML
|
||||
*/
|
||||
bool writeXML( QDomElement& elem, QDomDocument & doc ) 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.
|
||||
@ -60,13 +60,13 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @see vectorLayer
|
||||
*/
|
||||
void setVectorLayer( QgsVectorLayer* layer );
|
||||
|
||||
|
||||
/**Returns the vector layer the attribute table is currently using
|
||||
* @returns attribute table's current vector layer
|
||||
* @see setVectorLayer
|
||||
*/
|
||||
QgsVectorLayer* vectorLayer() const;
|
||||
|
||||
|
||||
/**Resets the attribute table's columns to match the vector layer's fields
|
||||
* @note added in 2.3
|
||||
* @see setVectorLayer
|
||||
@ -83,13 +83,13 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @see setDisplayOnlyVisibleFeatures
|
||||
*/
|
||||
void setComposerMap( const QgsComposerMap* map /TransferThis/ );
|
||||
|
||||
|
||||
/**Returns the composer map whose extents are controlling the features shown in the
|
||||
* table. The extents of the map are only used if displayOnlyVisibleFeatures() is true.
|
||||
* @returns composer map controlling the attribute table
|
||||
* @see setComposerMap
|
||||
* @see displayOnlyVisibleFeatures
|
||||
*/
|
||||
*/
|
||||
const QgsComposerMap* composerMap() const;
|
||||
|
||||
/**Sets the maximum number of features shown by the table. Changing this setting may result
|
||||
@ -99,11 +99,11 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @see maximumNumberOfFeatures
|
||||
*/
|
||||
void setMaximumNumberOfFeatures( int features );
|
||||
|
||||
|
||||
/**Returns the maximum number of features to be shown by the table.
|
||||
* @returns maximum number of features
|
||||
* @see setMaximumNumberOfFeatures
|
||||
*/
|
||||
*/
|
||||
int maximumNumberOfFeatures() const;
|
||||
|
||||
/**Sets attribute table to only show features which are visible in a composer map item. Changing
|
||||
@ -114,15 +114,15 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @see setComposerMap
|
||||
*/
|
||||
void setDisplayOnlyVisibleFeatures( bool b );
|
||||
|
||||
|
||||
/**Returns true if the table is set to show only features visible on a corresponding
|
||||
* composer map item.
|
||||
* @returns true if table only shows visible features
|
||||
* @see composerMap
|
||||
* @see setDisplayOnlyVisibleFeatures
|
||||
*/
|
||||
*/
|
||||
bool displayOnlyVisibleFeatures() const;
|
||||
|
||||
|
||||
/**Returns true if a feature filter is active on the attribute table
|
||||
* @returns bool state of the feature filter
|
||||
* @note added in 2.3
|
||||
@ -130,7 +130,7 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @see featureFilter
|
||||
*/
|
||||
bool filterFeatures() const;
|
||||
|
||||
|
||||
/**Sets whether the feature filter is active for the attribute table. Changing
|
||||
* this setting forces the table to refetch features from its vector layer, and may result in
|
||||
* the table changing size to accommodate the new displayed feature attributes.
|
||||
@ -149,7 +149,7 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @see filterFeatures
|
||||
*/
|
||||
QString featureFilter() const;
|
||||
|
||||
|
||||
/**Sets the expression used for filtering features in the table. The filter is only
|
||||
* active if filterFeatures() is set to true. Changing this setting forces the table
|
||||
* to refetch features from its vector layer, and may result in
|
||||
@ -168,7 +168,7 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @deprecated use QgsComposerTable::columns() instead
|
||||
*/
|
||||
QSet<int> displayAttributes() const /Deprecated/;
|
||||
|
||||
|
||||
/**Sets the attributes to display in the table.
|
||||
* @param attr QSet of integer values refering to the attributes from the vector layer to show.
|
||||
* Set to an empty QSet to show all feature attributes.
|
||||
@ -176,7 +176,7 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* and immediately update the display of the table. This may result in the table changing size
|
||||
* to accommodate the new displayed feature attributes.
|
||||
* @see displayAttributes
|
||||
*/
|
||||
*/
|
||||
void setDisplayAttributes( const QSet<int>& attr );
|
||||
|
||||
/**Returns the attribute field aliases, which control how fields are named in the table's
|
||||
@ -187,14 +187,14 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
* @deprecated use QgsComposerTable::columns() instead
|
||||
*/
|
||||
QMap<int, QString> fieldAliasMap() const /Deprecated/;
|
||||
|
||||
|
||||
/**Sets the attribute field aliases, which control how fields are named in the table's
|
||||
* header row.
|
||||
* @param map QMap of integers to strings, where the string is the alias to use for the
|
||||
* corresponding field, and the integer is the field index from the vector layer
|
||||
* @see fieldAliasMap
|
||||
* @deprecated use QgsComposerTable::columns() instead
|
||||
*/
|
||||
*/
|
||||
void setFieldAliasMap( const QMap<int, QString>& map ) /Deprecated/;
|
||||
|
||||
/**Adapts mMaximumNumberOfFeatures depending on the rectangle height. Calling this forces
|
||||
@ -205,12 +205,34 @@ class QgsComposerAttributeTable : QgsComposerTable
|
||||
*/
|
||||
void setSceneRect( const QRectF& rectangle );
|
||||
|
||||
// @note not available in python bindings
|
||||
// void setSortAttributes( const QList<QPair<int, bool> > att );
|
||||
/**Sets the attributes to use to sort the table's features.
|
||||
* @param att QList integers/bool pairs, where the integer refers to the attribute index and
|
||||
* the bool sets the sort order for the attribute. If true the attribute is sorted ascending,
|
||||
* if false, the attribute is sorted in descending order. Note that features are sorted
|
||||
* after the maximum number of displayed features have been fetched from the vector layer's
|
||||
* provider.
|
||||
* @see sortAttributes
|
||||
* @deprecated use QgsComposerTable::columns() instead
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// void setSortAttributes( const QList<QPair<int, bool> > att ) /Deprecated/;
|
||||
|
||||
// @note not available in python bindings
|
||||
/**Returns the attributes used to sort the table's features.
|
||||
* @returns a QList of integer/bool pairs, where the integer refers to the attribute index and
|
||||
* the bool to the sort order for the attribute. If true the attribute is sorted ascending,
|
||||
* if false, the attribute is sorted in descending order.
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// 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
|
||||
* @returns true if attributes were successfully fetched
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps );
|
||||
|
||||
|
||||
signals:
|
||||
/**This signal is emitted if the maximum number of feature changes (interactively)*/
|
||||
void maximumNumberOfFeaturesChanged( int n );
|
||||
|
@ -5,7 +5,7 @@ class QgsComposerAttributeTableColumnModel: QAbstractTableModel
|
||||
#include <qgscomposerattributetablemodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
/*! Controls whether a row/column is shifted up or down
|
||||
*/
|
||||
@ -17,6 +17,7 @@ class QgsComposerAttributeTableColumnModel: QAbstractTableModel
|
||||
|
||||
/**Constructor for QgsComposerAttributeTableColumnModel.
|
||||
* @param composerTable QgsComposerAttributeTable the model is attached to
|
||||
* @param parent optional parent
|
||||
*/
|
||||
QgsComposerAttributeTableColumnModel( QgsComposerAttributeTable *composerTable, QObject *parent = 0 );
|
||||
virtual ~QgsComposerAttributeTableColumnModel();
|
||||
@ -30,6 +31,7 @@ class QgsComposerAttributeTableColumnModel: QAbstractTableModel
|
||||
bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );
|
||||
bool insertRows( int row, int count, const QModelIndex &parent = QModelIndex() );
|
||||
QModelIndex index( int row, int column, const QModelIndex &parent ) const;
|
||||
QModelIndex parent( const QModelIndex &child ) const;
|
||||
|
||||
/**Moves the specified row up or down in the model. Used for rearranging the attribute tables
|
||||
* columns.
|
||||
@ -87,7 +89,7 @@ class QgsComposerAttributeTableColumnModel: QAbstractTableModel
|
||||
* @see setColumnAsSorted
|
||||
*/
|
||||
bool moveColumnInSortRank( QgsComposerTableColumn * column, ShiftDirection direction );
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**Allows for filtering QgsComposerAttributeTable columns by columns which are sorted or unsorted*/
|
||||
@ -98,7 +100,8 @@ class QgsComposerTableSortColumnsProxyModel : QSortFilterProxyModel
|
||||
%End
|
||||
|
||||
public:
|
||||
/*! Controls whether the proxy model shows sorted or unsorted columns
|
||||
|
||||
/*! Controls whether the proxy model shows sorted or unsorted columns
|
||||
*/
|
||||
enum ColumnFilterType
|
||||
{
|
||||
@ -109,6 +112,7 @@ class QgsComposerTableSortColumnsProxyModel : QSortFilterProxyModel
|
||||
/**Constructor for QgsComposerTableSortColumnsProxyModel.
|
||||
* @param composerTable QgsComposerAttributeTable the model is attached to
|
||||
* @param filterType filter for columns, controls whether sorted or unsorted columns are shown
|
||||
* @param parent optional parent
|
||||
*/
|
||||
QgsComposerTableSortColumnsProxyModel( QgsComposerAttributeTable *composerTable, ColumnFilterType filterType, QObject *parent = 0 );
|
||||
|
||||
@ -142,7 +146,7 @@ class QgsComposerTableSortColumnsProxyModel : QSortFilterProxyModel
|
||||
/**Returns the QgsComposerTableColumn corresponding to an index from the source
|
||||
* QgsComposerAttributeTableColumnModel model.
|
||||
* @returns QgsComposerTableColumn for specified index from QgsComposerAttributeTableColumnModel
|
||||
* @param index a QModelIndex
|
||||
* @param sourceIndex a QModelIndex
|
||||
* @note added in 2.3
|
||||
* @see columnFromRow
|
||||
* @see columnFromIndex
|
||||
@ -150,7 +154,6 @@ class QgsComposerTableSortColumnsProxyModel : QSortFilterProxyModel
|
||||
QgsComposerTableColumn* columnFromSourceIndex( const QModelIndex& sourceIndex ) const;
|
||||
|
||||
protected:
|
||||
|
||||
bool filterAcceptsRow( int source_row, const QModelIndex & source_parent ) const;
|
||||
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ class QgsComposerPicture: QgsComposerItem
|
||||
ZoomResizeFrame, /*!< enlarges image to fit frame, then resizes frame to fit resultant image */
|
||||
FrameToImageSize /*!< sets size of frame to match original size of image without scaling */
|
||||
};
|
||||
|
||||
|
||||
/*! Format of source image
|
||||
*/
|
||||
enum Mode
|
||||
@ -28,8 +28,8 @@ class QgsComposerPicture: QgsComposerItem
|
||||
SVG,
|
||||
RASTER,
|
||||
Unknown
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
QgsComposerPicture( QgsComposition *composition /TransferThis/);
|
||||
~QgsComposerPicture();
|
||||
|
||||
@ -46,7 +46,7 @@ class QgsComposerPicture: QgsComposerItem
|
||||
* @see pictureFile
|
||||
*/
|
||||
void setPictureFile( const QString& path );
|
||||
|
||||
|
||||
/**Returns the path of the source image file. This is only used if
|
||||
* usePictureExpression() is false.
|
||||
* @returns path to the source image
|
||||
@ -84,39 +84,40 @@ class QgsComposerPicture: QgsComposerItem
|
||||
*/
|
||||
double pictureRotation() const;
|
||||
|
||||
/**Sets the map object for rotation (by id). A value of -1 disables the map rotation.
|
||||
* If this is set then the picture will be rotated by the same amount as the specified
|
||||
* map object. This is useful especially for syncing north arrows with a map item.
|
||||
* @param id composer map id to sync rotation with
|
||||
/**Sets the map object for rotation (by id). A value of -1 disables the map
|
||||
* rotation. If this is set then the picture will be rotated by the same
|
||||
* amount as the specified map object. This is useful especially for
|
||||
* syncing north arrows with a map item.
|
||||
* @param composerMapId composer map id to sync rotation with
|
||||
* @see setPictureRotation
|
||||
* @see rotationMap
|
||||
*/
|
||||
*/
|
||||
void setRotationMap( int composerMapId );
|
||||
|
||||
/**Returns the id of the rotation map. A value of -1 means map rotation is disabled.
|
||||
* If this is set then the picture is rotated by the same amount as the specified
|
||||
* map object.
|
||||
|
||||
/**Returns the id of the rotation map. A value of -1 means map rotation is
|
||||
* disabled. If this is set then the picture is rotated by the same amount
|
||||
* as the specified map object.
|
||||
* @returns id of map object
|
||||
* @see setRotationMap
|
||||
* @see useRotationMap
|
||||
*/
|
||||
*/
|
||||
int rotationMap() const;
|
||||
|
||||
|
||||
/**True if the picture rotation is matched to a map item.
|
||||
* @returns true if rotation map is in use
|
||||
* @see rotationMap
|
||||
* @see setRotationMap
|
||||
*/
|
||||
bool useRotationMap() const;
|
||||
|
||||
/**Returns the resize mode used for drawing the picture within the composer item's
|
||||
* frame.
|
||||
|
||||
/**Returns the resize mode used for drawing the picture within the composer
|
||||
* item's frame.
|
||||
* @returns resize mode of picture
|
||||
* @note added in 2.3
|
||||
* @see setResizeMode
|
||||
*/
|
||||
*/
|
||||
ResizeMode resizeMode() const;
|
||||
|
||||
|
||||
/**Sets the picture's anchor point, which controls how it is placed
|
||||
* within the picture item's frame.
|
||||
* @param anchor anchor point for picture
|
||||
@ -131,8 +132,8 @@ class QgsComposerPicture: QgsComposerItem
|
||||
* @note added in 2.3
|
||||
* @see setPictureAnchor
|
||||
*/
|
||||
ItemPositionMode pictureAnchor() const;
|
||||
|
||||
ItemPositionMode pictureAnchor() const;
|
||||
|
||||
/**Returns whether the picture item is using an expression for the image source.
|
||||
* @returns true if the picture is using an expression for the source, false if
|
||||
* it is using a single static file path for the source.
|
||||
@ -142,7 +143,7 @@ class QgsComposerPicture: QgsComposerItem
|
||||
* @see pictureExpression
|
||||
*/
|
||||
bool usePictureExpression() const;
|
||||
|
||||
|
||||
/**Returns the expression the item is using for the picture source. This is only
|
||||
* used if usePictureExpression() is true.
|
||||
* @returns expression for the picture item's image path
|
||||
@ -150,7 +151,7 @@ class QgsComposerPicture: QgsComposerItem
|
||||
* @see setPictureExpression
|
||||
* @see usePictureExpression
|
||||
*/
|
||||
QString pictureExpression() const;
|
||||
QString pictureExpression() const;
|
||||
|
||||
/**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation
|
||||
* @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation )
|
||||
@ -163,37 +164,37 @@ class QgsComposerPicture: QgsComposerItem
|
||||
*/
|
||||
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;
|
||||
/**Calculates width / height of the bounding box of a rotated rectangle
|
||||
* @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation )
|
||||
* instead
|
||||
*/
|
||||
* @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation )
|
||||
* instead
|
||||
*/
|
||||
void sizeChangedByRotation( double& width, double& height ) /Deprecated/;
|
||||
|
||||
|
||||
/**Returns the current picture mode (image format).
|
||||
* @returns picture mode
|
||||
* @note added in 2.3
|
||||
*/
|
||||
Mode mode() const;
|
||||
*/
|
||||
Mode mode() const;
|
||||
|
||||
public slots:
|
||||
/**Sets the picture rotation within the item bounds. This does not affect the item rectangle,
|
||||
only the way the picture is drawn within the item.
|
||||
/**Sets the picture rotation within the item bounds. This does not affect
|
||||
* the item rectangle, only the way the picture is drawn within the item.
|
||||
* @deprecated Use setPictureRotation( double rotation ) instead
|
||||
*/
|
||||
virtual void setRotation( double r ) /Deprecated/;
|
||||
|
||||
/**Sets the picture rotation within the item bounds. This does not affect the item's frame,
|
||||
* only the way the picture is drawn within the item.
|
||||
/**Sets the picture rotation within the item bounds. This does not affect
|
||||
* the item's frame, only the way the picture is drawn within the item.
|
||||
* @param r rotation in degrees clockwise
|
||||
* @see pictureRotation
|
||||
* @note added in 2.2
|
||||
*/
|
||||
*/
|
||||
virtual void setPictureRotation( double r );
|
||||
|
||||
|
||||
/**Sets the resize mode used for drawing the picture within the item bounds.
|
||||
* @param mode ResizeMode to use for image file
|
||||
* @note added in 2.3
|
||||
* @see resizeMode
|
||||
*/
|
||||
*/
|
||||
virtual void setResizeMode( ResizeMode mode );
|
||||
|
||||
/**Sets whether the picture should use an expression based image source path
|
||||
@ -203,7 +204,7 @@ class QgsComposerPicture: QgsComposerItem
|
||||
* @see usePictureExpression
|
||||
* @see setPictureFile
|
||||
* @see setPictureExpression
|
||||
*/
|
||||
*/
|
||||
virtual void setUsePictureExpression( bool useExpression );
|
||||
|
||||
/**Sets an expression to use for the picture source. This expression is only
|
||||
@ -212,25 +213,25 @@ class QgsComposerPicture: QgsComposerItem
|
||||
* @note added in 2.3
|
||||
* @see setUsePictureExpression
|
||||
* @see pictureExpression
|
||||
*/
|
||||
*/
|
||||
virtual void setPictureExpression( QString expression );
|
||||
|
||||
/**Recalculates the source image (if using an expression for picture's source)
|
||||
* and reloads and redraws the picture.
|
||||
* @note added in 2.3
|
||||
*/
|
||||
*/
|
||||
void refreshPicture();
|
||||
|
||||
/**Prepares the picture's source expression after it is altered or the compositions
|
||||
* atlas coverage layer changes.
|
||||
* @note added in 2.3
|
||||
*/
|
||||
*/
|
||||
void updatePictureExpression();
|
||||
|
||||
/**Forces a recalculation of the picture's frame size
|
||||
* @note added in 2.3
|
||||
*/
|
||||
void recalculateSize();
|
||||
*/
|
||||
void recalculateSize();
|
||||
|
||||
signals:
|
||||
/**Is emitted on picture rotation change*/
|
||||
|
@ -6,7 +6,7 @@ class QgsComposerTable: QgsComposerItem
|
||||
%End
|
||||
|
||||
public:
|
||||
|
||||
|
||||
/*! Controls how headers are horizontally aligned in a table
|
||||
*/
|
||||
enum HeaderHAlignment
|
||||
@ -16,7 +16,7 @@ class QgsComposerTable: QgsComposerItem
|
||||
HeaderCenter, /*!< align headers to center */
|
||||
HeaderRight /*!< align headers right */
|
||||
};
|
||||
|
||||
|
||||
QgsComposerTable( QgsComposition* composition /TransferThis/ );
|
||||
virtual ~QgsComposerTable();
|
||||
|
||||
@ -34,7 +34,7 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @see lineTextDistance
|
||||
*/
|
||||
void setLineTextDistance( double d );
|
||||
|
||||
|
||||
/**Returns the margin distance between cell borders and their contents.
|
||||
* @returns margin for cell contents
|
||||
* @see setLineTextDistance
|
||||
@ -47,14 +47,14 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @see setContentFont
|
||||
*/
|
||||
void setHeaderFont( const QFont& f );
|
||||
|
||||
|
||||
/**Returns the font used to draw header text in the table.
|
||||
* @returns font for header cells
|
||||
* @see setHeaderFont
|
||||
* @see contentFont
|
||||
*/
|
||||
QFont headerFont() const;
|
||||
|
||||
|
||||
/**Sets the horizontal alignment for table headers
|
||||
* @param alignment Horizontal alignment for table header cells
|
||||
* @note added in 2.3
|
||||
@ -75,7 +75,7 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @see setHeaderFont
|
||||
*/
|
||||
void setContentFont( const QFont& f );
|
||||
|
||||
|
||||
/**Returns the font used to draw text in table body cells.
|
||||
* @returns font for table cells
|
||||
* @see setContentFont
|
||||
@ -90,7 +90,7 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @see setGridColor
|
||||
*/
|
||||
void setShowGrid( bool show );
|
||||
|
||||
|
||||
/**Returns whether grid lines are drawn in the table
|
||||
* @returns true if grid lines are shown
|
||||
* @see setShowGrid
|
||||
@ -106,7 +106,7 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @see setGridColor
|
||||
*/
|
||||
void setGridStrokeWidth( double w );
|
||||
|
||||
|
||||
/**Returns the width of grid lines in the table.
|
||||
* @returns grid line width
|
||||
* @see setGridStrokeWidth
|
||||
@ -122,7 +122,7 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @see setGridStrokeWidth
|
||||
*/
|
||||
void setGridColor( const QColor& c );
|
||||
|
||||
|
||||
/**Returns the color used for grid lines in the table.
|
||||
* @returns grid line color
|
||||
* @see setGridColor
|
||||
@ -130,21 +130,39 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @see gridStrokeWidth
|
||||
*/
|
||||
QColor gridColor() const;
|
||||
|
||||
|
||||
/**Returns the text used in the column headers for the table.
|
||||
* @returns QMap of int to QString, where the int is the column index (starting at 0),
|
||||
* and the string is the text to use for the column's header
|
||||
* @note added in 2.3
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// virtual QMap<int, QString> headerLabels() const;
|
||||
|
||||
//TODO - make this more generic for next API break, eg rename as getRowValues, use QStringList rather than
|
||||
//QgsAttributeMap
|
||||
|
||||
/**Fetches the text used for the rows of the table.
|
||||
* @returns true if attribute text was successfully retrieved.
|
||||
* @param attributeMaps QList of QgsAttributeMap to store retrieved row data in
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// virtual bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps ) { Q_UNUSED( attributeMaps ); return false; }
|
||||
|
||||
/**Returns a pointer to the list of QgsComposerTableColumns shown in the table
|
||||
* @returns pointer to list of columns in table
|
||||
* @note added in 2.3
|
||||
* @see setColumns
|
||||
*/
|
||||
QList<QgsComposerTableColumn*>* columns();
|
||||
|
||||
|
||||
/**Replaces the columns in the table with a specified list of QgsComposerTableColumns.
|
||||
* @param columns list of QgsComposerTableColumns to show in table
|
||||
* @note added in 2.3
|
||||
* @see columns
|
||||
*/
|
||||
void setColumns( QList<QgsComposerTableColumn*> columns );
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
/**Refreshes the attributes shown in the table by querying the vector layer for new data.
|
||||
@ -162,24 +180,44 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @note added in 2.3
|
||||
* @see refreshAttributes
|
||||
*/
|
||||
virtual void adjustFrameToSize();
|
||||
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.
|
||||
* @param attributeMaps list of attribute values for each row shown in the table
|
||||
* @note not available in python bindings
|
||||
* @see adaptItemFrame
|
||||
*/
|
||||
// virtual bool calculateMaxColumnWidths( QMap<int, double>& maxWidthMap, const QList<QgsAttributeMap>& attributeMaps ) const;
|
||||
|
||||
/**Adapts the size of the item frame to match the table's content.
|
||||
* @param maxWidthMap QMap of int to double, where the int contains the column number and the double is the
|
||||
* maximum width of text present in the column.
|
||||
* @param attributeMaps list of attribute values for each row shown in the table
|
||||
* @note not available in python bindings
|
||||
* @see calculateMaxColumnWidths
|
||||
*/
|
||||
// void adaptItemFrame( const QMap<int, double>& maxWidthMap, const QList<QgsAttributeMap>& attributeMaps );
|
||||
|
||||
/**Calculate the maximum width values of the vector attributes*/
|
||||
// virtual bool calculateMaxColumnWidths( QMap<int, double>& maxWidthMap, const QList< QMap<int, QVariant> >& attributeMaps ) const;
|
||||
/**Adapts the size of the item frame to match the content*/
|
||||
// void adaptItemFrame( const QMap<int, double>& maxWidthMap, const QList< QMap<int, QVariant> >& attributeMaps );
|
||||
|
||||
/**Draws the horizontal grid lines for the table.
|
||||
* @param p destination painter for grid lines
|
||||
* @param nAttributes number of attribute rows shown in table
|
||||
* @see drawVerticalGridLines
|
||||
*/
|
||||
*/
|
||||
void drawHorizontalGridLines( QPainter* p, int nAttributes );
|
||||
|
||||
|
||||
/**Draws the vertical grid lines for the table.
|
||||
* @param p destination painter for grid lines
|
||||
* @param maxWidthMap QMap of int to double, where the int contains the column number and the double is the
|
||||
* maximum width of text present in the column.
|
||||
* @note not available in python bindings
|
||||
* @see drawVerticalGridLines
|
||||
* @see calculateMaxColumnWidths
|
||||
*/
|
||||
// void drawVerticalGridLines( QPainter* p, const QMap<int, double>& maxWidthMap );
|
||||
|
||||
/**Writes common table properties to xml for storage.
|
||||
@ -189,7 +227,7 @@ class QgsComposerTable: QgsComposerItem
|
||||
* @see writeXML
|
||||
*/
|
||||
bool tableWriteXML( QDomElement& itemElem, QDomDocument& doc ) const;
|
||||
|
||||
|
||||
/**Reads the table's common properties from xml.
|
||||
* @param itemElem a QDomElement holding the table's desired properties.
|
||||
* @param doc QDomDocument for the source xml.
|
||||
|
@ -7,7 +7,7 @@ class QgsComposerTableColumn: QObject
|
||||
#include <qgscomposertablecolumn.h>
|
||||
%End
|
||||
public:
|
||||
|
||||
|
||||
QgsComposerTableColumn();
|
||||
virtual ~QgsComposerTableColumn();
|
||||
|
||||
|
@ -10,19 +10,19 @@ class QgsComposerTextTable: QgsComposerTable
|
||||
|
||||
/** return correct graphics item type. Added in v1.7 */
|
||||
virtual int type() const;
|
||||
|
||||
|
||||
/**Sets the text to use for the header row for the table
|
||||
* @param labels list of strings to use for each column's header row
|
||||
* @see headerLabels
|
||||
*/
|
||||
void setHeaderLabels( const QStringList& labels );
|
||||
|
||||
|
||||
/**Adds a row to the table
|
||||
* @param row list of strings to use for each cell's value in the newly added row
|
||||
* @note If row is shorter than the number of columns in the table than blank cells
|
||||
* will be inserted at the end of the row. If row contains more strings then the number
|
||||
* of columns in the table then these extra strings will be ignored.
|
||||
*/
|
||||
*/
|
||||
void addRow( const QStringList& row );
|
||||
|
||||
/**Writes properties specific to text tables
|
||||
@ -31,7 +31,7 @@ class QgsComposerTextTable: QgsComposerTable
|
||||
* @see readXML
|
||||
*/
|
||||
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
|
||||
|
||||
|
||||
/**Reads the properties specific to a text table from xml.
|
||||
* @param itemElem a QDomElement holding the text table's desired properties.
|
||||
* @param doc QDomDocument for the source xml.
|
||||
@ -39,4 +39,10 @@ class QgsComposerTextTable: QgsComposerTable
|
||||
*/
|
||||
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
|
||||
|
||||
/**Queries the text table for text to show in the cells.
|
||||
* @param attributeMaps list of QgsAttributeMaps where the cell text will be stored
|
||||
* @returns true if attribute values were successfully set from table's text
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps );
|
||||
};
|
||||
|
@ -204,7 +204,7 @@ class QgsMapLayer : QObject
|
||||
*/
|
||||
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document );
|
||||
|
||||
/** Returns the layer as a layer definition document
|
||||
/** Returns the given layer as a layer definition document
|
||||
Layer definitions store the data source as well as styling and custom properties.
|
||||
|
||||
Layer definitions can be used to load a layer and styling all from a single file.
|
||||
@ -353,6 +353,12 @@ class QgsMapLayer : QObject
|
||||
/** Return pointer to layer's undo stack */
|
||||
QUndoStack *undoStack();
|
||||
|
||||
/* Layer legendUrl information */
|
||||
void setLegendUrl( const QString& legendUrl );
|
||||
const QString& legendUrl() const;
|
||||
void setLegendUrlFormat( const QString& legendUrlFormat );
|
||||
const QString& legendUrlFormat() const;
|
||||
|
||||
/** @deprecated since 2.4 - returns NULL */
|
||||
QImage *cacheImage() /Deprecated/;
|
||||
/** @deprecated since 2.4 - caches listen to repaintRequested() signal to invalidate the cached image */
|
||||
@ -403,8 +409,8 @@ class QgsMapLayer : QObject
|
||||
*/
|
||||
void layerCrsChanged();
|
||||
|
||||
/** This signal should be connected with the slot QgsMapCanvas::refresh()
|
||||
* \todo to be removed - GUI dependency
|
||||
/** By emitting this signal the layer tells that either appearance or content have been changed
|
||||
* and any view showing the rendered layer should refresh itself.
|
||||
*/
|
||||
void repaintRequested();
|
||||
|
||||
@ -419,7 +425,7 @@ class QgsMapLayer : QObject
|
||||
void dataChanged();
|
||||
|
||||
/** Signal emitted when the blend mode is changed, through QgsMapLayer::setBlendMode() */
|
||||
void blendModeChanged( const QPainter::CompositionMode blendMode );
|
||||
void blendModeChanged( const QPainter::CompositionMode &blendMode );
|
||||
|
||||
protected:
|
||||
/** Set the extent */
|
||||
|
@ -5,7 +5,6 @@
|
||||
* QgsVectorDataProvider, and does not yet make
|
||||
* sense for Raster layers.
|
||||
*/
|
||||
|
||||
class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
{
|
||||
%TypeHeaderCode
|
||||
@ -15,7 +14,6 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
%End
|
||||
|
||||
public:
|
||||
|
||||
QgsRasterDataProvider();
|
||||
|
||||
QgsRasterDataProvider( const QString & uri );
|
||||
@ -27,31 +25,30 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
/* It makes no sense to set input on provider */
|
||||
bool setInput( QgsRasterInterface* input );
|
||||
|
||||
// TODO: Document this better.
|
||||
/** \brief Renders the layer as an image
|
||||
*/
|
||||
\note When render caching (/qgis/enable_render_caching) is on the wms
|
||||
provider doesn't wait for the reply of the getmap request or all
|
||||
tiles replies and can return incomplete images.
|
||||
Temporarily disable render caching if you require the complete
|
||||
wms image in the first call.
|
||||
*/
|
||||
virtual QImage* draw( const QgsRectangle & viewExtent, int pixelWidth, int pixelHeight ) = 0;
|
||||
|
||||
// TODO: Get the supported formats by this provider
|
||||
|
||||
// TODO: Get the file masks supported by this provider, suitable for feeding into the file open dialog box
|
||||
|
||||
/** Get the extent of the data source.
|
||||
* @return QgsRectangle containing the extent of the layer */
|
||||
virtual QgsRectangle extent() = 0;
|
||||
|
||||
/** Returns data type for the band specified by number */
|
||||
virtual QGis::DataType dataType( int bandNo ) const = 0;
|
||||
|
||||
/** Returns source data type for the band specified by number,
|
||||
* source data type may be shorter than dataType
|
||||
*/
|
||||
* source data type may be shorter than dataType */
|
||||
virtual QGis::DataType srcDataType( int bandNo ) const = 0;
|
||||
|
||||
/** Returns data type for the band specified by number */
|
||||
virtual int colorInterpretation( int theBandNo ) const;
|
||||
|
||||
QString colorName( int colorInterpretation ) const;
|
||||
|
||||
/** Reload data (data could change) */
|
||||
virtual bool reload();
|
||||
|
||||
virtual QString colorInterpretationName( int theBandNo ) const;
|
||||
@ -59,7 +56,6 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
/** Read band scale for raster value
|
||||
* @@note added in 2.3 */
|
||||
virtual double bandScale( int bandNo ) const;
|
||||
|
||||
/** Read band offset for raster value
|
||||
* @@note added in 2.3 */
|
||||
virtual double bandOffset( int bandNo ) const;
|
||||
@ -94,10 +90,14 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
|
||||
virtual QList<QgsColorRampShader::ColorRampItem> colorTable( int bandNo ) const;
|
||||
|
||||
// Defined in parent
|
||||
/** \brief Returns the sublayers of this layer - Useful for providers that manage their own layers, such as WMS */
|
||||
/** \brief Returns the sublayers of this layer - useful for providers that manage
|
||||
* their own layers, such as WMS */
|
||||
virtual QStringList subLayers() const;
|
||||
|
||||
/** \brief Returns the legend rendered as pixmap
|
||||
* useful for that layer that need to get legend layer remotly as WMS */
|
||||
virtual QImage getLegendGraphic( double scale = 0, bool forceRefresh = false );
|
||||
|
||||
/** \brief Create pyramid overviews */
|
||||
virtual QString buildPyramids( const QList<QgsRasterPyramid> & thePyramidList,
|
||||
const QString & theResamplingMethod = "NEAREST",
|
||||
@ -122,10 +122,31 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
*/
|
||||
virtual QString metadata() = 0;
|
||||
|
||||
/** \brief Identify raster value(s) found on the point position. The context
|
||||
* parameters theExtent, theWidth and theHeight are important to identify
|
||||
* on the same zoom level as a displayed map and to do effective
|
||||
* caching (WCS). If context params are not specified the highest
|
||||
* resolution is used. capabilities() may be used to test if format
|
||||
* is supported by provider. Values are set to 'no data' or empty string
|
||||
* if point is outside data source extent.
|
||||
*
|
||||
* \note The arbitraryness of the returned document is enforced by WMS standards
|
||||
* up to at least v1.3.0
|
||||
* @param thePoint coordinates in data source CRS
|
||||
* @param theFormat result format
|
||||
* @param theExtent context extent
|
||||
* @param theWidth context width
|
||||
* @param theHeight context height
|
||||
* @return QgsRaster::IdentifyFormatValue: map of values for each band, keys are band numbers
|
||||
* (from 1).
|
||||
* QgsRaster::IdentifyFormatFeature: map of QgsRasterFeatureList for each sublayer
|
||||
* (WMS) - TODO: it is not consistent with QgsRaster::IdentifyFormatValue.
|
||||
* QgsRaster::IdentifyFormatHtml: map of HTML strings for each sublayer (WMS).
|
||||
* Empty if failed or there are no results (TODO: better error reporting).
|
||||
*/
|
||||
//virtual QMap<int, QVariant> identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0 );
|
||||
virtual QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0 );
|
||||
|
||||
//QMap<QString, QString> identify( const QgsPoint & thePoint, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0 );
|
||||
|
||||
/**
|
||||
* \brief Returns the caption error text for the last error in this provider
|
||||
*
|
||||
@ -173,15 +194,14 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
// TODO: add data type (may be defferent from band type)
|
||||
virtual bool write( void* data, int band, int width, int height, int xOffset, int yOffset );
|
||||
|
||||
/** Creates a new dataset with mDataSourceURI
|
||||
@return true in case of success*/
|
||||
/** Creates a new dataset with mDataSourceURI */
|
||||
static QgsRasterDataProvider* create( const QString &providerKey,
|
||||
const QString &uri,
|
||||
const QString& format, int nBands,
|
||||
QGis::DataType type,
|
||||
int width, int height, double* geoTransform,
|
||||
const QgsCoordinateReferenceSystem& crs,
|
||||
QStringList createOptions = QStringList() /*e.v. color table*/ );
|
||||
const QString &uri,
|
||||
const QString& format, int nBands,
|
||||
QGis::DataType type,
|
||||
int width, int height, double* geoTransform,
|
||||
const QgsCoordinateReferenceSystem& crs,
|
||||
QStringList createOptions = QStringList() );
|
||||
|
||||
/** Set no data value on created dataset
|
||||
* @param bandNo band number
|
||||
@ -192,20 +212,26 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
/** Remove dataset*/
|
||||
virtual bool remove();
|
||||
|
||||
/** Returns a list of pyramid resampling method names for given provider */
|
||||
static QList<QPair<QString,QString> > pyramidResamplingMethods( QString providerKey );
|
||||
/** Returns a list of pyramid resampling method name and label pairs
|
||||
* for given provider */
|
||||
static QList<QPair<QString, QString> > pyramidResamplingMethods( QString providerKey );
|
||||
|
||||
/** Validates creation options for a specific dataset and destination format.
|
||||
* @note used by GDAL provider only
|
||||
* @note see also validateCreationOptionsFormat() in gdal provider for validating options based on format only */
|
||||
virtual QString validateCreationOptions( const QStringList& createOptions, QString format );
|
||||
virtual QString validateCreationOptions( const QStringList& createOptions, QString format );
|
||||
|
||||
/** Validates pyramid creation options for a specific dataset and destination format
|
||||
* @note used by GDAL provider only */
|
||||
virtual QString validatePyramidsConfigOptions( QgsRaster::RasterPyramidsFormat pyramidsFormat,
|
||||
const QStringList & theConfigOptions, const QString & fileFormat );
|
||||
|
||||
signals:
|
||||
static QString identifyFormatName( QgsRaster::IdentifyFormat format );
|
||||
static QgsRaster::IdentifyFormat identifyFormatFromName( QString formatName );
|
||||
static QString identifyFormatLabel( QgsRaster::IdentifyFormat format );
|
||||
static Capability identifyFormatToCapability( QgsRaster::IdentifyFormat format );
|
||||
|
||||
signals:
|
||||
/** Emit a signal to notify of the progress event.
|
||||
* Emitted theProgress is in percents (0.0-100.0) */
|
||||
void progress( int theType, double theProgress, QString theMessage );
|
||||
|
@ -90,6 +90,7 @@
|
||||
%Include qgsoptionsdialogbase.sip
|
||||
%Include qgssvgannotationitem.sip
|
||||
%Include qgsextentgroupbox.sip
|
||||
%Include qgsprevieweffect.sip
|
||||
|
||||
%Include attributetable/qgsattributetabledelegate.sip
|
||||
%Include attributetable/qgsattributetablefiltermodel.sip
|
||||
|
@ -13,19 +13,19 @@ class QgsFieldExpressionWidget : QWidget
|
||||
|
||||
//! define the title used in the expression dialog
|
||||
void setExpressionDialogTitle( QString title );
|
||||
|
||||
|
||||
//! return the title used for the expression dialog
|
||||
const QString expressionDialogTitle();
|
||||
|
||||
//! setFilters allows fitering according to the type of field
|
||||
void setFilters( QgsFieldProxyModel::Filters filters );
|
||||
|
||||
//! currently used filter on list of fields
|
||||
QgsFieldProxyModel::Filters filters();
|
||||
|
||||
//! return the title used for the expression dialog
|
||||
const QString expressionDialogTitle();
|
||||
|
||||
//! set the geometry calculator used in the expression dialog
|
||||
void setGeomCalculator( const QgsDistanceArea &da );
|
||||
|
||||
|
||||
/**
|
||||
* @brief currentField returns the currently selected field or expression if allowed
|
||||
* @param isExpression determines if the string returned is the name of a field or an expression
|
||||
@ -35,7 +35,7 @@ class QgsFieldExpressionWidget : QWidget
|
||||
|
||||
//! Returns the currently used layer
|
||||
QgsVectorLayer* layer();
|
||||
|
||||
|
||||
signals:
|
||||
//! the signal is emitted when the currently selected field changes
|
||||
void fieldChanged( QString fieldName );
|
||||
@ -51,5 +51,5 @@ class QgsFieldExpressionWidget : QWidget
|
||||
void setLayer( QgsMapLayer* layer );
|
||||
|
||||
//! sets the current field or expression in the widget
|
||||
void setField( QString fieldName );
|
||||
void setField( const QString &fieldName );
|
||||
};
|
||||
|
@ -12,14 +12,14 @@ class QgsFieldModel : QAbstractItemModel
|
||||
%End
|
||||
|
||||
public:
|
||||
enum FieldRoles {
|
||||
/* SIP does not accept any arithmetic" */
|
||||
FieldNameRole = 33, /* return field name if index corresponds to a field */
|
||||
FieldIndexRole = 34, /* return field index if index corresponds to a field */
|
||||
ExpressionRole = 35, /* return field name or expression */
|
||||
IsExpressionRole = 36, /* return if index corresponds to an expression */
|
||||
ExpressionValidityRole = 37, /* return if expression is valid or not */
|
||||
FieldTypeRole = 38 /* return the field type (if a field, return QVariant if expression) */
|
||||
enum FieldRoles
|
||||
{
|
||||
FieldNameRole, /* return field name if index corresponds to a field */
|
||||
FieldIndexRole, /* return field index if index corresponds to a field */
|
||||
ExpressionRole, /* return field name or expression */
|
||||
IsExpressionRole, /* return if index corresponds to an expression */
|
||||
ExpressionValidityRole, /* return if expression is valid or not */
|
||||
FieldTypeRole /* return the field type (if a field, return QVariant if expression) */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -28,7 +28,7 @@ class QgsFieldModel : QAbstractItemModel
|
||||
explicit QgsFieldModel( QObject *parent /TransferThis/ = 0 );
|
||||
|
||||
//! return the index corresponding to a given fieldName
|
||||
QModelIndex indexFromName( QString fieldName );
|
||||
QModelIndex indexFromName( const QString &fieldName );
|
||||
|
||||
//! returns the currently used layer
|
||||
void setAllowExpression( bool allowExpression );
|
||||
@ -38,7 +38,7 @@ class QgsFieldModel : QAbstractItemModel
|
||||
* @brief setExpression sets a single expression to be added after the fields at the end of the model
|
||||
* @return the model index of the newly added expression
|
||||
*/
|
||||
QModelIndex setExpression( QString expression );
|
||||
QModelIndex setExpression( const QString &expression );
|
||||
|
||||
//! remove expressions from the model
|
||||
void removeExpression();
|
||||
@ -60,5 +60,4 @@ class QgsFieldModel : QAbstractItemModel
|
||||
int rowCount( const QModelIndex &parent = QModelIndex() ) const;
|
||||
int columnCount( const QModelIndex &parent ) const;
|
||||
QVariant data( const QModelIndex &index, int role ) const;
|
||||
|
||||
};
|
||||
|
@ -12,13 +12,13 @@ class QgsFieldProxyModel : QSortFilterProxyModel
|
||||
public:
|
||||
enum Filter
|
||||
{
|
||||
String = 1,
|
||||
Int = 2,
|
||||
LongLong = 4,
|
||||
Double = 8,
|
||||
Numeric = 14,
|
||||
Date = 16,
|
||||
All = 31
|
||||
String,
|
||||
Int,
|
||||
LongLong,
|
||||
Double,
|
||||
Numeric,
|
||||
Date,
|
||||
All
|
||||
};
|
||||
typedef QFlags<QgsFieldProxyModel::Filter> Filters;
|
||||
|
||||
@ -37,7 +37,7 @@ class QgsFieldProxyModel : QSortFilterProxyModel
|
||||
* @note added in 2.3
|
||||
*/
|
||||
QgsFieldProxyModel* setFilters( Filters filters );
|
||||
const Filters& filters() const ;
|
||||
const Filters& filters() const;
|
||||
|
||||
// QSortFilterProxyModel interface
|
||||
public:
|
||||
|
@ -2,10 +2,11 @@
|
||||
* A graphics effect which can be applied to a widget to simulate various printing and
|
||||
* color blindness modes.
|
||||
*/
|
||||
|
||||
class QgsPreviewEffect : QGraphicsEffect
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include "qgsgraphicseffect.h"
|
||||
#include "qgsprevieweffect.h"
|
||||
%End
|
||||
|
||||
public:
|
||||
@ -26,7 +27,6 @@ class QgsPreviewEffect : QGraphicsEffect
|
||||
* @see mode
|
||||
*/
|
||||
void setMode( PreviewMode mode );
|
||||
|
||||
/**Returns the mode used for the preview effect.
|
||||
* @returns PreviewMode currently used by the effect
|
||||
* @note added in 2.3
|
@ -1,8 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
for file in $*; do
|
||||
file=$1
|
||||
|
||||
d=${file#*/}
|
||||
d=${d%/*}
|
||||
f=${file##*/}
|
||||
|
@ -162,7 +162,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem
|
||||
* and the string is the text to use for the column's header
|
||||
* @note added in 2.3
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
*/
|
||||
virtual QMap<int, QString> headerLabels() const;
|
||||
|
||||
//TODO - make this more generic for next API break, eg rename as getRowValues, use QStringList rather than
|
||||
@ -172,7 +172,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem
|
||||
* @returns true if attribute text was successfully retrieved.
|
||||
* @param attributeMaps QList of QgsAttributeMap to store retrieved row data in
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
*/
|
||||
virtual bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps ) { Q_UNUSED( attributeMaps ); return false; }
|
||||
|
||||
/**Returns a pointer to the list of QgsComposerTableColumns shown in the table
|
||||
@ -232,7 +232,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem
|
||||
* @param attributeMaps list of attribute values for each row shown in the table
|
||||
* @note not available in python bindings
|
||||
* @see adaptItemFrame
|
||||
*/
|
||||
*/
|
||||
virtual bool calculateMaxColumnWidths( QMap<int, double>& maxWidthMap, const QList<QgsAttributeMap>& attributeMaps ) const;
|
||||
|
||||
/**Adapts the size of the item frame to match the table's content.
|
||||
@ -241,14 +241,14 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem
|
||||
* @param attributeMaps list of attribute values for each row shown in the table
|
||||
* @note not available in python bindings
|
||||
* @see calculateMaxColumnWidths
|
||||
*/
|
||||
*/
|
||||
void adaptItemFrame( const QMap<int, double>& maxWidthMap, const QList<QgsAttributeMap>& attributeMaps );
|
||||
|
||||
/**Draws the horizontal grid lines for the table.
|
||||
* @param p destination painter for grid lines
|
||||
* @param nAttributes number of attribute rows shown in table
|
||||
* @see drawVerticalGridLines
|
||||
*/
|
||||
*/
|
||||
void drawHorizontalGridLines( QPainter* p, int nAttributes );
|
||||
|
||||
/**Draws the vertical grid lines for the table.
|
||||
@ -258,7 +258,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem
|
||||
* @note not available in python bindings
|
||||
* @see drawVerticalGridLines
|
||||
* @see calculateMaxColumnWidths
|
||||
*/
|
||||
*/
|
||||
void drawVerticalGridLines( QPainter* p, const QMap<int, double>& maxWidthMap );
|
||||
|
||||
/**Writes common table properties to xml for storage.
|
||||
|
@ -240,7 +240,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
|
||||
virtual QString metadata() = 0;
|
||||
|
||||
/** \brief Identify raster value(s) found on the point position. The context
|
||||
* parameters theExtent, theWidth and theHeigh are important to identify
|
||||
* parameters theExtent, theWidth and theHeight are important to identify
|
||||
* on the same zoom level as a displayed map and to do effective
|
||||
* caching (WCS). If context params are not specified the highest
|
||||
* resolution is used. capabilities() may be used to test if format
|
||||
@ -295,11 +295,11 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
|
||||
|
||||
/**Returns the dpi of the output device.
|
||||
@note: this method was added in version 1.2*/
|
||||
int dpi() const {return mDpi;}
|
||||
int dpi() const { return mDpi; }
|
||||
|
||||
/**Sets the output device resolution.
|
||||
@note: this method was added in version 1.2*/
|
||||
void setDpi( int dpi ) {mDpi = dpi;}
|
||||
void setDpi( int dpi ) { mDpi = dpi; }
|
||||
|
||||
/** Time stamp of data source in the moment when data/metadata were loaded by provider */
|
||||
virtual QDateTime timestamp() const { return mTimestamp; }
|
||||
@ -335,10 +335,6 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
|
||||
*/
|
||||
virtual bool setNoDataValue( int bandNo, double noDataValue ) { Q_UNUSED( bandNo ); Q_UNUSED( noDataValue ); return false; }
|
||||
|
||||
/** Returns the formats supported by create() */
|
||||
// TODO: this should be static and call C functions in provider library
|
||||
//static QStringList createFormats();
|
||||
|
||||
/** Remove dataset*/
|
||||
virtual bool remove() { return false; }
|
||||
|
||||
|
@ -116,7 +116,7 @@ void QgsFieldExpressionWidget::setLayer( QgsVectorLayer *layer )
|
||||
mFieldProxyModel->sourceFieldModel()->setLayer( layer );
|
||||
}
|
||||
|
||||
void QgsFieldExpressionWidget::setField( const QString fieldName )
|
||||
void QgsFieldExpressionWidget::setField( const QString &fieldName )
|
||||
{
|
||||
if ( fieldName.isEmpty() )
|
||||
return;
|
||||
|
@ -89,7 +89,7 @@ class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
|
||||
void setLayer( QgsMapLayer* layer );
|
||||
|
||||
//! sets the current field or expression in the widget
|
||||
void setField( const QString fieldName );
|
||||
void setField( const QString &fieldName );
|
||||
|
||||
protected slots:
|
||||
//! open the expression dialog to edit the current or add a new expression
|
||||
|
@ -28,7 +28,7 @@ QgsFieldModel::QgsFieldModel( QObject *parent )
|
||||
{
|
||||
}
|
||||
|
||||
QModelIndex QgsFieldModel::indexFromName( const QString fieldName )
|
||||
QModelIndex QgsFieldModel::indexFromName( const QString &fieldName )
|
||||
{
|
||||
int r = mFields.indexFromName( fieldName );
|
||||
QModelIndex idx = index( r, 0 );
|
||||
@ -104,7 +104,7 @@ void QgsFieldModel::setAllowExpression( bool allowExpression )
|
||||
}
|
||||
}
|
||||
|
||||
QModelIndex QgsFieldModel::setExpression( const QString expression )
|
||||
QModelIndex QgsFieldModel::setExpression( const QString &expression )
|
||||
{
|
||||
if ( !mAllowExpression )
|
||||
return QModelIndex();
|
||||
|
@ -32,7 +32,7 @@ class GUI_EXPORT QgsFieldModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum FieldRoles
|
||||
enum FieldRoles
|
||||
{
|
||||
FieldNameRole = Qt::UserRole + 1, /* return field name if index corresponds to a field */
|
||||
FieldIndexRole = Qt::UserRole + 2, /* return field index if index corresponds to a field */
|
||||
@ -48,23 +48,23 @@ class GUI_EXPORT QgsFieldModel : public QAbstractItemModel
|
||||
explicit QgsFieldModel( QObject *parent = 0 );
|
||||
|
||||
//! return the index corresponding to a given fieldName
|
||||
QModelIndex indexFromName( const QString fieldName );
|
||||
QModelIndex indexFromName( const QString &fieldName );
|
||||
|
||||
//! returns the currently used layer
|
||||
void setAllowExpression( bool allowExpression );
|
||||
bool allowExpression() {return mAllowExpression;}
|
||||
bool allowExpression() { return mAllowExpression; }
|
||||
|
||||
/**
|
||||
* @brief setExpression sets a single expression to be added after the fields at the end of the model
|
||||
* @return the model index of the newly added expression
|
||||
*/
|
||||
QModelIndex setExpression( const QString expression );
|
||||
QModelIndex setExpression( const QString &expression );
|
||||
|
||||
//! remove expressions from the model
|
||||
void removeExpression();
|
||||
|
||||
//! returns the currently used layer
|
||||
QgsVectorLayer* layer() {return mLayer;}
|
||||
QgsVectorLayer* layer() { return mLayer; }
|
||||
|
||||
public slots:
|
||||
//! set the layer of whch fields are displayed
|
||||
|
Loading…
x
Reference in New Issue
Block a user