Skip to content
Permalink
Browse files
Merged rest of composer branch (9087-9115)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9125 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 23, 2008
1 parent 1f19b8d commit 9930215a570ff6d995e463009a6d82042111582f
Showing with 479 additions and 471 deletions.
  1. +1 −1 python/core/qgscontinuouscolorrenderer.sip
  2. +2 −2 python/core/qgscoordinatereferencesystem.sip
  3. +2 −2 python/core/qgscoordinatetransform.sip
  4. +1 −1 python/core/qgsgraduatedsymbolrenderer.sip
  5. +2 −2 python/core/qgslabel.sip
  6. +10 −10 python/core/qgsmaplayer.sip
  7. +4 −4 python/core/qgsmaprenderer.sip
  8. +1 −1 python/core/qgsmaptopixel.sip
  9. +2 −2 python/core/qgspoint.sip
  10. +5 −5 python/core/qgsproject.sip
  11. +5 −5 python/core/qgsrasterlayer.sip
  12. +6 −6 python/core/qgsrect.sip
  13. +1 −1 python/core/qgsrendercontext.sip
  14. +1 −1 python/core/qgsrenderer.sip
  15. +1 −1 python/core/qgssinglesymbolrenderer.sip
  16. +1 −1 python/core/qgsuniquevaluerenderer.sip
  17. +1 −1 python/core/qgsvectordataprovider.sip
  18. +9 −9 python/core/qgsvectorlayer.sip
  19. +6 −4 src/app/composer/qgscomposer.cpp
  20. +2 −2 src/app/composer/qgscomposer.h
  21. +1 −1 src/app/legend/qgslegendlayer.cpp
  22. +1 −1 src/app/legend/qgslegendlayerfile.cpp
  23. +26 −26 src/app/qgisapp.cpp
  24. +4 −4 src/app/qgsattributedialog.cpp
  25. +1 −1 src/app/qgsattributetable.cpp
  26. +1 −1 src/app/qgsattributetabledisplay.cpp
  27. +3 −3 src/app/qgscontinuouscolordialog.cpp
  28. +4 −4 src/app/qgsgraduatedsymboldialog.cpp
  29. +1 −1 src/app/qgsmapserverexport.cpp
  30. +1 −1 src/app/qgsmaptooladdfeature.cpp
  31. +4 −4 src/app/qgsmaptoolidentify.cpp
  32. +2 −2 src/app/qgsrasterlayerproperties.cpp
  33. +3 −3 src/app/qgssearchquerybuilder.cpp
  34. +1 −1 src/app/qgssinglesymboldialog.cpp
  35. +3 −3 src/app/qgsuniquevaluedialog.cpp
  36. +8 −8 src/app/qgsvectorlayerproperties.cpp
  37. +16 −16 src/core/composer/qgscomposermap.cpp
  38. +1 −1 src/core/composer/qgslegendmodel.cpp
  39. +1 −1 src/core/qgscoordinatetransform.cpp
  40. +2 −2 src/core/qgscoordinatetransform.h
  41. +2 −2 src/core/qgsdistancearea.cpp
  42. +8 −8 src/core/qgsdistancearea.h
  43. +1 −1 src/core/qgsexception.h
  44. +2 −2 src/core/qgsgeometry.cpp
  45. +7 −7 src/core/qgslabel.cpp
  46. +3 −3 src/core/qgslabel.h
  47. +2 −2 src/core/qgsline.cpp
  48. +3 −3 src/core/qgsline.h
  49. +5 −5 src/core/qgsmaplayer.cpp
  50. +10 −10 src/core/qgsmaplayer.h
  51. +12 −12 src/core/qgsmaprenderer.cpp
  52. +5 −5 src/core/qgsmaprenderer.h
  53. +1 −1 src/core/qgsmaptopixel.cpp
  54. +1 −1 src/core/qgsmaptopixel.h
  55. +2 −2 src/core/qgspoint.cpp
  56. +3 −3 src/core/qgspoint.h
  57. +13 −13 src/core/qgsproject.cpp
  58. +5 −5 src/core/qgsproject.h
  59. +2 −2 src/core/qgsprojectfiletransform.h
  60. +4 −4 src/core/qgsprojectproperty.cpp
  61. +3 −3 src/core/qgsprojectproperty.h
  62. +9 −9 src/core/qgsrect.cpp
  63. +9 −9 src/core/qgsrect.h
  64. +1 −1 src/core/qgsrendercontext.h
  65. +5 −5 src/core/qgssnapper.cpp
  66. +1 −1 src/core/qgsvectordataprovider.cpp
  67. +1 −1 src/core/qgsvectordataprovider.h
  68. +1 −1 src/core/qgsvectorfilewriter.cpp
  69. +1 −1 src/core/qgsvectorfilewriter.h
  70. +45 −41 src/core/qgsvectorlayer.cpp
  71. +9 −9 src/core/qgsvectorlayer.h
  72. +11 −11 src/core/raster/qgsrasterlayer.cpp
  73. +5 −5 src/core/raster/qgsrasterlayer.h
  74. +1 −1 src/core/renderer/qgscontinuouscolorrenderer.h
  75. +1 −1 src/core/renderer/qgsgraduatedsymbolrenderer.h
  76. +1 −1 src/core/renderer/qgsrenderer.h
  77. +1 −1 src/core/renderer/qgssinglesymbolrenderer.cpp
  78. +1 −1 src/core/renderer/qgssinglesymbolrenderer.h
  79. +1 −1 src/core/renderer/qgsuniquevaluerenderer.h
  80. +1 −1 src/core/symbology/qgssymbol.cpp
  81. +11 −11 src/gui/qgsmapcanvas.cpp
  82. +4 −4 src/gui/qgsmapoverviewcanvas.cpp
  83. +3 −3 src/gui/qgsmaptip.cpp
  84. +3 −3 src/gui/qgsmaptool.cpp
  85. +5 −5 src/gui/qgsmaptoolzoom.cpp
  86. +11 −10 src/gui/qgsrubberband.cpp
  87. +1 −1 src/plugins/geoprocessing/qgspggeoprocessing.cpp
  88. +1 −1 src/plugins/gps_importer/qgsgpsplugin.cpp
  89. +5 −5 src/plugins/grass/qgsgrassedit.cpp
  90. +6 −6 src/plugins/grass/qgsgrassmodule.cpp
  91. +1 −1 src/plugins/maplayer/maplayertest.cpp
  92. +1 −1 src/plugins/maplayer/maplayertest.h
  93. +1 −1 src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
  94. +1 −1 src/providers/grass/qgsgrassprovider.cpp
  95. +1 −1 src/providers/grass/qgsgrassprovider.h
  96. +1 −1 src/providers/ogr/qgsogrprovider.cpp
  97. +1 −1 src/providers/ogr/qgsogrprovider.h
  98. +2 −2 src/providers/postgres/qgspostgisbox2d.cpp
  99. +1 −1 src/providers/postgres/qgspostgisbox2d.h
  100. +2 −2 src/providers/postgres/qgspostgisbox3d.cpp
  101. +1 −1 src/providers/postgres/qgspostgisbox3d.h
  102. +2 −2 src/providers/postgres/qgspostgresextentthread.cpp
  103. +12 −12 src/providers/postgres/qgspostgresprovider.cpp
  104. +1 −1 src/providers/postgres/qgspostgresprovider.h
  105. +2 −1 src/providers/wfs/qgswfsdata.cpp
  106. +5 −5 src/providers/wfs/qgswfsprovider.cpp
  107. +29 −29 src/providers/wms/qgswmsprovider.cpp
  108. +4 −4 src/providers/wms/qgswmsprovider.h
  109. +13 −13 tests/algorithms/qgsproject/projecttest.h
  110. +1 −1 tests/src/core/testqgsgeometry.cpp
  111. +1 −1 tools/mapserver_export/qgsmapserverexport.cpp
