mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-19 00:02:48 -04:00
* fix cppcheck warnings
* some sip updates * [API] fix spelling QgsMultiRenderChecker::drawBackround * [API] fix spelling QgsSymbolLayerV2Utils::drawStippledBackround * [API] fix spelling QgsMapSettings::layerTransfrom
This commit is contained in:
parent
d897aa5bde
commit
a57066a48d
@ -27,7 +27,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame
|
||||
|
||||
public:
|
||||
|
||||
/*! Controls how headers are horizontally aligned in a table
|
||||
/*! Controls how headers are horizontally aligned in a table
|
||||
*/
|
||||
enum HeaderHAlignment
|
||||
{
|
||||
@ -318,7 +318,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame
|
||||
|
||||
protected:
|
||||
|
||||
/**Calculates the maximum width of text shown in columns.
|
||||
/**Calculates the maximum width of text shown in columns.
|
||||
*/
|
||||
virtual bool calculateMaxColumnWidths();
|
||||
|
||||
@ -355,7 +355,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame
|
||||
* @param frameIndex index number for frame
|
||||
* @returns row range
|
||||
*/
|
||||
QPair<int, int> rowRange( const QRectF extent, const int frameIndex ) const;
|
||||
QPair<int, int> rowRange( const QRectF &extent, const int frameIndex ) const;
|
||||
|
||||
/**Draws the horizontal grid lines for the table.
|
||||
* @param painter destination painter for grid lines
|
||||
|
@ -52,8 +52,8 @@ class QgsColorScheme
|
||||
* to colors related to the base color.
|
||||
* @returns a list of QPairs of color and color name
|
||||
*/
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() ) = 0;
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() ) = 0;
|
||||
|
||||
/**Returns whether the color scheme is editable
|
||||
* @returns true if scheme is editable
|
||||
@ -68,7 +68,7 @@ class QgsColorScheme
|
||||
* @returns true if colors were set successfully
|
||||
* @see isEditable
|
||||
*/
|
||||
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
/**Clones a color scheme
|
||||
* @returns copy of color scheme
|
||||
@ -97,10 +97,10 @@ class QgsGplColorScheme : QgsColorScheme
|
||||
|
||||
virtual ~QgsGplColorScheme();
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() );
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() );
|
||||
|
||||
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
protected:
|
||||
|
||||
@ -117,7 +117,7 @@ class QgsGplColorScheme : QgsColorScheme
|
||||
* subfolder off the user's QGIS settings folder.
|
||||
* \note Added in version 2.5
|
||||
*/
|
||||
class QgsUserColorScheme : QgsGplColorScheme
|
||||
class QgsUserColorScheme : QgsGplColorScheme
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgscolorscheme.h>
|
||||
@ -128,7 +128,7 @@ class QgsUserColorScheme : QgsGplColorScheme
|
||||
/**Constructs a new user color scheme, using a specified gpl palette file
|
||||
* @param filename filename of gpl palette file stored in the users "palettes" folder
|
||||
*/
|
||||
QgsUserColorScheme( const QString filename );
|
||||
QgsUserColorScheme( const QString &filename );
|
||||
|
||||
virtual ~QgsUserColorScheme();
|
||||
|
||||
@ -141,7 +141,7 @@ class QgsUserColorScheme : QgsGplColorScheme
|
||||
/**Sets the name for the scheme
|
||||
* @param name new name
|
||||
*/
|
||||
void setName( const QString name );
|
||||
void setName( const QString &name );
|
||||
|
||||
/**Erases the associated gpl palette file from the users "palettes" folder
|
||||
* @returns true if erase was successful
|
||||
@ -175,8 +175,8 @@ class QgsRecentColorScheme : QgsColorScheme
|
||||
|
||||
virtual SchemeFlags flags() const;
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() );
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() );
|
||||
|
||||
QgsColorScheme* clone() const /Factory/;
|
||||
}; // class QgsRecentColorScheme
|
||||
@ -202,12 +202,12 @@ class QgsCustomColorScheme : QgsColorScheme
|
||||
|
||||
virtual SchemeFlags flags() const;
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() );
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() );
|
||||
|
||||
virtual bool isEditable() const;
|
||||
|
||||
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
QgsColorScheme* clone() const /Factory/;
|
||||
}; // class QgsCustomColorScheme
|
||||
@ -232,12 +232,12 @@ class QgsProjectColorScheme : QgsColorScheme
|
||||
|
||||
virtual SchemeFlags flags() const;
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() );
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() );
|
||||
|
||||
virtual bool isEditable() const;
|
||||
|
||||
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
QgsColorScheme* clone() const /Factory/;
|
||||
}; // class QgsProjectColorScheme
|
||||
|
@ -94,7 +94,7 @@ class QgsCoordinateTransform : QObject
|
||||
* @param direction TransformDirection (defaults to ForwardTransform)
|
||||
* @return QgsPoint in Destination Coordinate System
|
||||
*/
|
||||
QgsPoint transform( const QgsPoint p, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
|
||||
QgsPoint transform( const QgsPoint &p, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
|
||||
|
||||
/*! Transform the point specified by x,y from Source Coordinate System to Destination Coordinate System
|
||||
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
|
||||
@ -118,12 +118,12 @@ class QgsCoordinateTransform : QObject
|
||||
* longitude line is required
|
||||
* @return QgsRectangle in Destination Coordinate System
|
||||
*/
|
||||
QgsRectangle transformBoundingBox( const QgsRectangle theRect, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const throw (QgsCsException);
|
||||
QgsRectangle transformBoundingBox( const QgsRectangle &theRect, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const throw (QgsCsException);
|
||||
|
||||
// Same as for the other transform() functions, but alters the x
|
||||
// and y variables in place. The second one works with good old-fashioned
|
||||
// C style arrays.
|
||||
void transformInPlace( double& x, double& y, double &z, TransformDirection direction = ForwardTransform) const throw (QgsCsException);
|
||||
void transformInPlace( double& x, double& y, double &z, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
|
||||
|
||||
//! @note not available in python bindings
|
||||
// void transformInPlace( QVector<double>& x, QVector<double>& y, QVector<double>& z,
|
||||
@ -142,7 +142,7 @@ class QgsCoordinateTransform : QObject
|
||||
* @param direction TransformDirection (defaults to ForwardTransform)
|
||||
* @return QgsRectangle in Destination Coordinate System
|
||||
*/
|
||||
QgsRectangle transform( const QgsRectangle theRect, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
|
||||
QgsRectangle transform( const QgsRectangle &theRect, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
|
||||
|
||||
/*! Transform an array of coordinates to a different Coordinate System
|
||||
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
|
||||
|
@ -20,8 +20,6 @@ class QgsDataItem : QObject
|
||||
|
||||
int rowCount();
|
||||
|
||||
//
|
||||
|
||||
virtual void refresh();
|
||||
|
||||
// Create vector of children
|
||||
@ -56,6 +54,8 @@ class QgsDataItem : QObject
|
||||
// try to process the data dropped on this item
|
||||
virtual bool handleDrop( const QMimeData * /*data*/, Qt::DropAction /*action*/ );
|
||||
|
||||
//
|
||||
|
||||
enum Capability
|
||||
{
|
||||
NoCapabilities,
|
||||
@ -83,6 +83,9 @@ class QgsDataItem : QObject
|
||||
QString path() const;
|
||||
void setPath( const QString );
|
||||
|
||||
// Because QIcon (QPixmap) must not be used in outside the GUI thread, it is
|
||||
// not possible to set mIcon in constructor. Either use mIconName/setIconName()
|
||||
// or implement icon().
|
||||
void setIcon( QIcon icon );
|
||||
void setIconName( const QString & icon );
|
||||
|
||||
|
@ -40,7 +40,7 @@ class QgsMapLayer : QObject
|
||||
{
|
||||
VectorLayer,
|
||||
RasterLayer,
|
||||
PluginLayer // added in 1.5
|
||||
PluginLayer
|
||||
};
|
||||
|
||||
/** Constructor
|
||||
@ -58,9 +58,7 @@ class QgsMapLayer : QObject
|
||||
*/
|
||||
QgsMapLayer::LayerType type() const;
|
||||
|
||||
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
|
||||
* @note added in 1.7
|
||||
*/
|
||||
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry */
|
||||
QString id() const;
|
||||
|
||||
/** Set the display name of the layer
|
||||
@ -73,9 +71,7 @@ class QgsMapLayer : QObject
|
||||
*/
|
||||
const QString & name() const;
|
||||
|
||||
/** Get the original name of the layer
|
||||
* @note added in 1.9
|
||||
*/
|
||||
/** Get the original name of the layer */
|
||||
const QString & originalName() const;
|
||||
|
||||
void setTitle( const QString& title );
|
||||
@ -113,7 +109,7 @@ class QgsMapLayer : QObject
|
||||
QPainter::CompositionMode blendMode() const;
|
||||
|
||||
/**Synchronises with changes in the datasource
|
||||
@note added in version 1.6*/
|
||||
*/
|
||||
virtual void reload();
|
||||
|
||||
/** Return new instance of QgsMapLayerRenderer that will be used for rendering of given context
|
||||
@ -190,6 +186,7 @@ class QgsMapLayer : QObject
|
||||
/** stores state in Dom node
|
||||
@param layerElement is a Dom element corresponding to ``maplayer'' tag
|
||||
@param document is a the dom document being written
|
||||
@param relativeBasePath base path for relative paths
|
||||
@note
|
||||
|
||||
The Dom node corresponds to a Dom document project file XML element to be
|
||||
@ -202,28 +199,25 @@ class QgsMapLayer : QObject
|
||||
|
||||
@returns true if successful
|
||||
*/
|
||||
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document );
|
||||
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document, QString relativeBasePath = QString::null );
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers );
|
||||
static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers, QString relativeBasePath = QString::null );
|
||||
|
||||
/** Creates a new layer from a layer defininition document
|
||||
*/
|
||||
static QList<QgsMapLayer*> fromLayerDefinition( QDomDocument& document );
|
||||
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString qlrfile );
|
||||
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString &qlrfile );
|
||||
|
||||
/** Set a custom property for layer. Properties are stored in a map and saved in project file.
|
||||
* @note Added in v1.4 */
|
||||
/** Set a custom property for layer. Properties are stored in a map and saved in project file. */
|
||||
void setCustomProperty( const QString& key, const QVariant& value );
|
||||
/** Read a custom property from layer. Properties are stored in a map and saved in project file.
|
||||
* @note Added in v1.4 */
|
||||
/** Read a custom property from layer. Properties are stored in a map and saved in project file. */
|
||||
QVariant customProperty( const QString& value, const QVariant& defaultValue = QVariant() ) const;
|
||||
/** Remove a custom property from layer. Properties are stored in a map and saved in project file.
|
||||
* @note Added in v1.4 */
|
||||
/** Remove a custom property from layer. Properties are stored in a map and saved in project file. */
|
||||
void removeCustomProperty( const QString& key );
|
||||
|
||||
|
||||
@ -244,8 +238,7 @@ class QgsMapLayer : QObject
|
||||
*/
|
||||
const QgsCoordinateReferenceSystem& crs() const;
|
||||
|
||||
/** Sets layer's spatial reference system
|
||||
@note emitSignal added in 1.4 */
|
||||
/** Sets layer's spatial reference system */
|
||||
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );
|
||||
|
||||
/** A convenience function to (un)capitalise the layer name */
|
||||
@ -256,7 +249,6 @@ class QgsMapLayer : QObject
|
||||
* record in the users style table in their personal qgis.db)
|
||||
* @return a QString with the style file name
|
||||
* @see also loadNamedStyle () and saveNamedStyle ();
|
||||
* @note This method was added in QGIS 1.8
|
||||
*/
|
||||
virtual QString styleURI();
|
||||
|
||||
@ -373,6 +365,7 @@ class QgsMapLayer : QObject
|
||||
*/
|
||||
void setLegend( QgsMapLayerLegend* legend /Transfer/ );
|
||||
/**
|
||||
* Can be null.
|
||||
* @note added in 2.6
|
||||
*/
|
||||
QgsMapLayerLegend* legend() const;
|
||||
@ -423,9 +416,7 @@ class QgsMapLayer : QObject
|
||||
/** Emit a signal that the layer name has been changed */
|
||||
void layerNameChanged();
|
||||
|
||||
/** Emit a signal that layer's CRS has been reset
|
||||
added in 1.4
|
||||
*/
|
||||
/** Emit a signal that layer's CRS has been reset */
|
||||
void layerCrsChanged();
|
||||
|
||||
/** By emitting this signal the layer tells that either appearance or content have been changed
|
||||
@ -439,8 +430,7 @@ class QgsMapLayer : QObject
|
||||
/** This is used to send a request that any mapcanvas using this layer update its extents */
|
||||
void recalculateExtents();
|
||||
|
||||
/** data of layer changed
|
||||
* added in 1.5 */
|
||||
/** data of layer changed */
|
||||
void dataChanged();
|
||||
|
||||
/** Signal emitted when the blend mode is changed, through QgsMapLayer::setBlendMode() */
|
||||
@ -459,8 +449,7 @@ class QgsMapLayer : QObject
|
||||
/** Set the extent */
|
||||
virtual void setExtent( const QgsRectangle &rect );
|
||||
|
||||
/** set whether layer is valid or not - should be used in constructor.
|
||||
\note added in v1.5 */
|
||||
/** set whether layer is valid or not - should be used in constructor. */
|
||||
void setValid( bool valid );
|
||||
|
||||
/** called by readLayerXML(), used by children to read state specific to them from
|
||||
@ -474,12 +463,12 @@ class QgsMapLayer : QObject
|
||||
virtual bool writeXml( QDomNode & layer_node, QDomDocument & document );
|
||||
|
||||
|
||||
/** Read custom properties from project file. Added in v1.4
|
||||
/** Read custom properties from project file.
|
||||
@param layerNode note to read from
|
||||
@param keyStartsWith reads only properties starting with the specified string (or all if the string is empty)*/
|
||||
void readCustomProperties( const QDomNode& layerNode, const QString& keyStartsWith = "" );
|
||||
|
||||
/** Write custom properties to project file. Added in v1.4 */
|
||||
/** Write custom properties to project file. */
|
||||
void writeCustomProperties( QDomNode & layerNode, QDomDocument & doc ) const;
|
||||
|
||||
/** debugging member - invoked when a connect() is made to this object */
|
||||
|
@ -152,7 +152,7 @@ class QgsMapSettings
|
||||
* @param layer
|
||||
* @return transform - may be null if the transform is not needed
|
||||
*/
|
||||
const QgsCoordinateTransform* layerTransfrom( QgsMapLayer *layer ) const;
|
||||
const QgsCoordinateTransform* layerTransform( QgsMapLayer *layer ) const;
|
||||
|
||||
//! returns current extent of layer set
|
||||
QgsRectangle fullExtent() const;
|
||||
|
@ -90,6 +90,6 @@ class QgsMultiRenderChecker
|
||||
/**Draws a checkboard pattern for image backgrounds, so that transparency is visible
|
||||
* without requiring a transparent background for the image
|
||||
*/
|
||||
static void drawBackround( QImage* image );
|
||||
static void drawBackground( QImage* image );
|
||||
};
|
||||
|
||||
|
@ -22,19 +22,33 @@ class QgsRenderChecker
|
||||
//only records time for actual render part
|
||||
int elapsedTime();
|
||||
void setElapsedTimeTarget( int theTarget );
|
||||
|
||||
/** Base directory name for the control image (with control image path
|
||||
* suffixed) the path to the image will be constructed like this:
|
||||
* controlImagePath + '/' + mControlName + '/' + mControlName + '.png'
|
||||
*/
|
||||
void setControlName( const QString theName );
|
||||
void setControlName( const QString &theName );
|
||||
|
||||
/** Prefix where the control images are kept.
|
||||
* This will be appended to controlImagePath
|
||||
*/
|
||||
void setControlPathPrefix( const QString theName );
|
||||
void setControlPathPrefix( const QString &theName );
|
||||
|
||||
void setControlPathSuffix( const QString& theName );
|
||||
|
||||
/** Get an md5 hash that uniquely identifies an image */
|
||||
QString imageToHash( QString theImageFile );
|
||||
|
||||
void setRenderedImage( QString theImageFileName );
|
||||
|
||||
/**
|
||||
* The path of the rendered image can be retrieved through that method.
|
||||
* Will return the path set with setRenderedImage() or generated in runTest()
|
||||
*
|
||||
* @return The path to the rendered image
|
||||
*/
|
||||
const QString& renderedImage();
|
||||
|
||||
//! @deprecated since 2.4 - use setMapSettings()
|
||||
void setMapRenderer( QgsMapRenderer * thepMapRenderer ) /Deprecated/;
|
||||
|
||||
@ -81,12 +95,33 @@ class QgsRenderChecker
|
||||
*/
|
||||
bool isKnownAnomaly( QString theDiffImageFile );
|
||||
|
||||
QString expectedImageFile();
|
||||
|
||||
protected:
|
||||
|
||||
/**Draws a checkboard pattern for image backgrounds, so that transparency is visible
|
||||
* without requiring a transparent background for the image
|
||||
*/
|
||||
static void drawBackround( QImage* image );
|
||||
static void drawBackground( QImage* image );
|
||||
|
||||
/**
|
||||
* Returns the path to the expected image file
|
||||
*
|
||||
* @return Path to the expected image file
|
||||
*/
|
||||
const QString& expectedImageFile() const;
|
||||
|
||||
/**
|
||||
* Call this to enable internal buffering of dash messages. You may later call
|
||||
* dashMessages() to get access to the buffered messages. If disabled (default)
|
||||
* dash messages will be sent immediately.
|
||||
*
|
||||
* @param enable Enable or disable buffering
|
||||
*/
|
||||
void enableDashBuffering( bool enable );
|
||||
|
||||
/**
|
||||
* Get access to buffered dash messages.
|
||||
* Only will return something if you call enableDashBuffering( true ); before.
|
||||
*
|
||||
* @return buffered dash messages
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// const QVector<QgsDartMeasurement>& dartMeasurements() const;
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ class QgsSymbolLayerV2Utils
|
||||
static QIcon symbolLayerPreviewIcon( QgsSymbolLayerV2* layer, QgsSymbolV2::OutputUnit u, QSize size, const QgsMapUnitScale& scale = QgsMapUnitScale() );
|
||||
static QIcon colorRampPreviewIcon( QgsVectorColorRampV2* ramp, QSize size );
|
||||
|
||||
static void drawStippledBackround( QPainter* painter, QRect rect );
|
||||
static void drawStippledBackground( QPainter* painter, QRect rect );
|
||||
|
||||
//! @note customContext parameter added in 2.6
|
||||
static QPixmap symbolPreviewPixmap( QgsSymbolV2* symbol, QSize size, QgsRenderContext* customContext = 0 );
|
||||
@ -216,7 +216,7 @@ class QgsSymbolLayerV2Utils
|
||||
* @see colorFromMimeData
|
||||
* @note added in 2.5
|
||||
*/
|
||||
static QMimeData * colorToMimeData( const QColor color );
|
||||
static QMimeData *colorToMimeData( const QColor &color );
|
||||
|
||||
/**
|
||||
* Attempts to parse mime data as a color
|
||||
@ -227,7 +227,7 @@ class QgsSymbolLayerV2Utils
|
||||
* invalid color
|
||||
* @note added in 2.5
|
||||
*/
|
||||
static QColor colorFromMimeData( const QMimeData * mimeData, bool& hasAlpha );
|
||||
static QColor colorFromMimeData( const QMimeData *data, bool& hasAlpha );
|
||||
|
||||
/**
|
||||
* Attempts to parse mime data as a list of named colors
|
||||
@ -297,9 +297,7 @@ class QgsSymbolLayerV2Utils
|
||||
/**Multiplies opacity of image pixel values with a (global) transparency value*/
|
||||
static void multiplyImageOpacity( QImage* image, qreal alpha );
|
||||
|
||||
/** Blurs an image in place, e.g. creating Qt-independent drop shadows
|
||||
* @note added in 1.9
|
||||
*/
|
||||
/** Blurs an image in place, e.g. creating Qt-independent drop shadows */
|
||||
static void blurImageInPlace( QImage& image, const QRect& rect, int radius, bool alphaOnly );
|
||||
|
||||
/** Converts a QColor into a premultiplied ARGB QColor value using a specified alpha value
|
||||
@ -330,6 +328,12 @@ class QgsSymbolLayerV2Utils
|
||||
//! Calculate the centroid point of a QPolygonF
|
||||
static QPointF polygonCentroid( const QPolygonF& points );
|
||||
|
||||
//! Calculate a point within of a QPolygonF
|
||||
static QPointF polygonPointOnSurface( const QPolygonF& points );
|
||||
|
||||
//! Calculate whether a point is within of a QPolygonF
|
||||
static bool pointInPolygon( const QPolygonF &points, const QPointF &point );
|
||||
|
||||
/** Return a new valid expression instance for given field or expression string.
|
||||
* If the input is not a valid expression, it is assumed that it is a field name and gets properly quoted.
|
||||
* If the string is empty, returns null pointer.
|
||||
@ -345,4 +349,5 @@ class QgsSymbolLayerV2Utils
|
||||
* @note added in 2.2
|
||||
*/
|
||||
static QString fieldOrExpressionFromExpression( QgsExpression* expression );
|
||||
|
||||
};
|
||||
|
@ -25,18 +25,40 @@ class QgsAttributeForm : QWidget
|
||||
|
||||
const QgsFeature& feature();
|
||||
|
||||
/**
|
||||
* Hides the button box (Ok/Cancel) and enables auto-commit
|
||||
*/
|
||||
void hideButtonBox();
|
||||
|
||||
/**
|
||||
* Shows the button box (Ok/Cancel) and disables auto-commit
|
||||
*/
|
||||
void showButtonBox();
|
||||
|
||||
/**
|
||||
* Disconnects the button box (Ok/Cancel) from the accept/resetValues slots
|
||||
* If this method is called, you have to create these connections from outside
|
||||
*/
|
||||
void disconnectButtonBox();
|
||||
|
||||
/**
|
||||
* Takes ownership
|
||||
* @param iface
|
||||
*/
|
||||
void addInterface( QgsAttributeFormInterface* iface /Transfer/ );
|
||||
|
||||
/**
|
||||
* Returns the layer for which this form is shown
|
||||
*
|
||||
* @return Layer
|
||||
*/
|
||||
QgsVectorLayer* layer();
|
||||
|
||||
/**
|
||||
* Returns if the form is currently in editable mode.
|
||||
*
|
||||
* @return Editable mode of this form
|
||||
*/
|
||||
bool editable();
|
||||
|
||||
/**
|
||||
@ -55,6 +77,16 @@ class QgsAttributeForm : QWidget
|
||||
*/
|
||||
void setEditCommandMessage( const QString& message );
|
||||
|
||||
/**
|
||||
* Intercepts keypress on custom form (escape should not close it)
|
||||
*
|
||||
* @param object The object for which the event has been sent
|
||||
* @param event The event which is being filtered
|
||||
*
|
||||
* @return true if the event has been handled (key was ESC)
|
||||
*/
|
||||
bool eventFilter( QObject* object, QEvent* event );
|
||||
|
||||
signals:
|
||||
/**
|
||||
* Notifies about changes of attributes
|
||||
@ -80,9 +112,28 @@ class QgsAttributeForm : QWidget
|
||||
void featureSaved( const QgsFeature& feature );
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Call this to change the content of a given attribute. Will update the editor(s) related to this field.
|
||||
*
|
||||
* @param field The field to change
|
||||
* @param value The new value
|
||||
*/
|
||||
void changeAttribute( const QString& field, const QVariant& value );
|
||||
|
||||
/**
|
||||
* Update all editors to correspond to a different feature.
|
||||
*
|
||||
* @param feature The feature which will be represented by the form
|
||||
*/
|
||||
void setFeature( const QgsFeature& feature );
|
||||
|
||||
/**
|
||||
* Save all the values from the editors to the layer.
|
||||
*
|
||||
* @return True if successful
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/**
|
||||
* Alias for save()
|
||||
*
|
||||
@ -97,5 +148,8 @@ class QgsAttributeForm : QWidget
|
||||
*/
|
||||
void reject() /Deprecated/;
|
||||
|
||||
/**
|
||||
* Sets all values to the values of the current feature
|
||||
*/
|
||||
void resetValues();
|
||||
};
|
||||
|
@ -33,6 +33,8 @@ class QgsColorButtonV2: QToolButton
|
||||
|
||||
virtual ~QgsColorButtonV2();
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
/**Return the currently selected color.
|
||||
* @returns currently selected color
|
||||
* @see setColor
|
||||
@ -206,7 +208,7 @@ class QgsColorButtonV2: QToolButton
|
||||
* @param color Color for button background. If no color is specified, the button's current
|
||||
* color will be used
|
||||
*/
|
||||
void setButtonBackground( const QColor color = QColor() );
|
||||
void setButtonBackground( const QColor &color = QColor() );
|
||||
|
||||
/**Copies the current color to the clipboard
|
||||
* @see pasteColor
|
||||
@ -248,7 +250,7 @@ class QgsColorButtonV2: QToolButton
|
||||
* @see setBehaviour
|
||||
* @see behaviour
|
||||
*/
|
||||
void colorClicked( const QColor color );
|
||||
void colorClicked( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -108,7 +108,7 @@ class QgsColorDialogV2 : QDialog
|
||||
/**Sets the current color for the dialog
|
||||
* @param color desired color
|
||||
*/
|
||||
void setColor( const QColor color );
|
||||
void setColor( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -31,13 +31,13 @@ class QgsColorSchemeModel: QAbstractItemModel
|
||||
|
||||
public:
|
||||
|
||||
/**Constructor
|
||||
/**Constructor
|
||||
* @param scheme color scheme for list
|
||||
* @param context context string for color scheme
|
||||
* @param baseColor base color for color scheme
|
||||
* @param parent parent object
|
||||
*/
|
||||
explicit QgsColorSchemeModel( QgsColorScheme* scheme, const QString context = QString(), const QColor baseColor = QColor(), QObject* parent /TransferThis/ = 0 );
|
||||
explicit QgsColorSchemeModel( QgsColorScheme* scheme, const QString context = QString(), const QColor &baseColor = QColor(), QObject* parent /TransferThis/ = 0 );
|
||||
|
||||
~QgsColorSchemeModel();
|
||||
|
||||
@ -67,7 +67,7 @@ class QgsColorSchemeModel: QAbstractItemModel
|
||||
* @param context context for color scheme
|
||||
* @param baseColor base color for color scheme
|
||||
*/
|
||||
void setScheme( QgsColorScheme* scheme, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
void setScheme( QgsColorScheme* scheme, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
/**Get the current color scheme context for the model
|
||||
* @returns context string which is passed to scheme for color generation
|
||||
@ -106,7 +106,7 @@ class QgsColorSchemeList: QTreeView
|
||||
#include <qgscolorschemelist.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
/**Construct a new color swatch grid.
|
||||
* @param parent parent widget
|
||||
@ -114,7 +114,7 @@ class QgsColorSchemeList: QTreeView
|
||||
* @param context context string provided to color scheme
|
||||
* @param baseColor base color for color scheme
|
||||
*/
|
||||
QgsColorSchemeList( QWidget *parent /TransferThis/ = 0, QgsColorScheme* scheme = 0, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
QgsColorSchemeList( QWidget *parent /TransferThis/ = 0, QgsColorScheme* scheme = 0, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
virtual ~QgsColorSchemeList();
|
||||
|
||||
@ -148,7 +148,7 @@ class QgsColorSchemeList: QTreeView
|
||||
* @param context context string provided to color scheme
|
||||
* @param baseColor base color for color scheme
|
||||
*/
|
||||
void setScheme( QgsColorScheme* scheme, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
void setScheme( QgsColorScheme* scheme, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
/**Removes any selected colors from the list
|
||||
*/
|
||||
@ -158,7 +158,7 @@ class QgsColorSchemeList: QTreeView
|
||||
* @param color color to add
|
||||
* @param label optional label for color
|
||||
*/
|
||||
void addColor( const QColor color, const QString label = QString() );
|
||||
void addColor( const QColor &color, const QString &label = QString() );
|
||||
|
||||
/**Pastes colors from clipboard to the list
|
||||
* @see copyColors
|
||||
@ -175,7 +175,7 @@ class QgsColorSchemeList: QTreeView
|
||||
/**Emitted when a color is selected from the list
|
||||
* @param color color selected
|
||||
*/
|
||||
void colorSelected( const QColor color );
|
||||
void colorSelected( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -6,14 +6,13 @@
|
||||
* @see QgsColorGridAction
|
||||
* @note introduced in QGIS 2.5
|
||||
*/
|
||||
|
||||
class QgsColorSwatchGrid: QWidget
|
||||
class QgsColorSwatchGrid : QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgscolorswatchgrid.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
/**Construct a new color swatch grid.
|
||||
* @param scheme QgsColorScheme for colors to show in grid
|
||||
@ -52,12 +51,12 @@ class QgsColorSwatchGrid: QWidget
|
||||
* @param baseColor base color to pass to scheme for color generation
|
||||
* @see baseColor
|
||||
*/
|
||||
void setBaseColor( const QColor baseColor );
|
||||
void setBaseColor( const QColor &baseColor );
|
||||
|
||||
/**Gets the list of colors shown in the grid
|
||||
* @returns list of colors currently shown in the grid
|
||||
*/
|
||||
QgsNamedColorList* colors();
|
||||
QgsNamedColorList *colors();
|
||||
|
||||
public slots:
|
||||
|
||||
@ -70,13 +69,15 @@ class QgsColorSwatchGrid: QWidget
|
||||
/**Emitted when a color has been selected from the widget
|
||||
* @param color selected color
|
||||
*/
|
||||
void colorChanged( const QColor color );
|
||||
void colorChanged( const QColor &color );
|
||||
|
||||
/**Emitted when mouse hovers over widget
|
||||
*/
|
||||
void hovered();
|
||||
|
||||
protected:
|
||||
|
||||
//reimplemented QWidget events
|
||||
void paintEvent( QPaintEvent * event );
|
||||
void mouseMoveEvent( QMouseEvent * event );
|
||||
void mousePressEvent( QMouseEvent * event );
|
||||
@ -87,6 +88,7 @@ class QgsColorSwatchGrid: QWidget
|
||||
|
||||
};
|
||||
|
||||
|
||||
/** \ingroup gui
|
||||
* \class QgsColorGridAction
|
||||
* A color swatch grid which can be embedded into a menu.
|
||||
@ -117,7 +119,7 @@ class QgsColorSwatchGridAction: QWidgetAction
|
||||
* @param baseColor base color to pass to scheme for color generation
|
||||
* @see baseColor
|
||||
*/
|
||||
void setBaseColor( const QColor baseColor );
|
||||
void setBaseColor( const QColor &baseColor );
|
||||
|
||||
/**Get the base color for the color grid
|
||||
* @returns base color which is passed to scheme for color generation
|
||||
@ -148,6 +150,6 @@ class QgsColorSwatchGridAction: QWidgetAction
|
||||
/**Emitted when a color has been selected from the widget
|
||||
* @param color selected color
|
||||
*/
|
||||
void colorChanged( const QColor color );
|
||||
void colorChanged( const QColor &color );
|
||||
|
||||
};
|
||||
|
@ -60,7 +60,7 @@ class QgsColorWidget : QWidget
|
||||
/**Create an icon for dragging colors
|
||||
* @param color for icon
|
||||
*/
|
||||
static QPixmap createDragIcon( const QColor color );
|
||||
static QPixmap createDragIcon( const QColor &color );
|
||||
|
||||
public slots:
|
||||
|
||||
@ -69,7 +69,7 @@ class QgsColorWidget : QWidget
|
||||
* @param emitSignals set to true to emit the colorChanged signal after setting color
|
||||
* @see color
|
||||
*/
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
/**Sets the color component which the widget controls
|
||||
* @param component color component for widget
|
||||
@ -92,7 +92,7 @@ class QgsColorWidget : QWidget
|
||||
/**Emitted when the widget's color changes
|
||||
* @param color new widget color
|
||||
*/
|
||||
void colorChanged( const QColor color );
|
||||
void colorChanged( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
@ -167,7 +167,7 @@ class QgsColorWheel : QgsColorWidget
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
protected:
|
||||
|
||||
@ -211,8 +211,7 @@ class QgsColorBox : QgsColorWidget
|
||||
virtual void setComponent( const ColorComponent component );
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
protected:
|
||||
|
||||
@ -339,7 +338,7 @@ class QgsColorSliderWidget : QgsColorWidget
|
||||
|
||||
virtual void setComponent( const ColorComponent component );
|
||||
virtual void setComponentValue( const int value );
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
};
|
||||
|
||||
@ -366,7 +365,7 @@ class QgsColorTextWidget : QgsColorWidget
|
||||
|
||||
virtual ~QgsColorTextWidget();
|
||||
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
protected:
|
||||
void resizeEvent( QResizeEvent * event );
|
||||
|
@ -20,7 +20,7 @@ class QgsRasterHistogramWidget : QWidget
|
||||
bool computeHistogram( bool forceComputeFlag );
|
||||
|
||||
/** Apply a histoActionTriggered() event. */
|
||||
void histoAction( const QString actionName, bool actionFlag = true );
|
||||
void histoAction( const QString &actionName, bool actionFlag = true );
|
||||
|
||||
/** Apply a histoActionTriggered() event. */
|
||||
void setSelectedBand( int index );
|
||||
|
@ -105,7 +105,7 @@ void Bezier3D::calcSecDer( float t, Vector3D* v )
|
||||
}
|
||||
|
||||
|
||||
void Bezier3D::changeDirection()//does this work correctli? more testing is needed.
|
||||
void Bezier3D::changeDirection()//does this work correctly? more testing is needed.
|
||||
{
|
||||
if ( mControlPoly )
|
||||
{
|
||||
@ -119,6 +119,7 @@ void Bezier3D::changeDirection()//does this work correctli? more testing is need
|
||||
{
|
||||
mControlPoly->insert( i, pointer[( mControlPoly->count()-1 )-i] );
|
||||
}
|
||||
delete [] pointer;
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -56,6 +56,8 @@ class QwtPolarCurve::PrivateData
|
||||
QwtSymbol *symbol;
|
||||
QPen pen;
|
||||
QwtCurveFitter *curveFitter;
|
||||
private:
|
||||
Q_DISABLE_COPY(PrivateData)
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
|
@ -58,6 +58,7 @@ class QWT_POLAR_EXPORT QwtPolarItemDict
|
||||
|
||||
class PrivateData;
|
||||
PrivateData *d_data;
|
||||
Q_DISABLE_COPY( QwtPolarItemDict )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -76,6 +76,7 @@ class QWT_POLAR_EXPORT QwtPolarLayout
|
||||
private:
|
||||
class PrivateData;
|
||||
PrivateData *d_data;
|
||||
Q_DISABLE_COPY(QwtPolarLayout)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -40,6 +40,9 @@ class QwtPolarMarker::PrivateData
|
||||
QwtSymbol *symbol;
|
||||
|
||||
QwtPolarPoint pos;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(PrivateData)
|
||||
};
|
||||
|
||||
//! Sets alignment to Qt::AlignCenter, and style to NoLine
|
||||
|
@ -68,10 +68,15 @@ class QwtPolarSpectrogram::PrivateData
|
||||
|
||||
~PrivateData()
|
||||
{
|
||||
delete data;
|
||||
delete colorMap;
|
||||
}
|
||||
|
||||
QwtRasterData *data;
|
||||
QwtColorMap *colorMap;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(PrivateData)
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
|
@ -61,6 +61,8 @@ public:
|
||||
QwtCurveFitter *curveFitter;
|
||||
|
||||
QwtPolarCurve::LegendAttributes legendAttributes;
|
||||
private:
|
||||
Q_DISABLE_COPY(PrivateData)
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
|
@ -50,6 +50,7 @@ private:
|
||||
|
||||
class PrivateData;
|
||||
PrivateData *d_data;
|
||||
Q_DISABLE_COPY(QwtPolarItemDict);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -71,6 +71,8 @@ protected:
|
||||
private:
|
||||
class PrivateData;
|
||||
PrivateData *d_data;
|
||||
|
||||
Q_DISABLE_COPY(QwtPolarLayout)
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarLayout::Options )
|
||||
|
@ -35,6 +35,8 @@ public:
|
||||
const QwtSymbol *symbol;
|
||||
|
||||
QwtPointPolar pos;
|
||||
private:
|
||||
Q_DISABLE_COPY(PrivateData)
|
||||
};
|
||||
|
||||
//! Sets alignment to Qt::AlignCenter, and style to NoLine
|
||||
|
@ -102,6 +102,7 @@ public:
|
||||
|
||||
~PrivateData()
|
||||
{
|
||||
delete colorMap;
|
||||
}
|
||||
|
||||
QwtRasterData *data;
|
||||
@ -110,6 +111,8 @@ public:
|
||||
uint renderThreadCount;
|
||||
|
||||
QwtPolarSpectrogram::PaintAttributes paintAttributes;
|
||||
private:
|
||||
Q_DISABLE_COPY(PrivateData)
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
|
@ -165,6 +165,7 @@ void myPrint( const char *fmt, ... )
|
||||
#else
|
||||
vfprintf( stderr, fmt, ap );
|
||||
#endif
|
||||
va_end( ap );
|
||||
}
|
||||
|
||||
static void dumpBacktrace( unsigned int depth )
|
||||
|
@ -1665,7 +1665,7 @@ int QgsComposerMapGrid::xGridLinesCRSTransform( const QgsRectangle& bbox, const
|
||||
|
||||
QList<QPolygonF> lineSegments = trimLinesToMap( gridLine, QgsRectangle( mComposerMap->rect() ) );
|
||||
QList<QPolygonF>::const_iterator lineIt = lineSegments.constBegin();
|
||||
for ( ; lineIt != lineSegments.constEnd(); lineIt ++ )
|
||||
for ( ; lineIt != lineSegments.constEnd(); ++lineIt )
|
||||
{
|
||||
if (( *lineIt ).size() > 0 )
|
||||
{
|
||||
@ -1731,7 +1731,7 @@ int QgsComposerMapGrid::yGridLinesCRSTransform( const QgsRectangle& bbox, const
|
||||
//clip grid line to map polygon
|
||||
QList<QPolygonF> lineSegments = trimLinesToMap( gridLine, QgsRectangle( mComposerMap->rect() ) );
|
||||
QList<QPolygonF>::const_iterator lineIt = lineSegments.constBegin();
|
||||
for ( ; lineIt != lineSegments.constEnd(); lineIt ++ )
|
||||
for ( ; lineIt != lineSegments.constEnd(); ++lineIt )
|
||||
{
|
||||
if (( *lineIt ).size() > 0 )
|
||||
{
|
||||
@ -2331,7 +2331,7 @@ QList<QPolygonF> QgsComposerMapGrid::trimLinesToMap( const QPolygonF& line, cons
|
||||
|
||||
QList<QPolygonF> trimmedLines;
|
||||
QList<QgsGeometry*>::const_iterator geomIt = intersectedParts.constBegin();
|
||||
for ( ; geomIt != intersectedParts.constEnd(); geomIt++ )
|
||||
for ( ; geomIt != intersectedParts.constEnd(); ++geomIt )
|
||||
{
|
||||
trimmedLines << ( *geomIt )->asQPolygonF();
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ int QgsComposerTableV2::rowsVisible( const double frameHeight, const bool includ
|
||||
return qMax( floor( contentHeight / rowHeight ), 0.0 );
|
||||
}
|
||||
|
||||
QPair< int, int > QgsComposerTableV2::rowRange( const QRectF extent, const int frameIndex ) const
|
||||
QPair< int, int > QgsComposerTableV2::rowRange( const QRectF &extent, const int frameIndex ) const
|
||||
{
|
||||
//calculate row height
|
||||
if ( frameIndex >= frameCount() )
|
||||
|
@ -432,7 +432,7 @@ class CORE_EXPORT QgsComposerTableV2: public QgsComposerMultiFrame
|
||||
* @param frameIndex index number for frame
|
||||
* @returns row range
|
||||
*/
|
||||
QPair<int, int> rowRange( const QRectF extent, const int frameIndex ) const;
|
||||
QPair<int, int> rowRange( const QRectF &extent, const int frameIndex ) const;
|
||||
|
||||
/**Draws the horizontal grid lines for the table.
|
||||
* @param painter destination painter for grid lines
|
||||
|
@ -73,6 +73,7 @@ namespace pal
|
||||
va_list list;
|
||||
va_start( list, fmt );
|
||||
vfprintf( stderr, fmt, list );
|
||||
va_end( list );
|
||||
}
|
||||
|
||||
void geosNotice( const char *fmt, ... )
|
||||
@ -80,6 +81,7 @@ namespace pal
|
||||
va_list list;
|
||||
va_start( list, fmt );
|
||||
vfprintf( stdout, fmt, list );
|
||||
va_end( list );
|
||||
}
|
||||
|
||||
GEOSContextHandle_t geosContext()
|
||||
|
@ -364,7 +364,7 @@ namespace pal
|
||||
|
||||
|
||||
// iterate on all shape points except points which are in the hole
|
||||
double isValid;
|
||||
bool isValid;
|
||||
int k, l;
|
||||
for ( i = ( cHull[holeE] + 1 ) % nbp; i != ( cHull[holeS] - 1 + nbp ) % nbp; i = j )
|
||||
{
|
||||
|
@ -87,6 +87,9 @@ namespace pal
|
||||
|
||||
|
||||
int getId( int key );
|
||||
private:
|
||||
PriorityQueue( const PriorityQueue & );
|
||||
PriorityQueue &operator=( const PriorityQueue & );
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -155,10 +155,10 @@ namespace pal
|
||||
~Iterator() { }
|
||||
|
||||
/// Is iterator invalid
|
||||
bool IsNull() { return ( m_tos <= 0 ); }
|
||||
bool IsNull() const { return ( m_tos <= 0 ); }
|
||||
|
||||
/// Is iterator pointing to valid data
|
||||
bool IsNotNull() { return ( m_tos > 0 ); }
|
||||
bool IsNotNull() const { return ( m_tos > 0 ); }
|
||||
|
||||
/// Access the current data element. Caller must be sure iterator is not NULL first.
|
||||
DATATYPE& operator*()
|
||||
|
@ -34,7 +34,7 @@ QgsColorScheme::~QgsColorScheme()
|
||||
|
||||
}
|
||||
|
||||
bool QgsColorScheme::setColors( const QgsNamedColorList colors, const QString context, const QColor baseColor )
|
||||
bool QgsColorScheme::setColors( const QgsNamedColorList &colors, const QString &context, const QColor &baseColor )
|
||||
{
|
||||
//base implementation does nothing
|
||||
Q_UNUSED( colors );
|
||||
@ -58,8 +58,7 @@ QgsRecentColorScheme::~QgsRecentColorScheme()
|
||||
|
||||
}
|
||||
|
||||
QgsNamedColorList QgsRecentColorScheme::fetchColors( const QString context,
|
||||
const QColor baseColor )
|
||||
QgsNamedColorList QgsRecentColorScheme::fetchColors( const QString &context, const QColor &baseColor )
|
||||
{
|
||||
Q_UNUSED( context );
|
||||
Q_UNUSED( baseColor );
|
||||
@ -93,7 +92,7 @@ QgsCustomColorScheme::~QgsCustomColorScheme()
|
||||
|
||||
}
|
||||
|
||||
QgsNamedColorList QgsCustomColorScheme::fetchColors( const QString context, const QColor baseColor )
|
||||
QgsNamedColorList QgsCustomColorScheme::fetchColors( const QString &context, const QColor &baseColor )
|
||||
{
|
||||
Q_UNUSED( context );
|
||||
Q_UNUSED( baseColor );
|
||||
@ -142,7 +141,7 @@ QgsNamedColorList QgsCustomColorScheme::fetchColors( const QString context, cons
|
||||
return colorList;
|
||||
}
|
||||
|
||||
bool QgsCustomColorScheme::setColors( const QgsNamedColorList colors, const QString context, const QColor baseColor )
|
||||
bool QgsCustomColorScheme::setColors( const QgsNamedColorList &colors, const QString &context, const QColor &baseColor )
|
||||
{
|
||||
Q_UNUSED( context );
|
||||
Q_UNUSED( baseColor );
|
||||
@ -181,7 +180,7 @@ QgsProjectColorScheme::~QgsProjectColorScheme()
|
||||
|
||||
}
|
||||
|
||||
QgsNamedColorList QgsProjectColorScheme::fetchColors( const QString context, const QColor baseColor )
|
||||
QgsNamedColorList QgsProjectColorScheme::fetchColors( const QString &context, const QColor &baseColor )
|
||||
{
|
||||
Q_UNUSED( context );
|
||||
Q_UNUSED( baseColor );
|
||||
@ -210,7 +209,7 @@ QgsNamedColorList QgsProjectColorScheme::fetchColors( const QString context, con
|
||||
return colorList;
|
||||
}
|
||||
|
||||
bool QgsProjectColorScheme::setColors( const QgsNamedColorList colors, const QString context, const QColor baseColor )
|
||||
bool QgsProjectColorScheme::setColors( const QgsNamedColorList &colors, const QString &context, const QColor &baseColor )
|
||||
{
|
||||
Q_UNUSED( context );
|
||||
Q_UNUSED( baseColor );
|
||||
@ -253,7 +252,7 @@ QgsGplColorScheme::~QgsGplColorScheme()
|
||||
|
||||
}
|
||||
|
||||
QgsNamedColorList QgsGplColorScheme::fetchColors( const QString context, const QColor baseColor )
|
||||
QgsNamedColorList QgsGplColorScheme::fetchColors( const QString &context, const QColor &baseColor )
|
||||
{
|
||||
Q_UNUSED( context );
|
||||
Q_UNUSED( baseColor );
|
||||
@ -271,7 +270,7 @@ QgsNamedColorList QgsGplColorScheme::fetchColors( const QString context, const Q
|
||||
return QgsSymbolLayerV2Utils::importColorsFromGpl( sourceFile, ok, name );
|
||||
}
|
||||
|
||||
bool QgsGplColorScheme::setColors( const QgsNamedColorList colors, const QString context, const QColor baseColor )
|
||||
bool QgsGplColorScheme::setColors( const QgsNamedColorList &colors, const QString &context, const QColor &baseColor )
|
||||
{
|
||||
Q_UNUSED( context );
|
||||
Q_UNUSED( baseColor );
|
||||
@ -291,7 +290,7 @@ bool QgsGplColorScheme::setColors( const QgsNamedColorList colors, const QString
|
||||
// QgsUserColorScheme
|
||||
//
|
||||
|
||||
QgsUserColorScheme::QgsUserColorScheme( const QString filename )
|
||||
QgsUserColorScheme::QgsUserColorScheme( const QString &filename )
|
||||
: QgsGplColorScheme()
|
||||
, mFilename( filename )
|
||||
{
|
||||
|
@ -74,8 +74,8 @@ class CORE_EXPORT QgsColorScheme
|
||||
* to colors related to the base color.
|
||||
* @returns a list of QPairs of color and color name
|
||||
*/
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() ) = 0;
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() ) = 0;
|
||||
|
||||
/**Returns whether the color scheme is editable
|
||||
* @returns true if scheme is editable
|
||||
@ -90,7 +90,7 @@ class CORE_EXPORT QgsColorScheme
|
||||
* @returns true if colors were set successfully
|
||||
* @see isEditable
|
||||
*/
|
||||
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
/**Clones a color scheme
|
||||
* @returns copy of color scheme
|
||||
@ -113,10 +113,10 @@ class CORE_EXPORT QgsGplColorScheme : public QgsColorScheme
|
||||
|
||||
virtual ~QgsGplColorScheme();
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() );
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() );
|
||||
|
||||
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
protected:
|
||||
|
||||
@ -140,7 +140,7 @@ class CORE_EXPORT QgsUserColorScheme : public QgsGplColorScheme
|
||||
/**Constructs a new user color scheme, using a specified gpl palette file
|
||||
* @param filename filename of gpl palette file stored in the users "palettes" folder
|
||||
*/
|
||||
QgsUserColorScheme( const QString filename );
|
||||
QgsUserColorScheme( const QString &filename );
|
||||
|
||||
virtual ~QgsUserColorScheme();
|
||||
|
||||
@ -153,7 +153,7 @@ class CORE_EXPORT QgsUserColorScheme : public QgsGplColorScheme
|
||||
/**Sets the name for the scheme
|
||||
* @param name new name
|
||||
*/
|
||||
void setName( const QString name ) { mName = name; }
|
||||
void setName( const QString &name ) { mName = name; }
|
||||
|
||||
/**Erases the associated gpl palette file from the users "palettes" folder
|
||||
* @returns true if erase was successful
|
||||
@ -187,8 +187,8 @@ class CORE_EXPORT QgsRecentColorScheme : public QgsColorScheme
|
||||
|
||||
virtual SchemeFlags flags() const { return ShowInAllContexts; }
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() );
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() );
|
||||
|
||||
QgsColorScheme* clone() const;
|
||||
};
|
||||
@ -210,12 +210,12 @@ class CORE_EXPORT QgsCustomColorScheme : public QgsColorScheme
|
||||
|
||||
virtual SchemeFlags flags() const { return ShowInAllContexts; }
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() );
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() );
|
||||
|
||||
virtual bool isEditable() const { return true; }
|
||||
|
||||
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
QgsColorScheme* clone() const;
|
||||
};
|
||||
@ -237,12 +237,12 @@ class CORE_EXPORT QgsProjectColorScheme : public QgsColorScheme
|
||||
|
||||
virtual SchemeFlags flags() const { return ShowInAllContexts; }
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() );
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() );
|
||||
|
||||
virtual bool isEditable() const { return true; }
|
||||
|
||||
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
QgsColorScheme* clone() const;
|
||||
};
|
||||
|
@ -273,7 +273,7 @@ void QgsCoordinateTransform::initialise()
|
||||
//
|
||||
|
||||
|
||||
QgsPoint QgsCoordinateTransform::transform( const QgsPoint thePoint, TransformDirection direction ) const
|
||||
QgsPoint QgsCoordinateTransform::transform( const QgsPoint &thePoint, TransformDirection direction ) const
|
||||
{
|
||||
if ( mShortCircuit || !mInitialisedFlag )
|
||||
return thePoint;
|
||||
@ -296,7 +296,7 @@ QgsPoint QgsCoordinateTransform::transform( const QgsPoint thePoint, TransformDi
|
||||
}
|
||||
|
||||
|
||||
QgsPoint QgsCoordinateTransform::transform( const double theX, const double theY = 0, TransformDirection direction ) const
|
||||
QgsPoint QgsCoordinateTransform::transform( const double theX, const double theY = 0.0, TransformDirection direction ) const
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -310,7 +310,7 @@ QgsPoint QgsCoordinateTransform::transform( const double theX, const double theY
|
||||
}
|
||||
}
|
||||
|
||||
QgsRectangle QgsCoordinateTransform::transform( const QgsRectangle theRect, TransformDirection direction ) const
|
||||
QgsRectangle QgsCoordinateTransform::transform( const QgsRectangle &theRect, TransformDirection direction ) const
|
||||
{
|
||||
if ( mShortCircuit || !mInitialisedFlag )
|
||||
return theRect;
|
||||
@ -520,7 +520,7 @@ void QgsCoordinateTransform::transformInPlace(
|
||||
#endif //ANDROID
|
||||
|
||||
|
||||
QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle rect, TransformDirection direction, const bool handle180Crossover ) const
|
||||
QgsRectangle QgsCoordinateTransform::transformBoundingBox( const QgsRectangle &rect, TransformDirection direction, const bool handle180Crossover ) const
|
||||
{
|
||||
// Calculate the bounding box of a QgsRectangle in the source CRS
|
||||
// when projected to the destination CRS (or the inverse).
|
||||
|
@ -128,7 +128,7 @@ class CORE_EXPORT QgsCoordinateTransform : public QObject
|
||||
* @param direction TransformDirection (defaults to ForwardTransform)
|
||||
* @return QgsPoint in Destination Coordinate System
|
||||
*/
|
||||
QgsPoint transform( const QgsPoint p, TransformDirection direction = ForwardTransform ) const;
|
||||
QgsPoint transform( const QgsPoint &p, TransformDirection direction = ForwardTransform ) const;
|
||||
|
||||
/*! Transform the point specified by x,y from Source Coordinate System to Destination Coordinate System
|
||||
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
|
||||
@ -152,7 +152,7 @@ class CORE_EXPORT QgsCoordinateTransform : public QObject
|
||||
* longitude line is required
|
||||
* @return QgsRectangle in Destination Coordinate System
|
||||
*/
|
||||
QgsRectangle transformBoundingBox( const QgsRectangle theRect, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const;
|
||||
QgsRectangle transformBoundingBox( const QgsRectangle &theRect, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const;
|
||||
|
||||
// Same as for the other transform() functions, but alters the x
|
||||
// and y variables in place. The second one works with good old-fashioned
|
||||
@ -182,7 +182,7 @@ class CORE_EXPORT QgsCoordinateTransform : public QObject
|
||||
* @param direction TransformDirection (defaults to ForwardTransform)
|
||||
* @return QgsRectangle in Destination Coordinate System
|
||||
*/
|
||||
QgsRectangle transform( const QgsRectangle theRect, TransformDirection direction = ForwardTransform ) const;
|
||||
QgsRectangle transform( const QgsRectangle &theRect, TransformDirection direction = ForwardTransform ) const;
|
||||
|
||||
/*! Transform an array of coordinates to a different Coordinate System
|
||||
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
|
||||
|
@ -87,7 +87,7 @@ class CORE_EXPORT QgsDataItem : public QObject
|
||||
|
||||
virtual bool equal( const QgsDataItem *other );
|
||||
|
||||
virtual QWidget * paramWidget() { return 0; }
|
||||
virtual QWidget *paramWidget() { return 0; }
|
||||
|
||||
// list of actions provided by this item - usually used for popup menu on right-click
|
||||
virtual QList<QAction*> actions() { return QList<QAction*>(); }
|
||||
@ -132,7 +132,7 @@ class CORE_EXPORT QgsDataItem : public QObject
|
||||
virtual QIcon icon();
|
||||
QString name() const { return mName; }
|
||||
QString path() const { return mPath; }
|
||||
void setPath( const QString path ) { mPath = path; }
|
||||
void setPath( const QString &path ) { mPath = path; }
|
||||
|
||||
// Because QIcon (QPixmap) must not be used in outside the GUI thread, it is
|
||||
// not possible to set mIcon in constructor. Either use mIconName/setIconName()
|
||||
|
@ -6307,7 +6307,7 @@ QgsGeometry* QgsGeometry::convertToPoint( bool destMultipart )
|
||||
|
||||
case QGis::Polygon:
|
||||
{
|
||||
// can only transfrom if destination is multipoint
|
||||
// can only transform if destination is multipoint
|
||||
if ( !destMultipart )
|
||||
return 0;
|
||||
|
||||
|
@ -334,7 +334,7 @@ void QgsGml::endElement( const XML_Char* el )
|
||||
|
||||
if (( theParseMode == coordinate && elementName == GML_NAMESPACE + NS_SEPARATOR + "coordinates" )
|
||||
|| ( theParseMode == posList && (
|
||||
elementName == GML_NAMESPACE + NS_SEPARATOR + "posList"
|
||||
elementName == GML_NAMESPACE + NS_SEPARATOR + "pos"
|
||||
|| elementName == GML_NAMESPACE + NS_SEPARATOR + "posList" ) ) )
|
||||
{
|
||||
mParseModeStack.pop();
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "qgsvectorlayer.h"
|
||||
|
||||
const QString QgsLegacyHelpers::convertEditType( QgsVectorLayer::EditType editType, QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name, const QDomElement editTypeElement )
|
||||
const QString QgsLegacyHelpers::convertEditType( QgsVectorLayer::EditType editType, QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name, const QDomElement &editTypeElement )
|
||||
{
|
||||
QString widgetType = "TextEdit"; // Fallback
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
class CORE_EXPORT QgsLegacyHelpers
|
||||
{
|
||||
public:
|
||||
Q_DECL_DEPRECATED static const QString convertEditType( QgsVectorLayer::EditType editType, QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name, const QDomElement editTypeElement = QDomElement() );
|
||||
Q_DECL_DEPRECATED static const QString convertEditType( QgsVectorLayer::EditType editType, QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name, const QDomElement &editTypeElement = QDomElement() );
|
||||
Q_DECL_DEPRECATED static QgsVectorLayer::EditType convertEditType( const QString& editType, const QgsEditorWidgetConfig& cfg, QgsVectorLayer* vl, const QString& name );
|
||||
|
||||
private:
|
||||
|
@ -38,7 +38,7 @@ void QgsMapHitTest::run()
|
||||
|
||||
if ( mSettings.hasCrsTransformEnabled() )
|
||||
{
|
||||
context.setCoordinateTransform( mSettings.layerTransfrom( vl ) );
|
||||
context.setCoordinateTransform( mSettings.layerTransform( vl ) );
|
||||
context.setExtent( mSettings.outputExtentToLayerExtent( vl, mSettings.visibleExtent() ) );
|
||||
}
|
||||
|
||||
|
@ -660,7 +660,7 @@ QList<QgsMapLayer*> QgsMapLayer::fromLayerDefinition( QDomDocument& document )
|
||||
return layers;
|
||||
}
|
||||
|
||||
QList<QgsMapLayer *> QgsMapLayer::fromLayerDefinitionFile( const QString qlrfile )
|
||||
QList<QgsMapLayer *> QgsMapLayer::fromLayerDefinitionFile( const QString &qlrfile )
|
||||
{
|
||||
QFile file( qlrfile );
|
||||
if ( !file.open( QIODevice::ReadOnly ) )
|
||||
@ -860,8 +860,6 @@ QString QgsMapLayer::styleURI()
|
||||
myURI.chop( 7 );
|
||||
else if ( myURI.endsWith( ".tgz", Qt::CaseInsensitive ) )
|
||||
myURI.chop( 4 );
|
||||
else if ( myURI.endsWith( ".gz", Qt::CaseInsensitive ) )
|
||||
myURI.chop( 3 );
|
||||
myFileInfo.setFile( myURI );
|
||||
// get the file name for our .qml style file
|
||||
key = myFileInfo.path() + QDir::separator() + myFileInfo.completeBaseName() + ".qml";
|
||||
|
@ -226,7 +226,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
|
||||
/** Creates a new layer from a layer defininition document
|
||||
*/
|
||||
static QList<QgsMapLayer*> fromLayerDefinition( QDomDocument& document );
|
||||
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString qlrfile );
|
||||
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString &qlrfile );
|
||||
|
||||
/** Set a custom property for layer. Properties are stored in a map and saved in project file. */
|
||||
void setCustomProperty( const QString& key, const QVariant& value );
|
||||
|
@ -298,7 +298,7 @@ void QgsMapRendererJob::drawOldLabeling( const QgsMapSettings& settings, QgsRend
|
||||
|
||||
if ( settings.hasCrsTransformEnabled() )
|
||||
{
|
||||
ct = settings.layerTransfrom( ml );
|
||||
ct = settings.layerTransform( ml );
|
||||
if ( ct )
|
||||
reprojectToLayerExtent( ct, ml->crs().geographicFlag(), r1, r2 );
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin
|
||||
|
||||
if ( mSettings.hasCrsTransformEnabled() )
|
||||
{
|
||||
ct = mSettings.layerTransfrom( ml );
|
||||
ct = mSettings.layerTransform( ml );
|
||||
if ( ct )
|
||||
{
|
||||
reprojectToLayerExtent( ct, ml->crs().geographicFlag(), r1, r2 );
|
||||
|
@ -274,7 +274,7 @@ double QgsMapSettings::scale() const
|
||||
|
||||
|
||||
|
||||
const QgsCoordinateTransform* QgsMapSettings::layerTransfrom( QgsMapLayer *layer ) const
|
||||
const QgsCoordinateTransform* QgsMapSettings::layerTransform( QgsMapLayer *layer ) const
|
||||
{
|
||||
return mDatumTransformStore.transformation( layer );
|
||||
}
|
||||
@ -287,7 +287,7 @@ QgsRectangle QgsMapSettings::layerExtentToOutputExtent( QgsMapLayer* theLayer, Q
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( const QgsCoordinateTransform* ct = layerTransfrom( theLayer ) )
|
||||
if ( const QgsCoordinateTransform* ct = layerTransform( theLayer ) )
|
||||
{
|
||||
QgsDebugMsg( QString( "sourceCrs = " + ct->sourceCrs().authid() ) );
|
||||
QgsDebugMsg( QString( "destCRS = " + ct->destCRS().authid() ) );
|
||||
@ -313,7 +313,7 @@ QgsRectangle QgsMapSettings::outputExtentToLayerExtent( QgsMapLayer* theLayer, Q
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( const QgsCoordinateTransform* ct = layerTransfrom( theLayer ) )
|
||||
if ( const QgsCoordinateTransform* ct = layerTransform( theLayer ) )
|
||||
{
|
||||
QgsDebugMsg( QString( "sourceCrs = " + ct->sourceCrs().authid() ) );
|
||||
QgsDebugMsg( QString( "destCRS = " + ct->destCRS().authid() ) );
|
||||
@ -339,7 +339,7 @@ QgsPoint QgsMapSettings::layerToMapCoordinates( QgsMapLayer* theLayer, QgsPoint
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( const QgsCoordinateTransform* ct = layerTransfrom( theLayer ) )
|
||||
if ( const QgsCoordinateTransform* ct = layerTransform( theLayer ) )
|
||||
point = ct->transform( point, QgsCoordinateTransform::ForwardTransform );
|
||||
}
|
||||
catch ( QgsCsException &cse )
|
||||
@ -361,7 +361,7 @@ QgsRectangle QgsMapSettings::layerToMapCoordinates( QgsMapLayer* theLayer, QgsRe
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( const QgsCoordinateTransform* ct = layerTransfrom( theLayer ) )
|
||||
if ( const QgsCoordinateTransform* ct = layerTransform( theLayer ) )
|
||||
rect = ct->transform( rect, QgsCoordinateTransform::ForwardTransform );
|
||||
}
|
||||
catch ( QgsCsException &cse )
|
||||
@ -383,7 +383,7 @@ QgsPoint QgsMapSettings::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsPoint
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( const QgsCoordinateTransform* ct = layerTransfrom( theLayer ) )
|
||||
if ( const QgsCoordinateTransform* ct = layerTransform( theLayer ) )
|
||||
point = ct->transform( point, QgsCoordinateTransform::ReverseTransform );
|
||||
}
|
||||
catch ( QgsCsException &cse )
|
||||
@ -405,7 +405,7 @@ QgsRectangle QgsMapSettings::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRe
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( const QgsCoordinateTransform* ct = layerTransfrom( theLayer ) )
|
||||
if ( const QgsCoordinateTransform* ct = layerTransform( theLayer ) )
|
||||
rect = ct->transform( rect, QgsCoordinateTransform::ReverseTransform );
|
||||
}
|
||||
catch ( QgsCsException &cse )
|
||||
@ -446,7 +446,7 @@ QgsRectangle QgsMapSettings::fullExtent() const
|
||||
|
||||
if ( lyr->extent().isNull() )
|
||||
{
|
||||
it++;
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -458,7 +458,7 @@ QgsRectangle QgsMapSettings::fullExtent() const
|
||||
fullExtent.unionRect( extent );
|
||||
|
||||
}
|
||||
it++;
|
||||
++it;
|
||||
}
|
||||
|
||||
if ( fullExtent.width() == 0.0 || fullExtent.height() == 0.0 )
|
||||
|
@ -198,7 +198,7 @@ class CORE_EXPORT QgsMapSettings
|
||||
* @param layer
|
||||
* @return transform - may be null if the transform is not needed
|
||||
*/
|
||||
const QgsCoordinateTransform* layerTransfrom( QgsMapLayer *layer ) const;
|
||||
const QgsCoordinateTransform* layerTransform( QgsMapLayer *layer ) const;
|
||||
|
||||
//! returns current extent of layer set
|
||||
QgsRectangle fullExtent() const;
|
||||
|
@ -117,7 +117,7 @@ class CORE_EXPORT QgsMultiRenderChecker
|
||||
/**Draws a checkboard pattern for image backgrounds, so that transparency is visible
|
||||
* without requiring a transparent background for the image
|
||||
*/
|
||||
static void drawBackround( QImage* image ) { QgsRenderChecker::drawBackround( image ); }
|
||||
static void drawBackground( QImage* image ) { QgsRenderChecker::drawBackground( image ); }
|
||||
|
||||
private:
|
||||
QString mReport;
|
||||
|
@ -47,7 +47,7 @@ QString QgsRenderChecker::controlImagePath() const
|
||||
return myControlImageDir;
|
||||
}
|
||||
|
||||
void QgsRenderChecker::setControlName( const QString theName )
|
||||
void QgsRenderChecker::setControlName( const QString &theName )
|
||||
{
|
||||
mControlName = theName;
|
||||
mExpectedImageFile = controlImagePath() + theName + QDir::separator() + mControlPathSuffix
|
||||
@ -77,7 +77,7 @@ void QgsRenderChecker::setMapSettings( const QgsMapSettings& mapSettings )
|
||||
mMapSettings = mapSettings;
|
||||
}
|
||||
|
||||
void QgsRenderChecker::drawBackround( QImage* image )
|
||||
void QgsRenderChecker::drawBackground( QImage* image )
|
||||
{
|
||||
// create a 2x2 checker-board image
|
||||
uchar pixDataRGB[] = { 255, 255, 255, 255,
|
||||
|
@ -61,12 +61,12 @@ class CORE_EXPORT QgsRenderChecker
|
||||
* suffixed) the path to the image will be constructed like this:
|
||||
* controlImagePath + '/' + mControlName + '/' + mControlName + '.png'
|
||||
*/
|
||||
void setControlName( const QString theName );
|
||||
void setControlName( const QString &theName );
|
||||
|
||||
/** Prefix where the control images are kept.
|
||||
* This will be appended to controlImagePath
|
||||
*/
|
||||
void setControlPathPrefix( const QString theName ) { mControlPathPrefix = theName + QDir::separator(); }
|
||||
void setControlPathPrefix( const QString &theName ) { mControlPathPrefix = theName + QDir::separator(); }
|
||||
|
||||
void setControlPathSuffix( const QString& theName ) { mControlPathSuffix = theName + QDir::separator(); }
|
||||
|
||||
@ -82,6 +82,7 @@ class CORE_EXPORT QgsRenderChecker
|
||||
* @return The path to the rendered image
|
||||
*/
|
||||
const QString& renderedImage() { return mRenderedImageFile; }
|
||||
|
||||
//! @deprecated since 2.4 - use setMapSettings()
|
||||
Q_DECL_DEPRECATED void setMapRenderer( QgsMapRenderer * thepMapRenderer );
|
||||
|
||||
@ -131,7 +132,7 @@ class CORE_EXPORT QgsRenderChecker
|
||||
/**Draws a checkboard pattern for image backgrounds, so that transparency is visible
|
||||
* without requiring a transparent background for the image
|
||||
*/
|
||||
static void drawBackround( QImage* image );
|
||||
static void drawBackground( QImage* image );
|
||||
|
||||
/**
|
||||
* Returns the path to the expected image file
|
||||
@ -154,6 +155,7 @@ class CORE_EXPORT QgsRenderChecker
|
||||
* Only will return something if you call enableDashBuffering( true ); before.
|
||||
*
|
||||
* @return buffered dash messages
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
const QVector<QgsDartMeasurement>& dartMeasurements() const { return mDashMessages; }
|
||||
|
||||
|
@ -75,6 +75,7 @@ class CORE_EXPORT QgsVectorLayerCache : public QObject
|
||||
QgsVectorLayerCache* mCache;
|
||||
|
||||
friend class QgsVectorLayerCache;
|
||||
Q_DISABLE_COPY( QgsCachedFeature )
|
||||
};
|
||||
|
||||
public:
|
||||
|
@ -338,7 +338,7 @@ void QgsVectorLayerRenderer::drawRendererV2Levels( QgsFeatureIterator& fit )
|
||||
mCache->cacheGeometry( fet.id(), *fet.geometry() );
|
||||
}
|
||||
|
||||
if ( sym && mContext.labelingEngine() )
|
||||
if ( mContext.labelingEngine() )
|
||||
{
|
||||
if ( mLabeling )
|
||||
{
|
||||
|
@ -585,7 +585,7 @@ QPixmap QgsSymbolLayerV2Utils::colorRampPreviewPixmap( QgsVectorColorRampV2* ram
|
||||
painter.begin( &pixmap );
|
||||
|
||||
//draw stippled background, for transparent images
|
||||
drawStippledBackround( &painter, QRect( 0, 0, size.width(), size.height() ) );
|
||||
drawStippledBackground( &painter, QRect( 0, 0, size.width(), size.height() ) );
|
||||
|
||||
// antialising makes the colors duller, and no point in antialiasing a color ramp
|
||||
// painter.setRenderHint( QPainter::Antialiasing );
|
||||
@ -599,7 +599,7 @@ QPixmap QgsSymbolLayerV2Utils::colorRampPreviewPixmap( QgsVectorColorRampV2* ram
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
void QgsSymbolLayerV2Utils::drawStippledBackround( QPainter* painter, QRect rect )
|
||||
void QgsSymbolLayerV2Utils::drawStippledBackground( QPainter* painter, QRect rect )
|
||||
{
|
||||
// create a 2x2 checker-board image
|
||||
uchar pixDataRGB[] = { 255, 255, 255, 255,
|
||||
@ -2817,7 +2817,7 @@ QList<QColor> QgsSymbolLayerV2Utils::parseColorList( const QString colorStr )
|
||||
return colors;
|
||||
}
|
||||
|
||||
QMimeData * QgsSymbolLayerV2Utils::colorToMimeData( const QColor color )
|
||||
QMimeData * QgsSymbolLayerV2Utils::colorToMimeData( const QColor &color )
|
||||
{
|
||||
//set both the mime color data (which includes alpha channel), and the text (which is the color's hex
|
||||
//value, and can be used when pasting colors outside of QGIS).
|
||||
|
@ -106,7 +106,7 @@ class CORE_EXPORT QgsSymbolLayerV2Utils
|
||||
static QIcon symbolLayerPreviewIcon( QgsSymbolLayerV2* layer, QgsSymbolV2::OutputUnit u, QSize size, const QgsMapUnitScale& scale = QgsMapUnitScale() );
|
||||
static QIcon colorRampPreviewIcon( QgsVectorColorRampV2* ramp, QSize size );
|
||||
|
||||
static void drawStippledBackround( QPainter* painter, QRect rect );
|
||||
static void drawStippledBackground( QPainter* painter, QRect rect );
|
||||
|
||||
//! @note customContext parameter added in 2.6
|
||||
static QPixmap symbolPreviewPixmap( QgsSymbolV2* symbol, QSize size, QgsRenderContext* customContext = 0 );
|
||||
@ -254,7 +254,7 @@ class CORE_EXPORT QgsSymbolLayerV2Utils
|
||||
* @see colorFromMimeData
|
||||
* @note added in 2.5
|
||||
*/
|
||||
static QMimeData * colorToMimeData( const QColor color );
|
||||
static QMimeData *colorToMimeData( const QColor &color );
|
||||
|
||||
/**
|
||||
* Attempts to parse mime data as a color
|
||||
|
@ -172,19 +172,15 @@ bool QgsAttributeTableFilterModel::filterAcceptsRow( int sourceRow, const QModel
|
||||
{
|
||||
case ShowAll:
|
||||
return true;
|
||||
break;
|
||||
|
||||
case ShowFilteredList:
|
||||
return mFilteredFeatures.contains( masterModel()->rowToId( sourceRow ) );
|
||||
break;
|
||||
|
||||
case ShowSelected:
|
||||
return layer()->selectedFeaturesIds().contains( masterModel()->rowToId( sourceRow ) );
|
||||
break;
|
||||
|
||||
case ShowVisible:
|
||||
return mFilteredFeatures.contains( masterModel()->rowToId( sourceRow ) );
|
||||
break;
|
||||
|
||||
case ShowEdited:
|
||||
{
|
||||
@ -197,13 +193,11 @@ bool QgsAttributeTableFilterModel::filterAcceptsRow( int sourceRow, const QModel
|
||||
return addedFeatures.contains( fid ) || changedFeatures.contains( fid );
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
Q_ASSERT( false ); // In debug mode complain
|
||||
return true; // In release mode accept row
|
||||
break;
|
||||
}
|
||||
// returns are handled in their respective case statement above
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ void QgsValueMapConfigDlg::updateMap( const QMap<QString, QVariant> &map, bool i
|
||||
++row;
|
||||
}
|
||||
|
||||
for ( QMap<QString, QVariant>::const_iterator mit = map.begin(); mit != map.end(); mit++, row++ )
|
||||
for ( QMap<QString, QVariant>::const_iterator mit = map.begin(); mit != map.end(); ++mit, ++row )
|
||||
{
|
||||
tableWidget->insertRow( row );
|
||||
if ( mit.value().isNull() )
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
int QgsAttributeForm::sFormCounter = 0;
|
||||
|
||||
QgsAttributeForm::QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature feature, QgsAttributeEditorContext context, QWidget* parent )
|
||||
QgsAttributeForm::QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &feature, QgsAttributeEditorContext context, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, mLayer( vl )
|
||||
, mContext( context )
|
||||
|
@ -31,7 +31,7 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature feature = QgsFeature(), QgsAttributeEditorContext context = QgsAttributeEditorContext(), QWidget *parent = 0 );
|
||||
explicit QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &feature = QgsFeature(), QgsAttributeEditorContext context = QgsAttributeEditorContext(), QWidget *parent = 0 );
|
||||
~QgsAttributeForm();
|
||||
|
||||
const QgsFeature& feature() { return mFeature; }
|
||||
|
@ -105,7 +105,7 @@ void QgsAttributeTypeLoadDialog::fillComboBoxes( int layerIndex )
|
||||
valueComboBox->setEnabled( vLayer != 0 );
|
||||
|
||||
keyComboBox->setCurrentIndex( -1 );
|
||||
valueComboBox->setEnabled( -1 );
|
||||
valueComboBox->setCurrentIndex( -1 );
|
||||
|
||||
keyComboBox->blockSignals( false );
|
||||
valueComboBox->blockSignals( false );
|
||||
|
@ -337,7 +337,7 @@ void QgsColorButtonV2::setValidColor( const QColor& newColor )
|
||||
}
|
||||
}
|
||||
|
||||
QPixmap QgsColorButtonV2::createMenuIcon( const QColor color, const bool showChecks )
|
||||
QPixmap QgsColorButtonV2::createMenuIcon( const QColor &color, const bool showChecks )
|
||||
{
|
||||
//create an icon pixmap
|
||||
QPixmap pixmap( 16, 16 );
|
||||
@ -542,7 +542,7 @@ void QgsColorButtonV2::addRecentColor( const QColor& color )
|
||||
settings.setValue( QString( "/colors/recent" ), recentColorVariants );
|
||||
}
|
||||
|
||||
void QgsColorButtonV2::setButtonBackground( const QColor color )
|
||||
void QgsColorButtonV2::setButtonBackground( const QColor &color )
|
||||
{
|
||||
QColor backgroundColor = color;
|
||||
|
||||
|
@ -240,7 +240,7 @@ class GUI_EXPORT QgsColorButtonV2: public QToolButton
|
||||
* @param color Color for button background. If no color is specified, the button's current
|
||||
* color will be used
|
||||
*/
|
||||
void setButtonBackground( const QColor color = QColor() );
|
||||
void setButtonBackground( const QColor &color = QColor() );
|
||||
|
||||
/**Copies the current color to the clipboard
|
||||
* @see pasteColor
|
||||
@ -282,7 +282,7 @@ class GUI_EXPORT QgsColorButtonV2: public QToolButton
|
||||
* @see setBehaviour
|
||||
* @see behaviour
|
||||
*/
|
||||
void colorClicked( const QColor color );
|
||||
void colorClicked( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
@ -374,7 +374,7 @@ class GUI_EXPORT QgsColorButtonV2: public QToolButton
|
||||
* @param showChecks set to true to display a checkboard pattern behind
|
||||
* transparent colors
|
||||
*/
|
||||
QPixmap createMenuIcon( const QColor color, const bool showChecks = true );
|
||||
QPixmap createMenuIcon( const QColor &color, const bool showChecks = true );
|
||||
|
||||
private slots:
|
||||
|
||||
|
@ -782,7 +782,7 @@ void QgsColorDialogV2::stopPicking( const QPoint &eventPos, const bool takeSampl
|
||||
mColorPreview->setColor( snappedColor, true );
|
||||
}
|
||||
|
||||
void QgsColorDialogV2::setColor( const QColor color )
|
||||
void QgsColorDialogV2::setColor( const QColor &color )
|
||||
{
|
||||
if ( !color.isValid() )
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ class GUI_EXPORT QgsColorDialogV2 : public QDialog, private Ui::QgsColorDialogBa
|
||||
/**Sets the current color for the dialog
|
||||
* @param color desired color
|
||||
*/
|
||||
void setColor( const QColor color );
|
||||
void setColor( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
//For model testing
|
||||
//#include "modeltest.h"
|
||||
|
||||
QgsColorSchemeList::QgsColorSchemeList( QWidget *parent, QgsColorScheme *scheme, const QString context, const QColor baseColor )
|
||||
QgsColorSchemeList::QgsColorSchemeList( QWidget *parent, QgsColorScheme *scheme, const QString &context, const QColor &baseColor )
|
||||
: QTreeView( parent )
|
||||
, mScheme( scheme )
|
||||
{
|
||||
@ -54,7 +54,7 @@ QgsColorSchemeList::~QgsColorSchemeList()
|
||||
|
||||
}
|
||||
|
||||
void QgsColorSchemeList::setScheme( QgsColorScheme *scheme, const QString context, const QColor baseColor )
|
||||
void QgsColorSchemeList::setScheme( QgsColorScheme *scheme, const QString &context, const QColor &baseColor )
|
||||
{
|
||||
mScheme = scheme;
|
||||
mModel->setScheme( scheme, context, baseColor );
|
||||
@ -89,7 +89,7 @@ void QgsColorSchemeList::removeSelection()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsColorSchemeList::addColor( const QColor color, const QString label )
|
||||
void QgsColorSchemeList::addColor( const QColor &color, const QString &label )
|
||||
{
|
||||
mModel->addColor( color, label );
|
||||
}
|
||||
@ -233,7 +233,7 @@ bool QgsColorSchemeList::isDirty() const
|
||||
// QgsColorSchemeModel
|
||||
//
|
||||
|
||||
QgsColorSchemeModel::QgsColorSchemeModel( QgsColorScheme *scheme, const QString context, const QColor baseColor, QObject *parent )
|
||||
QgsColorSchemeModel::QgsColorSchemeModel( QgsColorScheme *scheme, const QString &context, const QColor &baseColor, QObject *parent )
|
||||
: QAbstractItemModel( parent )
|
||||
, mScheme( scheme )
|
||||
, mContext( context )
|
||||
@ -522,7 +522,7 @@ bool QgsColorSchemeModel::dropMimeData( const QMimeData *data, Qt::DropAction ac
|
||||
return true;
|
||||
}
|
||||
|
||||
void QgsColorSchemeModel::setScheme( QgsColorScheme *scheme, const QString context, const QColor baseColor )
|
||||
void QgsColorSchemeModel::setScheme( QgsColorScheme *scheme, const QString &context, const QColor &baseColor )
|
||||
{
|
||||
mScheme = scheme;
|
||||
mContext = context;
|
||||
@ -581,7 +581,7 @@ bool QgsColorSchemeModel::insertRows( int row, int count, const QModelIndex& par
|
||||
return true;
|
||||
}
|
||||
|
||||
void QgsColorSchemeModel::addColor( const QColor color, const QString label )
|
||||
void QgsColorSchemeModel::addColor( const QColor &color, const QString &label )
|
||||
{
|
||||
if ( !mScheme->isEditable() )
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ class GUI_EXPORT QgsColorSchemeModel: public QAbstractItemModel
|
||||
* @param baseColor base color for color scheme
|
||||
* @param parent parent object
|
||||
*/
|
||||
explicit QgsColorSchemeModel( QgsColorScheme* scheme, const QString context = QString(), const QColor baseColor = QColor(), QObject* parent = 0 );
|
||||
explicit QgsColorSchemeModel( QgsColorScheme* scheme, const QString &context = QString(), const QColor &baseColor = QColor(), QObject* parent = 0 );
|
||||
|
||||
~QgsColorSchemeModel();
|
||||
|
||||
@ -97,7 +97,7 @@ class GUI_EXPORT QgsColorSchemeModel: public QAbstractItemModel
|
||||
* @param context context for color scheme
|
||||
* @param baseColor base color for color scheme
|
||||
*/
|
||||
void setScheme( QgsColorScheme* scheme, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
void setScheme( QgsColorScheme* scheme, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
/**Get the current color scheme context for the model
|
||||
* @returns context string which is passed to scheme for color generation
|
||||
@ -115,7 +115,7 @@ class GUI_EXPORT QgsColorSchemeModel: public QAbstractItemModel
|
||||
* @param color color to add
|
||||
* @param label label for color
|
||||
*/
|
||||
void addColor( const QColor color, const QString label = QString() );
|
||||
void addColor( const QColor &color, const QString &label = QString() );
|
||||
|
||||
/**Returns whether the color scheme model has been modified
|
||||
* @returns true if colors have been modified
|
||||
@ -155,7 +155,7 @@ class GUI_EXPORT QgsColorSchemeList: public QTreeView
|
||||
* @param context context string provided to color scheme
|
||||
* @param baseColor base color for color scheme
|
||||
*/
|
||||
QgsColorSchemeList( QWidget *parent = 0, QgsColorScheme* scheme = 0, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
QgsColorSchemeList( QWidget *parent = 0, QgsColorScheme* scheme = 0, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
virtual ~QgsColorSchemeList();
|
||||
|
||||
@ -189,7 +189,7 @@ class GUI_EXPORT QgsColorSchemeList: public QTreeView
|
||||
* @param context context string provided to color scheme
|
||||
* @param baseColor base color for color scheme
|
||||
*/
|
||||
void setScheme( QgsColorScheme* scheme, const QString context = QString(), const QColor baseColor = QColor() );
|
||||
void setScheme( QgsColorScheme* scheme, const QString &context = QString(), const QColor &baseColor = QColor() );
|
||||
|
||||
/**Removes any selected colors from the list
|
||||
*/
|
||||
@ -199,7 +199,7 @@ class GUI_EXPORT QgsColorSchemeList: public QTreeView
|
||||
* @param color color to add
|
||||
* @param label optional label for color
|
||||
*/
|
||||
void addColor( const QColor color, const QString label = QString() );
|
||||
void addColor( const QColor &color, const QString &label = QString() );
|
||||
|
||||
/**Pastes colors from clipboard to the list
|
||||
* @see copyColors
|
||||
@ -216,7 +216,7 @@ class GUI_EXPORT QgsColorSchemeList: public QTreeView
|
||||
/**Emitted when a color is selected from the list
|
||||
* @param color color selected
|
||||
*/
|
||||
void colorSelected( const QColor color );
|
||||
void colorSelected( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -67,13 +67,13 @@ QSize QgsColorSwatchGrid::sizeHint() const
|
||||
return QSize( mWidth, calculateHeight() );
|
||||
}
|
||||
|
||||
void QgsColorSwatchGrid::setContext( const QString context )
|
||||
void QgsColorSwatchGrid::setContext( const QString &context )
|
||||
{
|
||||
mContext = context;
|
||||
refreshColors();
|
||||
}
|
||||
|
||||
void QgsColorSwatchGrid::setBaseColor( const QColor baseColor )
|
||||
void QgsColorSwatchGrid::setBaseColor( const QColor &baseColor )
|
||||
{
|
||||
mBaseColor = baseColor;
|
||||
refreshColors();
|
||||
@ -380,7 +380,7 @@ QgsColorSwatchGridAction::~QgsColorSwatchGridAction()
|
||||
|
||||
}
|
||||
|
||||
void QgsColorSwatchGridAction::setBaseColor( const QColor baseColor )
|
||||
void QgsColorSwatchGridAction::setBaseColor( const QColor &baseColor )
|
||||
{
|
||||
mColorSwatchGrid->setBaseColor( baseColor );
|
||||
}
|
||||
@ -395,7 +395,7 @@ QString QgsColorSwatchGridAction::context() const
|
||||
return mColorSwatchGrid->context();
|
||||
}
|
||||
|
||||
void QgsColorSwatchGridAction::setContext( const QString context )
|
||||
void QgsColorSwatchGridAction::setContext( const QString &context )
|
||||
{
|
||||
mColorSwatchGrid->setContext( context );
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
* @see QgsColorGridAction
|
||||
* @note introduced in QGIS 2.5
|
||||
*/
|
||||
class GUI_EXPORT QgsColorSwatchGrid: public QWidget
|
||||
class GUI_EXPORT QgsColorSwatchGrid : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -57,7 +57,7 @@ class GUI_EXPORT QgsColorSwatchGrid: public QWidget
|
||||
* @param context string which is passed to scheme for color generation
|
||||
* @see context
|
||||
*/
|
||||
void setContext( const QString context );
|
||||
void setContext( const QString &context );
|
||||
|
||||
/**Get the base color for the widget
|
||||
* @returns base color which is passed to scheme for color generation
|
||||
@ -69,12 +69,12 @@ class GUI_EXPORT QgsColorSwatchGrid: public QWidget
|
||||
* @param baseColor base color to pass to scheme for color generation
|
||||
* @see baseColor
|
||||
*/
|
||||
void setBaseColor( const QColor baseColor );
|
||||
void setBaseColor( const QColor &baseColor );
|
||||
|
||||
/**Gets the list of colors shown in the grid
|
||||
* @returns list of colors currently shown in the grid
|
||||
*/
|
||||
QgsNamedColorList* colors() { return &mColors; }
|
||||
QgsNamedColorList *colors() { return &mColors; }
|
||||
|
||||
public slots:
|
||||
|
||||
@ -87,7 +87,7 @@ class GUI_EXPORT QgsColorSwatchGrid: public QWidget
|
||||
/**Emitted when a color has been selected from the widget
|
||||
* @param color selected color
|
||||
*/
|
||||
void colorChanged( const QColor color );
|
||||
void colorChanged( const QColor &color );
|
||||
|
||||
/**Emitted when mouse hovers over widget
|
||||
*/
|
||||
@ -175,7 +175,7 @@ class GUI_EXPORT QgsColorSwatchGridAction: public QWidgetAction
|
||||
* @param baseColor base color to pass to scheme for color generation
|
||||
* @see baseColor
|
||||
*/
|
||||
void setBaseColor( const QColor baseColor );
|
||||
void setBaseColor( const QColor &baseColor );
|
||||
|
||||
/**Get the base color for the color grid
|
||||
* @returns base color which is passed to scheme for color generation
|
||||
@ -193,7 +193,7 @@ class GUI_EXPORT QgsColorSwatchGridAction: public QWidgetAction
|
||||
* @param context string which is passed to scheme for color generation
|
||||
* @see context
|
||||
*/
|
||||
void setContext( const QString context );
|
||||
void setContext( const QString &context );
|
||||
|
||||
public slots:
|
||||
|
||||
@ -206,7 +206,7 @@ class GUI_EXPORT QgsColorSwatchGridAction: public QWidgetAction
|
||||
/**Emitted when a color has been selected from the widget
|
||||
* @param color selected color
|
||||
*/
|
||||
void colorChanged( const QColor color );
|
||||
void colorChanged( const QColor &color );
|
||||
|
||||
private:
|
||||
QMenu* mMenu;
|
||||
|
@ -52,7 +52,7 @@ int QgsColorWidget::componentValue() const
|
||||
return componentValue( mComponent );
|
||||
}
|
||||
|
||||
QPixmap QgsColorWidget::createDragIcon( const QColor color )
|
||||
QPixmap QgsColorWidget::createDragIcon( const QColor &color )
|
||||
{
|
||||
//craft a pixmap for the drag icon
|
||||
QPixmap pixmap( 50, 50 );
|
||||
@ -318,7 +318,7 @@ void QgsColorWidget::setComponentValue( const int value )
|
||||
update();
|
||||
}
|
||||
|
||||
void QgsColorWidget::setColor( const QColor color, const bool emitSignals )
|
||||
void QgsColorWidget::setColor( const QColor &color, const bool emitSignals )
|
||||
{
|
||||
if ( color == mCurrentColor )
|
||||
{
|
||||
@ -462,7 +462,7 @@ void QgsColorWheel::paintEvent( QPaintEvent *event )
|
||||
painter.end();
|
||||
}
|
||||
|
||||
void QgsColorWheel::setColor( const QColor color, const bool emitSignals )
|
||||
void QgsColorWheel::setColor( const QColor &color, const bool emitSignals )
|
||||
{
|
||||
if ( color.hue() >= 0 && color.hue() != hue() )
|
||||
{
|
||||
@ -543,8 +543,6 @@ void QgsColorWheel::setColorFromPos( const QPointF pos )
|
||||
b = tan( rad1 ) * a;
|
||||
r = sqrt( a * a + b * b );
|
||||
}
|
||||
x = ( cos( eventAngleRadians ) * r );
|
||||
y = ( -sin( eventAngleRadians ) * r );
|
||||
|
||||
double triangleSideLength = sqrt( 3.0 ) * triangleLength;
|
||||
double newL = (( -sin( rad0 ) * r ) / triangleSideLength ) + 0.5;
|
||||
@ -788,7 +786,7 @@ void QgsColorBox::setComponent( const QgsColorWidget::ColorComponent component )
|
||||
QgsColorWidget::setComponent( component );
|
||||
}
|
||||
|
||||
void QgsColorBox::setColor( const QColor color, const bool emitSignals )
|
||||
void QgsColorBox::setColor( const QColor &color, const bool emitSignals )
|
||||
{
|
||||
//check if we need to redraw the box image
|
||||
if ( mComponent == QgsColorWidget::Red && mCurrentColor.red() != color.red() )
|
||||
@ -1305,7 +1303,7 @@ void QgsColorSliderWidget::setComponentValue( const int value )
|
||||
mSpinBox->blockSignals( false );
|
||||
}
|
||||
|
||||
void QgsColorSliderWidget::setColor( const QColor color, const bool emitSignals )
|
||||
void QgsColorSliderWidget::setColor( const QColor &color, bool emitSignals )
|
||||
{
|
||||
QgsColorWidget::setColor( color, emitSignals );
|
||||
mRampWidget->setColor( color );
|
||||
@ -1314,7 +1312,7 @@ void QgsColorSliderWidget::setColor( const QColor color, const bool emitSignals
|
||||
mSpinBox->blockSignals( false );
|
||||
}
|
||||
|
||||
void QgsColorSliderWidget::rampColorChanged( const QColor color )
|
||||
void QgsColorSliderWidget::rampColorChanged( const QColor &color )
|
||||
{
|
||||
emit colorChanged( color );
|
||||
}
|
||||
@ -1404,7 +1402,7 @@ QgsColorTextWidget::~QgsColorTextWidget()
|
||||
|
||||
}
|
||||
|
||||
void QgsColorTextWidget::setColor( const QColor color, const bool emitSignals )
|
||||
void QgsColorTextWidget::setColor( const QColor &color, const bool emitSignals )
|
||||
{
|
||||
QgsColorWidget::setColor( color, emitSignals );
|
||||
updateText();
|
||||
|
@ -83,7 +83,7 @@ class GUI_EXPORT QgsColorWidget : public QWidget
|
||||
/**Create an icon for dragging colors
|
||||
* @param color for icon
|
||||
*/
|
||||
static QPixmap createDragIcon( const QColor color );
|
||||
static QPixmap createDragIcon( const QColor &color );
|
||||
|
||||
public slots:
|
||||
|
||||
@ -92,7 +92,7 @@ class GUI_EXPORT QgsColorWidget : public QWidget
|
||||
* @param emitSignals set to true to emit the colorChanged signal after setting color
|
||||
* @see color
|
||||
*/
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
/**Sets the color component which the widget controls
|
||||
* @param component color component for widget
|
||||
@ -115,7 +115,7 @@ class GUI_EXPORT QgsColorWidget : public QWidget
|
||||
/**Emitted when the widget's color changes
|
||||
* @param color new widget color
|
||||
*/
|
||||
void colorChanged( const QColor color );
|
||||
void colorChanged( const QColor &color );
|
||||
|
||||
protected:
|
||||
|
||||
@ -197,7 +197,7 @@ class GUI_EXPORT QgsColorWheel : public QgsColorWidget
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
protected:
|
||||
|
||||
@ -291,8 +291,7 @@ class GUI_EXPORT QgsColorBox : public QgsColorWidget
|
||||
virtual void setComponent( const ColorComponent component );
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
protected:
|
||||
|
||||
@ -485,7 +484,7 @@ class GUI_EXPORT QgsColorSliderWidget : public QgsColorWidget
|
||||
|
||||
virtual void setComponent( const ColorComponent component );
|
||||
virtual void setComponentValue( const int value );
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
private:
|
||||
|
||||
@ -514,7 +513,7 @@ class GUI_EXPORT QgsColorSliderWidget : public QgsColorWidget
|
||||
|
||||
/**Called when the color for the ramp changes
|
||||
*/
|
||||
void rampColorChanged( const QColor color );
|
||||
void rampColorChanged( const QColor &color );
|
||||
|
||||
/**Called when the value of the spin box changes
|
||||
*/
|
||||
@ -547,7 +546,7 @@ class GUI_EXPORT QgsColorTextWidget : public QgsColorWidget
|
||||
|
||||
virtual ~QgsColorTextWidget();
|
||||
|
||||
virtual void setColor( const QColor color, const bool emitSignals = false );
|
||||
virtual void setColor( const QColor &color, const bool emitSignals = false );
|
||||
|
||||
protected:
|
||||
void resizeEvent( QResizeEvent * event );
|
||||
|
@ -92,9 +92,9 @@ QSize QgsDetailedItemDelegate::sizeHint(
|
||||
}
|
||||
}
|
||||
|
||||
void QgsDetailedItemDelegate::paintManually( QPainter * thepPainter,
|
||||
const QStyleOptionViewItem & theOption,
|
||||
const QgsDetailedItemData theData ) const
|
||||
void QgsDetailedItemDelegate::paintManually( QPainter *thepPainter,
|
||||
const QStyleOptionViewItem &theOption,
|
||||
const QgsDetailedItemData &theData ) const
|
||||
{
|
||||
//
|
||||
// Get the strings and check box properties
|
||||
@ -238,9 +238,9 @@ void QgsDetailedItemDelegate::paintManually( QPainter * thepPainter,
|
||||
} //render by manual painting
|
||||
|
||||
|
||||
void QgsDetailedItemDelegate::paintAsWidget( QPainter * thepPainter,
|
||||
const QStyleOptionViewItem & theOption,
|
||||
const QgsDetailedItemData theData ) const
|
||||
void QgsDetailedItemDelegate::paintAsWidget( QPainter *thepPainter,
|
||||
const QStyleOptionViewItem &theOption,
|
||||
const QgsDetailedItemData &theData ) const
|
||||
{
|
||||
|
||||
mpWidget->setChecked( theData.isChecked() );
|
||||
@ -276,8 +276,8 @@ void QgsDetailedItemDelegate::drawHighlight( const QStyleOptionViewItem &theOpti
|
||||
thepPainter->fillRect( theOption.rect, QBrush( myGradient ) );
|
||||
}
|
||||
|
||||
int QgsDetailedItemDelegate::height( const QStyleOptionViewItem & theOption,
|
||||
const QgsDetailedItemData theData ) const
|
||||
int QgsDetailedItemDelegate::height( const QStyleOptionViewItem &theOption,
|
||||
const QgsDetailedItemData &theData ) const
|
||||
{
|
||||
QFontMetrics myTitleMetrics( titleFont( theOption ) );
|
||||
QFontMetrics myDetailMetrics( detailFont( theOption ) );
|
||||
|
@ -65,14 +65,14 @@ class GUI_EXPORT QgsDetailedItemDelegate :
|
||||
QStringList wordWrap( QString theString,
|
||||
QFontMetrics theMetrics,
|
||||
int theWidth ) const;
|
||||
void paintManually( QPainter * thePainter,
|
||||
const QStyleOptionViewItem & theOption,
|
||||
const QgsDetailedItemData theData ) const;
|
||||
void paintAsWidget( QPainter * thePainter,
|
||||
const QStyleOptionViewItem & theOption,
|
||||
const QgsDetailedItemData theData ) const;
|
||||
int height( const QStyleOptionViewItem & theOption,
|
||||
const QgsDetailedItemData theData ) const;
|
||||
void paintManually( QPainter *thePainter,
|
||||
const QStyleOptionViewItem &theOption,
|
||||
const QgsDetailedItemData &theData ) const;
|
||||
void paintAsWidget( QPainter *thePainter,
|
||||
const QStyleOptionViewItem &theOption,
|
||||
const QgsDetailedItemData &theData ) const;
|
||||
int height( const QStyleOptionViewItem &theOption,
|
||||
const QgsDetailedItemData &theData ) const;
|
||||
QgsDetailedItemWidget * mpWidget;
|
||||
QCheckBox * mpCheckBox;
|
||||
int mVerticalSpacing;
|
||||
|
@ -88,7 +88,7 @@ void QgsHighlight::init()
|
||||
{
|
||||
if ( mMapCanvas->mapSettings().hasCrsTransformEnabled() )
|
||||
{
|
||||
const QgsCoordinateTransform* ct = mMapCanvas->mapSettings().layerTransfrom( mLayer );
|
||||
const QgsCoordinateTransform* ct = mMapCanvas->mapSettings().layerTransform( mLayer );
|
||||
if ( ct )
|
||||
{
|
||||
if ( mGeometry )
|
||||
|
@ -778,7 +778,7 @@ void QgsRasterHistogramWidget::histoActionTriggered( QAction* action )
|
||||
histoAction( action->data().toString(), action->isChecked() );
|
||||
}
|
||||
|
||||
void QgsRasterHistogramWidget::histoAction( const QString actionName, bool actionFlag )
|
||||
void QgsRasterHistogramWidget::histoAction( const QString &actionName, bool actionFlag )
|
||||
{
|
||||
if ( actionName == "" )
|
||||
return;
|
||||
|
@ -55,7 +55,7 @@ class GUI_EXPORT QgsRasterHistogramWidget : public QWidget, private Ui::QgsRaste
|
||||
bool computeHistogram( bool forceComputeFlag );
|
||||
|
||||
/** Apply a histoActionTriggered() event. */
|
||||
void histoAction( const QString actionName, bool actionFlag = true );
|
||||
void histoAction( const QString &actionName, bool actionFlag = true );
|
||||
|
||||
/** Apply a histoActionTriggered() event. */
|
||||
void setSelectedBand( int index );
|
||||
|
@ -585,15 +585,13 @@ void QgsGraduatedSymbolRendererV2Widget::classifyGraduated()
|
||||
mRenderer->setClassAttribute( attrName );
|
||||
mRenderer->setMode( mode );
|
||||
mRenderer->setSourceColorRamp( ramp->clone() );
|
||||
bool updateUiCount = true;
|
||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||
mRenderer->updateClasses( mLayer, mode, nclasses );
|
||||
mRenderer->calculateLabelPrecision();
|
||||
QApplication::restoreOverrideCursor();
|
||||
// PrettyBreaks and StdDev calculation don't generate exact
|
||||
// number of classes - leave user interface unchanged for these
|
||||
updateUiCount = false;
|
||||
updateUiFromRenderer( updateUiCount );
|
||||
updateUiFromRenderer( false );
|
||||
}
|
||||
|
||||
void QgsGraduatedSymbolRendererV2Widget::reapplyColorRamp()
|
||||
|
@ -56,10 +56,13 @@
|
||||
#define TO8(x) (x).toLocal8Bit().constData()
|
||||
#endif
|
||||
|
||||
QgsSLDConfigParser::QgsSLDConfigParser( QDomDocument* doc, const QMap<QString, QString>& parameters ):
|
||||
QgsWMSConfigParser(), mXMLDoc( doc ), mParameterMap( parameters ), mFallbackParser( 0 )
|
||||
QgsSLDConfigParser::QgsSLDConfigParser( QDomDocument* doc, const QMap<QString, QString>& parameters )
|
||||
: QgsWMSConfigParser()
|
||||
, mXMLDoc( doc )
|
||||
, mParameterMap( parameters )
|
||||
, mSLDNamespace( "http://www.opengis.net/sld" )
|
||||
, mFallbackParser( 0 )
|
||||
{
|
||||
mSLDNamespace = "http://www.opengis.net/sld";
|
||||
|
||||
//set output units
|
||||
if ( mXMLDoc )
|
||||
@ -278,34 +281,30 @@ QList<QgsMapLayer*> QgsSLDConfigParser::mapLayerFromStyle( const QString& lName,
|
||||
|
||||
QgsFeatureRendererV2* theRenderer = 0;
|
||||
|
||||
QgsVectorLayer* theVectorLayer = dynamic_cast<QgsVectorLayer*>( theMapLayer );
|
||||
if ( !theVectorLayer )
|
||||
QgsRasterLayer* theRasterLayer = dynamic_cast<QgsRasterLayer*>( theMapLayer );
|
||||
if ( theRasterLayer )
|
||||
{
|
||||
//a raster layer
|
||||
QgsRasterLayer* theRasterLayer = dynamic_cast<QgsRasterLayer*>( theMapLayer );
|
||||
if ( theRasterLayer )
|
||||
QgsDebugMsg( "Layer is a rasterLayer" );
|
||||
if ( !userStyleElement.isNull() )
|
||||
{
|
||||
QgsDebugMsg( "Layer is a rasterLayer" );
|
||||
if ( !userStyleElement.isNull() )
|
||||
QgsDebugMsg( "Trying to add raster symbology" );
|
||||
rasterSymbologyFromUserStyle( userStyleElement, theRasterLayer );
|
||||
//todo: possibility to have vector layer or raster layer
|
||||
QgsDebugMsg( "Trying to find contour symbolizer" );
|
||||
QgsVectorLayer* v = contourLayerFromRaster( userStyleElement, theRasterLayer );
|
||||
if ( v )
|
||||
{
|
||||
QgsDebugMsg( "Trying to add raster symbology" );
|
||||
rasterSymbologyFromUserStyle( userStyleElement, theRasterLayer );
|
||||
//todo: possibility to have vector layer or raster layer
|
||||
QgsDebugMsg( "Trying to find contour symbolizer" );
|
||||
QgsVectorLayer* v = contourLayerFromRaster( userStyleElement, theRasterLayer );
|
||||
if ( v )
|
||||
{
|
||||
QgsDebugMsg( "Returning vector layer" );
|
||||
resultList.push_back( v );
|
||||
mLayersToRemove.push_back( v );
|
||||
}
|
||||
QgsDebugMsg( "Returning vector layer" );
|
||||
resultList.push_back( v );
|
||||
mLayersToRemove.push_back( v );
|
||||
}
|
||||
resultList.push_back( theMapLayer );
|
||||
|
||||
return resultList;
|
||||
}
|
||||
resultList.push_back( theMapLayer );
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
QgsVectorLayer* theVectorLayer = dynamic_cast<QgsVectorLayer*>( theMapLayer );
|
||||
if ( userStyleElement.isNull() )//apply a default style
|
||||
{
|
||||
QgsSymbolV2* symbol = QgsSymbolV2::defaultSymbol( theVectorLayer->geometryType() );
|
||||
|
@ -53,7 +53,6 @@ void QgsSOAPRequestHandler::parseInput()
|
||||
QgsDebugMsg( "the xml string was:" );
|
||||
QgsDebugMsg( inputString );
|
||||
throw QgsMapServiceException( "InvalidXML", "XML error: " + errorMsg );
|
||||
return;
|
||||
}
|
||||
|
||||
// if xml reading was successfull, save the inputXML in a file
|
||||
@ -66,7 +65,6 @@ void QgsSOAPRequestHandler::parseInput()
|
||||
{
|
||||
QgsDebugMsg( "Envelope element not found" );
|
||||
throw QgsMapServiceException( "SOAPError", "Element <Envelope> not found" );
|
||||
return;
|
||||
}
|
||||
|
||||
QDomNodeList bodyNodeList = envelopeNodeList.item( 0 ).toElement().elementsByTagNameNS( "http://schemas.xmlsoap.org/soap/envelope/", "Body" );
|
||||
@ -74,7 +72,6 @@ void QgsSOAPRequestHandler::parseInput()
|
||||
{
|
||||
QgsDebugMsg( "body node not found" );
|
||||
throw QgsMapServiceException( "SOAPError", "Element <Body> not found" );
|
||||
return;
|
||||
}
|
||||
QDomElement bodyElement = bodyNodeList.item( 0 ).toElement();
|
||||
QDomElement firstChildElement = bodyElement.firstChild().toElement();
|
||||
|
@ -258,6 +258,9 @@ class DL_CreationInterface
|
||||
protected:
|
||||
DL_Attributes attributes;
|
||||
DL_Extrusion *extrusion;
|
||||
|
||||
DL_CreationInterface(const DL_CreationInterface &);
|
||||
DL_CreationInterface&operator=(const DL_CreationInterface&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -69,9 +69,9 @@ class DL_Extrusion
|
||||
* Constructor for DXF extrusion.
|
||||
*
|
||||
* @param direction Vector of axis along which the entity shall be extruded
|
||||
* this is also the Z axis of the Entity coordinate system
|
||||
* this is also the Z axis of the Entity coordinate system
|
||||
* @param elevation Distance of the entities XY plane from the origin of the
|
||||
* world coordinate system
|
||||
* world coordinate system
|
||||
*/
|
||||
DL_Extrusion( double dx, double dy, double dz, double elevation )
|
||||
{
|
||||
@ -152,6 +152,8 @@ class DL_Extrusion
|
||||
private:
|
||||
double *direction;
|
||||
double elevation;
|
||||
|
||||
DL_Extrusion(const DL_Extrusion &);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1799,18 +1799,19 @@ ControlNodeBin::draw( const ControlContext& context, bool newContext, int bin )
|
||||
|
||||
if ( _sortingEnabled && _sortByDistance )
|
||||
{
|
||||
for( ControlNodeCollection::iterator i = _controlNodes.begin(); i != _controlNodes.end(); ++i )
|
||||
for( ControlNodeCollection::iterator i = _controlNodes.begin(); i != _controlNodes.end(); )
|
||||
{
|
||||
ControlNode* node = i->second.get();
|
||||
if ( node->getNumParents() == 0 )
|
||||
{
|
||||
_renderNodes.erase( node );
|
||||
_controlNodes.erase( i );
|
||||
i = _controlNodes.erase( i );
|
||||
}
|
||||
else
|
||||
{
|
||||
ControlNode::PerViewData& nodeData = node->getData( context._view );
|
||||
byDepth.insert( ControlNodePair(nodeData._screenPos.z(), node) );
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,8 @@ class QgsRubberSelectId
|
||||
int mWidth;
|
||||
QGis::GeometryType mGeometryType;
|
||||
QgsMapCanvas* mMapCanvas;
|
||||
|
||||
Q_DISABLE_COPY( QgsRubberSelectId )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -669,6 +669,7 @@ ErrorList topolTest::checkGaps( double tolerance, QgsVectorLayer *layer1, QgsVec
|
||||
if ( geomList.size() == 0 )
|
||||
{
|
||||
//qDebug() << "geometry list is empty!";
|
||||
delete [] geomArray;
|
||||
return errorList;
|
||||
}
|
||||
|
||||
|
@ -2256,7 +2256,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
|
||||
{
|
||||
QgsDebugMsg( QString( "res:%1 >= %2" ).arg( it.key() ).arg( vres ) );
|
||||
prev = it;
|
||||
it++;
|
||||
++it;
|
||||
}
|
||||
|
||||
if ( it == m.constEnd() ||
|
||||
|
@ -56,7 +56,7 @@ bool QgsCompositionChecker::testComposition( QString &theReport, int page, int p
|
||||
mComposition->setPlotStyle( QgsComposition::Print );
|
||||
newImage.setDotsPerMeterX( 96 / 25.4 * 1000 );
|
||||
newImage.setDotsPerMeterY( 96 / 25.4 * 1000 );
|
||||
drawBackround( &newImage );
|
||||
drawBackground( &newImage );
|
||||
QPainter expectedPainter( &newImage );
|
||||
//QRectF sourceArea( 0, 0, mComposition->paperWidth(), mComposition->paperHeight() );
|
||||
//QRectF targetArea( 0, 0, 3507, 2480 );
|
||||
@ -71,7 +71,7 @@ bool QgsCompositionChecker::testComposition( QString &theReport, int page, int p
|
||||
mComposition->setPlotStyle( QgsComposition::Print );
|
||||
outputImage.setDotsPerMeterX( mDotsPerMeter );
|
||||
outputImage.setDotsPerMeterY( mDotsPerMeter );
|
||||
drawBackround( &outputImage );
|
||||
drawBackground( &outputImage );
|
||||
QPainter p( &outputImage );
|
||||
mComposition->renderPage( &p, page );
|
||||
p.end();
|
||||
|
@ -30,8 +30,8 @@ class DummyColorScheme : public QgsColorScheme
|
||||
|
||||
virtual QString schemeName() const { return QString( "Dummy scheme" ); }
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() )
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() )
|
||||
{
|
||||
QList< QPair< QColor, QString> > colors;
|
||||
if ( context == QString( "testscheme" ) )
|
||||
|
@ -31,8 +31,8 @@ class DummyColorScheme : public QgsColorScheme
|
||||
|
||||
virtual QString schemeName() const { return QString( "Dummy scheme" ); }
|
||||
|
||||
virtual QgsNamedColorList fetchColors( const QString context = QString(),
|
||||
const QColor baseColor = QColor() )
|
||||
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
|
||||
const QColor &baseColor = QColor() )
|
||||
{
|
||||
QList< QPair< QColor, QString> > colors;
|
||||
if ( context == QString( "testscheme" ) )
|
||||
|
@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
qgscompositionchecker.py - check rendering of Qgscomposition against an expected image
|
||||
--------------------------------------
|
||||
Date : 31 Juli 2012
|
||||
Copyright : (C) 2012 by Dr. Horst Düster / Dr. Marco Hugentobler
|
||||
email : horst.duester@sourcepole.ch
|
||||
--------------------------------------
|
||||
Date : 31 Juli 2012
|
||||
Copyright : (C) 2012 by Dr. Horst Düster / Dr. Marco Hugentobler
|
||||
email : horst.duester@sourcepole.ch
|
||||
***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -43,7 +43,7 @@ class QgsCompositionChecker(QgsMultiRenderChecker):
|
||||
self.mComposition.setPlotStyle( QgsComposition.Print )
|
||||
outputImage.setDotsPerMeterX( self.mDotsPerMeter )
|
||||
outputImage.setDotsPerMeterY( self.mDotsPerMeter )
|
||||
QgsMultiRenderChecker.drawBackround( outputImage )
|
||||
QgsMultiRenderChecker.drawBackground( outputImage )
|
||||
p = QPainter( outputImage )
|
||||
self.mComposition.renderPage( p, page )
|
||||
p.end()
|
||||
|
Loading…
x
Reference in New Issue
Block a user