@@ -29,7 +29,7 @@ class QgsContinuousColorRenderer : QgsRenderer
/** whether to draw a polygon outline*/
bool drawPolygonOutline() const;
/**Reads the renderer configuration from an XML file
@param rnode the DOM node to read
@param rnode the Dom node to read
@param vl the vector layer which will be associated with the renderer*/
virtual void readXML(const QDomNode& rnode, QgsVectorLayer& vl);
/**Writes the contents of the renderer to a configuration file
@@ -175,12 +175,12 @@ class QgsCoordinateReferenceSystem
*/
QString toWkt() const;

/*! Restores state from the given DOM node.
/*! Restores state from the given Dom node.
* @param theNode The node from which state will be restored
* @return bool True on success, False on failure
*/
bool readXML( QDomNode & theNode );
/*! Stores state to the given DOM node in the given document.
/*! Stores state to the given Dom node in the given document.
* Below is an example of the generated tag.
* <spatialrefsys>
* <proj4>+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs </proj4>
@@ -169,13 +169,13 @@ class QgsCoordinateTransform : QObject
//!initialise is used to actually create the Transformer instance
void initialise();

/*! Restores state from the given DOM node.
/*! Restores state from the given Dom node.
* @param theNode The node from which state will be restored
* @return bool True on success, False on failure
*/
bool readXML( QDomNode & theNode );

/*! Stores state to the given DOM node in the given document
/*! Stores state to the given Dom node in the given document
* @param theNode The node in which state will be restored
* @param theDom The document in which state will be stored
* @return bool True on success, False on failure
@@ -28,7 +28,7 @@ class QgsGraduatedSymbolRenderer : QgsRenderer
\param field the number of the field to classify*/
void setClassificationField(int field);
/**Reads the renderer configuration from an XML file
@param rnode the DOM node to read
@param rnode the Dom node to read
@param vl the vector layer which will be associated with the renderer*/
virtual void readXML(const QDomNode& rnode, QgsVectorLayer& vl);
/**Writes the contents of the renderer to a configuration file
@@ -45,12 +45,12 @@ public:
* \param sizeScale global scale factor for size in pixels, labels in map units are not scaled
*/
void renderLabel ( QPainter* painter, QgsRect& viewExtent,
QgsCoordinateTransform* coordTransform,
QgsCoordinateTransform* coordinateTransform,
QgsMapToPixel *transform,
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes=0, double sizeScale = 1);

/** Reads the renderer configuration from an XML file
@param rnode the DOM node to read
@param rnode the Dom node to read
*/
void readXML(const QDomNode& node);

@@ -57,12 +57,12 @@ public:

/** Render the layer, to be overridden in child classes
*/
virtual bool draw(QgsRenderContext& renderContext);
virtual bool draw(QgsRenderContext& rendererContext);

/** Draw labels
* @TODO to be removed: used only in vector layers
*/
virtual void drawLabels(QgsRenderContext& renderContext);
virtual void drawLabels(QgsRenderContext& rendererContext);

/** Return the extent of the layer as a QRect */
const QgsRect extent();
@@ -107,15 +107,15 @@ public:
/** True if the layer can be edited */
virtual bool isEditable() const = 0;

/** sets state from DOM document
@param layer_node is DOM node corresponding to ``maplayer'' tag
/** sets state from Dom document
@param layer_node is Dom node corresponding to ``maplayer'' tag
@note

The DOM node corresponds to a DOM document project file XML element read
The Dom node corresponds to a Dom document project file XML element read
by QgsProject.

This, in turn, calls readXml(), which is over-rideable by sub-classes so
that they can read their own specific state from the given DOM node.
that they can read their own specific state from the given Dom node.

Invoked by QgsProject::read().

@@ -124,15 +124,15 @@ public:
bool readXML(QDomNode & layer_node);


/** stores state in DOM node
@param layer_node is DOM node corresponding to ``projectlayers'' tag
/** stores state in Dom node
@param layer_node is Dom node corresponding to ``projectlayers'' tag
@note

The DOM node corresponds to a DOM document project file XML element to be
The Dom node corresponds to a Dom document project file XML element to be
written by QgsProject.

This, in turn, calls writeXml(), which is over-rideable by sub-classes so
that they can write their own specific state to the given DOM node.
that they can write their own specific state to the given Dom node.

Invoked by QgsProject::write().

@@ -28,7 +28,7 @@ class QgsMapRenderer : QObject
//! returns current extent
QgsRect extent();

const QgsMapToPixel* coordXForm();
const QgsMapToPixel* coordinateTransform();

double scale() const;
double mupp() const;
@@ -57,13 +57,13 @@ class QgsMapRenderer : QObject
QgsRect layerExtentToOutputExtent(QgsMapLayer* theLayer, QgsRect extent);

//! transform coordinates from layer's CRS to output CRS
QgsPoint layerCoordsToOutputCoords(QgsMapLayer* theLayer, QgsPoint point);
QgsPoint layerToMapCoordinates(QgsMapLayer* theLayer, QgsPoint point);

//! transform coordinates from output CRS to layer's CRS
QgsPoint outputCoordsToLayerCoords(QgsMapLayer* theLayer, QgsPoint point);
QgsPoint mapToLayerCoordinates(QgsMapLayer* theLayer, QgsPoint point);

//! transform rect's coordinates from output CRS to layer's CRS
QgsRect outputCoordsToLayerCoords(QgsMapLayer* theLayer, QgsRect rect);
QgsRect mapToLayerCoordinates(QgsMapLayer* theLayer, QgsRect rect);

//! sets whether to use projections for this layer set
void setProjectionsEnabled(bool enabled);
@@ -73,7 +73,7 @@ class QgsMapToPixel
//! Set minimum y value
void setYmin(double ymin);
//! set minimum x value
void setXmin(double xmin);
void setXMinimum(double xmin);
/*! Set parameters for use in tranfsorming coordinates
* @param mupp Map units per pixel
* @param xmin Minimum x value
@@ -48,10 +48,10 @@ public:
double y() const;

//! String representation of the point (x,y)
QString stringRep() const;
QString toString() const;

//! As above but with precision for string representaiton of a point
QString stringRep(int thePrecision) const;
QString toString(int thePrecision) const;

/*! Return the well known text representation for the point.
* The wkt is created without an SRID.
@@ -49,7 +49,7 @@ public:
write()
*/
//@{
bool dirty() const;
bool isDirty() const;

void dirty( bool b );
//@}
@@ -59,7 +59,7 @@ public:
Every project has an associated file that contains its XML
*/
//@{
void filename( const QString & name );
void setFilename( const QString & name );

/** returns file name */
QString filename() const;
@@ -100,14 +100,14 @@ public:
//@}


/** read the layer described in the associated DOM node
/** read the layer described in the associated Dom node

@param layerNode represents a QgsProject DOM node that maps to a specific layer.
@param layerNode represents a QgsProject Dom node that maps to a specific layer.

QgsProject raises an exception when one of the QgsProject::read()
implementations fails. Since the read()s are invoked from qgisapp,
then qgisapp handles the exception. It prompts the user for the new
location of the data, if any. If there is a new location, the DOM
location of the data, if any. If there is a new location, the Dom
node associated with the layer has its <datasource> tag corrected.
Then that node is passed to this member function to be re-opened.

@@ -104,7 +104,7 @@ public:

/** \brief This is called when the view on the rasterlayer needs to be refreshed (redrawn).
*/
bool draw(QgsRenderContext& renderContext);
bool draw(QgsRenderContext& rendererContext);

/** \brief This is an overloaded version of the above function that is called by both draw above and drawThumbnail */
void draw(QPainter * theQPainter, QgsRasterViewPort * myRasterViewPort,
@@ -430,14 +430,14 @@ public:
*
* \retval 0 if not using the data provider model (i.e. directly using GDAL)
*/
QgsRasterDataProvider* getDataProvider();
QgsRasterDataProvider* dataProvider();

/** Returns the data provider in a const-correct manner
*
* \retval 0 if not using the data provider model (i.e. directly using GDAL)
*/
// PyQGIS: commented out, has the same signature as the function above
// const QgsRasterDataProvider* getDataProvider() const;
// const QgsRasterDataProvider* dataProvider() const;

/** \brief Mutator for mUserDefinedRGBMinMaxFlag */
void setUserDefinedRGBMinMax(bool theBool);
@@ -501,7 +501,7 @@ public slots:
QgsColorTable *colorTable ( int theBandNoInt );
protected:

/** reads vector layer specific state from project file DOM node.
/** reads vector layer specific state from project file Dom node.

@note

@@ -512,7 +512,7 @@ public slots:



/** write vector layer specific state to project file DOM node.
/** write vector layer specific state to project file Dom node.

@note

@@ -27,9 +27,9 @@ class QgsRect
// normalised after construction.
void set(double xmin, double ymin, double xmax, double ymax);
//! Set the minimum x value
void setXmin(double x);
void setXMinimum(double x);
//! Set the maximum x value
void setXmax(double x);
void setXMaximum(double x);
//! Set the maximum y value
void setYmin(double y);
//! Set the maximum y value
@@ -68,11 +68,11 @@ class QgsRect
//! test if rectangle is empty
bool isEmpty() const;
//! returns string representation in WKT form
QString asWKTCoords() const;
QString asWktCoordinates() const;
//! returns string representation of form xmin,ymin xmax,ymax
QString stringRep(bool automaticPrecision = false) const;
//! overloaded stringRep that allows precision of numbers to be set
QString stringRep(int thePrecision) const;
QString toString(bool automaticPrecision = false) const;
//! overloaded toString that allows precision of numbers to be set
QString toString(int thePrecision) const;
//! returns rectangle s a polygon
QString asPolygon() const;
/*! Comparison operator
@@ -14,7 +14,7 @@ class QgsRenderContext

QPainter* painter();

const QgsCoordinateTransform* coordTransform() const;
const QgsCoordinateTransform* coordinateTransform() const;

const QgsRect& extent() const;

@@ -18,7 +18,7 @@ class QgsRenderer
@param scalefactor pointer to the scale factor for the marker image*/
virtual void renderFeature(QPainter* p, QgsFeature& f,QImage* pic, bool selected, double widthScale = 1.0, double rasterScaleFactor = 1.0)=0;
/**Reads the renderer configuration from an XML file
@param rnode the DOM node to read
@param rnode the Dom node to read
@param vl the vector layer which will be associated with the renderer*/
virtual void readXML(const QDomNode& rnode, QgsVectorLayer& vl)=0;
/**Writes the contents of the renderer to a configuration file
@@ -16,7 +16,7 @@ class QgsSingleSymbolRenderer : QgsRenderer
/**Renders an OGRFeature*/
void renderFeature(QPainter* p, QgsFeature& f, QImage* img, bool selected, double widthScale = 1.0, double rasterScaleFactor = 1.0);
/**Reads the renderer configuration from an XML file
@param rnode the DOM node to read
@param rnode the Dom node to read
@param vl the vector layer which will be associated with the renderer*/
virtual void readXML(const QDomNode& rnode, QgsVectorLayer& vl);
/**Writes the contents of the renderer to a configuration file*/
@@ -13,7 +13,7 @@ class QgsUniqueValueRenderer : QgsRenderer
bool willRenderFeature(QgsFeature *f);
void renderFeature(QPainter* p, QgsFeature& f, QImage* img, bool selected, double widthScale = 1.0, double rasterScaleFactor = 1.0);
/**Reads the renderer configuration from an XML file
@param rnode the DOM node to read
@param rnode the Dom node to read
@param vl the vector layer which will be associated with the renderer*/
void readXML(const QDomNode& rnode, QgsVectorLayer& vl);
/**Writes the contents of the renderer to a configuration file
@@ -122,7 +122,7 @@ class QgsVectorDataProvider : QgsDataProvider
* and maximal values. If provider has facilities to retrieve minimal
* value directly, override this function.
*/
virtual QVariant minValue(int index);
virtual QVariant minimumValue(int index);

/**
* Returns the maximum value of an attributs
@@ -45,10 +45,10 @@ public:
const QString displayField() const;

/** Returns the data provider */
QgsVectorDataProvider* getDataProvider();
QgsVectorDataProvider* dataProvider();

/** Returns the data provider in a const-correct manner */
//const QgsVectorDataProvider* getDataProvider() const;
//const QgsVectorDataProvider* dataProvider() const;

/** Sets the textencoding of the data provider */
void setProviderEncoding(const QString& encoding);
@@ -102,12 +102,12 @@ public:
/** Return the provider type for this layer */
QString providerType() const;

/** reads vector layer specific state from project file DOM node.
/** reads vector layer specific state from project file Dom node.
* @note Called by QgsMapLayer::readXml().
*/
virtual bool readXml( QDomNode & layer_node );

/** write vector layer specific state to project file DOM node.
/** write vector layer specific state to project file Dom node.
* @note Called by QgsMapLayer::writeXml().
*/
virtual bool writeXml( QDomNode & layer_node, QDomDocument & doc );
@@ -246,10 +246,10 @@ public:
int insertSegmentVerticesForSnap(const QList<QgsSnappingResult>& snapResults);

/** Set labels on */
void setLabelOn( bool on );
void enableLabels( bool on );

/** Label is on */
bool labelOn( );
bool hasLabelsEnabled( );

/** Returns true if the provider is in editing mode */
virtual bool isEditable() const;
@@ -277,10 +277,10 @@ public:
/** Draws the layer using coordinate transformation
* @return FALSE if an error occurred during drawing
*/
bool draw(QgsRenderContext& renderContext);
bool draw(QgsRenderContext& rendererContext);

/** Draws the layer labels using coordinate transformation */
void drawLabels(QgsRenderContext& renderContext);
void drawLabels(QgsRenderContext& rendererContext);

/** \brief Draws the layer labels using coordinate transformation
* \param scale size scale, applied to all values in pixels
@@ -372,7 +372,7 @@ signals:
void selectionChanged();

/** This signal is emitted when modifications has been done on layer */
void wasModified(bool onlyGeometry);
void layerModified(bool onlyGeometry);

void editingStarted();
void editingStopped();

0 comments on commit 9930215

Please sign in to comment.