qextserialenumerator.h   qextserialenumerator.h 
skipping to change at line 16 skipping to change at line 16
#ifndef _QEXTSERIALENUMERATOR_H_ #ifndef _QEXTSERIALENUMERATOR_H_
#define _QEXTSERIALENUMERATOR_H_ #define _QEXTSERIALENUMERATOR_H_
#include <QString> #include <QString>
#include <QList> #include <QList>
#include <QObject> #include <QObject>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#ifdef __MINGW32__ #ifdef __MINGW32__
#ifdef _WIN32_WINNT
#if _WIN32_WINNT < 0x0500
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
#else
#define _WIN32_WINNT 0x0500 #define _WIN32_WINNT 0x0500
#define _WIN32_WINDOWS 0x0500 #endif
#define WINVER 0x0500
#endif #endif
#include <windows.h> #include <windows.h>
#include <setupapi.h> #include <setupapi.h>
#include <dbt.h> #include <dbt.h>
#endif /*Q_OS_WIN*/ #endif /*Q_OS_WIN*/
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
#include <IOKit/usb/IOUSBLib.h> #include <IOKit/usb/IOUSBLib.h>
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 7 lines changed or added


 qgis.h   qgis.h 
skipping to change at line 93 skipping to change at line 94
*/ */
enum UnitType enum UnitType
{ {
Meters = 0, Meters = 0,
Feet = 1, Feet = 1,
Degrees = 2, //for 1.0 api backwards compatibility Degrees = 2, //for 1.0 api backwards compatibility
DecimalDegrees = 2, DecimalDegrees = 2,
DegreesMinutesSeconds = 4, DegreesMinutesSeconds = 4,
DegreesDecimalMinutes = 5, DegreesDecimalMinutes = 5,
UnknownUnit = 3 UnknownUnit = 3
} ; };
//! User defined event types //! User defined event types
enum UserEvent enum UserEvent
{ {
// These first two are useful for threads to alert their parent data providers // These first two are useful for threads to alert their parent data providers
//! The extents have been calculated by a provider of a layer //! The extents have been calculated by a provider of a layer
ProviderExtentCalcEvent = ( QEvent::User + 1 ), ProviderExtentCalcEvent = ( QEvent::User + 1 ),
//! The row count has been calculated by a provider of a layer //! The row count has been calculated by a provider of a layer
skipping to change at line 135 skipping to change at line 136
// //
// compare two doubles (but allow some difference) // compare two doubles (but allow some difference)
// //
inline bool doubleNear( double a, double b, double epsilon = 4 * DBL_EPSILO N ) inline bool doubleNear( double a, double b, double epsilon = 4 * DBL_EPSILO N )
{ {
const double diff = a - b; const double diff = a - b;
return diff > -epsilon && diff <= epsilon; return diff > -epsilon && diff <= epsilon;
} }
/** Wkt string that represents a geographic coord sys */ /** Wkt string that represents a geographic coord sys
const QString GEOWkt = * @note added in 1.8 to replace GEOWkt
*/
const QString GEOWKT =
"GEOGCS[\"WGS 84\", " "GEOGCS[\"WGS 84\", "
" DATUM[\"WGS_1984\", " " DATUM[\"WGS_1984\", "
" SPHEROID[\"WGS 84\",6378137,298.257223563, " " SPHEROID[\"WGS 84\",6378137,298.257223563, "
" AUTHORITY[\"EPSG\",7030]], " " AUTHORITY[\"EPSG\",7030]], "
" TOWGS84[0,0,0,0,0,0,0], " " TOWGS84[0,0,0,0,0,0,0], "
" AUTHORITY[\"EPSG\",6326]], " " AUTHORITY[\"EPSG\",6326]], "
" PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",8901]], " " PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",8901]], "
" UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",9108]], " " UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",9108]], "
" AXIS[\"Lat\",NORTH], " " AXIS[\"Lat\",NORTH], "
" AXIS[\"Long\",EAST], " " AXIS[\"Long\",EAST], "
" AUTHORITY[\"EPSG\",4326]]"; " AUTHORITY[\"EPSG\",4326]]";
/** Wkt string that represents a geographic coord sys
* @note deprecated in 1.8 due to violation of coding conventions (globals
* should be in all caps).
*/
#ifndef _MSC_VER
Q_DECL_DEPRECATED
#endif
const QString GEOWkt = GEOWKT;
/** PROJ4 string that represents a geographic coord sys */ /** PROJ4 string that represents a geographic coord sys */
const QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" ; extern CORE_EXPORT const QString GEOPROJ4;
/** Magic number for a geographic coord sys in POSTGIS SRID */ /** Magic number for a geographic coord sys in POSTGIS SRID */
const long GEOSRID = 4326; const long GEOSRID = 4326;
/** Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id * / /** Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id * /
const long GEOCRS_ID = 3452; const long GEOCRS_ID = 3452;
/** Magic number for a geographic coord sys in EpsgCrsId ID format */ /** Magic number for a geographic coord sys in EpsgCrsId ID format */
const long GEO_EPSG_CRS_ID = 4326; const long GEO_EPSG_CRS_ID = 4326;
/** Geographic coord sys from EPSG authority */ /** Geographic coord sys from EPSG authority */
const QString GEO_EPSG_CRS_AUTHID = "EPSG:4326"; const QString GEO_EPSG_CRS_AUTHID = "EPSG:4326";
/** The length of the string "+proj=" */ /** The length of the string "+proj=" */
const int PROJ_PREFIX_LEN = 6; const int PROJ_PREFIX_LEN = 6;
skipping to change at line 178 skipping to change at line 189
// //
// Constants for point symbols // Constants for point symbols
// //
/** Magic number that determines the minimum allowable point size for point symbols */ /** Magic number that determines the minimum allowable point size for point symbols */
const double MINIMUM_POINT_SIZE = 0.1; const double MINIMUM_POINT_SIZE = 0.1;
/** Magic number that determines the default point size for point symbols * / /** Magic number that determines the default point size for point symbols * /
const double DEFAULT_POINT_SIZE = 2.0; const double DEFAULT_POINT_SIZE = 2.0;
const double DEFAULT_LINE_WIDTH = 0.26; const double DEFAULT_LINE_WIDTH = 0.26;
/** default snapping tolerance for segments (@note added in 1.8) */
const double DEFAULT_SEGMENT_EPSILON = 1e-8;
// FIXME: also in qgisinterface.h // FIXME: also in qgisinterface.h
#ifndef QGISEXTERN #ifndef QGISEXTERN
#ifdef WIN32 #ifdef WIN32
# define QGISEXTERN extern "C" __declspec( dllexport ) # define QGISEXTERN extern "C" __declspec( dllexport )
# ifdef _MSC_VER # ifdef _MSC_VER
// do not warn about C bindings returing QString // do not warn about C bindings returing QString
# pragma warning(disable:4190) # pragma warning(disable:4190)
# endif # endif
#else #else
# define QGISEXTERN extern "C" # define QGISEXTERN extern "C"
 End of changes. 5 change blocks. 
4 lines changed or deleted 17 lines changed or added


 qgisgui.h   qgisgui.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2006 by Tom Elwertowski Copyright : (C) 2006 by Tom Elwertowski
Email : telwertowski at users dot sourceforge dot net Email : telwertowski at users dot sourceforge dot net
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGISGUI_H #ifndef QGISGUI_H
#define QGISGUI_H #define QGISGUI_H
#include <Qt> #include <Qt>
#include <QPair> #include <QPair>
class QStringList; class QStringList;
/** \ingroup gui /** \ingroup gui
* /namespace QgisGui * /namespace QgisGui
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgisinterface.h   qgisinterface.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGISINTERFACE_H #ifndef QGISINTERFACE_H
#define QGISINTERFACE_H #define QGISINTERFACE_H
class QAction; class QAction;
class QMenu; class QMenu;
class QToolBar; class QToolBar;
class QDockWidget; class QDockWidget;
class QMainWindow; class QMainWindow;
class QWidget; class QWidget;
skipping to change at line 120 skipping to change at line 119
//! returns true if the layer exists, false otherwise //! returns true if the layer exists, false otherwise
//! added in 1.4 //! added in 1.4
virtual bool setActiveLayer( QgsMapLayer * ) = 0; virtual bool setActiveLayer( QgsMapLayer * ) = 0;
//! Add an icon to the plugins toolbar //! Add an icon to the plugins toolbar
virtual int addToolBarIcon( QAction *qAction ) = 0; virtual int addToolBarIcon( QAction *qAction ) = 0;
//! Remove an action (icon) from the plugin toolbar //! Remove an action (icon) from the plugin toolbar
virtual void removeToolBarIcon( QAction *qAction ) = 0; virtual void removeToolBarIcon( QAction *qAction ) = 0;
//! Add an icon to the Raster toolbar
//! @note added in 2.0
virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
//! Remove an action (icon) from the Raster toolbar
//! @note added in 2.0
virtual void removeRasterToolBarIcon( QAction *qAction ) = 0;
//! Add an icon to the Vector toolbar
//! @note added in 2.0
virtual int addVectorToolBarIcon( QAction *qAction ) = 0;
//! Remove an action (icon) from the Vector toolbar
//! @note added in 2.0
virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
//! Add an icon to the Database toolbar
//! @note added in 2.0
virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;
//! Remove an action (icon) from the Database toolbar
//! @note added in 2.0
virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
//! Add an icon to the Web toolbar
//! @note added in 2.0
virtual int addWebToolBarIcon( QAction *qAction ) = 0;
//! Remove an action (icon) from the Web toolbar
//! @note added in 2.0
virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
//! Add toolbar with specified name //! Add toolbar with specified name
virtual QToolBar * addToolBar( QString name ) = 0; virtual QToolBar * addToolBar( QString name ) = 0;
/** Return a pointer to the map canvas */ /** Return a pointer to the map canvas */
virtual QgsMapCanvas * mapCanvas() = 0; virtual QgsMapCanvas * mapCanvas() = 0;
/** Return a pointer to the main window (instance of QgisApp in case of QGIS) */ /** Return a pointer to the main window (instance of QgisApp in case of QGIS) */
virtual QWidget * mainWindow() = 0; virtual QWidget * mainWindow() = 0;
/**Return mainwindows / composer views of running composer instances (c urrently only one)*/ /**Return mainwindows / composer views of running composer instances (c urrently only one)*/
skipping to change at line 158 skipping to change at line 189
/** Add action to the Database menu /** Add action to the Database menu
* @note added in 1.7 * @note added in 1.7
*/ */
virtual void addPluginToDatabaseMenu( QString name, QAction* action ) = 0; virtual void addPluginToDatabaseMenu( QString name, QAction* action ) = 0;
/** Remove action from the Database menu /** Remove action from the Database menu
* @note added in 1.7 * @note added in 1.7
*/ */
virtual void removePluginDatabaseMenu( QString name, QAction* action ) = 0; virtual void removePluginDatabaseMenu( QString name, QAction* action ) = 0;
/** Add action to the Raster menu
* @note added in 2.0
*/
virtual void addPluginToRasterMenu( QString name, QAction* action ) = 0
;
/** Remove action from the Raster menu
* @note added in 2.0
*/
virtual void removePluginRasterMenu( QString name, QAction* action ) =
0;
/** Add action to the Vector menu
* @note added in 2.0
*/
virtual void addPluginToVectorMenu( QString name, QAction* action ) = 0
;
/** Remove action from the Vector menu
* @note added in 2.0
*/
virtual void removePluginVectorMenu( QString name, QAction* action ) =
0;
/** Add action to the Web menu
* @note added in 2.0
*/
virtual void addPluginToWebMenu( QString name, QAction* action ) = 0;
/** Remove action from the Web menu
* @note added in 2.0
*/
virtual void removePluginWebMenu( QString name, QAction* action ) = 0;
/** Add a dock widget to the main window */ /** Add a dock widget to the main window */
virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget * dock widget ) = 0; virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget * dock widget ) = 0;
/** Remove specified dock widget from main window (doesn't delete it). /** Remove specified dock widget from main window (doesn't delete it).
* @note Added in 1.1 * @note Added in 1.1
*/ */
virtual void removeDockWidget( QDockWidget * dockwidget ) = 0; virtual void removeDockWidget( QDockWidget * dockwidget ) = 0;
/** refresh the legend of a layer /** refresh the legend of a layer
\deprecated use QgsLegendInterface::refreshLayerSymbology \deprecated use QgsLegendInterface::refreshLayerSymbology
skipping to change at line 226 skipping to change at line 287
* An item can be inserted before any existing action. * An item can be inserted before any existing action.
*/ */
//! Menus //! Menus
virtual QMenu *fileMenu() = 0; virtual QMenu *fileMenu() = 0;
virtual QMenu *editMenu() = 0; virtual QMenu *editMenu() = 0;
virtual QMenu *viewMenu() = 0; virtual QMenu *viewMenu() = 0;
virtual QMenu *layerMenu() = 0; virtual QMenu *layerMenu() = 0;
virtual QMenu *settingsMenu() = 0; virtual QMenu *settingsMenu() = 0;
virtual QMenu *pluginMenu() = 0; virtual QMenu *pluginMenu() = 0;
virtual QMenu *rasterMenu() = 0;
/** \note added in 1.7
*/
virtual QMenu *databaseMenu() = 0;
/** \note added in 2.0
*/
virtual QMenu *vectorMenu() = 0;
/** \note added in 2.0
*/
virtual QMenu *webMenu() = 0;
virtual QMenu *firstRightStandardMenu() = 0; virtual QMenu *firstRightStandardMenu() = 0;
virtual QMenu *windowMenu() = 0; virtual QMenu *windowMenu() = 0;
virtual QMenu *helpMenu() = 0; virtual QMenu *helpMenu() = 0;
//! ToolBars //! ToolBars
virtual QToolBar *fileToolBar() = 0; virtual QToolBar *fileToolBar() = 0;
virtual QToolBar *layerToolBar() = 0; virtual QToolBar *layerToolBar() = 0;
virtual QToolBar *mapNavToolToolBar() = 0; virtual QToolBar *mapNavToolToolBar() = 0;
virtual QToolBar *digitizeToolBar() = 0; virtual QToolBar *digitizeToolBar() = 0;
virtual QToolBar *advancedDigitizeToolBar() = 0; // added in v1.5 virtual QToolBar *advancedDigitizeToolBar() = 0; // added in v1.5
virtual QToolBar *attributesToolBar() = 0; virtual QToolBar *attributesToolBar() = 0;
virtual QToolBar *pluginToolBar() = 0; virtual QToolBar *pluginToolBar() = 0;
virtual QToolBar *helpToolBar() = 0; virtual QToolBar *helpToolBar() = 0;
/** \note added in 1.7 /** \note added in 1.7
*/ */
virtual QToolBar *rasterToolBar() = 0; virtual QToolBar *rasterToolBar() = 0;
/** \note added in 2.0
*/
virtual QToolBar *vectorToolBar() = 0;
/** \note added in 2.0
*/
virtual QToolBar *databaseToolBar() = 0;
/** \note added in 2.0
*/
virtual QToolBar *webToolBar() = 0;
//! File menu actions //! File menu actions
virtual QAction *actionNewProject() = 0; virtual QAction *actionNewProject() = 0;
virtual QAction *actionOpenProject() = 0; virtual QAction *actionOpenProject() = 0;
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#endif #endif
virtual QAction *actionFileSeparator1() = 0; virtual QAction *actionFileSeparator1() = 0;
virtual QAction *actionSaveProject() = 0; virtual QAction *actionSaveProject() = 0;
virtual QAction *actionSaveProjectAs() = 0; virtual QAction *actionSaveProjectAs() = 0;
skipping to change at line 277 skipping to change at line 357
virtual QAction *actionExit() = 0; virtual QAction *actionExit() = 0;
//! Edit menu actions //! Edit menu actions
virtual QAction *actionCutFeatures() = 0; virtual QAction *actionCutFeatures() = 0;
virtual QAction *actionCopyFeatures() = 0; virtual QAction *actionCopyFeatures() = 0;
virtual QAction *actionPasteFeatures() = 0; virtual QAction *actionPasteFeatures() = 0;
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#endif #endif
virtual QAction *actionEditSeparator1() = 0; virtual QAction *actionEditSeparator1() = 0;
virtual QAction *actionAddFeature() = 0;
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
virtual QAction *actionCapturePoint() = 0; virtual QAction *actionCapturePoint() = 0;
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
virtual QAction *actionCaptureLine() = 0; virtual QAction *actionCaptureLine() = 0;
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
virtual QAction *actionCapturePolygon() = 0; virtual QAction *actionCapturePolygon() = 0;
virtual QAction *actionDeleteSelected() = 0; virtual QAction *actionDeleteSelected() = 0;
virtual QAction *actionMoveFeature() = 0; virtual QAction *actionMoveFeature() = 0;
virtual QAction *actionSplitFeatures() = 0; virtual QAction *actionSplitFeatures() = 0;
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#endif #endif
virtual QAction *actionAddVertex() = 0; virtual QAction *actionAddVertex() = 0;
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#endif #endif
virtual QAction *actionDeleteVertex() = 0; virtual QAction *actionDeleteVertex() = 0;
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#endif #endif
virtual QAction *actionMoveVertex() = 0; virtual QAction *actionMoveVertex() = 0;
virtual QAction *actionAddRing() = 0; virtual QAction *actionAddRing() = 0;
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
virtual QAction *actionAddIsland() = 0; virtual QAction *actionAddIsland() = 0;
virtual QAction *actionAddPart() = 0;
virtual QAction *actionSimplifyFeature() = 0; virtual QAction *actionSimplifyFeature() = 0;
virtual QAction *actionDeleteRing() = 0; virtual QAction *actionDeleteRing() = 0;
virtual QAction *actionDeletePart() = 0; virtual QAction *actionDeletePart() = 0;
virtual QAction *actionNodeTool() = 0; virtual QAction *actionNodeTool() = 0;
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#endif #endif
virtual QAction *actionEditSeparator2() = 0; virtual QAction *actionEditSeparator2() = 0;
//! View menu actions //! View menu actions
virtual QAction *actionPan() = 0; virtual QAction *actionPan() = 0;
virtual QAction *actionPanToSelected() = 0;
virtual QAction *actionZoomIn() = 0; virtual QAction *actionZoomIn() = 0;
virtual QAction *actionZoomOut() = 0; virtual QAction *actionZoomOut() = 0;
virtual QAction *actionSelect() = 0; virtual QAction *actionSelect() = 0;
virtual QAction *actionSelectRectangle() = 0; virtual QAction *actionSelectRectangle() = 0;
virtual QAction *actionSelectPolygon() = 0; virtual QAction *actionSelectPolygon() = 0;
virtual QAction *actionSelectFreehand() = 0; virtual QAction *actionSelectFreehand() = 0;
virtual QAction *actionSelectRadius() = 0; virtual QAction *actionSelectRadius() = 0;
virtual QAction *actionIdentify() = 0; virtual QAction *actionIdentify() = 0;
virtual QAction *actionMeasure() = 0; virtual QAction *actionMeasure() = 0;
virtual QAction *actionMeasureArea() = 0; virtual QAction *actionMeasureArea() = 0;
 End of changes. 11 change blocks. 
1 lines changed or deleted 100 lines changed or added


 qgisplugin.h   qgisplugin.h 
skipping to change at line 73 skipping to change at line 73
enum PLUGINTYPE enum PLUGINTYPE
{ {
UI = 1, /* user interface plug-in */ UI = 1, /* user interface plug-in */
MAPLAYER, /* map layer plug-in */ MAPLAYER, /* map layer plug-in */
RENDERER, /*a plugin for a new renderer class*/ RENDERER, /*a plugin for a new renderer class*/
VECTOR_OVERLAY /*an overlay plugin. Added in version 1 .1*/ VECTOR_OVERLAY /*an overlay plugin. Added in version 1 .1*/
}; };
QgisPlugin( QString const & name = "", QgisPlugin( QString const & name = "",
QString const & description = "", QString const & description = "",
QString const & category = "",
QString const & version = "", QString const & version = "",
PLUGINTYPE const & type = MAPLAYER ) PLUGINTYPE const & type = MAPLAYER )
: mName( name ), : mName( name ),
mDescription( description ), mDescription( description ),
mCategory( category ),
mVersion( version ), mVersion( version ),
mType( type ) mType( type )
{} {}
virtual ~QgisPlugin() virtual ~QgisPlugin()
{} {}
//! Get the name of the plugin //! Get the name of the plugin
QString const & name() const QString const & name() const
{ {
skipping to change at line 119 skipping to change at line 121
{ {
return mDescription; return mDescription;
} }
//! A brief description of the plugin //! A brief description of the plugin
QString & description() QString & description()
{ {
return mDescription; return mDescription;
} }
//! Plugin category
QString const & category() const
{
return mCategory;
}
//! Plugin category
QString & category()
{
return mCategory;
}
//! Plugin type, either UI or map layer //! Plugin type, either UI or map layer
QgisPlugin::PLUGINTYPE const & type() const QgisPlugin::PLUGINTYPE const & type() const
{ {
return mType; return mType;
} }
//! Plugin type, either UI or map layer //! Plugin type, either UI or map layer
QgisPlugin::PLUGINTYPE & type() QgisPlugin::PLUGINTYPE & type()
{ {
return mType; return mType;
skipping to change at line 145 skipping to change at line 159
virtual void unload() = 0; virtual void unload() = 0;
private: private:
/// plug-in name /// plug-in name
QString mName; QString mName;
/// description /// description
QString mDescription; QString mDescription;
/// category
QString mCategory;
/// version /// version
QString mVersion; QString mVersion;
/// UI or MAPLAYER plug-in /// UI or MAPLAYER plug-in
/** /**
@todo Really, might be indicative that this needs to split into @todo Really, might be indicative that this needs to split into
maplayer vs. ui plug-in vs. other kind of plug-in maplayer vs. ui plug-in vs. other kind of plug-in
*/ */
PLUGINTYPE mType; PLUGINTYPE mType;
skipping to change at line 171 skipping to change at line 188
//! Typedef for the function to unload a plugin and free its resources //! Typedef for the function to unload a plugin and free its resources
typedef void unload_t( QgisPlugin * ); typedef void unload_t( QgisPlugin * );
//! Typedef for getting the name of the plugin without instantiating it //! Typedef for getting the name of the plugin without instantiating it
typedef QString name_t(); typedef QString name_t();
//! Typedef for getting the description without instantiating the plugin //! Typedef for getting the description without instantiating the plugin
typedef QString description_t(); typedef QString description_t();
//! Typedef for getting the category without instantiating the plugin
typedef QString category_t();
//! Typedef for getting the plugin type without instantiating the plugin //! Typedef for getting the plugin type without instantiating the plugin
typedef int type_t(); typedef int type_t();
//! Typedef for getting the plugin version without instantiating the plugin //! Typedef for getting the plugin version without instantiating the plugin
typedef QString version_t(); typedef QString version_t();
//! Typedef for getting the plugin icon file name without instantiating the plugin //! Typedef for getting the plugin icon file name without instantiating the plugin
typedef QString icon_t(); typedef QString icon_t();
#endif //qgisplugin_h #endif //qgisplugin_h
 End of changes. 5 change blocks. 
0 lines changed or deleted 20 lines changed or added


 qgsapplication.h   qgsapplication.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2006 by Tom Elwertowski Copyright : (C) 2006 by Tom Elwertowski
Email : telwertowski at users dot sourceforge dot net Email : telwertowski at users dot sourceforge dot net
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSAPPLICATION_H #ifndef QGSAPPLICATION_H
#define QGSAPPLICATION_H #define QGSAPPLICATION_H
#include <QApplication> #include <QApplication>
#include <QEvent> #include <QEvent>
#include <QStringList>
#include <qgis.h> #include <qgis.h>
#define ABISYM(x) x ## VERSION_INT
/** \ingroup core /** \ingroup core
* Extends QApplication to provide access to QGIS specific resources such * Extends QApplication to provide access to QGIS specific resources such
* as theme paths, database paths etc. * as theme paths, database paths etc.
*/ */
class CORE_EXPORT QgsApplication: public QApplication class CORE_EXPORT QgsApplication: public QApplication
{ {
Q_OBJECT Q_OBJECT
public: public:
//! @note customConfigDir parameter added in v1.6 //! @note customConfigDir parameter added in v1.6
QgsApplication( int & argc, char ** argv, bool GUIenabled, QString cust omConfigPath = QString() ); QgsApplication( int & argc, char ** argv, bool GUIenabled, QString cust omConfigPath = QString() );
virtual ~QgsApplication(); virtual ~QgsApplication();
/** This method initialises paths etc for QGIS. Called by the ctor or c
all it manually
when your app does not extend the QApplication class.
@note you will probably want to call initQgis too to load the provi
ders in
the above case.
*/
static void init( QString customConfigPath = QString() );
//! Watch for QFileOpenEvent. //! Watch for QFileOpenEvent.
virtual bool event( QEvent * event ); virtual bool event( QEvent * event );
//! Catch exceptions when sending event to receiver. //! Catch exceptions when sending event to receiver.
virtual bool notify( QObject * receiver, QEvent * event ); virtual bool notify( QObject * receiver, QEvent * event );
//! Set the FileOpen event receiver //! Set the FileOpen event receiver
static void setFileOpenEventReceiver( QObject * receiver ); static void setFileOpenEventReceiver( QObject * receiver );
/** Set the active theme to the specified theme. /** Set the active theme to the specified theme.
skipping to change at line 88 skipping to change at line 97
@note this function was added in version 1.2*/ @note this function was added in version 1.2*/
static const QString donorsFilePath(); static const QString donorsFilePath();
/** /**
* Returns the path to the sponsors file. * Returns the path to the sponsors file.
* @note This was added in QGIS 1.1 * @note This was added in QGIS 1.1
*/ */
static const QString translatorsFilePath(); static const QString translatorsFilePath();
//! Returns the path to the developer image directory. //! Returns the path to the developer image directory.
static const QString developerPath(); //! @deprecated images are not provided anymore :-P
Q_DECL_DEPRECATED static const QString developerPath();
//! Returns the path to the help application. //! Returns the path to the help application.
static const QString helpAppPath(); static const QString helpAppPath();
//! Returns the path to the translation directory. //! Returns the path to the translation directory.
static const QString i18nPath(); static const QString i18nPath();
//! Returns the path to the master qgis.db file. //! Returns the path to the master qgis.db file.
static const QString qgisMasterDbFilePath(); static const QString qgisMasterDbFilePath();
skipping to change at line 148 skipping to change at line 158
//! First it tries to use the active theme path, then default theme pat h //! First it tries to use the active theme path, then default theme pat h
//! @note Added in 1.5 //! @note Added in 1.5
static QString iconPath( QString iconFile ); static QString iconPath( QString iconFile );
//! Returns the path to user's style. Added in QGIS 1.4 //! Returns the path to user's style. Added in QGIS 1.4
static const QString userStyleV2Path(); static const QString userStyleV2Path();
//! Returns the path to default style (works as a starting point). Adde d in QGIS 1.4 //! Returns the path to default style (works as a starting point). Adde d in QGIS 1.4
static const QString defaultStyleV2Path(); static const QString defaultStyleV2Path();
//! Returns the path containing qgis_core, qgis_gui, qgispython (and ot
her) libraries
//! @note Added in 2.0
static const QString libraryPath();
//! Returns the path with utility executables (help viewer, crssync, ..
.)
//! @note Added in 2.0
static const QString libexecPath();
//! Alters prefix path - used by 3rd party apps //! Alters prefix path - used by 3rd party apps
static void setPrefixPath( const QString thePrefixPath, bool useDefault Paths = false ); static void setPrefixPath( const QString thePrefixPath, bool useDefault Paths = false );
//! Alters plugin path - used by 3rd party apps //! Alters plugin path - used by 3rd party apps
static void setPluginPath( const QString thePluginPath ); static void setPluginPath( const QString thePluginPath );
//! Alters pkg data path - used by 3rd party apps //! Alters pkg data path - used by 3rd party apps
static void setPkgDataPath( const QString thePkgDataPath ); static void setPkgDataPath( const QString thePkgDataPath );
//! Alters default svg paths - used by 3rd party apps. Added in QGIS 1. 5 //! Alters default svg paths - used by 3rd party apps. Added in QGIS 1. 5
skipping to change at line 204 skipping to change at line 222
*/ */
static void registerOgrDrivers(); static void registerOgrDrivers();
/**Converts absolute path to path relative to target /**Converts absolute path to path relative to target
@note: this method was added in version 1.6*/ @note: this method was added in version 1.6*/
static QString absolutePathToRelativePath( QString apath, QString targe tPath ); static QString absolutePathToRelativePath( QString apath, QString targe tPath );
/**Converts path relative to target to an absolute path /**Converts path relative to target to an absolute path
@note: this method was added in version 1.6*/ @note: this method was added in version 1.6*/
static QString relativePathToAbsolutePath( QString rpath, QString targe tPath ); static QString relativePathToAbsolutePath( QString rpath, QString targe tPath );
/** Indicates whether running from build directory (not installed)
@note added in 2.0 */
static bool isRunningFromBuildDir() { return ABISYM( mRunningFromBuildD
ir ); }
#ifdef _MSC_VER
static QString cfgIntDir() { return ABISYM( mCfgIntDir ); }
#endif
/** Returns path to the source directory. Valid only when running from
build directory
@note added in 2.0 */
static QString buildSourcePath() { return ABISYM( mBuildSourcePath ); }
/** Returns path to the build output directory. Valid only when running
from build directory
@note added in 2.0 */
static QString buildOutputPath() { return ABISYM( mBuildOutputPath ); }
/** Sets the GDAL_SKIP environment variable to include the specified dr
iver
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it
. The
* driver name should be the short format of the Gdal driver name e.g.
GTIFF.
* @note added in 2.0
*/
static void skipGdalDriver( QString theDriver );
/** Sets the GDAL_SKIP environment variable to exclude the specified dr
iver
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it
. The
* driver name should be the short format of the Gdal driver name e.g.
GTIFF.
* @note added in 2.0
*/
static void restoreGdalDriver( QString theDriver );
/** Returns the list of gdal drivers that should be skipped (based on
* GDAL_SKIP environment variable)
* @note added in 2.0
*/
static QStringList skippedGdalDrivers( ) { return ABISYM( mGdalSkipList
); };
/** Apply the skipped drivers list to gdal
* @see skipGdalDriver
* @see restoreGdalDriver
* @see skippedGdalDrivers
* @note added in 2.0 */
static void applyGdalSkippedDrivers();
signals:
void preNotify( QObject * receiver, QEvent * event, bool * done );
private: private:
static QObject* mFileOpenEventReceiver; static QObject* ABISYM( mFileOpenEventReceiver );
static QStringList mFileOpenEventList; static QStringList ABISYM( mFileOpenEventList );
static QString mPrefixPath; static QString ABISYM( mPrefixPath );
static QString mPluginPath; static QString ABISYM( mPluginPath );
static QString mPkgDataPath; static QString ABISYM( mPkgDataPath );
static QString mThemeName; static QString ABISYM( mLibraryPath );
static QStringList mDefaultSvgPaths; static QString ABISYM( mLibexecPath );
static QString ABISYM( mThemeName );
static QStringList ABISYM( mDefaultSvgPaths );
static QString mConfigPath; static QString ABISYM( mConfigPath );
/** true when running from build directory, i.e. without 'make install'
*/
static bool ABISYM( mRunningFromBuildDir );
/** path to the source directory. valid only when running from build di
rectory. */
static QString ABISYM( mBuildSourcePath );
#ifdef _MSC_VER
/** configuration internal dir */
static QString ABISYM( mCfgIntDir );
#endif
/** path to the output directory of the build. valid only when running
from build directory */
static QString ABISYM( mBuildOutputPath );
/** List of gdal drivers to be skipped. Uses GDAL_SKIP to exclude them.
* @see skipGdalDriver, restoreGdalDriver
* @note added in 2.0 */
static QStringList ABISYM( mGdalSkipList );
}; };
#endif #endif
 End of changes. 10 change blocks. 
10 lines changed or deleted 105 lines changed or added


 qgsattributeaction.h   qgsattributeaction.h 
skipping to change at line 23 skipping to change at line 23
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSATTRIBUTEACTION_H #ifndef QGSATTRIBUTEACTION_H
#define QGSATTRIBUTEACTION_H #define QGSATTRIBUTEACTION_H
#include <QString> #include <QString>
#include <QObject> #include <QObject>
#include <qgsfeature.h> #include <qgsfeature.h>
class QDomNode; class QDomNode;
skipping to change at line 51 skipping to change at line 50
class CORE_EXPORT QgsAction class CORE_EXPORT QgsAction
{ {
public: public:
enum ActionType enum ActionType
{ {
Generic, Generic,
GenericPython, GenericPython,
Mac, Mac,
Windows, Windows,
Unix, Unix,
OpenUrl,
}; };
QgsAction( ActionType type, QString name, QString action, bool capture ) : QgsAction( ActionType type, QString name, QString action, bool capture ) :
mType( type ), mName( name ), mAction( action ), mCaptureOutput( ca pture ) {} mType( type ), mName( name ), mAction( action ), mCaptureOutput( ca pture ) {}
//! The name of the action //! The name of the action
QString name() const { return mName; } QString name() const { return mName; }
//! The action //! The action
QString action() const { return mAction; } QString action() const { return mAction; }
skipping to change at line 73 skipping to change at line 73
ActionType type() const { return mType; } ActionType type() const { return mType; }
//! Whether to capture output for display when this action is run //! Whether to capture output for display when this action is run
bool capture() const { return mCaptureOutput; } bool capture() const { return mCaptureOutput; }
//! Whether the action is runable on the current platform //! Whether the action is runable on the current platform
bool runable() const bool runable() const
{ {
return mType == Generic || return mType == Generic ||
mType == GenericPython || mType == GenericPython ||
mType == OpenUrl ||
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
mType == Windows mType == Windows
#elif defined(Q_OS_MAC) #elif defined(Q_OS_MAC)
mType == Mac mType == Mac
#else #else
mType == Unix mType == Unix
#endif #endif
; ;
} }
skipping to change at line 111 skipping to change at line 112
//! Destructor //! Destructor
virtual ~QgsAttributeAction() {} virtual ~QgsAttributeAction() {}
//! Add an action with the given name and action details. //! Add an action with the given name and action details.
// Will happily have duplicate names and actions. If // Will happily have duplicate names and actions. If
// capture is true, when running the action using doAction(), // capture is true, when running the action using doAction(),
// any stdout from the process will be captured and displayed in a // any stdout from the process will be captured and displayed in a
// dialog box. // dialog box.
void addAction( QgsAction::ActionType type, QString name, QString actio n, bool capture = false ); void addAction( QgsAction::ActionType type, QString name, QString actio n, bool capture = false );
//! Does the action using the given values. defaultValueIndex is an /*! Does the action using the given values. defaultValueIndex is an
// index into values which indicates which value in the values vector * index into values which indicates which value in the values vector
// is to be used if the action has a default placeholder. * is to be used if the action has a default placeholder.
// @note parameter executePython deprecated (and missing in python bind * @note parameter executePython deprecated (and missing in python bin
ing) ding)
* @deprecated
*/
Q_DECL_DEPRECATED void doAction( int index,
const QgsAttributeMap &attributes,
int defaultValueIndex = 0,
void ( *executePython )( const QString
& ) = 0 );
/*! Does the given values. defaultValueIndex is the index of the
* field to be used if the action has a $currfield placeholder.
* @note added in 1.9
*/
void doAction( int index, void doAction( int index,
const QgsAttributeMap &attributes, QgsFeature &feat,
int defaultValueIndex = 0, int defaultValueIndex = 0 );
void ( *executePython )( const QString & ) = 0 );
/*! Does the action using the expression builder to expand it
* and getting values from the passed feature attribute map.
* substitutionMap is used to pass custom substitutions, to replace
* each key in the map with the associated value
* @note added in 1.9
*/
void doAction( int index,
QgsFeature &feat,
const QMap<QString, QVariant> *substitutionMap = 0 );
//! Removes all actions //! Removes all actions
void clearActions() { mActions.clear(); } void clearActions() { mActions.clear(); }
//! Expands the given action, replacing all %'s with the value as //! Return the layer
// given. QgsVectorLayer *layer() { return mLayer; }
/*! Expands the given action, replacing all %'s with the value as
* given.
*/
QString expandAction( QString action, const QgsAttributeMap &attributes
, uint defaultValueIndex );
/*! Expands the given action using the expression builder
* This function currently replaces each expression between [% and %]
* placeholders in the action with the result of its evaluation on
* the feature passed as argument.
*
* Additional substitutions can be passed through the substitutionMap
* parameter
*
* @note added in 1.9
*/
QString expandAction( QString action, QString expandAction( QString action,
const QgsAttributeMap &attributes, QgsFeature &feat,
uint defaultValueIndex ); const QMap<QString, QVariant> *substitutionMap =
0 );
//! Writes the actions out in XML format //! Writes the actions out in XML format
bool writeXML( QDomNode& layer_node, QDomDocument& doc ) const; bool writeXML( QDomNode& layer_node, QDomDocument& doc ) const;
//! Reads the actions in in XML format //! Reads the actions in in XML format
bool readXML( const QDomNode& layer_node ); bool readXML( const QDomNode& layer_node );
int size() const { return mActions.size(); } int size() const { return mActions.size(); }
QgsAction &at( int idx ) { return mActions[idx]; } QgsAction &at( int idx ) { return mActions[idx]; }
QgsAction &operator[]( int idx ) { return mActions[idx]; } QgsAction &operator[]( int idx ) { return mActions[idx]; }
//! @deprecated Initialize QgsPythonRunner instead
static void setPythonExecute( void ( * )( const QString & ) ); static void setPythonExecute( void ( * )( const QString & ) );
//! Whether the action is the default action
int defaultAction() const { return mDefaultAction < 0 || mDefaultAction
>= size() ? 0 : mDefaultAction; }
void setDefaultAction( int actionNumber ) { mDefaultAction = actionNumb
er ; }
private: private:
QList<QgsAction> mActions; QList<QgsAction> mActions;
QgsVectorLayer *mLayer; QgsVectorLayer *mLayer;
static void ( *smPythonExecute )( const QString & ); static void ( *smPythonExecute )( const QString & );
void runAction( const QgsAction &action,
void ( *executePython )( const QString & ) = 0 );
int mDefaultAction;
}; };
#endif #endif
 End of changes. 10 change blocks. 
13 lines changed or deleted 65 lines changed or added


 qgsattributeeditor.h   qgsattributeeditor.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSATTRIBUTEEDITOR_H #ifndef QGSATTRIBUTEEDITOR_H
#define QGSATTRIBUTEEDITOR_H #define QGSATTRIBUTEEDITOR_H
#include <QVariant> #include <QVariant>
class QObject; class QObject;
class QWidget; class QWidget;
class QgsVectorLayer; class QgsVectorLayer;
class QComboBox; class QComboBox;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsbrushstylecombobox.h   qgsbrushstylecombobox.h 
/**************************************************************************
*
qgsbrushstylecombobox.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSBRUSHSTYLECOMBOBOX_H #ifndef QGSBRUSHSTYLECOMBOBOX_H
#define QGSBRUSHSTYLECOMBOBOX_H #define QGSBRUSHSTYLECOMBOBOX_H
#include <QComboBox> #include <QComboBox>
class GUI_EXPORT QgsBrushStyleComboBox : public QComboBox class GUI_EXPORT QgsBrushStyleComboBox : public QComboBox
{ {
Q_OBJECT Q_OBJECT
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgscategorizedsymbolrendererv2.h   qgscategorizedsymbolrendererv2.h 
/**************************************************************************
*
qgscategorizedsymbolrendererv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSCATEGORIZEDSYMBOLRENDERERV2_H #ifndef QGSCATEGORIZEDSYMBOLRENDERERV2_H
#define QGSCATEGORIZEDSYMBOLRENDERERV2_H #define QGSCATEGORIZEDSYMBOLRENDERERV2_H
#include "qgssymbolv2.h"
#include "qgsrendererv2.h" #include "qgsrendererv2.h"
#include <QHash> #include <QHash>
class QgsVectorColorRampV2; class QgsVectorColorRampV2;
class QgsVectorLayer; class QgsVectorLayer;
/* \brief categorized renderer */ /* \brief categorized renderer */
class CORE_EXPORT QgsRendererCategoryV2 class CORE_EXPORT QgsRendererCategoryV2
{ {
skipping to change at line 35 skipping to change at line 50
QgsSymbolV2* symbol() const; QgsSymbolV2* symbol() const;
QString label() const; QString label() const;
void setValue( const QVariant &value ); void setValue( const QVariant &value );
void setSymbol( QgsSymbolV2* s ); void setSymbol( QgsSymbolV2* s );
void setLabel( const QString &label ); void setLabel( const QString &label );
// debugging // debugging
QString dump(); QString dump();
void toSld( QDomDocument& doc, QDomElement &element, QgsStringMap props
) const;
protected: protected:
QVariant mValue; QVariant mValue;
QgsSymbolV2* mSymbol; QgsSymbolV2* mSymbol;
QString mLabel; QString mLabel;
}; };
typedef QList<QgsRendererCategoryV2> QgsCategoryList; typedef QList<QgsRendererCategoryV2> QgsCategoryList;
class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendere rV2 class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendere rV2
{ {
skipping to change at line 63 skipping to change at line 80
virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer ); virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer );
virtual void stopRender( QgsRenderContext& context ); virtual void stopRender( QgsRenderContext& context );
virtual QList<QString> usedAttributes(); virtual QList<QString> usedAttributes();
virtual QString dump(); virtual QString dump();
virtual QgsFeatureRendererV2* clone(); virtual QgsFeatureRendererV2* clone();
virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
//! returns bitwise OR-ed capabilities of the renderer
//! \note added in 2.0
virtual int capabilities() { return SymbolLevels | RotationField; }
virtual QgsSymbolV2List symbols(); virtual QgsSymbolV2List symbols();
const QgsCategoryList& categories() { return mCategories; } const QgsCategoryList& categories() { return mCategories; }
//! return index of category with specified value (-1 if not found) //! return index of category with specified value (-1 if not found)
int categoryIndexForValue( QVariant val ); int categoryIndexForValue( QVariant val );
bool updateCategoryValue( int catIndex, const QVariant &value ); bool updateCategoryValue( int catIndex, const QVariant &value );
bool updateCategorySymbol( int catIndex, QgsSymbolV2* symbol ); bool updateCategorySymbol( int catIndex, QgsSymbolV2* symbol );
bool updateCategoryLabel( int catIndex, QString label ); bool updateCategoryLabel( int catIndex, QString label );
 End of changes. 4 change blocks. 
0 lines changed or deleted 33 lines changed or added


 qgscategorizedsymbolrendererv2widget.h   qgscategorizedsymbolrendererv2widget.h 
/**************************************************************************
*
qgscategorizedsymbolrendererv2widget.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H #ifndef QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H
#define QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H #define QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H
#include "qgscategorizedsymbolrendererv2.h" #include "qgscategorizedsymbolrendererv2.h"
#include "qgsrendererv2widget.h" #include "qgsrendererv2widget.h"
#include <QStandardItem> #include <QStandardItem>
class QgsCategorizedSymbolRendererV2; class QgsCategorizedSymbolRendererV2;
class QgsRendererCategoryV2; class QgsRendererCategoryV2;
skipping to change at line 38 skipping to change at line 52
void categoryColumnChanged(); void categoryColumnChanged();
void categoriesDoubleClicked( const QModelIndex & idx ); void categoriesDoubleClicked( const QModelIndex & idx );
void addCategories(); void addCategories();
void deleteCategory(); void deleteCategory();
void deleteAllCategories(); void deleteAllCategories();
void changeCurrentValue( QStandardItem * item ); void changeCurrentValue( QStandardItem * item );
void rotationFieldChanged( QString fldName ); void rotationFieldChanged( QString fldName );
void sizeScaleFieldChanged( QString fldName ); void sizeScaleFieldChanged( QString fldName );
protected slots: void showSymbolLevels();
void addCategory();
protected: protected:
void updateUiFromRenderer(); void updateUiFromRenderer();
void updateCategorizedSymbolIcon(); void updateCategorizedSymbolIcon();
//! populate categories view //! populate categories view
void populateCategories(); void populateCategories();
skipping to change at line 65 skipping to change at line 78
void addCategory( const QgsRendererCategoryV2& cat ); void addCategory( const QgsRendererCategoryV2& cat );
//! return row index for the currently selected category (-1 if on no s election) //! return row index for the currently selected category (-1 if on no s election)
int currentCategoryRow(); int currentCategoryRow();
//! return key for the currently selected category //! return key for the currently selected category
QVariant currentCategory(); QVariant currentCategory();
void changeCategorySymbol(); void changeCategorySymbol();
QList<QgsSymbolV2*> selectedSymbols();
void refreshSymbolView() { populateCategories(); }
protected slots:
void addCategory();
protected: protected:
QgsCategorizedSymbolRendererV2* mRenderer; QgsCategorizedSymbolRendererV2* mRenderer;
QgsSymbolV2* mCategorizedSymbol; QgsSymbolV2* mCategorizedSymbol;
QgsRendererV2DataDefinedMenus* mDataDefinedMenus; QgsRendererV2DataDefinedMenus* mDataDefinedMenus;
private: private:
QString mOldClassificationAttribute; QString mOldClassificationAttribute;
}; };
 End of changes. 3 change blocks. 
2 lines changed or deleted 30 lines changed or added


 qgsclipper.h   qgsclipper.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSCLIPPER_H #ifndef QGSCLIPPER_H
#define QGSCLIPPER_H #define QGSCLIPPER_H
#include "qgis.h" #include "qgis.h"
#include "qgspoint.h" #include "qgspoint.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include <vector> #include <vector>
#include <utility> #include <utility>
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgscolorbrewerpalette.h   qgscolorbrewerpalette.h 
/**************************************************************************
*
qgscolorbrewerpalette.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSCOLORBREWERPALETTE_H #ifndef QGSCOLORBREWERPALETTE_H
#define QGSCOLORBREWERPALETTE_H #define QGSCOLORBREWERPALETTE_H
extern const char* brewerString; extern const char* brewerString;
class CORE_EXPORT QgsColorBrewerPalette class CORE_EXPORT QgsColorBrewerPalette
{ {
public: public:
static QList<QColor> listSchemeColors( QString schemeName, int colors ) static QList<QColor> listSchemeColors( QString schemeName, int colors )
{ {
skipping to change at line 35 skipping to change at line 49
static QStringList listSchemes() static QStringList listSchemes()
{ {
QStringList schemes; QStringList schemes;
QString palette( brewerString ); QString palette( brewerString );
QStringList list = palette.split( QChar( '\n' ) ); QStringList list = palette.split( QChar( '\n' ) );
foreach( QString entry, list ) foreach( QString entry, list )
{ {
QStringList items = entry.split( QChar( '-' ) ); QStringList items = entry.split( QChar( '-' ) );
if ( items.count() != 3 ) continue; if ( items.count() != 3 )
continue;
if ( !schemes.contains( items[0] ) ) if ( !schemes.contains( items[0] ) )
schemes << items[0]; schemes << items[0];
} }
return schemes; return schemes;
} }
static QList<int> listSchemeVariants( QString schemeName ) static QList<int> listSchemeVariants( QString schemeName )
{ {
QList<int> variants; QList<int> variants;
QString palette( brewerString ); QString palette( brewerString );
QStringList list = palette.split( QChar( '\n' ) ); QStringList list = palette.split( QChar( '\n' ) );
foreach( QString entry, list ) foreach( QString entry, list )
{ {
QStringList items = entry.split( QChar( '-' ) ); QStringList items = entry.split( QChar( '-' ) );
if ( items.count() != 3 || items[0] != schemeName ) continue; if ( items.count() != 3 || items[0] != schemeName )
continue;
variants << items[1].toInt(); variants << items[1].toInt();
} }
return variants; return variants;
} }
static QColor parseColor( QString color ) static QColor parseColor( QString color )
{ {
QStringList p = color.split( QChar( ',' ) ); QStringList p = color.split( QChar( ',' ) );
if ( p.count() != 3 ) return QColor(); if ( p.count() != 3 )
return QColor();
return QColor( p[0].toInt(), p[1].toInt(), p[2].toInt() ); return QColor( p[0].toInt(), p[1].toInt(), p[2].toInt() );
} }
}; };
/* /*
Apache-Style Software License for ColorBrewer software and ColorBrewer Colo r Schemes Apache-Style Software License for ColorBrewer software and ColorBrewer Colo r Schemes
Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania Stat e University. Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania Stat e University.
 End of changes. 4 change blocks. 
3 lines changed or deleted 29 lines changed or added


 qgscolorbutton.h   qgscolorbutton.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2006 by Tom Elwertowski Copyright : (C) 2006 by Tom Elwertowski
Email : telwertowski at users dot sourceforge dot net Email : telwertowski at users dot sourceforge dot net
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgscolorbutton.h 6251 2006-12-13 23:23:50Z telwertowski $ */
#ifndef QGSCOLORBUTTON_H #ifndef QGSCOLORBUTTON_H
#define QGSCOLORBUTTON_H #define QGSCOLORBUTTON_H
#include <QToolButton> #include <QToolButton>
#include <QPushButton> #include <QPushButton>
/** \ingroup gui /** \ingroup gui
* A cross platform button subclass for selecting colors. * A cross platform button subclass for selecting colors.
*/ */
class GUI_EXPORT QgsColorButton: public QToolButton class GUI_EXPORT QgsColorButton: public QToolButton
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgscolorrampcombobox.h   qgscolorrampcombobox.h 
/**************************************************************************
*
qgscolorrampcombobox.h
---------------------
begin : October 2010
copyright : (C) 2010 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSCOLORRAMPCOMBOBOX_H #ifndef QGSCOLORRAMPCOMBOBOX_H
#define QGSCOLORRAMPCOMBOBOX_H #define QGSCOLORRAMPCOMBOBOX_H
#include <QComboBox> #include <QComboBox>
class QgsStyleV2; class QgsStyleV2;
class QgsVectorColorRampV2; class QgsVectorColorRampV2;
class QgsColorRampComboBox : public QComboBox class QgsColorRampComboBox : public QComboBox
{ {
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgscolorrampshader.h   qgscolorrampshader.h 
skipping to change at line 99 skipping to change at line 99
bool shade( double, int*, int*, int* ); bool shade( double, int*, int*, int* );
/** \brief Generates and new RGB value based on original RGB value */ /** \brief Generates and new RGB value based on original RGB value */
bool shade( double, double, double, int*, int*, int* ); bool shade( double, double, double, int*, int*, int* );
private: private:
/** Current index from which to start searching the color table*/ /** Current index from which to start searching the color table*/
int mCurrentColorRampItemIndex; int mCurrentColorRampItemIndex;
//TODO: Consider pulling this out as a separate class and internally st oring as a QMap rather than a QList //TODO: Consider pulling this out as a separate class and internally st oring as a QMap rather than a QList
/** This vector holds the information for classification based on value /** This vector holds the information for classification based on value
s. Each item holds a value, a label and a color. The member mDiscreteClassi s.
fication holds if one color is applied for all values between two class bre * Each item holds a value, a label and a color. The member
aks (true) or if the item values are (linearly) interpolated for values bet * mDiscreteClassification holds if one color is applied for all values
ween the item values (false)*/ * between two class breaks (true) or if the item values are (linearly)
* interpolated for values between the item values (false)*/
QList<QgsColorRampShader::ColorRampItem> mColorRampItemList; QList<QgsColorRampShader::ColorRampItem> mColorRampItemList;
/** \brief The color ramp type */ /** \brief The color ramp type */
QgsColorRampShader::ColorRamp_TYPE mColorRampType; QgsColorRampShader::ColorRamp_TYPE mColorRampType;
/** \brief Cache of values that have already been looked up */ /** \brief Cache of values that have already been looked up */
QMap<double, QColor> mColorCache; QMap<double, QColor> mColorCache;
/** Maximum size of the color cache. The color cache could eat a ton of /** Maximum size of the color cache. The color cache could eat a ton of
memory if you have 32-bit data */ * memory if you have 32-bit data */
int mMaximumColorCacheSize; int mMaximumColorCacheSize;
/** Gets the color for a pixel value from the classification vector mVa /** Gets the color for a pixel value from the classification vector
lueClassification. Assigns the color of the lower class for every pixel bet * mValueClassification. Assigns the color of the lower class for every
ween two class breaks.*/ * pixel between two class breaks.*/
bool discreteColor( double, int*, int*, int* ); bool discreteColor( double, int*, int*, int* );
/** Gets the color for a pixel value from the classification vector mVa /** Gets the color for a pixel value from the classification vector
lueClassification. Assigns the color of the exact matching value in the col * mValueClassification. Assigns the color of the exact matching value
or ramp item list */ in
* the color ramp item list */
bool exactColor( double, int*, int*, int* ); bool exactColor( double, int*, int*, int* );
/** Gets the color for a pixel value from the classification vector mVa /** Gets the color for a pixel value from the classification vector
lueClassification. Interpolates the color between two class breaks linearly * mValueClassification. Interpolates the color between two class break
.*/ s
* linearly.*/
bool interpolatedColor( double, int*, int*, int* ); bool interpolatedColor( double, int*, int*, int* );
}; };
#endif #endif
 End of changes. 5 change blocks. 
16 lines changed or deleted 19 lines changed or added


 qgscomposeritem.h   qgscomposeritem.h 
skipping to change at line 161 skipping to change at line 161
/** sets state from Dom document /** sets state from Dom document
* @param itemElem is Dom node corresponding to item tag * @param itemElem is Dom node corresponding to item tag
* @param doc is Dom document * @param doc is Dom document
*/ */
virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) = 0; virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) = 0;
/**Reads parameter that are not subclass specific in document. Usually called from readXML methods of subclasses*/ /**Reads parameter that are not subclass specific in document. Usually called from readXML methods of subclasses*/
bool _readXML( const QDomElement& itemElem, const QDomDocument& doc ); bool _readXML( const QDomElement& itemElem, const QDomDocument& doc );
bool frame() const {return mFrame;} /** Whether this item has a frame or not.
void setFrame( bool drawFrame ) {mFrame = drawFrame;} * @return boolean - true if there is a frame around this item, otherwi
se false.
* @note deprecated since 1.8 don't use!
* @see hasFrame
*/
Q_DECL_DEPRECATED bool frame() const {return hasFrame();}
/** Whether this item has a frame or not.
* @returns true if there is a frame around this item, otherwise false.
* @note introduced since 1.8
*/
bool hasFrame() const {return mFrame;}
/** Set whether this item has a frame drawn around it or not.
* @returns void
* @note deprecated since 1.8 don't use!
* @see setFrameEnabled
*/
Q_DECL_DEPRECATED void setFrame( bool drawFrame ) { setFrameEnabled( dr
awFrame );}
/** Set whether this item has a frame drawn around it or not.
* @param drawFrame draw frame
* @returns nothing
* @note introduced in 1.8
* @see hasFrame
*/
void setFrameEnabled( bool drawFrame ) {mFrame = drawFrame;}
/**Composite operations for item groups do nothing per default*/ /**Composite operations for item groups do nothing per default*/
virtual void addItem( QgsComposerItem* item ) { Q_UNUSED( item ); } virtual void addItem( QgsComposerItem* item ) { Q_UNUSED( item ); }
virtual void removeItems() {} virtual void removeItems() {}
const QgsComposition* composition() const {return mComposition;} const QgsComposition* composition() const {return mComposition;}
/**Starts new composer undo command /**Starts new composer undo command
@param commandText command title @param commandText command title
@param c context for mergeable commands (unknown for non-mergeable co mmands*/ @param c context for mergeable commands (unknown for non-mergeable co mmands*/
void beginCommand( const QString& commandText, QgsComposerMergeCommand: :Context c = QgsComposerMergeCommand::Unknown ); void beginCommand( const QString& commandText, QgsComposerMergeCommand: :Context c = QgsComposerMergeCommand::Unknown );
/**Finish current command and push it onto the undo stack */ /**Finish current command and push it onto the undo stack */
void endCommand(); void endCommand();
void cancelCommand(); void cancelCommand();
//functions that encapsulate the workaround for the Qt font bug (that i s to scale the font size up and then scale the //functions that encapsulate the workaround for the Qt font bug (that i s to scale the font size up and then scale the
//painter down by the same factor for drawing //painter down by the same factor for drawing
/**Draws Text. Takes care about all the composer specific issues (calcu lation to pixel, scaling of font and painter /**Draws Text. Takes care about all the composer specific issues (calcu lation to pixel, scaling of font and painter
to work arount the Qt font bug)*/ to work around the Qt font bug)*/
void drawText( QPainter* p, double x, double y, const QString& text, co nst QFont& font ) const; void drawText( QPainter* p, double x, double y, const QString& text, co nst QFont& font ) const;
/**Like the above, but with a rectangle for multiline text*/ /**Like the above, but with a rectangle for multiline text*/
void drawText( QPainter* p, const QRectF& rect, const QString& text, co nst QFont& font, Qt::AlignmentFlag halignement = Qt::AlignLeft, Qt::Alignme ntFlag valignement = Qt::AlignTop ) const; void drawText( QPainter* p, const QRectF& rect, const QString& text, co nst QFont& font, Qt::AlignmentFlag halignement = Qt::AlignLeft, Qt::Alignme ntFlag valignement = Qt::AlignTop ) const;
/**Returns the font width in millimeters (considers upscaling and downs caling with FONT_WORKAROUND_SCALE*/ /**Returns the font width in millimeters (considers upscaling and downs caling with FONT_WORKAROUND_SCALE*/
double textWidthMillimeters( const QFont& font, const QString& text ) c onst; double textWidthMillimeters( const QFont& font, const QString& text ) c onst;
/**Returns the font height of a character in millimeters /**Returns the font height of a character in millimeters
@note this method was added in version 1.7*/ @note this method was added in version 1.7*/
skipping to change at line 218 skipping to change at line 240
/**Returns position lock for mouse drags (true means locked) /**Returns position lock for mouse drags (true means locked)
@note this method was added in version 1.2*/ @note this method was added in version 1.2*/
bool positionLock() const {return mItemPositionLocked;} bool positionLock() const {return mItemPositionLocked;}
/**Update mouse cursor at (item) position /**Update mouse cursor at (item) position
@note this method was added in version 1.2*/ @note this method was added in version 1.2*/
void updateCursor( const QPointF& itemPos ); void updateCursor( const QPointF& itemPos );
double rotation() const {return mRotation;} double rotation() const {return mRotation;}
/**Updates item, with the possibility to do custom update for subclasse
s*/
virtual void updateItem() { QGraphicsRectItem::update(); }
/**Get item identification name
@note this method was added in version 1.7*/
QString id() const { return mId; }
/**Set item identification name
@note this method was added in version 1.7
This method was moved from qgscomposerlabel so that ev
ery object can have a
id (NathanW)*/
void setId( const QString& id ) { mId = id; }
public slots: public slots:
virtual void setRotation( double r ); virtual void setRotation( double r );
void repaint(); void repaint();
protected: protected:
QgsComposition* mComposition; QgsComposition* mComposition;
QgsComposerItem::MouseMoveAction mCurrentMouseMoveAction; QgsComposerItem::MouseMoveAction mCurrentMouseMoveAction;
/**Start point of the last mouse move action (in scene coordinates)*/ /**Start point of the last mouse move action (in scene coordinates)*/
skipping to change at line 286 skipping to change at line 321
/**Draw background*/ /**Draw background*/
virtual void drawBackground( QPainter* p ); virtual void drawBackground( QPainter* p );
/**Draws arrowhead*/ /**Draws arrowhead*/
void drawArrowHead( QPainter* p, double x, double y, double angle, doub le arrowHeadWidth ) const; void drawArrowHead( QPainter* p, double x, double y, double angle, doub le arrowHeadWidth ) const;
/**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/ /**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
double angle( const QPointF& p1, const QPointF& p2 ) const; double angle( const QPointF& p1, const QPointF& p2 ) const;
/**Returns the current (zoom level dependent) tolerance to decide if mo use position is close enough to the \ /**Returns the current (zoom level dependent) tolerance to decide if mo use position is close enough to the
item border for resizing*/ item border for resizing*/
double rectHandlerBorderTolerance() const; double rectHandlerBorderTolerance() const;
/**Returns the size of the lock symbol depending on the composer zoom l evel and the item size /**Returns the size of the lock symbol depending on the composer zoom l evel and the item size
@note: this function was introduced in version 1.2*/ @note: this function was introduced in version 1.2*/
double lockSymbolSize() const; double lockSymbolSize() const;
/**Returns the zoom factor of the graphics view. /**Returns the zoom factor of the graphics view.
@return the factor or -1 in case of error (e.g. graphic view does not exist) @return the factor or -1 in case of error (e.g. graphic view does not exist)
@note: this function was introduced in version 1.2*/ @note: this function was introduced in version 1.2*/
double horizontalViewScaleFactor() const; double horizontalViewScaleFactor() const;
//some utility functions //some utility functions
/**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation*/ /**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation*/
bool imageSizeConsideringRotation( double& width, double& height ) cons t; bool imageSizeConsideringRotation( double& width, double& height ) cons t;
/**Calculates corner point after rotation and scaling*/ /**Calculates corner point after rotation and scaling*/
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double wi dth, double height ) const; bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double wi dth, double height ) const;
/**Returns a point on the line from startPoint to directionPoint that i
s a certain distance away from the starting point*/
QPointF pointOnLineWithDistance( const QPointF& startPoint, const QPoin
tF& directionPoint, double distance ) const;
/**Calculates width / height of the bounding box of a rotated rectangle (mRotation)*/ /**Calculates width / height of the bounding box of a rotated rectangle (mRotation)*/
void sizeChangedByRotation( double& width, double& height ); void sizeChangedByRotation( double& width, double& height );
/**Rotates a point / vector /**Rotates a point / vector
@param angle rotation angle in degrees, counterclockwise @param angle rotation angle in degrees, counterclockwise
@param x in/out: x coordinate before / after the rotation @param x in/out: x coordinate before / after the rotation
@param y in/out: y cooreinate before / after the rotation*/ @param y in/out: y cooreinate before / after the rotation*/
void rotate( double angle, double& x, double& y ) const; void rotate( double angle, double& x, double& y ) const;
signals: signals:
/**Is emitted on rotation change to notify north arrow pictures*/ /**Is emitted on rotation change to notify north arrow pictures*/
void rotationChanged( double newRotation ); void rotationChanged( double newRotation );
/**Used e.g. by the item widgets to update the gui elements*/ /**Used e.g. by the item widgets to update the gui elements*/
void itemChanged(); void itemChanged();
private:
// Label id (unique within the same composition)
QString mId;
void init( bool manageZValue );
}; };
#endif #endif
 End of changes. 6 change blocks. 
8 lines changed or deleted 49 lines changed or added


 qgscomposeritemgroup.h   qgscomposeritemgroup.h 
skipping to change at line 51 skipping to change at line 51
/**Sets this items bound in scene coordinates such that 1 item size uni ts /**Sets this items bound in scene coordinates such that 1 item size uni ts
corresponds to 1 scene size unit*/ corresponds to 1 scene size unit*/
void setSceneRect( const QRectF& rectangle ); void setSceneRect( const QRectF& rectangle );
/** resizes an item in x- and y direction (scene coordinates)*/ /** resizes an item in x- and y direction (scene coordinates)*/
void resize( double dx, double dy ); void resize( double dx, double dy );
/** stores state in Dom node /** stores state in Dom node
* @param elem is Dom element corresponding to 'Composer' tag * @param elem is Dom element corresponding to 'Composer' tag
* @param doc is the Dom document * @param doc is the Dom document
*/ */
bool writeXML( QDomElement& elem, QDomDocument & doc ) const { return t bool writeXML( QDomElement& elem, QDomDocument & doc ) const
rue; } { Q_UNUSED( elem ); Q_UNUSED( doc ); return true; }
/** sets state from Dom document /** sets state from Dom document
* @param itemElem is Dom node corresponding to item tag * @param itemElem is Dom node corresponding to item tag
* @param doc is the Dom document * @param doc is the Dom document
*/ */
bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) { bool readXML( const QDomElement& itemElem, const QDomDocument& doc )
return true; } { Q_UNUSED( itemElem ); Q_UNUSED( doc ); return true; }
QSet<QgsComposerItem*> items() { return mItems; } QSet<QgsComposerItem*> items() { return mItems; }
signals: signals:
void childItemDeleted( QgsComposerItem* item ); void childItemDeleted( QgsComposerItem* item );
protected: protected:
void drawFrame( QPainter* p ); void drawFrame( QPainter* p );
private: private:
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 qgscomposerlegend.h   qgscomposerlegend.h 
skipping to change at line 75 skipping to change at line 75
QFont layerFont() const; QFont layerFont() const;
void setLayerFont( const QFont& f ); void setLayerFont( const QFont& f );
QFont itemFont() const; QFont itemFont() const;
void setItemFont( const QFont& f ); void setItemFont( const QFont& f );
double boxSpace() const {return mBoxSpace;} double boxSpace() const {return mBoxSpace;}
void setBoxSpace( double s ) {mBoxSpace = s;} void setBoxSpace( double s ) {mBoxSpace = s;}
double groupSpace() const {return mGroupSpace;}
void setGroupSpace( double s ) {mGroupSpace = s;}
double layerSpace() const {return mLayerSpace;} double layerSpace() const {return mLayerSpace;}
void setLayerSpace( double s ) {mLayerSpace = s;} void setLayerSpace( double s ) {mLayerSpace = s;}
double symbolSpace() const {return mSymbolSpace;} double symbolSpace() const {return mSymbolSpace;}
void setSymbolSpace( double s ) {mSymbolSpace = s;} void setSymbolSpace( double s ) {mSymbolSpace = s;}
double iconLabelSpace() const {return mIconLabelSpace;} double iconLabelSpace() const {return mIconLabelSpace;}
void setIconLabelSpace( double s ) {mIconLabelSpace = s;} void setIconLabelSpace( double s ) {mIconLabelSpace = s;}
double symbolWidth() const {return mSymbolWidth;} double symbolWidth() const {return mSymbolWidth;}
void setSymbolWidth( double w ) {mSymbolWidth = w;} void setSymbolWidth( double w ) {mSymbolWidth = w;}
double symbolHeight() const {return mSymbolHeight;} double symbolHeight() const {return mSymbolHeight;}
void setSymbolHeight( double h ) {mSymbolHeight = h;} void setSymbolHeight( double h ) {mSymbolHeight = h;}
void setWrapChar( const QString& t ) {mWrapChar = t;}
QString wrapChar() const {return mWrapChar;}
void setComposerMap( const QgsComposerMap* map ); void setComposerMap( const QgsComposerMap* map );
const QgsComposerMap* composerMap() const { return mComposerMap; } const QgsComposerMap* composerMap() const { return mComposerMap; }
/**Updates the model and all legend entries*/ /**Updates the model and all legend entries*/
void updateLegend(); void updateLegend();
/** stores state in Dom node /** stores state in Dom node
* @param elem is Dom element corresponding to 'Composer' tag * @param elem is Dom element corresponding to 'Composer' tag
* @param doc Dom document * @param doc Dom document
*/ */
skipping to change at line 116 skipping to change at line 122
bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
public slots: public slots:
/**Data changed*/ /**Data changed*/
void synchronizeWithModel(); void synchronizeWithModel();
/**Sets mCompositionMap to 0 if the map is deleted*/ /**Sets mCompositionMap to 0 if the map is deleted*/
void invalidateCurrentMap(); void invalidateCurrentMap();
protected: protected:
QString mTitle; QString mTitle;
QString mWrapChar;
//different fonts for entries //different fonts for entries
QFont mTitleFont; QFont mTitleFont;
QFont mGroupFont; QFont mGroupFont;
QFont mLayerFont; QFont mLayerFont;
QFont mItemFont; QFont mItemFont;
/**Space between item box and contents*/ /**Space between item box and contents*/
double mBoxSpace; double mBoxSpace;
/**Vertical space between group entries*/
double mGroupSpace;
/**Vertical space between layer entries*/ /**Vertical space between layer entries*/
double mLayerSpace; double mLayerSpace;
/**Vertical space between symbol entries*/ /**Vertical space between symbol entries*/
double mSymbolSpace; double mSymbolSpace;
/**Horizontal space between item icon and label*/ /**Horizontal space between item icon and label*/
double mIconLabelSpace; double mIconLabelSpace;
/**Width of symbol icon*/ /**Width of symbol icon*/
double mSymbolWidth; double mSymbolWidth;
/**Height of symbol icon*/ /**Height of symbol icon*/
double mSymbolHeight; double mSymbolHeight;
/** Spacing between lines when wrapped */
double mlineSpacing;
QgsLegendModel mLegendModel; QgsLegendModel mLegendModel;
/**Reference to map (because symbols are sometimes in map units)*/ /**Reference to map (because symbols are sometimes in map units)*/
const QgsComposerMap* mComposerMap; const QgsComposerMap* mComposerMap;
private: private:
QgsComposerLegend(); //forbidden QgsComposerLegend(); //forbidden
/**Draws a group item and all subitems*/ /**Draws a group item and all subitems*/
void drawGroupItem( QPainter* p, QgsComposerGroupItem* groupItem, doubl e& currentYCoord, double& maxXCoord ); void drawGroupItem( QPainter* p, QgsComposerGroupItem* groupItem, doubl e& currentYCoord, double& maxXCoord );
skipping to change at line 168 skipping to change at line 180
/**Draws a symbol at the current y position and returns the new x posit ion. Returns real symbol height, because for points, /**Draws a symbol at the current y position and returns the new x posit ion. Returns real symbol height, because for points,
it is possible that it differs from mSymbolHeight*/ it is possible that it differs from mSymbolHeight*/
void drawSymbol( QPainter* p, QgsSymbol* s, double currentYCoord, doubl e& currentXPosition, double& symbolHeight, int layerOpacity = 255 ) const; void drawSymbol( QPainter* p, QgsSymbol* s, double currentYCoord, doubl e& currentXPosition, double& symbolHeight, int layerOpacity = 255 ) const;
void drawSymbolV2( QPainter* p, QgsSymbolV2* s, double currentYCoord, d ouble& currentXPosition, double& symbolHeight, int layerOpacity = 255 ) con st; void drawSymbolV2( QPainter* p, QgsSymbolV2* s, double currentYCoord, d ouble& currentXPosition, double& symbolHeight, int layerOpacity = 255 ) con st;
void drawPointSymbol( QPainter*, QgsSymbol* s, double currentYCoord, do uble& currentXPosition, double& symbolHeight, int opacity = 255 ) const; void drawPointSymbol( QPainter*, QgsSymbol* s, double currentYCoord, do uble& currentXPosition, double& symbolHeight, int opacity = 255 ) const;
void drawLineSymbol( QPainter*, QgsSymbol* s, double currentYCoord, dou ble& currentXPosition, int opacity = 255 ) const; void drawLineSymbol( QPainter*, QgsSymbol* s, double currentYCoord, dou ble& currentXPosition, int opacity = 255 ) const;
void drawPolygonSymbol( QPainter* p, QgsSymbol* s, double currentYCoord , double& currentXPosition, int opacity = 255 ) const; void drawPolygonSymbol( QPainter* p, QgsSymbol* s, double currentYCoord , double& currentXPosition, int opacity = 255 ) const;
/**Helper function that lists ids of layers contained in map canvas*/ /**Helper function that lists ids of layers contained in map canvas*/
QStringList layerIdList() const; QStringList layerIdList() const;
private:
/** Splits a string using the the wrap char taking into account handlin
g empty
wrap char which means no wrapping */
QStringList splitStringForWrapping( QString stringToSplt );
}; };
#endif #endif
 End of changes. 6 change blocks. 
0 lines changed or deleted 18 lines changed or added


 qgscomposerlegenditem.h   qgscomposerlegenditem.h 
skipping to change at line 128 skipping to change at line 128
virtual QStandardItem* clone() const; virtual QStandardItem* clone() const;
virtual void writeXML( QDomElement& elem, QDomDocument& doc ) const; virtual void writeXML( QDomElement& elem, QDomDocument& doc ) const;
virtual void readXML( const QDomElement& itemElem, bool xServerAvailabl e = true ); virtual void readXML( const QDomElement& itemElem, bool xServerAvailabl e = true );
void setLayerID( const QString& id ) { mLayerID = id; } void setLayerID( const QString& id ) { mLayerID = id; }
QString layerID() const { return mLayerID; } QString layerID() const { return mLayerID; }
ItemType itemType() const { return RasterSymbolItem; } ItemType itemType() const { return RasterSymbolItem; }
void setColor( const QColor& c ){ mColor = c; } void setColor( const QColor& c ) { mColor = c; }
QColor color() const { return mColor; } QColor color() const { return mColor; }
private: private:
QString mLayerID; QString mLayerID;
QColor mColor; QColor mColor;
}; };
class CORE_EXPORT QgsComposerLayerItem: public QgsComposerLegendItem class CORE_EXPORT QgsComposerLayerItem: public QgsComposerLegendItem
{ {
public: public:
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgscomposermap.h   qgscomposermap.h 
skipping to change at line 87 skipping to change at line 87
BoundaryDirection BoundaryDirection
}; };
/**This function is deprecated*/ /**This function is deprecated*/
void draw( QPainter *painter, const QgsRectangle& extent, const QSize& size, int dpi ); void draw( QPainter *painter, const QgsRectangle& extent, const QSize& size, int dpi );
/** \brief Draw to paint device /** \brief Draw to paint device
@param painter painter @param painter painter
@param extent map extent @param extent map extent
@param size size in scene coordinates @param size size in scene coordinates
@param dpi scene dpi*/ @param dpi scene dpi
void draw( QPainter *painter, const QgsRectangle& extent, const QSizeF& @param forceWidthScale force wysiwyg line widths / marker sizes
size, double dpi ); */
void draw( QPainter *painter, const QgsRectangle& extent, const QSizeF&
size, double dpi, double* forceWidthScale = 0 );
/** \brief Reimplementation of QCanvasItem::paint - draw on canvas */ /** \brief Reimplementation of QCanvasItem::paint - draw on canvas */
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyl e, QWidget* pWidget ); void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyl e, QWidget* pWidget );
/** \brief Create cache image */ /** \brief Create cache image */
void cache( void ); void cache( void );
/** \brief Get identification number*/ /** \brief Get identification number*/
int id() const {return mId;} int id() const {return mId;}
skipping to change at line 128 skipping to change at line 130
/** \brief Scale */ /** \brief Scale */
double scale( void ) const; double scale( void ) const;
/**Sets new scale and changes only mExtent*/ /**Sets new scale and changes only mExtent*/
void setNewScale( double scaleDenominator ); void setNewScale( double scaleDenominator );
/**Sets new Extent and changes width, height (and implicitely also scal e)*/ /**Sets new Extent and changes width, height (and implicitely also scal e)*/
void setNewExtent( const QgsRectangle& extent ); void setNewExtent( const QgsRectangle& extent );
PreviewMode previewMode() {return mPreviewMode;} PreviewMode previewMode() const {return mPreviewMode;}
void setPreviewMode( PreviewMode m ) {mPreviewMode = m;} void setPreviewMode( PreviewMode m );
/**Getter for flag that determines if the stored layer set should be us ed or the current layer set of the qgis mapcanvas /**Getter for flag that determines if the stored layer set should be us ed or the current layer set of the qgis mapcanvas
@note this function was added in version 1.2*/ @note this function was added in version 1.2*/
bool keepLayerSet() const {return mKeepLayerSet;} bool keepLayerSet() const {return mKeepLayerSet;}
/**Setter for flag that determines if the stored layer set should be us ed or the current layer set of the qgis mapcanvas /**Setter for flag that determines if the stored layer set should be us ed or the current layer set of the qgis mapcanvas
@note this function was added in version 1.2*/ @note this function was added in version 1.2*/
void setKeepLayerSet( bool enabled ) {mKeepLayerSet = enabled;} void setKeepLayerSet( bool enabled ) {mKeepLayerSet = enabled;}
/**Getter for stored layer set that is used if mKeepLayerSet is true /**Getter for stored layer set that is used if mKeepLayerSet is true
@note this function was added in version 1.2*/ @note this function was added in version 1.2*/
skipping to change at line 257 skipping to change at line 259
@note this function was added in version 1.4*/ @note this function was added in version 1.4*/
void updateBoundingRect(); void updateBoundingRect();
/**Sets length of the cros segments (if grid style is cross) /**Sets length of the cros segments (if grid style is cross)
@note this function was added in version 1.4*/ @note this function was added in version 1.4*/
void setCrossLength( double l ) {mCrossLength = l;} void setCrossLength( double l ) {mCrossLength = l;}
double crossLength() {return mCrossLength;} double crossLength() {return mCrossLength;}
void setMapRotation( double r ); void setMapRotation( double r );
void updateItem();
/**Sets canvas pointer (necessary to query and draw map canvas items)*/ /**Sets canvas pointer (necessary to query and draw map canvas items)*/
void setMapCanvas( QGraphicsView* canvas ) { mMapCanvas = canvas; } void setMapCanvas( QGraphicsView* canvas ) { mMapCanvas = canvas; }
void setDrawCanvasItems( bool b ) { mDrawCanvasItems = b; } void setDrawCanvasItems( bool b ) { mDrawCanvasItems = b; }
bool drawCanvasItems() const { return mDrawCanvasItems; } bool drawCanvasItems() const { return mDrawCanvasItems; }
/**Returns the conversion factor map units -> mm*/ /**Returns the conversion factor map units -> mm*/
double mapUnitsToMM() const; double mapUnitsToMM() const;
signals: signals:
 End of changes. 3 change blocks. 
5 lines changed or deleted 9 lines changed or added


 qgscomposerscalebar.h   qgscomposerscalebar.h 
skipping to change at line 35 skipping to change at line 35
* A scale bar item that can be added to a map composition. * A scale bar item that can be added to a map composition.
*/ */
class CORE_EXPORT QgsComposerScaleBar: public QgsComposerItem class CORE_EXPORT QgsComposerScaleBar: public QgsComposerItem
{ {
Q_OBJECT Q_OBJECT
public: public:
/**Added in version 1.8*/
enum Alignment
{
Left = 0,
Middle,
Right
};
QgsComposerScaleBar( QgsComposition* composition ); QgsComposerScaleBar( QgsComposition* composition );
~QgsComposerScaleBar(); ~QgsComposerScaleBar();
/** return correct graphics item type. Added in v1.7 */ /** return correct graphics item type. Added in v1.7 */
virtual int type() const { return ComposerScaleBar; } virtual int type() const { return ComposerScaleBar; }
/** \brief Reimplementation of QCanvasItem::paint*/ /** \brief Reimplementation of QCanvasItem::paint*/
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyl e, QWidget* pWidget ); void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyl e, QWidget* pWidget );
//getters and setters //getters and setters
int numSegments() const {return mNumSegments;} int numSegments() const {return mNumSegments;}
void setNumSegments( int nSegments ) {mNumSegments = nSegments;} void setNumSegments( int nSegments );
int numSegmentsLeft() const {return mNumSegmentsLeft;} int numSegmentsLeft() const {return mNumSegmentsLeft;}
void setNumSegmentsLeft( int nSegmentsLeft ) {mNumSegmentsLeft = nSegme ntsLeft;} void setNumSegmentsLeft( int nSegmentsLeft );
double numUnitsPerSegment() const {return mNumUnitsPerSegment;} double numUnitsPerSegment() const {return mNumUnitsPerSegment;}
void setNumUnitsPerSegment( double units ); void setNumUnitsPerSegment( double units );
double numMapUnitsPerScaleBarUnit() const {return mNumMapUnitsPerScaleB arUnit;} double numMapUnitsPerScaleBarUnit() const {return mNumMapUnitsPerScaleB arUnit;}
void setNumMapUnitsPerScaleBarUnit( double d ) {mNumMapUnitsPerScaleBar Unit = d;} void setNumMapUnitsPerScaleBarUnit( double d ) {mNumMapUnitsPerScaleBar Unit = d;}
QString unitLabeling() const {return mUnitLabeling;} QString unitLabeling() const {return mUnitLabeling;}
void setUnitLabeling( const QString& label ) {mUnitLabeling = label;} void setUnitLabeling( const QString& label ) {mUnitLabeling = label;}
skipping to change at line 80 skipping to change at line 88
double height() const {return mHeight;} double height() const {return mHeight;}
void setHeight( double h ) {mHeight = h;} void setHeight( double h ) {mHeight = h;}
void setComposerMap( const QgsComposerMap* map ); void setComposerMap( const QgsComposerMap* map );
const QgsComposerMap* composerMap() const {return mComposerMap;} const QgsComposerMap* composerMap() const {return mComposerMap;}
double labelBarSpace() const {return mLabelBarSpace;} double labelBarSpace() const {return mLabelBarSpace;}
void setLabelBarSpace( double space ) {mLabelBarSpace = space;} void setLabelBarSpace( double space ) {mLabelBarSpace = space;}
double boxContentSpace() const {return mBoxContentSpace;} double boxContentSpace() const {return mBoxContentSpace;}
void setBoxContentSpace( double space ) {mBoxContentSpace = space;} void setBoxContentSpace( double space );
double segmentMillimeters() const {return mSegmentMillimeters;} double segmentMillimeters() const {return mSegmentMillimeters;}
/**Left / Middle/ Right
@note: this method was added in version 1.8*/
Alignment alignment() const { return mAlignment; }
/**@note: this method was added in version 1.8*/
void setAlignment( Alignment a ) { mAlignment = a; }
/**Apply default settings*/ /**Apply default settings*/
void applyDefaultSettings(); void applyDefaultSettings();
/**Apply default size (scale bar 1/5 of map item width) /**Apply default size (scale bar 1/5 of map item width)
@note this method was added in version 1.7*/ @note this method was added in version 1.7*/
void applyDefaultSize(); void applyDefaultSize();
/**Sets style by name /**Sets style by name
@param styleName (untranslated) style name. Possibilities are: 'Single Box', 'Double Box', 'Line Ticks Middle', 'Line Ticks Down', 'Line Ticks Up ', 'Numeric'*/ @param styleName (untranslated) style name. Possibilities are: 'Single Box', 'Double Box', 'Line Ticks Middle', 'Line Ticks Down', 'Line Ticks Up ', 'Numeric'*/
void setStyle( const QString& styleName ); void setStyle( const QString& styleName );
skipping to change at line 122 skipping to change at line 137
* @param doc Dom document * @param doc Dom document
*/ */
bool writeXML( QDomElement& elem, QDomDocument & doc ) const; bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
/** sets state from Dom document /** sets state from Dom document
* @param itemElem is Dom node corresponding to item tag * @param itemElem is Dom node corresponding to item tag
* @param doc is Dom document * @param doc is Dom document
*/ */
bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
/**Moves scalebar position to the left / right depending on alignment a
nd change in item width*/
void correctXPositionAlignment( double width, double widthAfter );
public slots: public slots:
void updateSegmentSize(); void updateSegmentSize();
/**Sets mCompositionMap to 0 if the map is deleted*/ /**Sets mCompositionMap to 0 if the map is deleted*/
void invalidateCurrentMap(); void invalidateCurrentMap();
protected: protected:
/**Reference to composer map object*/ /**Reference to composer map object*/
const QgsComposerMap* mComposerMap; const QgsComposerMap* mComposerMap;
/**Number of segments on right side*/ /**Number of segments on right side*/
skipping to change at line 162 skipping to change at line 180
/**Space between bar and Text labels*/ /**Space between bar and Text labels*/
double mLabelBarSpace; double mLabelBarSpace;
/**Space between content and item box*/ /**Space between content and item box*/
double mBoxContentSpace; double mBoxContentSpace;
/**Width of a segment (in mm)*/ /**Width of a segment (in mm)*/
double mSegmentMillimeters; double mSegmentMillimeters;
Alignment mAlignment;
/**Calculates with of a segment in mm and stores it in mSegmentMillimet ers*/ /**Calculates with of a segment in mm and stores it in mSegmentMillimet ers*/
void refreshSegmentMillimeters(); void refreshSegmentMillimeters();
}; };
#endif //QGSCOMPOSERSCALEBAR_H #endif //QGSCOMPOSERSCALEBAR_H
 End of changes. 7 change blocks. 
3 lines changed or deleted 24 lines changed or added


 qgscomposerview.h   qgscomposerview.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSCOMPOSERVIEW_H #ifndef QGSCOMPOSERVIEW_H
#define QGSCOMPOSERVIEW_H #define QGSCOMPOSERVIEW_H
#include <QGraphicsView> #include <QGraphicsView>
#include "qgsaddremoveitemcommand.h" #include "qgsaddremoveitemcommand.h"
class QDomDocument;
class QDomElement;
class QKeyEvent; class QKeyEvent;
class QMainWindow; class QMainWindow;
class QMouseEvent; class QMouseEvent;
class QgsComposition; class QgsComposition;
class QgsComposerArrow; class QgsComposerArrow;
class QgsComposerItem; class QgsComposerItem;
class QgsComposerLabel; class QgsComposerLabel;
class QgsComposerLegend; class QgsComposerLegend;
class QgsComposerMap; class QgsComposerMap;
class QgsComposerPicture; class QgsComposerPicture;
skipping to change at line 61 skipping to change at line 62
/**Current tool*/ /**Current tool*/
enum Tool enum Tool
{ {
Select = 0, // Select/Move item Select = 0, // Select/Move item
AddArrow, //add arrow AddArrow, //add arrow
AddMap, // add new map AddMap, // add new map
AddLegend, // add vector legend AddLegend, // add vector legend
AddLabel, // add label AddLabel, // add label
AddScalebar, // add scalebar AddScalebar, // add scalebar
AddPicture, // add raster/vector picture AddPicture, // add raster/vector picture
AddShape, //add shape item (ellipse, rectangle, triangle) AddRectangle,
AddEllipse,
AddTriangle,
AddTable, //add attribute table AddTable, //add attribute table
MoveItemContent //move content of item (e.g. content of map) MoveItemContent //move content of item (e.g. content of map)
}; };
QgsComposerView( QWidget* parent = 0, const char* name = 0, Qt::WFlags f = 0 ); QgsComposerView( QWidget* parent = 0, const char* name = 0, Qt::WFlags f = 0 );
/**Add an item group containing the selected items*/ /**Add an item group containing the selected items*/
void groupItems(); void groupItems();
/**Ungroups the selected items*/ /**Ungroups the selected items*/
void ungroupItems(); void ungroupItems();
QgsComposerView::Tool currentTool() const {return mCurrentTool;} QgsComposerView::Tool currentTool() const {return mCurrentTool;}
void setCurrentTool( QgsComposerView::Tool t ) {mCurrentTool = t;} void setCurrentTool( QgsComposerView::Tool t ) {mCurrentTool = t;}
/**Sets composition (derived from QGraphicsScene)*/ /**Sets composition (derived from QGraphicsScene)*/
void setComposition( QgsComposition* c ); void setComposition( QgsComposition* c );
/**Returns the composition or 0 in case of error*/ /**Returns the composition or 0 in case of error*/
QgsComposition* composition(); QgsComposition* composition();
/**Adds an arrow item to the graphics scene and advices composer to cre
ate a widget for it (through signal)*/
void addComposerArrow( QgsComposerArrow* arrow );
/**Adds label to the graphics scene and advices composer to create a wi
dget for it (through signal)*/
void addComposerLabel( QgsComposerLabel* label );
/**Adds map to the graphics scene and advices composer to create a widg
et for it (through signal)*/
void addComposerMap( QgsComposerMap* map );
/**Adds scale bar to the graphics scene and advices composer to create
a widget for it (through signal)*/
void addComposerScaleBar( QgsComposerScaleBar* scaleBar );
/**Adds legend to the graphics scene and advices composer to create a w
idget for it (through signal)*/
void addComposerLegend( QgsComposerLegend* legend );
/**Adds picture to the graphics scene and advices composer to create a
widget for it (through signal)*/
void addComposerPicture( QgsComposerPicture* picture );
/**Adds a composer shape to the graphics scene and advices composer to
create a widget for it (through signal)*/
void addComposerShape( QgsComposerShape* shape );
/**Adds a composer table to the graphics scene and advices composer to
create a widget for it (through signal)*/
void addComposerTable( QgsComposerAttributeTable* table );
/**Returns the composer main window*/ /**Returns the composer main window*/
QMainWindow* composerWindow(); QMainWindow* composerWindow();
void setPaintingEnabled( bool enabled ) { mPaintingEnabled = enabled; } void setPaintingEnabled( bool enabled ) { mPaintingEnabled = enabled; }
bool paintingEnabled() const { return mPaintingEnabled; } bool paintingEnabled() const { return mPaintingEnabled; }
/**Convenience function to create a QgsAddRemoveItemCommand, connect it
s signals and push it to the undo stack*/
void pushAddRemoveCommand( QgsComposerItem* item, const QString& text,
QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );
protected: protected:
void mousePressEvent( QMouseEvent* ); void mousePressEvent( QMouseEvent* );
void mouseReleaseEvent( QMouseEvent* ); void mouseReleaseEvent( QMouseEvent* );
void mouseMoveEvent( QMouseEvent* ); void mouseMoveEvent( QMouseEvent* );
void mouseDoubleClickEvent( QMouseEvent* e ); void mouseDoubleClickEvent( QMouseEvent* e );
void keyPressEvent( QKeyEvent * e ); void keyPressEvent( QKeyEvent * e );
void keyReleaseEvent( QKeyEvent * e ); void keyReleaseEvent( QKeyEvent * e );
void wheelEvent( QWheelEvent* event ); void wheelEvent( QWheelEvent* event );
void paintEvent( QPaintEvent* event ); void paintEvent( QPaintEvent* event );
void hideEvent( QHideEvent* e );
void showEvent( QShowEvent* e );
private: private:
/**Status of shift key (used for multiple selection)*/ /**Status of shift key (used for multiple selection)*/
bool mShiftKeyPressed; bool mShiftKeyPressed;
/**Current composer tool*/ /**Current composer tool*/
QgsComposerView::Tool mCurrentTool; QgsComposerView::Tool mCurrentTool;
/**Rubber band item*/ /**Rubber band item*/
QGraphicsRectItem* mRubberBandItem; QGraphicsRectItem* mRubberBandItem;
/**Rubber band item for arrows*/ /**Rubber band item for arrows*/
QGraphicsLineItem* mRubberBandLineItem; QGraphicsLineItem* mRubberBandLineItem;
/**Item to move content*/ /**Item to move content*/
QgsComposerItem* mMoveContentItem; QgsComposerItem* mMoveContentItem;
/**Start position of content move*/ /**Start position of content move*/
QPointF mMoveContentStartPos; QPointF mMoveContentStartPos;
/**Start of rubber band creation*/ /**Start of rubber band creation*/
QPointF mRubberBandStartPos; QPointF mRubberBandStartPos;
bool mPaintingEnabled; bool mPaintingEnabled;
void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand* c ); /** Draw a shape on the canvas */
void addShape( Tool currentTool );
public slots: //void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand* c );
/**Casts object to the proper subclass type and calls corresponding ite
mAdded signal*/
void sendItemAddedSignal( QgsComposerItem* item );
signals: signals:
/**Is emitted when selected item changed. If 0, no item is selected*/ /**Is emitted when selected item changed. If 0, no item is selected*/
void selectedItemChanged( QgsComposerItem* selected ); void selectedItemChanged( QgsComposerItem* selected );
/**Is emitted when new composer arrow has been added to the view*/
void composerArrowAdded( QgsComposerArrow* arrow );
/**Is emitted when new composer label has been added to the view*/
void composerLabelAdded( QgsComposerLabel* label );
/**Is emitted when new composer map has been added to the view*/
void composerMapAdded( QgsComposerMap* map );
/**Is emitted when new composer scale bar has been added*/
void composerScaleBarAdded( QgsComposerScaleBar* scalebar );
/**Is emitted when a new composer legend has been added*/
void composerLegendAdded( QgsComposerLegend* legend );
/**Is emitted when a new composer picture has been added*/
void composerPictureAdded( QgsComposerPicture* picture );
/**Is emitted when a new composer shape has been added*/
void composerShapeAdded( QgsComposerShape* shape );
/**Is emitted when a new composer table has been added*/
void composerTableAdded( QgsComposerAttributeTable* table );
/**Is emitted when a composer item has been removed from the scene*/
void itemRemoved( QgsComposerItem* ); void itemRemoved( QgsComposerItem* );
/**Current action (e.g. adding composer map) has been finished. The pur pose of this signal is that /**Current action (e.g. adding composer map) has been finished. The pur pose of this signal is that
QgsComposer may set the selection tool again*/ QgsComposer may set the selection tool again*/
void actionFinished(); void actionFinished();
/**Emitted before composerview is shown*/
void composerViewShow( QgsComposerView* );
/**Emitted before composerview is hidden*/
void composerViewHide( QgsComposerView* );
}; };
#endif #endif
 End of changes. 10 change blocks. 
54 lines changed or deleted 16 lines changed or added


 qgscomposition.h   qgscomposition.h 
skipping to change at line 25 skipping to change at line 25
************************************************************************** */ ************************************************************************** */
#ifndef QGSCOMPOSITION_H #ifndef QGSCOMPOSITION_H
#define QGSCOMPOSITION_H #define QGSCOMPOSITION_H
#include <QDomDocument> #include <QDomDocument>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QLinkedList> #include <QLinkedList>
#include <QUndoStack> #include <QUndoStack>
#include "qgscomposeritemcommand.h" #include "qgscomposeritemcommand.h"
#include "qgsaddremoveitemcommand.h"
class QgsComposerItem; class QgsComposerItem;
class QgsComposerMap; class QgsComposerMap;
class QgsPaperItem; class QgsPaperItem;
class QGraphicsRectItem; class QGraphicsRectItem;
class QgsMapRenderer; class QgsMapRenderer;
class QDomElement; class QDomElement;
class QgsComposerArrow;
class QgsComposerItem;
class QgsComposerLabel;
class QgsComposerLegend;
class QgsComposerMap;
class QgsComposerPicture;
class QgsComposerScaleBar;
class QgsComposerShape;
class QgsComposerAttributeTable;
/** \ingroup MapComposer /** \ingroup MapComposer
* Graphics scene for map printing. The class manages the paper item which always * Graphics scene for map printing. The class manages the paper item which always
* is the item in the back (z-value 0). It maintains the z-Values of the it ems and stores * is the item in the back (z-value 0). It maintains the z-Values of the it ems and stores
* them in a list in ascending z-Order. This list can be changed to lower/r aise items one position * them in a list in ascending z-Order. This list can be changed to lower/r aise items one position
* or to bring them to front/back. * or to bring them to front/back.
* */ * */
class CORE_EXPORT QgsComposition: public QGraphicsScene class CORE_EXPORT QgsComposition: public QGraphicsScene
{ {
Q_OBJECT Q_OBJECT
skipping to change at line 112 skipping to change at line 121
/**Returns the composer map with specified id /**Returns the composer map with specified id
@return id or 0 pointer if the composer map item does not exist*/ @return id or 0 pointer if the composer map item does not exist*/
const QgsComposerMap* getComposerMapById( int id ) const; const QgsComposerMap* getComposerMapById( int id ) const;
int printResolution() const {return mPrintResolution;} int printResolution() const {return mPrintResolution;}
void setPrintResolution( int dpi ) {mPrintResolution = dpi;} void setPrintResolution( int dpi ) {mPrintResolution = dpi;}
bool printAsRaster() const {return mPrintAsRaster;} bool printAsRaster() const {return mPrintAsRaster;}
void setPrintAsRaster( bool enabled ) { mPrintAsRaster = enabled; } void setPrintAsRaster( bool enabled ) { mPrintAsRaster = enabled; }
double selectionTolerance() const { return mSelectionTolerance; }
void setSelectionTolerance( double tol );
/**Returns pointer to map renderer of qgis map canvas*/ /**Returns pointer to map renderer of qgis map canvas*/
QgsMapRenderer* mapRenderer() {return mMapRenderer;} QgsMapRenderer* mapRenderer() {return mMapRenderer;}
QgsComposition::PlotStyle plotStyle() const {return mPlotStyle;} QgsComposition::PlotStyle plotStyle() const {return mPlotStyle;}
void setPlotStyle( QgsComposition::PlotStyle style ) {mPlotStyle = styl e;} void setPlotStyle( QgsComposition::PlotStyle style ) {mPlotStyle = styl e;}
/**Returns the pixel font size for a font that has point size set. /**Returns the pixel font size for a font that has point size set.
The result depends on the resolution (dpi) and of the preview mode. Ea ch item that sets The result depends on the resolution (dpi) and of the preview mode. Ea ch item that sets
a font should call this function before drawing text*/ a font should call this function before drawing text*/
int pixelFontSize( double pointSize ) const; int pixelFontSize( double pointSize ) const;
/**Does the inverse calculation and returns points for pixels (equals t o mm in QgsComposition)*/ /**Does the inverse calculation and returns points for pixels (equals t o mm in QgsComposition)*/
double pointFontSize( int pixelSize ) const; double pointFontSize( int pixelSize ) const;
/**Writes settings to xml (paper dimension)*/ /**Writes settings to xml (paper dimension)*/
bool writeXML( QDomElement& composerElem, QDomDocument& doc ); bool writeXML( QDomElement& composerElem, QDomDocument& doc );
/**Reads settings from xml file*/ /**Reads settings from xml file*/
bool readXML( const QDomElement& compositionElem, const QDomDocument& d oc ); bool readXML( const QDomElement& compositionElem, const QDomDocument& d oc );
/**Add items from XML representation to the graphics scene (for project
file reading, pasting items from clipboard)
@param elem items parent element, e.g. \verbatim <Composer> \endverba
tim or \verbatim <ComposerItemClipboard> \endverbatim
@param doc xml document
@param mapsToRestore for reading from project file: set preview move
'rectangle' to all maps and save the preview states to show composer maps o
n demand
@param addUndoCommands insert AddItem commands if true (e.g. for copy
/paste)
@param pos item position. Optional, take position from xml if 0*/
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc,
QMap< QgsComposerMap*, int >* mapsToRestore = 0,
bool addUndoCommands = false, QPointF* pos = 0 );
/**Adds item to z list. Usually called from constructor of QgsComposerI tem*/ /**Adds item to z list. Usually called from constructor of QgsComposerI tem*/
void addItemToZList( QgsComposerItem* item ); void addItemToZList( QgsComposerItem* item );
/**Removes item from z list. Usually called from destructor of QgsCompo serItem*/ /**Removes item from z list. Usually called from destructor of QgsCompo serItem*/
void removeItemFromZList( QgsComposerItem* item ); void removeItemFromZList( QgsComposerItem* item );
//functions to move selected items in hierarchy //functions to move selected items in hierarchy
void raiseSelectedItems(); void raiseSelectedItems();
void raiseItem( QgsComposerItem* item ); void raiseItem( QgsComposerItem* item );
void lowerSelectedItems(); void lowerSelectedItems();
void lowerItem( QgsComposerItem* item ); void lowerItem( QgsComposerItem* item );
skipping to change at line 173 skipping to change at line 194
@param item target item @param item target item
@param commandText descriptive command text @param commandText descriptive command text
@param c context for merge commands (unknown for non-mergeable comman ds)*/ @param c context for merge commands (unknown for non-mergeable comman ds)*/
void beginCommand( QgsComposerItem* item, const QString& commandText, Q gsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown ); void beginCommand( QgsComposerItem* item, const QString& commandText, Q gsComposerMergeCommand::Context c = QgsComposerMergeCommand::Unknown );
/**Saves end state of item and pushes command to the undo history*/ /**Saves end state of item and pushes command to the undo history*/
void endCommand(); void endCommand();
/**Deletes current command*/ /**Deletes current command*/
void cancelCommand(); void cancelCommand();
/**Adds an arrow item to the graphics scene and advices composer to cre
ate a widget for it (through signal)*/
void addComposerArrow( QgsComposerArrow* arrow );
/**Adds label to the graphics scene and advices composer to create a wi
dget for it (through signal)*/
void addComposerLabel( QgsComposerLabel* label );
/**Adds map to the graphics scene and advices composer to create a widg
et for it (through signal)*/
void addComposerMap( QgsComposerMap* map, bool setDefaultPreviewStyle =
true );
/**Adds scale bar to the graphics scene and advices composer to create
a widget for it (through signal)*/
void addComposerScaleBar( QgsComposerScaleBar* scaleBar );
/**Adds legend to the graphics scene and advices composer to create a w
idget for it (through signal)*/
void addComposerLegend( QgsComposerLegend* legend );
/**Adds picture to the graphics scene and advices composer to create a
widget for it (through signal)*/
void addComposerPicture( QgsComposerPicture* picture );
/**Adds a composer shape to the graphics scene and advices composer to
create a widget for it (through signal)*/
void addComposerShape( QgsComposerShape* shape );
/**Adds a composer table to the graphics scene and advices composer to
create a widget for it (through signal)*/
void addComposerTable( QgsComposerAttributeTable* table );
/**Remove item from the graphics scene. Additionally to QGraphicsScene:
:removeItem, this function considers undo/redo command*/
void removeComposerItem( QgsComposerItem* item );
/**Convenience function to create a QgsAddRemoveItemCommand, connect it
s signals and push it to the undo stack*/
void pushAddRemoveCommand( QgsComposerItem* item, const QString& text,
QgsAddRemoveItemCommand::State state = QgsAddRemoveItemCommand::Added );
public slots:
/**Casts object to the proper subclass type and calls corresponding ite
mAdded signal*/
void sendItemAddedSignal( QgsComposerItem* item );
private: private:
/**Pointer to map renderer of QGIS main map*/ /**Pointer to map renderer of QGIS main map*/
QgsMapRenderer* mMapRenderer; QgsMapRenderer* mMapRenderer;
QgsComposition::PlotStyle mPlotStyle; QgsComposition::PlotStyle mPlotStyle;
QgsPaperItem* mPaperItem; QgsPaperItem* mPaperItem;
/**Maintains z-Order of items. Starts with item at position 1 (position 0 is always paper item)*/ /**Maintains z-Order of items. Starts with item at position 1 (position 0 is always paper item)*/
QLinkedList<QgsComposerItem*> mItemZList; QLinkedList<QgsComposerItem*> mItemZList;
/**Dpi for printout*/ /**Dpi for printout*/
int mPrintResolution; int mPrintResolution;
/**Flag if map should be printed as a raster (via QImage). False by def ault*/ /**Flag if map should be printed as a raster (via QImage). False by def ault*/
bool mPrintAsRaster; bool mPrintAsRaster;
/**Distance tolerance for item selection (in mm)*/
double mSelectionTolerance;
/**Parameters for snap to grid function*/ /**Parameters for snap to grid function*/
bool mSnapToGrid; bool mSnapToGrid;
double mSnapGridResolution; double mSnapGridResolution;
double mSnapGridOffsetX; double mSnapGridOffsetX;
double mSnapGridOffsetY; double mSnapGridOffsetY;
QPen mGridPen; QPen mGridPen;
GridStyle mGridStyle; GridStyle mGridStyle;
QUndoStack mUndoStack; QUndoStack mUndoStack;
skipping to change at line 209 skipping to change at line 260
QgsComposition(); //default constructor is forbidden QgsComposition(); //default constructor is forbidden
/**Reset z-values of items based on position in z list*/ /**Reset z-values of items based on position in z list*/
void updateZValues(); void updateZValues();
/**Returns the bounding rectangle of the selected items in scene coordi nates /**Returns the bounding rectangle of the selected items in scene coordi nates
@return 0 in case of success*/ @return 0 in case of success*/
int boundingRectOfSelectedItems( QRectF& bRect ); int boundingRectOfSelectedItems( QRectF& bRect );
void loadGridAppearanceSettings(); void loadSettings();
void saveGridAppearanceSettings(); void saveSettings();
void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand* c );
signals: signals:
void paperSizeChanged(); void paperSizeChanged();
/**Is emitted when selected item changed. If 0, no item is selected*/
void selectedItemChanged( QgsComposerItem* selected );
/**Is emitted when new composer arrow has been added to the view*/
void composerArrowAdded( QgsComposerArrow* arrow );
/**Is emitted when new composer label has been added to the view*/
void composerLabelAdded( QgsComposerLabel* label );
/**Is emitted when new composer map has been added to the view*/
void composerMapAdded( QgsComposerMap* map );
/**Is emitted when new composer scale bar has been added*/
void composerScaleBarAdded( QgsComposerScaleBar* scalebar );
/**Is emitted when a new composer legend has been added*/
void composerLegendAdded( QgsComposerLegend* legend );
/**Is emitted when a new composer picture has been added*/
void composerPictureAdded( QgsComposerPicture* picture );
/**Is emitted when a new composer shape has been added*/
void composerShapeAdded( QgsComposerShape* shape );
/**Is emitted when a new composer table has been added*/
void composerTableAdded( QgsComposerAttributeTable* table );
/**Is emitted when a composer item has been removed from the scene*/
void itemRemoved( QgsComposerItem* );
}; };
#endif #endif
 End of changes. 9 change blocks. 
3 lines changed or deleted 96 lines changed or added


 qgsconfig.h   qgsconfig.h 
// QGSCONFIG.H // QGSCONFIG.H
#ifndef QGSCONFIG_H #ifndef QGSCONFIG_H
#define QGSCONFIG_H #define QGSCONFIG_H
// Version must be specified according to // Version must be specified according to
// <int>.<int>.<int>-<any text>. // <int>.<int>.<int>-<any text>.
// or else upgrading old project file will not work // or else upgrading old project file will not work
// reliably. // reliably.
#define VERSION "1.7.4-Wroclaw" #define VERSION "1.8.0-Lisboa"
//used in vim src/core/qgis.cpp //used in vim src/core/qgis.cpp
//The way below should work but it resolves to a number like 0110 which the compiler treats as octal I think //The way below should work but it resolves to a number like 0110 which the compiler treats as octal I think
//because debuggin it out shows the decimal number 72 which results in inco rrect version status. //because debuggin it out shows the decimal number 72 which results in inco rrect version status.
//As a short term fix I (Tim) am defining the version in top level cmake. I t would be good to //As a short term fix I (Tim) am defining the version in top level cmake. I t would be good to
//reinstate this more generic approach below at some point though //reinstate this more generic approach below at some point though
//#define VERSION_INT 174 //#define VERSION_INT 180
#define VERSION_INT 10704 #define VERSION_INT 10800
//used in main.cpp and anywhere else where the release name is needed //used in main.cpp and anywhere else where the release name is needed
#define RELEASE_NAME "Wroclaw" #define RELEASE_NAME "Lisboa"
#define QGIS_PLUGIN_SUBDIR "lib/qgis/plugins" #define QGIS_PLUGIN_SUBDIR "lib/qgis/plugins"
#define QGIS_DATA_SUBDIR "share/qgis" #define QGIS_DATA_SUBDIR "share/qgis"
#define QGIS_LIBEXEC_SUBDIR "lib/qgis" #define QGIS_LIBEXEC_SUBDIR "lib/qgis"
#define QGIS_LIB_SUBDIR "lib" #define QGIS_LIB_SUBDIR "lib"
#define CMAKE_INSTALL_PREFIX "/home/andrey/upstream-tracker/testing/qgis/1. #define CMAKE_INSTALL_PREFIX "/home/andrey/upstream-tracker/testing/qgis/1.
7.4" 8.0"
#define CMAKE_SOURCE_DIR "/home/andrey/upstream-tracker/repository/qgis/qgi
s-1.8.0"
#define HAVE_POSTGRESQL #define HAVE_POSTGRESQL
#define HAVE_SPATIALITE #define HAVE_SPATIALITE
#define HAVE_MSSQL
/* #undef HAVE_PYTHON */ /* #undef HAVE_PYTHON */
#endif #endif
 End of changes. 5 change blocks. 
6 lines changed or deleted 10 lines changed or added


 qgscontexthelp.h   qgscontexthelp.h 
skipping to change at line 19 skipping to change at line 19
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSCONTEXTHELP_H #ifndef QGSCONTEXTHELP_H
#define QGSCONTEXTHELP_H #define QGSCONTEXTHELP_H
#include <QObject> #include <QObject>
class QProcess; class QProcess;
class QTcpSocket; class QTcpSocket;
#ifdef Q_OS_MACX #ifdef Q_OS_MACX
#define QGSCONTEXTHELP_REUSE 1 #define QGSCONTEXTHELP_REUSE 1
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgscontinuouscolorrenderer.h   qgscontinuouscolorrenderer.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgscontinuouscolorrenderer.h 5371 2006-04-25 01:52:13Z wonder $ */
#ifndef QGSCONTINUOUSCOLORRENDERER_H #ifndef QGSCONTINUOUSCOLORRENDERER_H
#define QGSCONTINUOUSCOLORRENDERER_H #define QGSCONTINUOUSCOLORRENDERER_H
#include "qgsrenderer.h" #include "qgsrenderer.h"
#include "qgsmaptopixel.h" #include "qgsmaptopixel.h"
#include "qgspoint.h" #include "qgspoint.h"
#include "qgsfeature.h" #include "qgsfeature.h"
class QgsSymbol; class QgsSymbol;
class QPainter; class QPainter;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgscontrastenhancement.h   qgscontrastenhancement.h 
skipping to change at line 97 skipping to change at line 97
* *
* Non-Static Inline methods * Non-Static Inline methods
* *
*/ */
/** \brief Return the maximum value for the contrast enhancement range. */ /** \brief Return the maximum value for the contrast enhancement range. */
double maximumValue() const { return mMaximumValue; } double maximumValue() const { return mMaximumValue; }
/** \brief Return the minimum value for the contrast enhancement range. */ /** \brief Return the minimum value for the contrast enhancement range. */
double minimumValue() const { return mMinimumValue; } double minimumValue() const { return mMinimumValue; }
ContrastEnhancementAlgorithm contrastEnhancementAlgorithm() { return mC ontrastEnhancementAlgorithm; } ContrastEnhancementAlgorithm contrastEnhancementAlgorithm() const { ret urn mContrastEnhancementAlgorithm; }
/* /*
* *
* Non-Static methods * Non-Static methods
* *
*/ */
/** \brief Apply the contrast enhancement to a value. Return values are 0 - 254, -1 means the pixel was clipped and should not be displayed */ /** \brief Apply the contrast enhancement to a value. Return values are 0 - 254, -1 means the pixel was clipped and should not be displayed */
int enhanceContrast( double ); int enhanceContrast( double );
/** \brief Return true if pixel is in stretable range, false if pixel i s outside of range (i.e., clipped) */ /** \brief Return true if pixel is in stretable range, false if pixel i s outside of range (i.e., clipped) */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgscoordinatereferencesystem.h   qgscoordinatereferencesystem.h 
skipping to change at line 173 skipping to change at line 173
/*! Set up this srs from a string definition, by default a WKT definiti on. Otherwise /*! Set up this srs from a string definition, by default a WKT definiti on. Otherwise
* the string defines a authority, followed by a colon, followed by the definition. * the string defines a authority, followed by a colon, followed by the definition.
* The authority can be one of "epsg", "postgis", "internal" for intege r definitions, * The authority can be one of "epsg", "postgis", "internal" for intege r definitions,
* and "wkt" or "proj4" for string definitions. The implementation of each authority * and "wkt" or "proj4" for string definitions. The implementation of each authority
* uses the corresponding createFrom... function. * uses the corresponding createFrom... function.
* @param theDefinition A String containing a coordinate reference syst em definition. * @param theDefinition A String containing a coordinate reference syst em definition.
*/ */
bool createFromString( const QString theDefinition ); bool createFromString( const QString theDefinition );
/*! Set up this srs from a various text formats.
*
* Valid formats: WKT string, "EPSG:n", "EPSGA:n", "AUTO:proj_id,unit_i
d,lon0,lat0",
* "urn:ogc:def:crs:EPSG::n", PROJ.4 string, filename (with WKT, XML or
PROJ.4 string),
* well known name (such as NAD27, NAD83, WGS84 or WGS72),
* ESRI::[WKT string] (directly or in a file), "IGNF:xxx"
*
* For more details on supported formats see OGRSpatialReference::SetFr
omUserInput()
* ( http://www.gdal.org/ogr/classOGRSpatialReference.html#aec3c6a49533
fe457ddc763d699ff8796 )
* @note this function generates a WKT string using OSRSetFromUserInput
() and
* passes it to createFromWkt() function.
* @param theDefinition A String containing a coordinate reference syst
em definition.
*/
bool createFromUserInput( const QString theDefinition );
/*! Make sure that ESRI WKT import is done properly.
* This is required for proper shapefile CRS import when using gdal>= 1
.9.
* @note This function is called by createFromUserInput() and QgsOgrPro
vider::crs(), there is usually
* no need to call it from elsewhere.
* @note This function sets CPL config option GDAL_FIX_ESRI_WKT to a pr
oper value,
* unless it has been set by the user through the commandline or an env
ironment variable.
* For more details refer to OGRSpatialReference::morphFromESRI() .
* @note added in 1.8
*/
static void setupESRIWktFix();
/*! Find out whether this CRS is correctly initialised and usable */ /*! Find out whether this CRS is correctly initialised and usable */
bool isValid() const; bool isValid() const;
/*! Perform some validation on this CRS. If the sts doesn't validate th e /*! Perform some validation on this CRS. If the sts doesn't validate th e
* default behaviour settings for layers with unknown CRS will be * default behaviour settings for layers with unknown CRS will be
* consulted and acted on accordingly. By hell or high water this * consulted and acted on accordingly. By hell or high water this
* method will do its best to make sure that this CRS is valid - even * method will do its best to make sure that this CRS is valid - even
* if that involves resorting to a hard coded default of geocs:wgs84. * if that involves resorting to a hard coded default of geocs:wgs84.
* *
* @note It is not usually necessary to use this function, unless you * @note It is not usually necessary to use this function, unless you
skipping to change at line 203 skipping to change at line 229
* There are some gotchas with using ogr isSame() srs comparison, but * There are some gotchas with using ogr isSame() srs comparison, but
* its more effective than using straight string comparison of proj4pa rams. * its more effective than using straight string comparison of proj4pa rams.
* @note The ellipsoid and projection acronyms must be set as well as the proj4string! * @note The ellipsoid and projection acronyms must be set as well as the proj4string!
* @return long the SrsId of the matched CRS * @return long the SrsId of the matched CRS
*/ */
long findMatchingProj(); long findMatchingProj();
/*! Overloaded == operator used to compare to CRS's. /*! Overloaded == operator used to compare to CRS's.
* Internally it will delegate to the equals method described below * Internally it will delegate to the equals method described below
*/ */
bool operator==( const QgsCoordinateReferenceSystem &theSrs ); bool operator==( const QgsCoordinateReferenceSystem &theSrs ) const;
/*! Overloaded != operator used to compare to CRS's. /*! Overloaded != operator used to compare to CRS's.
* Returns opposite bool value to operator == * Returns opposite bool value to operator ==
*/ */
bool operator!=( const QgsCoordinateReferenceSystem &theSrs ); bool operator!=( const QgsCoordinateReferenceSystem &theSrs ) const;
/*! Overloaded == operator used to compare to CRS's. /*! Overloaded == operator used to compare to CRS's.
* Internally it will use OGR isSameCRS() or isSameGeoCRS() methods as appropriate. * Internally it will use OGR isSameCRS() or isSameGeoCRS() methods as appropriate.
* Additionally logic may also be applied if the result from the OGR m ethods * Additionally logic may also be applied if the result from the OGR m ethods
* is inconclusive. * is inconclusive.
* @deprecated in 1.8 as the same proj.4 string not necessarily means t he same CRS
*/ */
bool equals( QString theProj4String ); Q_DECL_DEPRECATED bool equals( QString theProj4String );
/*! Restores state from the given Dom node. /*! Restores state from the given Dom node.
* @param theNode The node from which state will be restored * @param theNode The node from which state will be restored
* @return bool True on success, False on failure * @return bool True on success, False on failure
*/ */
bool readXML( QDomNode & theNode ); 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. * Below is an example of the generated tag.
\verbatim \verbatim
<spatialrefsys> <spatialrefsys>
skipping to change at line 309 skipping to change at line 336
* @return QString theProj4String Proj4 format specifies that define t his srs. * @return QString theProj4String Proj4 format specifies that define t his srs.
* @note A zero length string will be returned if the toProj4 is uninit ialised * @note A zero length string will be returned if the toProj4 is uninit ialised
*/ */
QString toProj4() const; QString toProj4() const;
/*! Get this Geographic? flag /*! Get this Geographic? flag
* @return bool theGeoFlag Whether this is a geographic or projected c oordinate system * @return bool theGeoFlag Whether this is a geographic or projected c oordinate system
*/ */
bool geographicFlag() const; bool geographicFlag() const;
/*! return if axis is inverted (eg. for WMS 1.3)
* @return bool Whether this is crs axis is inverted
* @note added in 1.9.90
*/
bool axisInverted() const;
/*! Get the units that the projection is in /*! Get the units that the projection is in
* @return QGis::UnitType that gives the units for the coordinate syste m * @return QGis::UnitType that gives the units for the coordinate syste m
*/ */
QGis::UnitType mapUnits() const; QGis::UnitType mapUnits() const;
// Mutators ----------------------------------- // Mutators -----------------------------------
/*! Set user hint for validation /*! Set user hint for validation
*/ */
void setValidationHint( QString html ); void setValidationHint( QString html );
/*! Get user hint for validation /*! Get user hint for validation
*/ */
QString validationHint(); QString validationHint();
/*! Update proj.4 parameters in our database from proj.4
* @returns number of updated CRS on success and
* negative number of failed updates in case of errors.
* @note added in 1.8
*/
static int syncDb();
// Mutators ----------------------------------- // Mutators -----------------------------------
// We don't want to expose these to the public api since they wont crea te // We don't want to expose these to the public api since they wont crea te
// a fully valid crs. Programmers should use the createFrom* methods ra ther // a fully valid crs. Programmers should use the createFrom* methods ra ther
private: private:
/** A static helper function to find out the proj4 string for a srsid /** A static helper function to find out the proj4 string for a srsid
* @param theSrsId The srsid used for the lookup * @param theSrsId The srsid used for the lookup
* @return QString The proj4 string * @return QString The proj4 string
*/ */
static QString proj4FromSrsId( const int theSrsId ); static QString proj4FromSrsId( const int theSrsId );
skipping to change at line 345 skipping to change at line 385
void setInternalId( long theSrsId ); void setInternalId( long theSrsId );
/*! Set the postgis srid /*! Set the postgis srid
* @param theSrid The postgis spatial_ref_sys key for this srs * @param theSrid The postgis spatial_ref_sys key for this srs
*/ */
void setSrid( long theSrid ); void setSrid( long theSrid );
/*! Set the Description /*! Set the Description
* @param theDescription A textual description of the srs. * @param theDescription A textual description of the srs.
*/ */
void setDescription( QString theDescription ); void setDescription( QString theDescription );
/* Set the Proj Proj4String. /* Set the Proj Proj4String.
* @param QString theProj4String Proj4 format specifies (excluding pro * @param QString theProj4String Proj4 format specifies
j and ellips) that define this srs. * (excluding proj and ellips) that define this srs.
* @note some content of the PROJ4 string may be stripped off by this
* method due to the parsing of the string by OSRNewSpatialReference .
* For example input:
* +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
* Gets stored in the CRS as:
* +proj=longlat +datum=WGS84 +no_defs
*/ */
void setProj4String( QString theProj4String ); void setProj4String( QString theProj4String );
/*! Set this Geographic? flag /*! Set this Geographic? flag
* @param theGeoFlag Whether this is a geographic or projected coordina te system * @param theGeoFlag Whether this is a geographic or projected coordina te system
*/ */
void setGeographicFlag( bool theGeoFlag ); void setGeographicFlag( bool theGeoFlag );
/*! Set the EpsgCrsId identifier for this srs /*! Set the EpsgCrsId identifier for this srs
* @param theEpsg the ESPG identifier for this srs (defaults to 0) * @param theEpsg the ESPG identifier for this srs (defaults to 0)
*/ */
skipping to change at line 385 skipping to change at line 432
/*! A string based associative array used for passing records around */ /*! A string based associative array used for passing records around */
typedef QMap<QString, QString> RecordMap; typedef QMap<QString, QString> RecordMap;
/*! Get a record from the srs.db or qgis.db backends, given an sql stat ment. /*! Get a record from the srs.db or qgis.db backends, given an sql stat ment.
* @note only handles queries that return a single record. * @note only handles queries that return a single record.
* @note it will first try the system srs.db then the users qgis.db! * @note it will first try the system srs.db then the users qgis.db!
* @param theSql The sql query to execute * @param theSql The sql query to execute
* @return An associative array of field name <-> value pairs * @return An associative array of field name <-> value pairs
*/ */
RecordMap getRecord( QString theSql ); RecordMap getRecord( QString theSql );
// Open SQLite db and show message if ccannot be opened // Open SQLite db and show message if cannot be opened
// returns the same code as sqlite3_open // returns the same code as sqlite3_open
static int openDb( QString path, sqlite3 **db ); static int openDb( QString path, sqlite3 **db, bool readonly = true );
//!The internal sqlite3 srs.db primary key for this srs //!The internal sqlite3 srs.db primary key for this srs
long mSrsId; long mSrsId;
//!A textual description of the srs. //!A textual description of the srs.
QString mDescription; QString mDescription;
//!The official proj4 acronym for the projection family //!The official proj4 acronym for the projection family
QString mProjectionAcronym ; QString mProjectionAcronym ;
//!The official proj4 acronym for the ellipoid //!The official proj4 acronym for the ellipoid
QString mEllipsoidAcronym; QString mEllipsoidAcronym;
//!Whether this is a geographic or projected coordinate system //!Whether this is a geographic or projected coordinate system
skipping to change at line 418 skipping to change at line 465
//! Work out the projection units and set the appropriate local variabl e //! Work out the projection units and set the appropriate local variabl e
void setMapUnits(); void setMapUnits();
//! Save the proj4-string as a custom CRS //! Save the proj4-string as a custom CRS
bool saveAsUserCRS(); bool saveAsUserCRS();
//! Helper for getting number of user CRS already in db //! Helper for getting number of user CRS already in db
long getRecordCount(); long getRecordCount();
//! Helper for sql-safe value quoting //! Helper for sql-safe value quoting
QString quotedValue( QString value ); static QString quotedValue( QString value );
void *mCRS; void *mCRS;
bool loadFromDb( QString db, QString expression, QString value ); bool loadFromDb( QString db, QString expression, QString value );
QString mValidationHint; QString mValidationHint;
mutable QString mWkt;
//!Whether this is a coordinate system has inverted axis
mutable int mAxisInverted;
static CUSTOM_CRS_VALIDATION mCustomSrsValidation; static CUSTOM_CRS_VALIDATION mCustomSrsValidation;
}; };
//! Output stream operator //! Output stream operator
inline std::ostream& operator << ( std::ostream& os, const QgsCoordinateRef erenceSystem &r ) inline std::ostream& operator << ( std::ostream& os, const QgsCoordinateRef erenceSystem &r )
{ {
QString mySummary( "\n\tSpatial Reference System:" ); QString mySummary( "\n\tSpatial Reference System:" );
mySummary += "\n\t\tDescription : "; mySummary += "\n\t\tDescription : ";
if ( !r.description().isNull() ) if ( !r.description().isNull() )
 End of changes. 12 change blocks. 
8 lines changed or deleted 68 lines changed or added


 qgscoordinatetransform.h   qgscoordinatetransform.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSCOORDINATETRANSFORM_H #ifndef QGSCOORDINATETRANSFORM_H
#define QGSCOORDINATETRANSFORM_H #define QGSCOORDINATETRANSFORM_H
//qt includes //qt includes
#include <QObject> #include <QObject>
//qgis includes //qgis includes
#include "qgspoint.h" #include "qgspoint.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include "qgscsexception.h" #include "qgscsexception.h"
skipping to change at line 161 skipping to change at line 160
QgsRectangle transformBoundingBox( const QgsRectangle theRect, Transfor mDirection direction = ForwardTransform ) const; QgsRectangle transformBoundingBox( const QgsRectangle theRect, Transfor mDirection direction = ForwardTransform ) const;
// Same as for the other transform() functions, but alters the x // Same as for the other transform() functions, but alters the x
// and y variables in place. The second one works with good old-fashion ed // and y variables in place. The second one works with good old-fashion ed
// C style arrays. // C style arrays.
void transformInPlace( double& x, double& y, double &z, TransformDirect ion direction = ForwardTransform ) const; void transformInPlace( double& x, double& y, double &z, TransformDirect ion direction = ForwardTransform ) const;
void transformInPlace( std::vector<double>& x, std::vector<double>& y, std::vector<double>& z, void transformInPlace( std::vector<double>& x, std::vector<double>& y, std::vector<double>& z,
TransformDirection direction = ForwardTransform ) const; TransformDirection direction = ForwardTransform ) const;
#ifdef ANDROID
void transformInPlace( float& x, float& y, float& z, TransformDirection
direction = ForwardTransform ) const;
void transformInPlace( std::vector<float>& x, std::vector<float>& y, st
d::vector<float>& z,
TransformDirection direction = ForwardTransform
) const;
#endif
/*! Transform a QgsRectangle to the dest Coordinate system /*! Transform a QgsRectangle to the dest Coordinate system
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS, * If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
* otherwise points are transformed from map canvas CS to layerCS. * otherwise points are transformed from map canvas CS to layerCS.
* @param theRect rect to transform * @param theRect rect to transform
* @param direction TransformDirection (defaults to ForwardTransform) * @param direction TransformDirection (defaults to ForwardTransform)
* @return QgsRectangle in Destination Coordinate System * @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 /*! Transform an array of coordinates to a different Coordinate System
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added


 qgscredentialdialog.h   qgscredentialdialog.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSCREDENTIALDIALOG_H #ifndef QGSCREDENTIALDIALOG_H
#define QGSCREDENTIALDIALOG_H #define QGSCREDENTIALDIALOG_H
#include <ui_qgscredentialdialog.h> #include <ui_qgscredentialdialog.h>
#include <qgisgui.h> #include <qgisgui.h>
#include "qgscredentials.h" #include "qgscredentials.h"
#include <QString> #include <QString>
/** \ingroup gui /** \ingroup gui
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgscredentials.h   qgscredentials.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2010 by Juergen E. Fischer copyright : (C) 2010 by Juergen E. Fischer
email : jef at norbit dot de email : jef at norbit dot de
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSCREDENTIALS_H #ifndef QGSCREDENTIALS_H
#define QGSCREDENTIALS_H #define QGSCREDENTIALS_H
#include <QString> #include <QString>
#include <QObject> #include <QObject>
#include <QPair> #include <QPair>
#include <QMap> #include <QMap>
/** \ingroup core /** \ingroup core
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgscsexception.h   qgscsexception.h 
skipping to change at line 17 skipping to change at line 17
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSCSEXCEPTION_H #ifndef QGSCSEXCEPTION_H
#define QGSCSEXCEPTION_H #define QGSCSEXCEPTION_H
#include "qgsexception.h" #include "qgsexception.h"
/** \ingroup core /** \ingroup core
* Custom exception class for Coordinate Reference System related exception s. * Custom exception class for Coordinate Reference System related exception s.
*/ */
class CORE_EXPORT QgsCsException : public QgsException class CORE_EXPORT QgsCsException : public QgsException
{ {
public: public:
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsdataprovider.h   qgsdataprovider.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2003 by Gary E.Sherman Copyright : (C) 2003 by Gary E.Sherman
email : sherman at mrcc.com email : sherman at mrcc.com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QQGSDATAPROVIDER_H #ifndef QQGSDATAPROVIDER_H
#define QQGSDATAPROVIDER_H #define QQGSDATAPROVIDER_H
#include <QDateTime> #include <QDateTime>
#include <QObject> #include <QObject>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
//#include "qgsdataitem.h"
class QgsRectangle; class QgsRectangle;
class QgsCoordinateReferenceSystem; class QgsCoordinateReferenceSystem;
/** \ingroup core /** \ingroup core
* Abstract base class for spatial data provider implementations. * Abstract base class for spatial data provider implementations.
* @author Gary E.Sherman * @author Gary E.Sherman
* *
* This object needs to inherit from QObject to enable event * This object needs to inherit from QObject to enable event
* processing in the Postgres/PostGIS provider (QgsPostgresProvider). * processing in the Postgres/PostGIS provider (QgsPostgresProvider).
* It is called *here* so that this vtable and the vtable for * It is called *here* so that this vtable and the vtable for
skipping to change at line 46 skipping to change at line 47
* the QgsVectorLayer class factory (which refers * the QgsVectorLayer class factory (which refers
* to generic QgsVectorDataProvider's) depends on it. * to generic QgsVectorDataProvider's) depends on it.
*/ */
class CORE_EXPORT QgsDataProvider : public QObject class CORE_EXPORT QgsDataProvider : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
Q_ENUMS( DataCapability )
enum DataCapability
{
NoDataCapabilities = 0,
File = 1,
Dir = 1 << 1,
Database = 1 << 2,
Net = 1 << 3 // Internet source
};
QgsDataProvider( QString const & uri = "" ) QgsDataProvider( QString const & uri = "" )
: mDataSourceURI( uri ) : mDataSourceURI( uri )
{} {}
/** /**
* We need this so the subclass destructors get called * We need this so the subclass destructors get called
*/ */
virtual ~QgsDataProvider() {}; virtual ~QgsDataProvider() {};
/*! Get the QgsCoordinateReferenceSystem for this layer /*! Get the QgsCoordinateReferenceSystem for this layer
skipping to change at line 112 skipping to change at line 124
/** /**
* Set the subset string used to create a subset of features in * Set the subset string used to create a subset of features in
* the layer. This may be a sql where clause or any other string * the layer. This may be a sql where clause or any other string
* that can be used by the data provider to create a subset. * that can be used by the data provider to create a subset.
* Must be implemented in the dataprovider. * Must be implemented in the dataprovider.
*/ */
virtual bool setSubsetString( QString subset, bool updateFeatureCount = true ) virtual bool setSubsetString( QString subset, bool updateFeatureCount = true )
{ {
// NOP by default // NOP by default
Q_UNUSED( subset ); Q_UNUSED( subset );
Q_UNUSED( updateFeatureCount );
return false; return false;
} }
/** /**
* provider supports setting of subset strings * provider supports setting of subset strings
* @note added in 1.4 * @note added in 1.4
*/ */
virtual bool supportsSubsetString() { return false; } virtual bool supportsSubsetString() { return false; }
/** /**
skipping to change at line 168 skipping to change at line 181
virtual uint subLayerCount() const virtual uint subLayerCount() const
{ {
return 0; return 0;
} }
/** /**
* Reorder the list of layer names to be rendered by this provider * Reorder the list of layer names to be rendered by this provider
* (in order from bottom to top) * (in order from bottom to top)
* \note layers must have been previously added. * \note layers must have been previously added.
*/ */
virtual void setLayerOrder( QStringList layers ) virtual void setLayerOrder( const QStringList &layers )
{ {
//prevent unused var warnings //prevent unused var warnings
if ( layers.count() < 1 ) if ( layers.count() < 1 )
{ {
return; return;
} }
// NOOP // NOOP
} }
/** /**
* Set the visibility of the given sublayer name * Set the visibility of the given sublayer name
*/ */
virtual void setSubLayerVisibility( QString name, bool vis ) virtual void setSubLayerVisibility( const QString &name, bool vis )
{ {
//prevent unused var warnings //prevent unused var warnings
if ( name.isEmpty() || !vis ) if ( name.isEmpty() || !vis )
{ {
return; return;
} }
// NOOP // NOOP
} }
/** return a provider name /** return a provider name
 End of changes. 6 change blocks. 
3 lines changed or deleted 16 lines changed or added


 qgsdatasourceuri.h   qgsdatasourceuri.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSDATASOURCEURI_H #ifndef QGSDATASOURCEURI_H
#define QGSDATASOURCEURI_H #define QGSDATASOURCEURI_H
#include <QString> #include "qgis.h"
/** \ingroup core /** \ingroup core
* Class for storing the component parts of a PostgreSQL/RDBMS datasource U RI. * Class for storing the component parts of a PostgreSQL/RDBMS datasource U RI.
* This structure stores the database connection information, including hos t, database, * This structure stores the database connection information, including hos t, database,
* user name, password, schema, password, and sql where clause * user name, password, schema, password, and sql where clause
*/ */
class CORE_EXPORT QgsDataSourceURI class CORE_EXPORT QgsDataSourceURI
{ {
public: public:
//! \note enumeration added in version 1.1 //! \note enumeration added in version 1.1
skipping to change at line 101 skipping to change at line 100
QString schema() const; QString schema() const;
QString table() const; QString table() const;
QString sql() const; QString sql() const;
QString geometryColumn() const; QString geometryColumn() const;
//! set use Estimated Metadata //! set use Estimated Metadata
// added in 1.5 // added in 1.5
void setUseEstimatedMetadata( bool theFlag ); void setUseEstimatedMetadata( bool theFlag );
bool useEstimatedMetadata() const; bool useEstimatedMetadata() const;
void disableSelectAtId( bool theFlag );
bool selectAtIdDisabled() const;
void clearSchema(); void clearSchema();
void setSql( QString sql ); void setSql( QString sql );
// added in version 1.1 // added in version 1.1
QString host() const; QString host() const;
QString database() const; QString database() const;
QString port() const; QString port() const;
QString password() const; QString password() const;
enum SSLmode sslMode() const; enum SSLmode sslMode() const;
// added in 1.7 // added in 1.7
QString service() const; QString service() const;
// added in version 1.2 // added in version 1.2
QString keyColumn() const; QString keyColumn() const;
void setKeyColumn( QString column ); void setKeyColumn( QString column );
// added in 1.9
QGis::WkbType wkbType() const;
void setWkbType( QGis::WkbType type );
QString srid() const;
void setSrid( QString srid );
private: private:
void skipBlanks( const QString &uri, int &i ); void skipBlanks( const QString &uri, int &i );
QString getValue( const QString &uri, int &i ); QString getValue( const QString &uri, int &i );
QString escape( const QString &uri, QChar delim ) const; QString escape( const QString &uri, QChar delim ) const;
/* data */ /* data */
//! host name //! host name
QString mHost; QString mHost;
//! port the database server listens on //! port the database server listens on
skipping to change at line 149 skipping to change at line 158
//! SQL query or where clause used to limit features returned from the layer //! SQL query or where clause used to limit features returned from the layer
QString mSql; QString mSql;
//! username //! username
QString mUsername; QString mUsername;
//! password //! password
QString mPassword; QString mPassword;
//! ssl mode //! ssl mode
enum SSLmode mSSLmode; enum SSLmode mSSLmode;
//! key column //! key column
QString mKeyColumn; QString mKeyColumn;
//Use estimated metadata flag //! Use estimated metadata flag
bool mUseEstimatedMetadata; bool mUseEstimatedMetadata;
//! Disable SelectAtId capability (eg. to trigger the attribute table m
emory model for expensive views)
bool mSelectAtIdDisabled;
//! geometry type (or QGis::WKBUnknown if not specified)
QGis::WkbType mWkbType;
//! SRID or a null string if not specified
QString mSrid;
}; };
#endif //QGSDATASOURCEURI_H #endif //QGSDATASOURCEURI_H
 End of changes. 6 change blocks. 
3 lines changed or deleted 19 lines changed or added


 qgsdetaileditemdelegate.h   qgsdetaileditemdelegate.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id:$ */
#ifndef QGSDETAILEDITEMDELEGATE_H #ifndef QGSDETAILEDITEMDELEGATE_H
#define QGSDETAILEDITEMDELEGATE_H #define QGSDETAILEDITEMDELEGATE_H
#include <QAbstractItemDelegate> #include <QAbstractItemDelegate>
#include <QString> #include <QString>
class QCheckBox; class QCheckBox;
class QgsDetailedItemWidget; class QgsDetailedItemWidget;
class QgsDetailedItemData; class QgsDetailedItemData;
class QFontMetrics; class QFontMetrics;
class QFont; class QFont;
/** \ingroup gui /** \ingroup gui
* A custom model/view delegate that can display an icon, heading * A custom model/view delegate that can display an icon, heading
* and detail sections. * and detail sections.
* @see also QgsDetailedItemData * @see also QgsDetailedItemData
*/ */
class GUI_EXPORT QgsDetailedItemDelegate : class GUI_EXPORT QgsDetailedItemDelegate :
public QAbstractItemDelegate public QAbstractItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsDetailedItemDelegate( QObject * parent = 0 ); QgsDetailedItemDelegate( QObject * parent = 0 );
~QgsDetailedItemDelegate(); ~QgsDetailedItemDelegate();
/** reimplement for parent class */ /** reimplement for parent class */
void paint( QPainter * thePainter, void paint( QPainter * thePainter,
const QStyleOptionViewItem & theOption, const QStyleOptionViewItem & theOption,
const QModelIndex & theIndex ) const; const QModelIndex & theIndex ) const;
/** reimplement for parent class */ /** reimplement for parent class */
skipping to change at line 60 skipping to change at line 59
void setVerticalSpacing( int theValue ); void setVerticalSpacing( int theValue );
int verticalSpacing() const; int verticalSpacing() const;
void setHorizontalSpacing( int theValue ); void setHorizontalSpacing( int theValue );
int horizontalSpacing() const; int horizontalSpacing() const;
private: private:
QFont detailFont( const QStyleOptionViewItem &theOption ) const; QFont detailFont( const QStyleOptionViewItem &theOption ) const;
QFont categoryFont( const QStyleOptionViewItem &theOption ) const;
QFont titleFont( const QStyleOptionViewItem &theOption ) const; QFont titleFont( const QStyleOptionViewItem &theOption ) const;
void drawHighlight( const QStyleOptionViewItem &theOption, void drawHighlight( const QStyleOptionViewItem &theOption,
QPainter * thepPainter, QPainter * thepPainter,
int theHeight ) const; int theHeight ) const;
QStringList wordWrap( QString theString, QStringList wordWrap( QString theString,
QFontMetrics theMetrics, QFontMetrics theMetrics,
int theWidth ) const; int theWidth ) const;
void paintManually( QPainter * thePainter, void paintManually( QPainter * thePainter,
const QStyleOptionViewItem & theOption, const QStyleOptionViewItem & theOption,
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgsdetaileditemwidget.h   qgsdetaileditemwidget.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id:$ */
#ifndef QGSDETAILEDITEMWIDGET_H #ifndef QGSDETAILEDITEMWIDGET_H
#define QGSDETAILEDITEMWIDGET_H #define QGSDETAILEDITEMWIDGET_H
#include <ui_qgsdetaileditemwidgetbase.h> #include <ui_qgsdetaileditemwidgetbase.h>
#include <qgsdetaileditemdata.h> #include <qgsdetaileditemdata.h>
/** \ingroup gui /** \ingroup gui
* A widget renderer for detailed item views. * A widget renderer for detailed item views.
* @see also QgsDetailedItem and QgsDetailedItemData. * @see also QgsDetailedItem and QgsDetailedItemData.
*/ */
class QgsDetailedItemWidget : class QgsDetailedItemWidget :
public QWidget, private Ui::QgsDetailedItemWidgetBase public QWidget, private Ui::QgsDetailedItemWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsDetailedItemWidget( QWidget * parent = 0 ); QgsDetailedItemWidget( QWidget * parent = 0 );
~QgsDetailedItemWidget(); ~QgsDetailedItemWidget();
void setData( QgsDetailedItemData theData ); void setData( QgsDetailedItemData theData );
void setChecked( bool theFlag ); void setChecked( bool theFlag );
private: private:
QgsDetailedItemData mData; QgsDetailedItemData mData;
}; };
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 qgsdiagramrendererv2.h   qgsdiagramrendererv2.h 
/**************************************************************************
*
qgsdiagramrendererv2.h
---------------------
begin : March 2011
copyright : (C) 2011 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSDIAGRAMRENDERERV2_H #ifndef QGSDIAGRAMRENDERERV2_H
#define QGSDIAGRAMRENDERERV2_H #define QGSDIAGRAMRENDERERV2_H
#include <QColor> #include <QColor>
#include <QFont> #include <QFont>
#include <QList> #include <QList>
#include <QPointF> #include <QPointF>
#include <QSizeF> #include <QSizeF>
#include "qgsfeature.h" #include "qgsfeature.h"
#include "qgspallabeling.h" #include "qgspallabeling.h"
skipping to change at line 40 skipping to change at line 54
}; };
enum LinePlacementFlags enum LinePlacementFlags
{ {
OnLine = 1, OnLine = 1,
AboveLine = 2, AboveLine = 2,
BelowLine = 4, BelowLine = 4,
MapOrientation = 8 MapOrientation = 8
}; };
QgsDiagramLayerSettings(): placement( AroundPoint ), placementFlags( OnLi QgsDiagramLayerSettings()
ne ), priority( 5 ), obstacle( false ), dist( 0.0 ), renderer( 0 ), : placement( AroundPoint )
palLayer( 0 ), ct( 0 ), xform( 0 ), xPosColumn( -1 ), yPosColumn( -1 , placementFlags( OnLine )
) , priority( 5 )
, obstacle( false )
, dist( 0.0 )
, renderer( 0 )
, palLayer( 0 )
, ct( 0 )
, xform( 0 )
, xPosColumn( -1 )
, yPosColumn( -1 )
{ {
} }
//pal placement properties //pal placement properties
Placement placement; Placement placement;
LinePlacementFlags placementFlags; LinePlacementFlags placementFlags;
int priority; // 0 = low, 10 = high int priority; // 0 = low, 10 = high
bool obstacle; // whether it's an obstacle bool obstacle; // whether it's an obstacle
double dist; // distance from the feature (in mm) double dist; // distance from the feature (in mm)
QgsDiagramRendererV2* renderer; QgsDiagramRendererV2* renderer;
skipping to change at line 168 skipping to change at line 192
void setDiagramSettings( const QgsDiagramSettings& s ) { mSettings = s; } void setDiagramSettings( const QgsDiagramSettings& s ) { mSettings = s; }
QList<QgsDiagramSettings> diagramSettings() const; QList<QgsDiagramSettings> diagramSettings() const;
void readXML( const QDomElement& elem ); void readXML( const QDomElement& elem );
void writeXML( QDomElement& layerElem, QDomDocument& doc ) const; void writeXML( QDomElement& layerElem, QDomDocument& doc ) const;
protected: protected:
bool diagramSettings( const QgsAttributeMap&, const QgsRenderContext& c , QgsDiagramSettings& s ); bool diagramSettings( const QgsAttributeMap&, const QgsRenderContext& c , QgsDiagramSettings& s );
QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderC QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderC
ontext& c ) { return mSettings.size; } ontext& c )
{ Q_UNUSED( attributes ); Q_UNUSED( c ); return mSettings.size; }
private: private:
QgsDiagramSettings mSettings; QgsDiagramSettings mSettings;
}; };
class CORE_EXPORT QgsLinearlyInterpolatedDiagramRenderer: public QgsDiagram RendererV2 class CORE_EXPORT QgsLinearlyInterpolatedDiagramRenderer: public QgsDiagram RendererV2
{ {
public: public:
QgsLinearlyInterpolatedDiagramRenderer(); QgsLinearlyInterpolatedDiagramRenderer();
~QgsLinearlyInterpolatedDiagramRenderer(); ~QgsLinearlyInterpolatedDiagramRenderer();
 End of changes. 3 change blocks. 
6 lines changed or deleted 38 lines changed or added


 qgsdistancearea.h   qgsdistancearea.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2005 by Martin Dobias Copyright : (C) 2005 by Martin Dobias
email : won.der at centrum.sk email : won.der at centrum.sk
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSDISTANCEAREA_H #ifndef QGSDISTANCEAREA_H
#define QGSDISTANCEAREA_H #define QGSDISTANCEAREA_H
#include <QList> #include <QList>
#include "qgscoordinatetransform.h" #include "qgscoordinatetransform.h"
class QgsGeometry; class QgsGeometry;
/** \ingroup core /** \ingroup core
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsexception.h   qgsexception.h 
skipping to change at line 17 skipping to change at line 17
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSEXCEPTION_H #ifndef QGSEXCEPTION_H
#define QGSEXCEPTION_H #define QGSEXCEPTION_H
#include <QString> #include <QString>
/** \ingroup core /** \ingroup core
* Defines a qgis exception class. * Defines a qgis exception class.
*/ */
class CORE_EXPORT QgsException class CORE_EXPORT QgsException
{ {
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsfeature.h   qgsfeature.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2003 by Gary E.Sherman Copyright : (C) 2003 by Gary E.Sherman
email : sherman at mrcc.com email : sherman at mrcc.com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSFEATURE_H #ifndef QGSFEATURE_H
#define QGSFEATURE_H #define QGSFEATURE_H
#include <QMap> #include <QMap>
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
#include <QList> #include <QList>
#include <QHash>
class QgsGeometry; class QgsGeometry;
class QgsRectangle; class QgsRectangle;
class QgsFeature; class QgsFeature;
// key = field index, value = field value // feature id class (currently 64 bit)
typedef QMap<int, QVariant> QgsAttributeMap; #if 0
#include <limits>
// key = feature id, value = changed attributes class QgsFeatureId
typedef QMap<int, QgsAttributeMap> QgsChangedAttributesMap; {
public:
QgsFeatureId( qint64 id = 0 ) : mId( id ) {}
QgsFeatureId( QString str ) : mId( str.toLongLong() ) {}
QgsFeatureId &operator=( const QgsFeatureId &other ) { mId = other.mId;
return *this; }
QgsFeatureId &operator++() { mId++; return *this; }
QgsFeatureId operator++( int ) { QgsFeatureId pId = mId; ++( *this ); r
eturn pId; }
// key = feature id, value = changed geometry bool operator==( const QgsFeatureId &id ) const { return mId == id.mId;
typedef QMap<int, QgsGeometry> QgsGeometryMap; }
bool operator!=( const QgsFeatureId &id ) const { return mId != id.mId;
}
bool operator<( const QgsFeatureId &id ) const { return mId < id.mId; }
bool operator>( const QgsFeatureId &id ) const { return mId > id.mId; }
operator QString() const { return QString::number( mId ); }
// key = field index, value = field name bool isNew() const
typedef QMap<int, QString> QgsFieldNameMap; {
return mId < 0;
}
typedef QList<QgsFeature> QgsFeatureList; qint64 toLongLong() const
{
return mId;
}
private:
qint64 mId;
friend uint qHash( const QgsFeatureId &id );
};
inline uint qHash( const QgsFeatureId &id )
{
return qHash( id.mId );
}
#define FID_IS_NEW(fid) (fid).isNew()
#define FID_TO_NUMBER(fid) (fid).toLongLong()
#define FID_TO_STRING(fid) static_cast<QString>(fid)
#define STRING_TO_FID(str) QgsFeatureId(str)
#endif
// 64 bit feature ids
#if 1
typedef qint64 QgsFeatureId;
#define FID_IS_NEW(fid) (fid<0)
#define FID_TO_NUMBER(fid) static_cast<qint64>(fid)
#define FID_TO_STRING(fid) QString::number( fid )
#define STRING_TO_FID(str) (str).toLongLong()
#endif
// 32 bit feature ids
#if 0
typedef int QgsFeatureId;
#define FID_IS_NEW(fid) (fid<0)
#define FID_TO_NUMBER(fid) static_cast<int>(fid)
#define FID_TO_STRING(fid) QString::number( fid )
#define STRING_TO_FID(str) (str).toLong()
#endif
// key = field index, value = field value
typedef QMap<int, QVariant> QgsAttributeMap;
/** \ingroup core /** \ingroup core
* The feature class encapsulates a single feature including its id, * The feature class encapsulates a single feature including its id,
* geometry and a list of field/values attributes. * geometry and a list of field/values attributes.
* *
* @author Gary E.Sherman * @author Gary E.Sherman
*/ */
class CORE_EXPORT QgsFeature class CORE_EXPORT QgsFeature
{ {
public: public:
//! Constructor //! Constructor
QgsFeature( int id = 0, QString typeName = "" ); QgsFeature( QgsFeatureId id = QgsFeatureId(), QString typeName = "" );
/** copy ctor needed due to internal pointer */ /** copy ctor needed due to internal pointer */
QgsFeature( QgsFeature const & rhs ); QgsFeature( QgsFeature const & rhs );
/** assignment operator needed due to internal pointer */ /** assignment operator needed due to internal pointer */
QgsFeature & operator=( QgsFeature const & rhs ); QgsFeature & operator=( QgsFeature const & rhs );
//! Destructor //! Destructor
~QgsFeature(); ~QgsFeature();
/** /**
* Get the feature id for this feature * Get the feature id for this feature
* @return Feature id * @return Feature id
*/ */
int id() const; QgsFeatureId id() const;
/** /**
* Set the feature id for this feature * Set the feature id for this feature
* @param id Feature id * @param id Feature id
*/ */
void setFeatureId( int id ); void setFeatureId( QgsFeatureId id );
/** returns the feature's type name /** returns the feature's type name
*/ */
QString typeName() const; QString typeName() const;
/** sets the feature's type name /** sets the feature's type name
*/ */
void setTypeName( QString typeName ); void setTypeName( QString typeName );
/** /**
skipping to change at line 164 skipping to change at line 217
/** /**
* Set this feature's geometry from WKB * Set this feature's geometry from WKB
* *
* This feature assumes responsibility for destroying geom. * This feature assumes responsibility for destroying geom.
*/ */
void setGeometryAndOwnership( unsigned char * geom, size_t length ); void setGeometryAndOwnership( unsigned char * geom, size_t length );
private: private:
//! feature id //! feature id
int mFid; QgsFeatureId mFid;
/** map of attributes accessed by field index */ /** map of attributes accessed by field index */
QgsAttributeMap mAttributes; QgsAttributeMap mAttributes;
/** pointer to geometry in binary WKB format /** pointer to geometry in binary WKB format
This is usually set by a call to OGRGeometry::exportToWkb() This is usually set by a call to OGRGeometry::exportToWkb()
*/ */
QgsGeometry *mGeometry; QgsGeometry *mGeometry;
skipping to change at line 193 skipping to change at line 246
//! Flag to indicate if this feature is dirty (e.g. geometry has been m odified in-memory) //! Flag to indicate if this feature is dirty (e.g. geometry has been m odified in-memory)
// TODO: still applies? [MD] // TODO: still applies? [MD]
bool mDirty; bool mDirty;
/// feature type name /// feature type name
QString mTypeName; QString mTypeName;
}; // class QgsFeature }; // class QgsFeature
// key = feature id, value = changed attributes
typedef QMap<QgsFeatureId, QgsAttributeMap> QgsChangedAttributesMap;
// key = feature id, value = changed geometry
typedef QMap<QgsFeatureId, QgsGeometry> QgsGeometryMap;
typedef QSet<QgsFeatureId> QgsFeatureIds;
// key = field index, value = field name
typedef QMap<int, QString> QgsFieldNameMap;
typedef QList<QgsFeature> QgsFeatureList;
#endif #endif
 End of changes. 12 change blocks. 
14 lines changed or deleted 84 lines changed or added


 qgsfield.h   qgsfield.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2004 by Gary E.Sherman Copyright : (C) 2004 by Gary E.Sherman
email : sherman at mrcc.com email : sherman at mrcc.com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSFIELD_H #ifndef QGSFIELD_H
#define QGSFIELD_H #define QGSFIELD_H
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
/** \ingroup core /** \ingroup core
* Encapsulate a field in an attribute table or data source. * Encapsulate a field in an attribute table or data source.
* QgsField stores metadata about an attribute field, including name, type * QgsField stores metadata about an attribute field, including name, type
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsfieldvalidator.h   qgsfieldvalidator.h 
skipping to change at line 19 skipping to change at line 19
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSFIELDVALIDATOR_H #ifndef QGSFIELDVALIDATOR_H
#define QGSFIELDVALIDATOR_H #define QGSFIELDVALIDATOR_H
#include <QValidator> #include <QValidator>
#include <QVariant> #include <QVariant>
#include <QSettings> #include <QSettings>
#include "qgsfield.h" #include "qgsfield.h"
class GUI_EXPORT QgsFieldValidator : public QValidator class GUI_EXPORT QgsFieldValidator : public QValidator
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsfiledropedit.h   qgsfiledropedit.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2007 by Tom Elwertowski Copyright : (C) 2007 by Tom Elwertowski
Email : telwertowski at users dot sourceforge dot net Email : telwertowski at users dot sourceforge dot net
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSFILEDROPEDIT_H #ifndef QGSFILEDROPEDIT_H
#define QGSFILEDROPEDIT_H #define QGSFILEDROPEDIT_H
#include <QLineEdit> #include <QLineEdit>
/** \ingroup gui /** \ingroup gui
* A line edit for capturing file names that can have files dropped onto * A line edit for capturing file names that can have files dropped onto
* it via drag & drop. * it via drag & drop.
*/ */
class GUI_EXPORT QgsFileDropEdit: public QLineEdit class GUI_EXPORT QgsFileDropEdit: public QLineEdit
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsfillsymbollayerv2.h   qgsfillsymbollayerv2.h 
/**************************************************************************
*
qgsfillsymbollayerv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSFILLSYMBOLLAYERV2_H #ifndef QGSFILLSYMBOLLAYERV2_H
#define QGSFILLSYMBOLLAYERV2_H #define QGSFILLSYMBOLLAYERV2_H
#include "qgssymbollayerv2.h" #include "qgssymbollayerv2.h"
#define DEFAULT_SIMPLEFILL_COLOR QColor(0,0,255) #define DEFAULT_SIMPLEFILL_COLOR QColor(0,0,255)
#define DEFAULT_SIMPLEFILL_STYLE Qt::SolidPattern #define DEFAULT_SIMPLEFILL_STYLE Qt::SolidPattern
#define DEFAULT_SIMPLEFILL_BORDERCOLOR QColor(0,0,0) #define DEFAULT_SIMPLEFILL_BORDERCOLOR QColor(0,0,0)
#define DEFAULT_SIMPLEFILL_BORDERSTYLE Qt::SolidLine #define DEFAULT_SIMPLEFILL_BORDERSTYLE Qt::SolidLine
skipping to change at line 28 skipping to change at line 42
public: public:
QgsSimpleFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR, QgsSimpleFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR,
Qt::BrushStyle style = DEFAULT_SIMPLEFILL_S TYLE, Qt::BrushStyle style = DEFAULT_SIMPLEFILL_S TYLE,
QColor borderColor = DEFAULT_SIMPLEFILL_BOR DERCOLOR, QColor borderColor = DEFAULT_SIMPLEFILL_BOR DERCOLOR,
Qt::PenStyle borderStyle = DEFAULT_SIMPLEFI LL_BORDERSTYLE, Qt::PenStyle borderStyle = DEFAULT_SIMPLEFI LL_BORDERSTYLE,
double borderWidth = DEFAULT_SIMPLEFILL_BOR DERWIDTH ); double borderWidth = DEFAULT_SIMPLEFILL_BOR DERWIDTH );
// static stuff // static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q gsSymbolV2RenderContext& context ); void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q gsSymbolV2RenderContext& context );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
Qt::BrushStyle brushStyle() const { return mBrushStyle; } Qt::BrushStyle brushStyle() const { return mBrushStyle; }
void setBrushStyle( Qt::BrushStyle style ) { mBrushStyle = style; } void setBrushStyle( Qt::BrushStyle style ) { mBrushStyle = style; }
QColor borderColor() const { return mBorderColor; } QColor borderColor() const { return mBorderColor; }
void setBorderColor( QColor borderColor ) { mBorderColor = borderColor; } void setBorderColor( QColor borderColor ) { mBorderColor = borderColor; }
Qt::PenStyle borderStyle() const { return mBorderStyle; } Qt::PenStyle borderStyle() const { return mBorderStyle; }
void setBorderStyle( Qt::PenStyle borderStyle ) { mBorderStyle = border Style; } void setBorderStyle( Qt::PenStyle borderStyle ) { mBorderStyle = border Style; }
double borderWidth() const { return mBorderWidth; } double borderWidth() const { return mBorderWidth; }
skipping to change at line 70 skipping to change at line 87
QBrush mSelBrush; QBrush mSelBrush;
Qt::BrushStyle mBrushStyle; Qt::BrushStyle mBrushStyle;
QColor mBorderColor; QColor mBorderColor;
Qt::PenStyle mBorderStyle; Qt::PenStyle mBorderStyle;
double mBorderWidth; double mBorderWidth;
QPen mPen; QPen mPen;
QPointF mOffset; QPointF mOffset;
}; };
/**Base class for polygon renderers generating texture images*/
class CORE_EXPORT QgsImageFillSymbolLayer: public QgsFillSymbolLayerV2
{
public:
QgsImageFillSymbolLayer();
virtual ~QgsImageFillSymbolLayer();
void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q
gsSymbolV2RenderContext& context );
virtual QgsSymbolV2* subSymbol() { return mOutline; }
virtual bool setSubSymbol( QgsSymbolV2* symbol );
protected:
QBrush mBrush;
/**Outline width*/
double mOutlineWidth;
/**Custom outline*/
QgsLineSymbolV2* mOutline;
};
/**A class for svg fill patterns. The class automatically scales the patter n to /**A class for svg fill patterns. The class automatically scales the patter n to
the appropriate pixel dimensions of the output device*/ the appropriate pixel dimensions of the output device*/
class CORE_EXPORT QgsSVGFillSymbolLayer: public QgsFillSymbolLayerV2 class CORE_EXPORT QgsSVGFillSymbolLayer: public QgsImageFillSymbolLayer
{ {
public: public:
QgsSVGFillSymbolLayer( const QString& svgFilePath = "", double width = 20, double rotation = 0.0 ); QgsSVGFillSymbolLayer( const QString& svgFilePath = "", double width = 20, double rotation = 0.0 );
QgsSVGFillSymbolLayer( const QByteArray& svgData, double width = 20, do uble rotation = 0.0 ); QgsSVGFillSymbolLayer( const QByteArray& svgData, double width = 20, do uble rotation = 0.0 );
~QgsSVGFillSymbolLayer(); ~QgsSVGFillSymbolLayer();
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q
gsSymbolV2RenderContext& context );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
//getters and setters //getters and setters
void setSvgFilePath( const QString& svgPath ); void setSvgFilePath( const QString& svgPath );
QString svgFilePath() const { return mSvgFilePath; } QString svgFilePath() const { return mSvgFilePath; }
void setPatternWidth( double width ) { mPatternWidth = width;} void setPatternWidth( double width ) { mPatternWidth = width;}
double patternWidth() const { return mPatternWidth; } double patternWidth() const { return mPatternWidth; }
QgsSymbolV2* subSymbol() { return mOutline; } void setSvgFillColor( const QColor& c ) { mSvgFillColor = c; }
bool setSubSymbol( QgsSymbolV2* symbol ); QColor svgFillColor() const { return mSvgFillColor; }
void setSvgOutlineColor( const QColor& c ) { mSvgOutlineColor = c; }
QColor svgOutlineColor() const { return mSvgOutlineColor; }
void setSvgOutlineWidth( double w ) { mSvgOutlineWidth = w; }
double svgOutlineWidth() const { return mSvgOutlineWidth; }
protected: protected:
/**Width of the pattern (in QgsSymbolV2 output units)*/ /**Width of the pattern (in QgsSymbolV2 output units)*/
double mPatternWidth; double mPatternWidth;
/**SVG data*/ /**SVG data*/
QByteArray mSvgData; QByteArray mSvgData;
/**Path to the svg file (or empty if constructed directly from data)*/ /**Path to the svg file (or empty if constructed directly from data)*/
QString mSvgFilePath; QString mSvgFilePath;
/**SVG view box (to keep the aspect ratio */ /**SVG view box (to keep the aspect ratio */
QRectF mSvgViewBox; QRectF mSvgViewBox;
/**Brush that receives rendered pixel image in startRender() method*/
QBrush mBrush; //param(fill), param(outline), param(outline-width) are going
/**Outline width*/ //to be replaced in memory
double mOutlineWidth; QColor mSvgFillColor;
/**Custom outline*/ QColor mSvgOutlineColor;
QgsLineSymbolV2* mOutline; double mSvgOutlineWidth;
private: private:
/**Helper function that gets the view box from the byte array*/ /**Helper function that gets the view box from the byte array*/
void storeViewBox(); void storeViewBox();
void setDefaultSvgParams(); //fills mSvgFillColor, mSvgOutlineColor, mS
vgOutlineWidth with default values for mSvgFilePath
};
class CORE_EXPORT QgsLinePatternFillSymbolLayer: public QgsImageFillSymbolL
ayer
{
public:
QgsLinePatternFillSymbolLayer();
~QgsLinePatternFillSymbolLayer();
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt
ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context );
QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
//getters and setters
void setLineAngle( double a ) { mLineAngle = a; }
double lineAngle() const { return mLineAngle; }
void setDistance( double d ) { mDistance = d; }
double distance() const { return mDistance; }
void setLineWidth( double w ) { mLineWidth = w; }
double lineWidth() const { return mLineWidth; }
void setColor( const QColor& c ) { mColor = c; }
QColor color() const { return mColor; }
void setOffset( double offset ) { mOffset = offset; }
double offset() const { return mOffset; }
protected:
/**Distance (in mm or map units) between lines*/
double mDistance;
/**Line width (in mm or map units)*/
double mLineWidth;
QColor mColor;
/**Vector line angle in degrees (0 = horizontal, counterclockwise)*/
double mLineAngle;
/**Offset perpendicular to line direction*/
double mOffset;
};
class CORE_EXPORT QgsPointPatternFillSymbolLayer: public QgsImageFillSymbol
Layer
{
public:
QgsPointPatternFillSymbolLayer();
~QgsPointPatternFillSymbolLayer();
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt
ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context );
QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
//getters and setters
double distanceX() const { return mDistanceX; }
void setDistanceX( double d ) { mDistanceX = d; }
double distanceY() const { return mDistanceY; }
void setDistanceY( double d ) { mDistanceY = d; }
double displacementX() const { return mDisplacementX; }
void setDisplacementX( double d ) { mDisplacementX = d; }
double displacementY() const { return mDisplacementY; }
void setDisplacementY( double d ) { mDisplacementY = d; }
bool setSubSymbol( QgsSymbolV2* symbol );
virtual QgsSymbolV2* subSymbol() { return mMarkerSymbol; }
protected:
QgsMarkerSymbolV2* mMarkerSymbol;
double mDistanceX;
double mDistanceY;
double mDisplacementX;
double mDisplacementY;
}; };
class CORE_EXPORT QgsCentroidFillSymbolLayerV2 : public QgsFillSymbolLayerV 2 class CORE_EXPORT QgsCentroidFillSymbolLayerV2 : public QgsFillSymbolLayerV 2
{ {
public: public:
QgsCentroidFillSymbolLayerV2(); QgsCentroidFillSymbolLayerV2();
~QgsCentroidFillSymbolLayerV2(); ~QgsCentroidFillSymbolLayerV2();
// static stuff // static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q gsSymbolV2RenderContext& context ); void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q gsSymbolV2RenderContext& context );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
void setColor( const QColor& color ); void setColor( const QColor& color );
QgsSymbolV2* subSymbol(); QgsSymbolV2* subSymbol();
bool setSubSymbol( QgsSymbolV2* symbol ); bool setSubSymbol( QgsSymbolV2* symbol );
protected: protected:
QgsMarkerSymbolV2* mMarker; QgsMarkerSymbolV2* mMarker;
}; };
#endif #endif
 End of changes. 13 change blocks. 
12 lines changed or deleted 167 lines changed or added


 qgsformannotationitem.h   qgsformannotationitem.h 
skipping to change at line 22 skipping to change at line 22
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSFORMANNOTATIONITEM_H #ifndef QGSFORMANNOTATIONITEM_H
#define QGSFORMANNOTATIONITEM_H #define QGSFORMANNOTATIONITEM_H
#include "qgsannotationitem.h" #include "qgsannotationitem.h"
#include "qgsfeature.h"
#include <QObject> #include <QObject>
class QGraphicsProxyWidget; class QGraphicsProxyWidget;
/**An annotation item that embedds a designer form showing the feature attr ibute*/ /**An annotation item that embedds a designer form showing the feature attr ibute*/
class GUI_EXPORT QgsFormAnnotationItem: public QObject, public QgsAnnotatio nItem class GUI_EXPORT QgsFormAnnotationItem: public QObject, public QgsAnnotatio nItem
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsFormAnnotationItem( QgsMapCanvas* canvas, QgsVectorLayer* vlayer = 0 , bool hasFeature = false, int feature = 0 ); QgsFormAnnotationItem( QgsMapCanvas* canvas, QgsVectorLayer* vlayer = 0 , bool hasFeature = false, int feature = 0 );
skipping to change at line 68 skipping to change at line 69
void updateVisibility(); void updateVisibility();
private: private:
QGraphicsProxyWidget* mWidgetContainer; QGraphicsProxyWidget* mWidgetContainer;
QWidget* mDesignerWidget; QWidget* mDesignerWidget;
/**Associated vectorlayer (or 0 if attributes are not supposed to be re placed)*/ /**Associated vectorlayer (or 0 if attributes are not supposed to be re placed)*/
QgsVectorLayer* mVectorLayer; QgsVectorLayer* mVectorLayer;
/**True if the item is related to a vector feature*/ /**True if the item is related to a vector feature*/
bool mHasAssociatedFeature; bool mHasAssociatedFeature;
/**Associated feature*/ /**Associated feature*/
int mFeature; QgsFeatureId mFeature;
/**Path to (and including) the .ui file*/ /**Path to (and including) the .ui file*/
QString mDesignerForm; QString mDesignerForm;
QWidget* createDesignerWidget( const QString& filePath ); QWidget* createDesignerWidget( const QString& filePath );
}; };
#endif // QGSFORMANNOTATIONITEM_H #endif // QGSFORMANNOTATIONITEM_H
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 qgsfreakoutshader.h   qgsfreakoutshader.h 
skipping to change at line 47 skipping to change at line 47
/** \brief generates and new RGB value based on original RGB value */ /** \brief generates and new RGB value based on original RGB value */
bool shade( double, double, double, int*, int*, int* ); bool shade( double, double, double, int*, int*, int* );
/** \brief Set the maximum value */ /** \brief Set the maximum value */
void setMaximumValue( double ); void setMaximumValue( double );
/** \brief Return the minimum value */ /** \brief Return the minimum value */
void setMinimumValue( double ); void setMinimumValue( double );
double classBreakMin1() const { return mClassBreakMin1; }
double classBreakMax1() const { return mClassBreakMax1; }
double classBreakMin2() const { return mClassBreakMin2; }
double classBreakMax2() const { return mClassBreakMax2; }
double classBreakMin3() const { return mClassBreakMin3; }
private: private:
void setClassBreaks(); void setClassBreaks();
double mBreakSize; double mBreakSize;
double mClassBreakMin1; double mClassBreakMin1;
double mClassBreakMax1; double mClassBreakMax1;
double mClassBreakMin2; double mClassBreakMin2;
double mClassBreakMax2; double mClassBreakMax2;
double mClassBreakMin3; double mClassBreakMin3;
}; };
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added


 qgsgenericprojectionselector.h   qgsgenericprojectionselector.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSGENERICPROJECTIONSELECTOR_H #ifndef QGSGENERICPROJECTIONSELECTOR_H
#define QGSGENERICPROJECTIONSELECTOR_H #define QGSGENERICPROJECTIONSELECTOR_H
#include <ui_qgsgenericprojectionselectorbase.h> #include <ui_qgsgenericprojectionselectorbase.h>
#include <qgisgui.h> #include <qgisgui.h>
#include <QSet> #include <QSet>
/** /**
* \ingroup gui * \ingroup gui
* A generic dialog to prompt the user for a Coordinate Reference System. * A generic dialog to prompt the user for a Coordinate Reference System.
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsgeometry.h   qgsgeometry.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2005 by Brendan Morley Copyright : (C) 2005 by Brendan Morley
email : morb at ozemail dot com dot au email : morb at ozemail dot com dot au
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSGEOMETRY_H #ifndef QGSGEOMETRY_H
#define QGSGEOMETRY_H #define QGSGEOMETRY_H
#include <QString> #include <QString>
#include <QVector> #include <QVector>
#include "qgis.h" #include "qgis.h"
#include <geos_c.h> #include <geos_c.h>
skipping to change at line 241 skipping to change at line 240
* @param point Specifiest the point for search * @param point Specifiest the point for search
* @param atVertex Receives index of the closest vertex * @param atVertex Receives index of the closest vertex
* @return The squared cartesian distance is also returned in sqrDist, negative number on error * @return The squared cartesian distance is also returned in sqrDist, negative number on error
*/ */
double closestVertexWithContext( const QgsPoint& point, int& atVertex ) ; double closestVertexWithContext( const QgsPoint& point, int& atVertex ) ;
/** /**
* Searches for the closest segment of geometry to the given point * Searches for the closest segment of geometry to the given point
* @param point Specifies the point for search * @param point Specifies the point for search
* @param minDistPoint Receives the nearest point on the segment * @param minDistPoint Receives the nearest point on the segment
* @param beforeVertex Receives index of the vertex before the closest * @param afterVertex Receives index of the vertex after the closest se
segment. The vertex gment. The vertex
* after the closest segment is always beforeVertex + 1 * before the closest segment is always afterVertex - 1
* @param leftOf Out: Returns if the point lies on the left of right si
de of the segment ( < 0 means left, > 0 means right )
* @param epsilon epsilon for segment snapping (added in 1.8)
* @return The squared cartesian distance is also returned in sqrDist, negative number on error * @return The squared cartesian distance is also returned in sqrDist, negative number on error
*/ */
double closestSegmentWithContext( const QgsPoint& point, QgsPoint& minD istPoint, int& beforeVertex ); double closestSegmentWithContext( const QgsPoint& point, QgsPoint& minD istPoint, int& afterVertex, double* leftOf = 0, double epsilon = DEFAULT_SE GMENT_EPSILON );
/**Adds a new ring to this geometry. This makes only sense for polygon and multipolygons. /**Adds a new ring to this geometry. This makes only sense for polygon and multipolygons.
@return 0 in case of success (ring added), 1 problem with geometry typ e, 2 ring not closed, @return 0 in case of success (ring added), 1 problem with geometry typ e, 2 ring not closed,
3 ring is not valid geometry, 4 ring not disjoint with existing rings, 5 no polygon found which contained the ring*/ 3 ring is not valid geometry, 4 ring not disjoint with existing rings, 5 no polygon found which contained the ring*/
int addRing( const QList<QgsPoint>& ring ); int addRing( const QList<QgsPoint>& ring );
/**Adds a new island polygon to a multipolygon feature /**Adds a new island polygon to a multipolygon feature
@return 0 in case of success, 1 if not a multipolygon, 2 if ring is no t a valid geometry, 3 if new polygon ring @return 0 in case of success, 1 if not a multipolygon, 2 if ring is no t a valid geometry, 3 if new polygon ring
not disjoint with existing polygons of the feature*/ not disjoint with existing polygons of the feature*/
int addIsland( const QList<QgsPoint>& ring ); int addPart( const QList<QgsPoint> &points );
Q_DECL_DEPRECATED int addIsland( const QList<QgsPoint> &points ) { retu
rn addPart( points ); }
/**Translate this geometry by dx, dy /**Translate this geometry by dx, dy
@return 0 in case of success*/ @return 0 in case of success*/
int translate( double dx, double dy ); int translate( double dx, double dy );
/**Transform this geometry as described by CoordinateTranasform ct /**Transform this geometry as described by CoordinateTranasform ct
@return 0 in case of success*/ @return 0 in case of success*/
int transform( const QgsCoordinateTransform& ct ); int transform( const QgsCoordinateTransform& ct );
/**Splits this geometry according to a given line. Note that the geomet ry is only split once. If there are several intersections /**Splits this geometry according to a given line. Note that the geomet ry is only split once. If there are several intersections
skipping to change at line 361 skipping to change at line 363
QgsGeometry* difference( QgsGeometry* geometry ); QgsGeometry* difference( QgsGeometry* geometry );
/** Returns a Geometry representing the points making up this Geometry that do not make up other. */ /** Returns a Geometry representing the points making up this Geometry that do not make up other. */
QgsGeometry* symDifference( QgsGeometry* geometry ); QgsGeometry* symDifference( QgsGeometry* geometry );
/** Exports the geometry to mWkt /** Exports the geometry to mWkt
@return true in case of success and false else @return true in case of success and false else
*/ */
QString exportToWkt(); QString exportToWkt();
/** Exports the geometry to mGeoJSON
@return true in case of success and false else
*/
QString exportToGeoJSON();
/* Accessor functions for getting geometry data */ /* Accessor functions for getting geometry data */
/** return contents of the geometry as a point /** return contents of the geometry as a point
if wkbType is WKBPoint, otherwise returns [0,0] */ if wkbType is WKBPoint, otherwise returns [0,0] */
QgsPoint asPoint(); QgsPoint asPoint();
/** return contents of the geometry as a polyline /** return contents of the geometry as a polyline
if wkbType is WKBLineString, otherwise an empty list */ if wkbType is WKBLineString, otherwise an empty list */
QgsPolyline asPolyline(); QgsPolyline asPolyline();
skipping to change at line 422 skipping to change at line 429
* @note added in 1.5 * @note added in 1.5
*/ */
int avoidIntersections(); int avoidIntersections();
class Error class Error
{ {
QString message; QString message;
QgsPoint location; QgsPoint location;
bool hasLocation; bool hasLocation;
public: public:
Error() : message( "none" ), hasLocation( false ) {}
Error( QString m ) : message( m ), hasLocation( false ) {} Error( QString m ) : message( m ), hasLocation( false ) {}
Error( QString m, QgsPoint p ) : message( m ), location( p ), hasLo cation( true ) {} Error( QString m, QgsPoint p ) : message( m ), location( p ), hasLo cation( true ) {}
QString what() { return message; }; QString what() { return message; };
QgsPoint where() { return location; } QgsPoint where() { return location; }
bool hasWhere() { return hasLocation; } bool hasWhere() { return hasLocation; }
}; };
/** Validate geometry and produce a list of geometry errors /** Validate geometry and produce a list of geometry errors
* @note added in 1.5 * @note added in 1.5
**/ **/
void validateGeometry( QList<Error> &errors ); void validateGeometry( QList<Error> &errors );
static void validatePolyline( QList<Error> &errors, int i, QgsPolyline
polyline, bool ring = false );
static void validatePolygon( QList<Error> &errors, int i, const QgsPoly
gon &polygon );
private: private:
// Private variables // Private variables
// All of these are mutable since there may be on-the-fly // All of these are mutable since there may be on-the-fly
// conversions between WKB, GEOS and Wkt; // conversions between WKB, GEOS and Wkt;
// However the intent is the const functions do not // However the intent is the const functions do not
// semantically change the value that this object represents. // semantically change the value that this object represents.
/** pointer to geometry in binary WKB format /** pointer to geometry in binary WKB format
This is the class' native implementation This is the class' native implementation
skipping to change at line 520 skipping to change at line 525
@param newGeometries new geometries if splitting was successful @param newGeometries new geometries if splitting was successful
@return 0 in case of success, 1 if geometry has not been split, error else*/ @return 0 in case of success, 1 if geometry has not been split, error else*/
int splitLinearGeometry( GEOSGeometry *splitLine, QList<QgsGeometry*>& newGeometries ); int splitLinearGeometry( GEOSGeometry *splitLine, QList<QgsGeometry*>& newGeometries );
/**Splits polygon/multipolygon geometries /**Splits polygon/multipolygon geometries
@return 0 in case of success, 1 if geometry has not been split, erro r else*/ @return 0 in case of success, 1 if geometry has not been split, erro r else*/
int splitPolygonGeometry( GEOSGeometry *splitLine, QList<QgsGeometry*>& newGeometries ); int splitPolygonGeometry( GEOSGeometry *splitLine, QList<QgsGeometry*>& newGeometries );
/**Finds out the points that need to be tested for topological correctn es if this geometry will be split /**Finds out the points that need to be tested for topological correctn es if this geometry will be split
@return 0 in case of success*/ @return 0 in case of success*/
int topologicalTestPointsSplit( const GEOSGeometry* splitLine, QList<Qg sPoint>& testPoints ) const; int topologicalTestPointsSplit( const GEOSGeometry* splitLine, QList<Qg sPoint>& testPoints ) const;
/**Creates a new line from an original line and a reshape line. The par t of the input line from the first to the last intersection with the \ /**Creates a new line from an original line and a reshape line. The par t of the input line from the first to the last intersection with the
reshape line will be replaced. The calling function takes ownership of the result. reshape line will be replaced. The calling function takes ownership of the result.
@param origLine the original line @param origLine the original line
@param reshapeLineGeos the reshape line @param reshapeLineGeos the reshape line
@return the reshaped line or 0 in case of error*/ @return the reshaped line or 0 in case of error*/
static GEOSGeometry* reshapeLine( const GEOSGeometry* origLine, const G EOSGeometry* reshapeLineGeos ); static GEOSGeometry* reshapeLine( const GEOSGeometry* origLine, const G EOSGeometry* reshapeLineGeos );
/**Creates a new polygon replacing the part from the first to the secon d intersection with the reshape line. As a polygon ring is always closed, /**Creates a new polygon replacing the part from the first to the secon d intersection with the reshape line. As a polygon ring is always closed,
the method keeps the longer part of the existing boundary the method keeps the longer part of the existing boundary
@param polygon geometry to reshape @param polygon geometry to reshape
@param reshapeLineGeos the reshape line @param reshapeLineGeos the reshape line
skipping to change at line 565 skipping to change at line 570
/** return point from wkb */ /** return point from wkb */
QgsPoint asPoint( unsigned char*& ptr, bool hasZValue ); QgsPoint asPoint( unsigned char*& ptr, bool hasZValue );
/** return polyline from wkb */ /** return polyline from wkb */
QgsPolyline asPolyline( unsigned char*& ptr, bool hasZValue ); QgsPolyline asPolyline( unsigned char*& ptr, bool hasZValue );
/** return polygon from wkb */ /** return polygon from wkb */
QgsPolygon asPolygon( unsigned char*& ptr, bool hasZValue ); QgsPolygon asPolygon( unsigned char*& ptr, bool hasZValue );
static void checkRingIntersections( QList<Error> &errors,
int p0, int i0, const QgsPolyline &
ring0,
int p1, int i1, const QgsPolyline &
ring1 );
static bool geosRelOp( char( *op )( const GEOSGeometry*, const GEOSGeom etry * ), static bool geosRelOp( char( *op )( const GEOSGeometry*, const GEOSGeom etry * ),
QgsGeometry *a, QgsGeometry *b ); QgsGeometry *a, QgsGeometry *b );
/**Returns < 0 if point(x/y) is left of the line x1,y1 -> x1,y2*/
double leftOf( double x, double y, double& x1, double& y1, double& x2,
double& y2 );
static int refcount; static int refcount;
}; // class QgsGeometry }; // class QgsGeometry
#endif #endif
 End of changes. 10 change blocks. 
18 lines changed or deleted 21 lines changed or added


 qgsgeometryanalyzer.h   qgsgeometryanalyzer.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgis.h 9774 2008-12-12 05:41:24Z timlinux $ */
#ifndef QGSGEOMETRYANALYZERH #ifndef QGSGEOMETRYANALYZERH
#define QGSGEOMETRYANALYZERH #define QGSGEOMETRYANALYZERH
#include "qgsvectorlayer.h" #include "qgsvectorlayer.h"
#include "qgsfield.h" #include "qgsfield.h"
#include "qgsfeature.h" #include "qgsfeature.h"
#include "qgsgeometry.h" #include "qgsgeometry.h"
#include "qgsfield.h" #include "qgsfield.h"
#include "qgsdistancearea.h" #include "qgsdistancearea.h"
skipping to change at line 103 skipping to change at line 102
@param layer input vector layer @param layer input vector layer
@param shapefileName path to the output shp @param shapefileName path to the output shp
@param onlySelectedFeatures if true, only selected features are consi dered, else all the features @param onlySelectedFeatures if true, only selected features are consi dered, else all the features
@param uniqueIdField index of the attribute field that contains the u nique id to dissolve on (or -1 if @param uniqueIdField index of the attribute field that contains the u nique id to dissolve on (or -1 if
all features should be dissolved together) all features should be dissolved together)
@param p progress dialog (or 0 if no progress dialog is to be shown) @param p progress dialog (or 0 if no progress dialog is to be shown)
@note: added in version 1.4*/ @note: added in version 1.4*/
bool dissolve( QgsVectorLayer* layer, const QString& shapefileName, boo l onlySelectedFeatures = false, bool dissolve( QgsVectorLayer* layer, const QString& shapefileName, boo l onlySelectedFeatures = false,
int uniqueIdField = -1, QProgressDialog* p = 0 ); int uniqueIdField = -1, QProgressDialog* p = 0 );
/**Creates an event layer (multipoint or multiline) by locating feature
s from a (non-spatial) event table along the features of a line layer.
Note that currently (until QgsGeometry supports m-values) the z-coo
rdinate of the line layer is used for linear referencing
@param lineLayer layer with the line geometry
@param eventLayer layer with features and location field
@param lineField join index in line layer
@param eventField join index in event layer
@param outputLayer name of output file (can be empty if a memory laye
r is used)
@param outputFormat name of output format (can be empty if a memory p
rovider is used to store the results)
@param unlocatedFeatureIds out: ids of event features where linear re
ferencing was not successful
@param locationField1 attribute index of location field in event laye
r
@param locationField2 attribute index of location end field (or -1 fo
r point layer)
@param offsetField attribute index for offset field. Negative offset
value = offset to left side, positive value = offset to right side
@param offsetScale factor to scale offset
@param forceSingleGeometry force layer to single point/line type. Fea
ture attributes are copied in case of multiple matches
@param memoryProvider memory provider to write output to (can be 0 if
output is written to a file)
@param p progress dialog or 0 if no progress dialog should be shown
*/
bool eventLayer( QgsVectorLayer* lineLayer, QgsVectorLayer* eventLayer,
int lineField, int eventField, QList<int>& unlocatedFeatureIds, const QStr
ing& outputLayer,
const QString& outputFormat, int locationField1, int l
ocationField2 = -1, int offsetField = -1, double offsetScale = 1.0,
bool forceSingleGeometry = false, QgsVectorDataProvide
r* memoryProvider = 0, QProgressDialog* p = 0 );
/**Returns linear reference geometry as a multiline (or 0 if no match).
Currently, the z-coordinates are considered to be the measures (no support
for m-values in QGIS)*/
QgsGeometry* locateBetweenMeasures( double fromMeasure, double toMeasur
e, QgsGeometry* lineGeom );
/**Returns linear reference geometry. Unlike the PostGIS function, this
method always returns multipoint or 0 if no match (not geometry collection
).
Currently, the z-coordinates are considered to be the measures (no su
pport for m-values in QGIS)*/
QgsGeometry* locateAlongMeasure( double measure, QgsGeometry* lineGeom
);
private: private:
QList<double> simpleMeasure( QgsGeometry* geometry ); QList<double> simpleMeasure( QgsGeometry* geometry );
double perimeterMeasure( QgsGeometry* geometry, QgsDistanceArea& measur e ); double perimeterMeasure( QgsGeometry* geometry, QgsDistanceArea& measur e );
/**Helper function to simplify an individual feature*/ /**Helper function to simplify an individual feature*/
void simplifyFeature( QgsFeature& f, QgsVectorFileWriter* vfw, double t olerance ); void simplifyFeature( QgsFeature& f, QgsVectorFileWriter* vfw, double t olerance );
/**Helper function to get the cetroid of an individual feature*/ /**Helper function to get the cetroid of an individual feature*/
void centroidFeature( QgsFeature& f, QgsVectorFileWriter* vfw ); void centroidFeature( QgsFeature& f, QgsVectorFileWriter* vfw );
/**Helper function to buffer an individual feature*/ /**Helper function to buffer an individual feature*/
void bufferFeature( QgsFeature& f, int nProcessedFeatures, QgsVectorFil eWriter* vfw, bool dissolve, QgsGeometry** dissolveGeometry, void bufferFeature( QgsFeature& f, int nProcessedFeatures, QgsVectorFil eWriter* vfw, bool dissolve, QgsGeometry** dissolveGeometry,
double bufferDistance, int bufferDistanceField ); double bufferDistance, int bufferDistanceField );
/**Helper function to get the convex hull of feature(s)*/ /**Helper function to get the convex hull of feature(s)*/
void convexFeature( QgsFeature& f, int nProcessedFeatures, QgsGeometry* * dissolveGeometry ); void convexFeature( QgsFeature& f, int nProcessedFeatures, QgsGeometry* * dissolveGeometry );
/**Helper function to dissolve feature(s)*/ /**Helper function to dissolve feature(s)*/
void dissolveFeature( QgsFeature& f, int nProcessedFeatures, QgsGeometr y** dissolveGeometry ); void dissolveFeature( QgsFeature& f, int nProcessedFeatures, QgsGeometr y** dissolveGeometry );
//helper functions for event layer
void addEventLayerFeature( QgsFeature& feature, QgsGeometry* geom, QgsG
eometry* lineGeom, QgsVectorFileWriter* fileWriter, QgsFeatureList& memoryF
eatures, int offsetField = -1, double offsetScale = 1.0,
bool forceSingleType = false );
/**Create geometry offset relative to line geometry.
@param geom the geometry to modify
@param lineGeom the line geometry to which the feature is reference
d
@param offset the offset value in layer unit. Negative values mean
offset towards left, positive values offset to the right side*/
void createOffsetGeometry( QgsGeometry* geom, QgsGeometry* lineGeom, do
uble offset );
QgsPoint createPointOffset( double x, double y, double dist, QgsGeometr
y* lineGeom ) const;
unsigned char* locateBetweenWkbString( unsigned char* ptr, QgsMultiPoly
line& result, double fromMeasure, double toMeasure );
unsigned char* locateAlongWkbString( unsigned char* ptr, QgsMultiPoint&
result, double measure );
static bool clipSegmentByRange( double x1, double y1, double m1, double
x2, double y2, double m2, double range1, double range2, QgsPoint& pt1, Qgs
Point& pt2, bool& secondPointClipped );
static void locateAlongSegment( double x1, double y1, double m1, double
x2, double y2, double m2, double measure, bool& pt1Ok, QgsPoint& pt1, bool
& pt2Ok, QgsPoint& pt2 );
}; };
#endif //QGSVECTORANALYZER #endif //QGSVECTORANALYZER
 End of changes. 3 change blocks. 
1 lines changed or deleted 73 lines changed or added


 qgsgpsconnection.h   qgsgpsconnection.h 
skipping to change at line 23 skipping to change at line 23
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSGPSCONNECTION_H #ifndef QGSGPSCONNECTION_H
#define QGSGPSCONNECTION_H #define QGSGPSCONNECTION_H
#include <QDateTime> #include <QDateTime>
#include <QObject> #include <QObject>
#include <QString>
class QIODevice; class QIODevice;
struct CORE_EXPORT QgsSatelliteInfo struct CORE_EXPORT QgsSatelliteInfo
{ {
int id; int id;
bool inUse; bool inUse;
int elevation; int elevation;
int azimuth; int azimuth;
int signal; int signal;
skipping to change at line 46 skipping to change at line 47
{ {
double latitude; double latitude;
double longitude; double longitude;
double elevation; double elevation;
double speed; //in km/h double speed; //in km/h
double direction; double direction;
QList<QgsSatelliteInfo> satellitesInView; QList<QgsSatelliteInfo> satellitesInView;
double pdop; double pdop;
double hdop; double hdop;
double vdop; double vdop;
double hacc; //horizontal accurancy in meters
double vacc; //vertical accurancy in meters
QDateTime utcDateTime; QDateTime utcDateTime;
QChar fixMode;
int fixType;
int quality; // from GPGGA
int satellitesUsed; // from GPGGA
QChar status; // from GPRMC A,V
QList<int>satPrn; // list of SVs in use; needed for QgsSatelliteInfo.inUs
e and other uses
bool satInfoComplete; // based on GPGSV sentences - to be used to determ
ine when to graph signal and satellite position
}; };
/**Abstract base class for connection to a GPS device*/ /**Abstract base class for connection to a GPS device*/
class CORE_EXPORT QgsGPSConnection : public QObject class CORE_EXPORT QgsGPSConnection : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
enum Status enum Status
{ {
skipping to change at line 84 skipping to change at line 94
void setSource( QIODevice* source ); void setSource( QIODevice* source );
/**Returns the status. Possible state are not connected, connected, dat a received*/ /**Returns the status. Possible state are not connected, connected, dat a received*/
Status status() const { return mStatus; } Status status() const { return mStatus; }
/**Returns the current gps information (lat, lon, etc.)*/ /**Returns the current gps information (lat, lon, etc.)*/
QgsGPSInformation currentGPSInformation() const { return mLastGPSInform ation; } QgsGPSInformation currentGPSInformation() const { return mLastGPSInform ation; }
signals: signals:
void stateChanged( const QgsGPSInformation& info ); void stateChanged( const QgsGPSInformation& info );
void nmeaSentenceReceived( const QString& substring ); // added to cap ture 'raw' data
protected: protected:
/**Data source (e.g. serial device, socket, file,...)*/ /**Data source (e.g. serial device, socket, file,...)*/
QIODevice* mSource; QIODevice* mSource;
/**Last state of the gps related variables (e.g. position, time, ...)*/ /**Last state of the gps related variables (e.g. position, time, ...)*/
QgsGPSInformation mLastGPSInformation; QgsGPSInformation mLastGPSInformation;
/**Connection status*/ /**Connection status*/
Status mStatus; Status mStatus;
private: private:
 End of changes. 4 change blocks. 
0 lines changed or deleted 13 lines changed or added


 qgsgraduatedsymbolrenderer.h   qgsgraduatedsymbolrenderer.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgsgraduatedsymbolrenderer.h 5371 2006-04-25 01:52:13Z wonder $ */
#ifndef QGSGRADUATEDSYMBOLRENDERER_H #ifndef QGSGRADUATEDSYMBOLRENDERER_H
#define QGSGRADUATEDSYMBOLRENDERER_H #define QGSGRADUATEDSYMBOLRENDERER_H
#include "qgsrenderer.h" #include "qgsrenderer.h"
class QgsVectorLayer; class QgsVectorLayer;
/**This class contains the information for graduate symbol rendering*/ /**This class contains the information for graduate symbol rendering*/
class CORE_EXPORT QgsGraduatedSymbolRenderer: public QgsRenderer class CORE_EXPORT QgsGraduatedSymbolRenderer: public QgsRenderer
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsgraduatedsymbolrendererv2.h   qgsgraduatedsymbolrendererv2.h 
/**************************************************************************
*
qgsgraduatedsymbolrendererv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSGRADUATEDSYMBOLRENDERERV2_H #ifndef QGSGRADUATEDSYMBOLRENDERERV2_H
#define QGSGRADUATEDSYMBOLRENDERERV2_H #define QGSGRADUATEDSYMBOLRENDERERV2_H
#include "qgssymbolv2.h"
#include "qgsrendererv2.h" #include "qgsrendererv2.h"
class CORE_EXPORT QgsRendererRangeV2 class CORE_EXPORT QgsRendererRangeV2
{ {
public: public:
QgsRendererRangeV2( double lowerValue, double upperValue, QgsSymbolV2* symbol, QString label ); QgsRendererRangeV2( double lowerValue, double upperValue, QgsSymbolV2* symbol, QString label );
QgsRendererRangeV2( const QgsRendererRangeV2& range ); QgsRendererRangeV2( const QgsRendererRangeV2& range );
~QgsRendererRangeV2(); ~QgsRendererRangeV2();
skipping to change at line 28 skipping to change at line 43
QString label() const; QString label() const;
void setSymbol( QgsSymbolV2* s ); void setSymbol( QgsSymbolV2* s );
void setLabel( QString label ); void setLabel( QString label );
void setLowerValue( double lowerValue ); void setLowerValue( double lowerValue );
void setUpperValue( double upperValue ); void setUpperValue( double upperValue );
// debugging // debugging
QString dump(); QString dump();
void toSld( QDomDocument& doc, QDomElement &element, QgsStringMap props
) const;
protected: protected:
double mLowerValue, mUpperValue; double mLowerValue, mUpperValue;
QgsSymbolV2* mSymbol; QgsSymbolV2* mSymbol;
QString mLabel; QString mLabel;
}; };
typedef QList<QgsRendererRangeV2> QgsRangeList; typedef QList<QgsRendererRangeV2> QgsRangeList;
class QgsVectorLayer; class QgsVectorLayer;
class QgsVectorColorRampV2; class QgsVectorColorRampV2;
skipping to change at line 58 skipping to change at line 75
virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer ); virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer );
virtual void stopRender( QgsRenderContext& context ); virtual void stopRender( QgsRenderContext& context );
virtual QList<QString> usedAttributes(); virtual QList<QString> usedAttributes();
virtual QString dump(); virtual QString dump();
virtual QgsFeatureRendererV2* clone(); virtual QgsFeatureRendererV2* clone();
virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
//! returns bitwise OR-ed capabilities of the renderer
//! \note added in 2.0
virtual int capabilities() { return SymbolLevels | RotationField; }
virtual QgsSymbolV2List symbols(); virtual QgsSymbolV2List symbols();
QString classAttribute() const { return mAttrName; } QString classAttribute() const { return mAttrName; }
void setClassAttribute( QString attr ) { mAttrName = attr; } void setClassAttribute( QString attr ) { mAttrName = attr; }
const QgsRangeList& ranges() { return mRanges; } const QgsRangeList& ranges() { return mRanges; }
bool updateRangeSymbol( int rangeIndex, QgsSymbolV2* symbol ); bool updateRangeSymbol( int rangeIndex, QgsSymbolV2* symbol );
bool updateRangeLabel( int rangeIndex, QString label ); bool updateRangeLabel( int rangeIndex, QString label );
bool updateRangeUpperValue( int rangeIndex, double value ); bool updateRangeUpperValue( int rangeIndex, double value );
skipping to change at line 113 skipping to change at line 136
//! return a list of item text / symbol //! return a list of item text / symbol
//! @note: this method was added in version 1.5 //! @note: this method was added in version 1.5
virtual QgsLegendSymbolList legendSymbolItems(); virtual QgsLegendSymbolList legendSymbolItems();
QgsSymbolV2* sourceSymbol(); QgsSymbolV2* sourceSymbol();
void setSourceSymbol( QgsSymbolV2* sym ); void setSourceSymbol( QgsSymbolV2* sym );
QgsVectorColorRampV2* sourceColorRamp(); QgsVectorColorRampV2* sourceColorRamp();
void setSourceColorRamp( QgsVectorColorRampV2* ramp ); void setSourceColorRamp( QgsVectorColorRampV2* ramp );
/** Update the color ramp used. Also updates all symbols colors.
* Doesn't alter current breaks.
*/
void updateColorRamp( QgsVectorColorRampV2* ramp );
/** Update the all symbols but leave breaks and colors. */
void updateSymbols( QgsSymbolV2* sym );
//! @note added in 1.6 //! @note added in 1.6
void setRotationField( QString fieldName ) { mRotationField = fieldName ; } void setRotationField( QString fieldName ) { mRotationField = fieldName ; }
//! @note added in 1.6 //! @note added in 1.6
QString rotationField() const { return mRotationField; } QString rotationField() const { return mRotationField; }
//! @note added in 1.6 //! @note added in 1.6
void setSizeScaleField( QString fieldName ) { mSizeScaleField = fieldNa me; } void setSizeScaleField( QString fieldName ) { mSizeScaleField = fieldNa me; }
//! @note added in 1.6 //! @note added in 1.6
QString sizeScaleField() const { return mSizeScaleField; } QString sizeScaleField() const { return mSizeScaleField; }
 End of changes. 5 change blocks. 
0 lines changed or deleted 41 lines changed or added


 qgsgraduatedsymbolrendererv2widget.h   qgsgraduatedsymbolrendererv2widget.h 
/**************************************************************************
*
qgsgraduatedsymbolrendererv2widget.h
---------------------
begin : December 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSGRADUATEDSYMBOLRENDERERV2WIDGET_H #ifndef QGSGRADUATEDSYMBOLRENDERERV2WIDGET_H
#define QGSGRADUATEDSYMBOLRENDERERV2WIDGET_H #define QGSGRADUATEDSYMBOLRENDERERV2WIDGET_H
#include "qgsgraduatedsymbolrendererv2.h"
#include "qgsrendererv2widget.h" #include "qgsrendererv2widget.h"
#include <QStandardItem> #include <QStandardItem>
class QgsGraduatedSymbolRendererV2;
#include "ui_qgsgraduatedsymbolrendererv2widget.h" #include "ui_qgsgraduatedsymbolrendererv2widget.h"
class GUI_EXPORT QgsGraduatedSymbolRendererV2Widget : public QgsRendererV2W idget, private Ui::QgsGraduatedSymbolRendererV2Widget class GUI_EXPORT QgsGraduatedSymbolRendererV2Widget : public QgsRendererV2W idget, private Ui::QgsGraduatedSymbolRendererV2Widget
{ {
Q_OBJECT Q_OBJECT
public: public:
static QgsRendererV2Widget* create( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer ); static QgsRendererV2Widget* create( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer );
QgsGraduatedSymbolRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer ); QgsGraduatedSymbolRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer );
~QgsGraduatedSymbolRendererV2Widget(); ~QgsGraduatedSymbolRendererV2Widget();
virtual QgsFeatureRendererV2* renderer(); virtual QgsFeatureRendererV2* renderer();
public slots: public slots:
void changeGraduatedSymbol(); void changeGraduatedSymbol();
void graduatedColumnChanged(); void graduatedColumnChanged();
void classifyGraduated(); void classifyGraduated();
void reapplyColorRamp();
void rangesDoubleClicked( const QModelIndex & idx ); void rangesDoubleClicked( const QModelIndex & idx );
void rangesClicked( const QModelIndex & idx ); void rangesClicked( const QModelIndex & idx );
void changeCurrentValue( QStandardItem * item ); void changeCurrentValue( QStandardItem * item );
/**Adds a class manually to the classification*/ /**Adds a class manually to the classification*/
void addClass(); void addClass();
/**Removes a class from the classification*/ /**Removes a class from the classification*/
void deleteCurrentClass(); void deleteCurrentClass();
void rotationFieldChanged( QString fldName ); void rotationFieldChanged( QString fldName );
void sizeScaleFieldChanged( QString fldName ); void sizeScaleFieldChanged( QString fldName );
void showSymbolLevels();
protected: protected:
void updateUiFromRenderer(); void updateUiFromRenderer();
void updateGraduatedSymbolIcon(); void updateGraduatedSymbolIcon();
//! populate column combos in categorized and graduated page //! populate column combos in categorized and graduated page
void populateColumns(); void populateColumns();
void populateColorRamps(); void populateColorRamps();
//! populate ranges of graduated symbol renderer //! populate ranges of graduated symbol renderer
void populateRanges(); void populateRanges();
void changeRangeSymbol( int rangeIdx ); void changeRangeSymbol( int rangeIdx );
void changeRange( int rangeIdx ); void changeRange( int rangeIdx );
QList<QgsSymbolV2*> selectedSymbols();
QgsSymbolV2* findSymbolForRange( double lowerBound, double upperBound,
const QgsRangeList& ranges ) const;
void refreshSymbolView();
protected: protected:
QgsGraduatedSymbolRendererV2* mRenderer; QgsGraduatedSymbolRendererV2* mRenderer;
QgsSymbolV2* mGraduatedSymbol; QgsSymbolV2* mGraduatedSymbol;
int mRowSelected; int mRowSelected;
QgsRendererV2DataDefinedMenus* mDataDefinedMenus; QgsRendererV2DataDefinedMenus* mDataDefinedMenus;
}; };
 End of changes. 6 change blocks. 
2 lines changed or deleted 33 lines changed or added


 qgshttptransaction.h   qgshttptransaction.h 
skipping to change at line 20 skipping to change at line 20
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgshttptransaction.h 5697 2006-08-15 10:29:46Z morb_au $ */
#ifndef QGSHTTPTRANSACTION_H #ifndef QGSHTTPTRANSACTION_H
#define QGSHTTPTRANSACTION_H #define QGSHTTPTRANSACTION_H
#include <QHttp> #include <QHttp>
#include <QNetworkProxy> #include <QNetworkProxy>
#include <QString> #include <QString>
class QTimer; class QTimer;
/** \ingroup core /** \ingroup core
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 qgslabel.h   qgslabel.h 
skipping to change at line 16 skipping to change at line 16
email : blazek@itc.it email : blazek@itc.it
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSLABEL_H #ifndef QGSLABEL_H
#define QGSLABEL_H #define QGSLABEL_H
#include <vector> #include <vector>
#include <QColor> #include <QColor>
#include <QList> #include <QList>
#include <QMap> #include <QMap>
#include "qgspoint.h" #include "qgspoint.h"
skipping to change at line 162 skipping to change at line 161
/** Pointer to default attributes. /** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method. * @note this replaces the to-be-deprecated layerAttributes method.
* @note introduced in QGIS 1.4 * @note introduced in QGIS 1.4
*/ */
QgsLabelAttributes *labelAttributes( void ); QgsLabelAttributes *labelAttributes( void );
//! Set label field //! Set label field
void setLabelField( int attr, int fieldIndex ); void setLabelField( int attr, int fieldIndex );
//! Set label field by name
bool setLabelFieldName( int attr, QString name );
//! label field //! label field
QString labelField( int attr ) const; QString labelField( int attr ) const;
/** Get field value if : 1) field name is not empty /** Get field value if : 1) field name is not empty
* 2) field exists * 2) field exists
* 3) value is defined * 3) value is defined
* otherwise returns empty string * otherwise returns empty string
*/ */
QString fieldValue( int attr, QgsFeature& feature ); QString fieldValue( int attr, QgsFeature& feature );
 End of changes. 2 change blocks. 
4 lines changed or deleted 0 lines changed or added


 qgslabelattributes.h   qgslabelattributes.h 
skipping to change at line 16 skipping to change at line 16
email : blazek@itc.it email : blazek@itc.it
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSLABELATTRIBUTES_H #ifndef QGSLABELATTRIBUTES_H
#define QGSLABELATTRIBUTES_H #define QGSLABELATTRIBUTES_H
#include <QBrush> #include <QBrush>
#include <QFont> #include <QFont>
#include <QPen> #include <QPen>
class QString; class QString;
class QColor; class QColor;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgslegendinterface.h   qgslegendinterface.h 
skipping to change at line 16 skipping to change at line 16
Email : manz dot andres at gmail dot com Email : manz dot andres at gmail dot com
*************************************************************************** */ *************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSLEGENDINTERFACE_H #ifndef QGSLEGENDINTERFACE_H
#define QGSLEGENDINTERFACE_H #define QGSLEGENDINTERFACE_H
#include <QObject> #include <QObject>
#include <QPair> #include <QPair>
#include <QStringList> #include <QStringList>
#include <QModelIndex>
class QgsMapLayer; class QgsMapLayer;
class QTreeWidgetItem; class QTreeWidgetItem;
//Information about relationship between groups and layers //Information about relationship between groups and layers
//key: group name (or null strings for single layers without groups) //key: group name (or null strings for single layers without groups)
//value: containter with layer ids contained in the group //value: containter with layer ids contained in the group
typedef QPair< QString, QList<QString> > GroupLayerInfo; typedef QPair< QString, QList<QString> > GroupLayerInfo;
/** \ingroup gui /** \ingroup gui
skipping to change at line 78 skipping to change at line 78
//! Check if a group is visible //! Check if a group is visible
//! @note added in 1.5 //! @note added in 1.5
virtual bool isGroupVisible( int groupIndex ) = 0; virtual bool isGroupVisible( int groupIndex ) = 0;
//! Check if a layer is visible //! Check if a layer is visible
//! @note added in 1.5 //! @note added in 1.5
virtual bool isLayerVisible( QgsMapLayer * ml ) = 0; virtual bool isLayerVisible( QgsMapLayer * ml ) = 0;
signals: signals:
//! emitted when a group index has changed //! emitted when a group index has changed
void groupIndexChanged( int oldIndex, int newIndex ); void groupIndexChanged( int oldIndex, int newIndex );
/* //! emitted when group relations have changed */
void groupRelationsChanged( );
/* //! emitted when an item (group/layer) is added */
void itemAdded( QModelIndex index );
/* //! emitted when an item (group/layer) is removed */
void itemRemoved( );
public slots: public slots:
//! Add a new group //! Add a new group
//! a parent group can be given to nest the new group in it //! a parent group can be given to nest the new group in it
virtual int addGroup( QString name, bool expand = true, QTreeWidgetItem * parent = 0 ) = 0; virtual int addGroup( QString name, bool expand = true, QTreeWidgetItem * parent = 0 ) = 0;
//! Add a new group //! Add a new group
//! a parent group index has to be given to nest the new group in it //! a parent group index has to be given to nest the new group in it
virtual int addGroup( QString name, bool expand, int parentIndex ) = 0; virtual int addGroup( QString name, bool expand, int parentIndex ) = 0;
 End of changes. 4 change blocks. 
1 lines changed or deleted 11 lines changed or added


 qgslegendmodel.h   qgslegendmodel.h 
skipping to change at line 67 skipping to change at line 67
void setLayerSetAndGroups( const QStringList& layerIds, const QList< Gr oupLayerInfo >& groupInfo ); void setLayerSetAndGroups( const QStringList& layerIds, const QList< Gr oupLayerInfo >& groupInfo );
void setLayerSet( const QStringList& layerIds ); void setLayerSet( const QStringList& layerIds );
/**Adds a group to a toplevel position (or -1 if it should be placed at the end of the legend). Returns a pointer to the added group*/ /**Adds a group to a toplevel position (or -1 if it should be placed at the end of the legend). Returns a pointer to the added group*/
QStandardItem* addGroup( QString text = tr( "Group" ), int position = - 1 ); QStandardItem* addGroup( QString text = tr( "Group" ), int position = - 1 );
/**Tries to automatically update a model entry (e.g. a whole layer or o nly a single item)*/ /**Tries to automatically update a model entry (e.g. a whole layer or o nly a single item)*/
void updateItem( QStandardItem* item ); void updateItem( QStandardItem* item );
/**Updates the whole symbology of a layer*/ /**Updates the whole symbology of a layer*/
void updateLayer( QStandardItem* layerItem ); void updateLayer( QStandardItem* layerItem );
/**Tries to update a single classification item*/ /**Tries to update a single classification item*/
void updateVectorClassificationItem( QStandardItem* classificationItem, void updateVectorClassificationItem( QStandardItem* classificationItem,
QgsSymbol* symbol, QString itemText ) {} QgsSymbol* symbol, QString itemText )
void updateVectorV2ClassificationItem( QStandardItem* classificationIte { Q_UNUSED( classificationItem ); Q_UNUSED( symbol ); Q_UNUSED( itemTex
m, QgsSymbolV2* symbol, QString itemText ) {} t ); }
void updateRasterClassificationItem( QStandardItem* classificationItem void updateVectorV2ClassificationItem( QStandardItem* classificationIte
) {} m, QgsSymbolV2* symbol, QString itemText )
{ Q_UNUSED( classificationItem ); Q_UNUSED( symbol ); Q_UNUSED( itemTex
t ); }
void updateRasterClassificationItem( QStandardItem* classificationItem
)
{ Q_UNUSED( classificationItem ); }
bool writeXML( QDomElement& composerLegendElem, QDomDocument& doc ) con st; bool writeXML( QDomElement& composerLegendElem, QDomDocument& doc ) con st;
bool readXML( const QDomElement& legendModelElem, const QDomDocument& d oc ); bool readXML( const QDomElement& legendModelElem, const QDomDocument& d oc );
Qt::DropActions supportedDropActions() const; Qt::DropActions supportedDropActions() const;
Qt::ItemFlags flags( const QModelIndex &index ) const; Qt::ItemFlags flags( const QModelIndex &index ) const;
/**Implemented to support drag operations*/ /**Implemented to support drag operations*/
virtual bool removeRows( int row, int count, const QModelIndex & parent = QModelIndex() ); virtual bool removeRows( int row, int count, const QModelIndex & parent = QModelIndex() );
skipping to change at line 107 skipping to change at line 110
private: private:
/**Adds classification items of vector layers /**Adds classification items of vector layers
@return 0 in case of success*/ @return 0 in case of success*/
int addVectorLayerItems( QStandardItem* layerItem, QgsVectorLayer* vlay er ); int addVectorLayerItems( QStandardItem* layerItem, QgsVectorLayer* vlay er );
/**Adds classification items of vector layers using new symbology*/ /**Adds classification items of vector layers using new symbology*/
int addVectorLayerItemsV2( QStandardItem* layerItem, QgsVectorLayer* vl ayer ); int addVectorLayerItemsV2( QStandardItem* layerItem, QgsVectorLayer* vl ayer );
/**Adds item of raster layer /**Adds item of raster layer
@return 0 in case of success*/ @return 0 in case of success*/
int addRasterLayerItem( QStandardItem* layerItem, QgsMapLayer* rlayer ) ; int addRasterLayerItems( QStandardItem* layerItem, QgsMapLayer* rlayer );
/**Creates a model item for a vector symbol. The calling function takes ownership*/ /**Creates a model item for a vector symbol. The calling function takes ownership*/
QStandardItem* itemFromSymbol( QgsSymbol* s, int opacity, const QString & layerID ); QStandardItem* itemFromSymbol( QgsSymbol* s, int opacity, const QString & layerID );
protected: protected:
QStringList mLayerIds; QStringList mLayerIds;
/**True if this application has toplevel windows (normally true). If th is is false, this means that the application /**True if this application has toplevel windows (normally true). If th is is false, this means that the application
might not have a running x-server on unix systems and so QPixmap and QIcon cannot be used*/ might not have a running x-server on unix systems and so QPixmap and QIcon cannot be used*/
bool mHasTopLevelWindow; bool mHasTopLevelWindow;
 End of changes. 2 change blocks. 
7 lines changed or deleted 12 lines changed or added


 qgslinesymbollayerv2.h   qgslinesymbollayerv2.h 
/**************************************************************************
*
qgslinesymbollayerv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSLINESYMBOLLAYERV2_H #ifndef QGSLINESYMBOLLAYERV2_H
#define QGSLINESYMBOLLAYERV2_H #define QGSLINESYMBOLLAYERV2_H
#include "qgssymbollayerv2.h" #include "qgssymbollayerv2.h"
#include <QPen> #include <QPen>
#include <QVector> #include <QVector>
#define DEFAULT_SIMPLELINE_COLOR QColor(0,0,0) #define DEFAULT_SIMPLELINE_COLOR QColor(0,0,0)
skipping to change at line 26 skipping to change at line 40
class CORE_EXPORT QgsSimpleLineSymbolLayerV2 : public QgsLineSymbolLayerV2 class CORE_EXPORT QgsSimpleLineSymbolLayerV2 : public QgsLineSymbolLayerV2
{ {
public: public:
QgsSimpleLineSymbolLayerV2( QColor color = DEFAULT_SIMPLELINE_COLOR, QgsSimpleLineSymbolLayerV2( QColor color = DEFAULT_SIMPLELINE_COLOR,
double width = DEFAULT_SIMPLELINE_WIDTH, double width = DEFAULT_SIMPLELINE_WIDTH,
Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_ PENSTYLE ); Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_ PENSTYLE );
// static stuff // static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context ); void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
// new stuff // new stuff
Qt::PenStyle penStyle() const { return mPenStyle; } Qt::PenStyle penStyle() const { return mPenStyle; }
void setPenStyle( Qt::PenStyle style ) { mPenStyle = style; } void setPenStyle( Qt::PenStyle style ) { mPenStyle = style; }
Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; } Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; } void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style; }
Qt::PenCapStyle penCapStyle() const { return mPenCapStyle; } Qt::PenCapStyle penCapStyle() const { return mPenCapStyle; }
void setPenCapStyle( Qt::PenCapStyle style ) { mPenCapStyle = style; } void setPenCapStyle( Qt::PenCapStyle style ) { mPenCapStyle = style; }
skipping to change at line 99 skipping to change at line 116
Interval, Interval,
Vertex, Vertex,
LastVertex, LastVertex,
FirstVertex, FirstVertex,
CentralPoint CentralPoint
}; };
// static stuff // static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context ); void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
void setColor( const QColor& color ); void setColor( const QColor& color );
QgsSymbolV2* subSymbol(); QgsSymbolV2* subSymbol();
bool setSubSymbol( QgsSymbolV2* symbol ); bool setSubSymbol( QgsSymbolV2* symbol );
virtual void setWidth( double width ); virtual void setWidth( double width );
virtual double width() const; virtual double width() const;
// new stuff // new stuff
skipping to change at line 165 skipping to change at line 185
{ {
public: public:
QgsLineDecorationSymbolLayerV2( QColor color = DEFAULT_LINEDECORATION_C OLOR, QgsLineDecorationSymbolLayerV2( QColor color = DEFAULT_LINEDECORATION_C OLOR,
double width = DEFAULT_LINEDECORATION_W IDTH ); double width = DEFAULT_LINEDECORATION_W IDTH );
~QgsLineDecorationSymbolLayerV2(); ~QgsLineDecorationSymbolLayerV2();
// static stuff // static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context ); void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
protected: protected:
QPen mPen; QPen mPen;
QPen mSelPen; QPen mSelPen;
}; };
#endif #endif
 End of changes. 7 change blocks. 
0 lines changed or deleted 35 lines changed or added


 qgslogger.h   qgslogger.h 
skipping to change at line 24 skipping to change at line 24
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSLOGGER_H #ifndef QGSLOGGER_H
#define QGSLOGGER_H #define QGSLOGGER_H
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <QString> #include <QString>
class QFile;
#ifdef QGISDEBUG #ifdef QGISDEBUG
#define QgsDebugMsg(str) QgsLogger::debug(QString(str), 1, __FILE__, __FUNC TION__, __LINE__) #define QgsDebugMsg(str) QgsLogger::debug(QString(str), 1, __FILE__, __FUNC TION__, __LINE__)
#define QgsDebugMsgLevel(str, level) \ #define QgsDebugMsgLevel(str, level) \
{ \ { \
if ( QgsLogger::debugLevel() >= (level) && (level) > 0 ) \ if ( QgsLogger::debugLevel() >= (level) && (level) > 0 ) \
QgsLogger::debug(QString(str), (level), __FILE__, __FUNCTION__, __LIN E__); \ QgsLogger::debug(QString(str), (level), __FILE__, __FUNCTION__, __LIN E__); \
} }
#else #else
#define QgsDebugMsg(str) #define QgsDebugMsg(str)
skipping to change at line 48 skipping to change at line 49
* QgsLogger is a class to print debug/warning/error messages to the consol e. * QgsLogger is a class to print debug/warning/error messages to the consol e.
* The advantage of this class over iostream & co. is that the * The advantage of this class over iostream & co. is that the
* output can be controlled with environment variables: * output can be controlled with environment variables:
* QGIS_DEBUG is an int describing what debug messages are written to the c onsole. * QGIS_DEBUG is an int describing what debug messages are written to the c onsole.
* If the debug level of a message is <= QGIS_DEBUG, the message is written to the * If the debug level of a message is <= QGIS_DEBUG, the message is written to the
* console. It the variable QGIS_DEBUG is not defined, it defaults to 1 for debug * console. It the variable QGIS_DEBUG is not defined, it defaults to 1 for debug
* mode and to 0 for release mode * mode and to 0 for release mode
* QGIS_DEBUG_FILE may contain a file name. Only the messages from this fil e are * QGIS_DEBUG_FILE may contain a file name. Only the messages from this fil e are
* printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not * printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not
* set, messages from all files are printed * set, messages from all files are printed
*
* QGIS_LOG_FILE may contain a file name. If set, all messages will be appe
nded
* to this file rather than to stdout.
*/ */
class CORE_EXPORT QgsLogger class CORE_EXPORT QgsLogger
{ {
public: public:
/**Goes to qDebug. /**Goes to qDebug.
@param msg the message to be printed @param msg the message to be printed
@param debuglevel @param debuglevel
@param file file name where the message comes from @param file file name where the message comes from
skipping to change at line 72 skipping to change at line 76
/**Similar to the previous method, but prints a variable int-value pair */ /**Similar to the previous method, but prints a variable int-value pair */
static void debug( const QString& var, int val, int debuglevel = 1, con st char* file = NULL, const char* function = NULL, int line = -1 ); static void debug( const QString& var, int val, int debuglevel = 1, con st char* file = NULL, const char* function = NULL, int line = -1 );
/**Similar to the previous method, but prints a variable double-value p air*/ /**Similar to the previous method, but prints a variable double-value p air*/
static void debug( const QString& var, double val, int debuglevel = 1, const char* file = NULL, const char* function = NULL, int line = -1 ); static void debug( const QString& var, double val, int debuglevel = 1, const char* file = NULL, const char* function = NULL, int line = -1 );
/**Prints out a variable/value pair for types with overloaded operator< <*/ /**Prints out a variable/value pair for types with overloaded operator< <*/
template <typename T> static void debug( const QString& var, T val, con st char* file = 0, const char* function = 0, template <typename T> static void debug( const QString& var, T val, con st char* file = 0, const char* function = 0,
int line = -1, int debuglevel = 1 ) int line = -1, int debuglevel = 1 )
{ {
Q_UNUSED( debuglevel );
const char* dfile = debugFile(); const char* dfile = debugFile();
if ( dfile ) //exit if QGIS_DEBUG_FILE is set and the message comes f rom the wrong file if ( dfile ) //exit if QGIS_DEBUG_FILE is set and the message comes f rom the wrong file
{ {
if ( !file || strcmp( dfile, file ) != 0 ) if ( !file || strcmp( dfile, file ) != 0 )
{ {
return; return;
} }
} }
std::ostringstream os; std::ostringstream os;
os << var.toLocal8Bit().data() << " = " << val; os << var.toLocal8Bit().data() << " = " << val;
if ( line == -1 ) if ( line == -1 )
{ {
qDebug( "%s: (%s) %s", file, function, os.str().c_str() ); qDebug( "%s: (%s) %s", file + sPrefixLength, function, os.str().c_s tr() );
} }
else else
{ {
#if defined(_MSC_VER) #if defined(_MSC_VER)
qDebug( "%s(%d): (%s) %s", file, line, function, os.str().c_str() ) ; qDebug( "%s(%d): (%s) %s", file + sPrefixLength, line, function, os .str().c_str() );
#else #else
qDebug( "%s: %d: (%s) %s", file, line, function, os.str().c_str() ) ; qDebug( "%s: %d: (%s) %s", file + sPrefixLength, line, function, os .str().c_str() );
#endif #endif
} }
} }
/**Goes to qWarning*/ /**Goes to qWarning*/
static void warning( const QString& msg ); static void warning( const QString& msg );
/**Goes to qCritical*/ /**Goes to qCritical*/
static void critical( const QString& msg ); static void critical( const QString& msg );
/**Goes to qFatal*/ /**Goes to qFatal*/
static void fatal( const QString& msg ); static void fatal( const QString& msg );
/**Reads the environment variable QGIS_DEBUG and converts it to int. If QGIS_DEBUG is not set, /**Reads the environment variable QGIS_DEBUG and converts it to int. If QGIS_DEBUG is not set,
the function returns 1 if QGISDEBUG is defined and 0 if not*/ the function returns 1 if QGISDEBUG is defined and 0 if not*/
static int debugLevel(); static int debugLevel();
/** Logs the message passed in to the logfile defined in QGIS_LOG_FILE
if any. **/
static void logMessageToFile( QString theMessage );
private: private:
/**Reads the environment variable QGIS_LOG_FILE. Returns NULL if the va
riable is not set,
* otherwise returns a file name for writing log messages to.*/
static const QString logFile();
/**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the /**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the
variable is not set*/ variable is not set.
* If set, only messages from this source file will be sent to logs. */
static const char* debugFile(); static const char* debugFile();
/** current debug level */ /** current debug level */
static int mDebugLevel; static int sDebugLevel;
static int sPrefixLength;
}; };
#endif #endif
 End of changes. 10 change blocks. 
6 lines changed or deleted 22 lines changed or added


 qgslonglongvalidator.h   qgslonglongvalidator.h 
skipping to change at line 19 skipping to change at line 19
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSLONGLONGVALIDATOR_H #ifndef QGSLONGLONGVALIDATOR_H
#define QGSLONGLONGVALIDATOR_H #define QGSLONGLONGVALIDATOR_H
#include <limits> #include <limits>
#include <QValidator> #include <QValidator>
#include <QLocale> #include <QLocale>
class GUI_EXPORT QgsLongLongValidator : public QValidator class GUI_EXPORT QgsLongLongValidator : public QValidator
{ {
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsludialog.h   qgsludialog.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSLUDIALOG_H #ifndef QGSLUDIALOG_H
#define QGSLUDIALOG_H #define QGSLUDIALOG_H
#include "ui_qgsludialogbase.h" #include "ui_qgsludialogbase.h"
#include "qgisgui.h" #include "qgisgui.h"
class GUI_EXPORT QgsLUDialog: public QDialog, private Ui::QgsLUDialogBase class GUI_EXPORT QgsLUDialog: public QDialog, private Ui::QgsLUDialogBase
{ {
Q_OBJECT Q_OBJECT
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsmapcanvas.h   qgsmapcanvas.h 
skipping to change at line 17 skipping to change at line 17
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgsmapcanvas.h 5341 2006-04-22 12:11:36Z wonder $ */
#ifndef QGSMAPCANVAS_H #ifndef QGSMAPCANVAS_H
#define QGSMAPCANVAS_H #define QGSMAPCANVAS_H
#include <list> #include <list>
#include <memory> #include <memory>
#include <deque> #include <deque>
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include "qgspoint.h" #include "qgspoint.h"
#include "qgis.h" #include "qgis.h"
#include <QDomDocument> #include <QDomDocument>
#include <QGraphicsView> #include <QGraphicsView>
#include <QtCore> #include <QtCore>
#ifdef HAVE_TOUCH
#include <QGestureEvent>
#endif
class QWheelEvent; class QWheelEvent;
class QPixmap; class QPixmap;
class QPaintEvent; class QPaintEvent;
class QKeyEvent; class QKeyEvent;
class ResizeEvent; class ResizeEvent;
class QColor; class QColor;
class QDomDocument; class QDomDocument;
class QPaintDevice; class QPaintDevice;
class QMouseEvent; class QMouseEvent;
skipping to change at line 159 skipping to change at line 162
//! Zoom to the Next extent (view) //! Zoom to the Next extent (view)
void zoomToNextExtent(); void zoomToNextExtent();
// ! Clears the list of extents and sets current extent as first item // ! Clears the list of extents and sets current extent as first item
void clearExtentHistory(); void clearExtentHistory();
/** Zoom to the extent of the selected features of current (vector) lay er. /** Zoom to the extent of the selected features of current (vector) lay er.
Added in version 1.2: optionally specify different than current layer */ Added in version 1.2: optionally specify different than current layer */
void zoomToSelected( QgsVectorLayer* layer = NULL ); void zoomToSelected( QgsVectorLayer* layer = NULL );
/** Pan to the selected features of current (vector) layer keeping same
extent.
@note added in 2.0 */
void panToSelected( QgsVectorLayer* layer = NULL );
/** \brief Sets the map tool currently being used on the canvas */ /** \brief Sets the map tool currently being used on the canvas */
void setMapTool( QgsMapTool* mapTool ); void setMapTool( QgsMapTool* mapTool );
/** \brief Unset the current map tool or last non zoom tool /** \brief Unset the current map tool or last non zoom tool
* *
* This is called from destructor of map tools to make sure * This is called from destructor of map tools to make sure
* that this map tool won't be used any more. * that this map tool won't be used any more.
* You don't have to call it manualy, QgsMapTool takes care of it. * You don't have to call it manualy, QgsMapTool takes care of it.
*/ */
void unsetMapTool( QgsMapTool* mapTool ); void unsetMapTool( QgsMapTool* mapTool );
skipping to change at line 300 skipping to change at line 307
//! show whatever error is exposed by the QgsMapLayer. //! show whatever error is exposed by the QgsMapLayer.
void showError( QgsMapLayer * mapLayer ); void showError( QgsMapLayer * mapLayer );
//! called to read map canvas settings from project //! called to read map canvas settings from project
void readProject( const QDomDocument & ); void readProject( const QDomDocument & );
//! called to write map canvas settings to project //! called to write map canvas settings to project
void writeProject( QDomDocument & ); void writeProject( QDomDocument & );
private slots:
//! called when current maptool is destroyed
void mapToolDestroyed();
signals: signals:
/** Let the owner know how far we are with render operations */ /** Let the owner know how far we are with render operations */
void setProgress( int, int ); void setProgress( int, int );
/** emits current mouse position /** emits current mouse position
\note changed in 1.3 */ \note changed in 1.3 */
void xyCoordinates( const QgsPoint & p ); void xyCoordinates( const QgsPoint & p );
//! Emitted when the scale of the map changes //! Emitted when the scale of the map changes
void scaleChanged( double ); void scaleChanged( double );
skipping to change at line 352 skipping to change at line 363
//! Emitted when zoom last status changed //! Emitted when zoom last status changed
//! @note: this signal was added in version 1.4 //! @note: this signal was added in version 1.4
void zoomLastStatusChanged( bool ); void zoomLastStatusChanged( bool );
//! Emitted when zoom next status changed //! Emitted when zoom next status changed
//! @note: this signal was added in version 1.4 //! @note: this signal was added in version 1.4
void zoomNextStatusChanged( bool ); void zoomNextStatusChanged( bool );
protected: protected:
#ifdef HAVE_TOUCH
//! Overridden standard event to be gestures aware
bool event( QEvent * e );
#endif
//! Overridden key press event //! Overridden key press event
void keyPressEvent( QKeyEvent * e ); void keyPressEvent( QKeyEvent * e );
//! Overridden key release event //! Overridden key release event
void keyReleaseEvent( QKeyEvent * e ); void keyReleaseEvent( QKeyEvent * e );
//! Overridden mouse double click event //! Overridden mouse double click event
void mouseDoubleClickEvent( QMouseEvent * e ); void mouseDoubleClickEvent( QMouseEvent * e );
//! Overridden mouse move event //! Overridden mouse move event
skipping to change at line 379 skipping to change at line 395
//! Overridden mouse wheel event //! Overridden mouse wheel event
void wheelEvent( QWheelEvent * e ); void wheelEvent( QWheelEvent * e );
//! Overridden resize event //! Overridden resize event
void resizeEvent( QResizeEvent * e ); void resizeEvent( QResizeEvent * e );
//! Overridden paint event //! Overridden paint event
void paintEvent( QPaintEvent * e ); void paintEvent( QPaintEvent * e );
//! Overridden drag enter event
void dragEnterEvent( QDragEnterEvent * e );
//! called when panning is in action, reset indicates end of panning //! called when panning is in action, reset indicates end of panning
void moveCanvasContents( bool reset = false ); void moveCanvasContents( bool reset = false );
//! called on resize or changed extent to notify canvas items to change their rectangle //! called on resize or changed extent to notify canvas items to change their rectangle
void updateCanvasItemPositions(); void updateCanvasItemPositions();
/// implementation struct /// implementation struct
class CanvasProperties; class CanvasProperties;
/// Handle pattern for implementation object /// Handle pattern for implementation object
std::auto_ptr<CanvasProperties> mCanvasProperties; std::auto_ptr<CanvasProperties> mCanvasProperties;
private slots:
void crsTransformEnabled( bool );
private: private:
/// this class is non-copyable /// this class is non-copyable
/** /**
@note @note
Otherwise std::auto_ptr would pass the object responsiblity on to th e Otherwise std::auto_ptr would pass the object responsiblity on to th e
copy like a hot potato leaving the copyer in a weird state. copy like a hot potato leaving the copyer in a weird state.
*/ */
QgsMapCanvas( QgsMapCanvas const & ); QgsMapCanvas( QgsMapCanvas const & );
 End of changes. 7 change blocks. 
1 lines changed or deleted 24 lines changed or added


 qgsmapcanvasitem.h   qgsmapcanvasitem.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPCANVASITEM_H #ifndef QGSMAPCANVASITEM_H
#define QGSMAPCANVASITEM_H #define QGSMAPCANVASITEM_H
#include <QGraphicsItem> #include <QGraphicsItem>
#include "qgsrectangle.h" #include "qgsrectangle.h"
class QgsMapCanvas; class QgsMapCanvas;
class QgsRenderContext; class QgsRenderContext;
class QPainter; class QPainter;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsmapcanvasmap.h   qgsmapcanvasmap.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPCANVASMAP_H #ifndef QGSMAPCANVASMAP_H
#define QGSMAPCANVASMAP_H #define QGSMAPCANVASMAP_H
#include <QGraphicsRectItem> #include <QGraphicsRectItem>
#include <QPixmap> #include <QPixmap>
#include <qgis.h> #include <qgis.h>
class QgsMapRenderer; class QgsMapRenderer;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsmapcanvassnapper.h   qgsmapcanvassnapper.h 
skipping to change at line 21 skipping to change at line 21
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSMAPCANVASSNAPPER_H #ifndef QGSMAPCANVASSNAPPER_H
#define QGSMAPCANVASSNAPPER_H #define QGSMAPCANVASSNAPPER_H
#include "qgssnapper.h"
#include <QList> #include <QList>
#include "qgssnapper.h"
class QgsMapCanvas; class QgsMapCanvas;
class QPoint; class QPoint;
class QgsSnapper;
/** \ingroup gui /** \ingroup gui
* This class reads the snapping properties from the current project and * This class reads the snapping properties from the current project and
* configures a QgsSnapper to perform the snapping. * configures a QgsSnapper to perform the snapping.
* Snapping can be done to the active layer (useful for selecting a vertex to * Snapping can be done to the active layer (useful for selecting a vertex to
* manipulate) or to background layers * manipulate) or to background layers
*/ */
class GUI_EXPORT QgsMapCanvasSnapper class GUI_EXPORT QgsMapCanvasSnapper
{ {
public: public:
 End of changes. 3 change blocks. 
2 lines changed or deleted 1 lines changed or added


 qgsmaplayer.h   qgsmaplayer.h 
skipping to change at line 17 skipping to change at line 17
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPLAYER_H #ifndef QGSMAPLAYER_H
#define QGSMAPLAYER_H #define QGSMAPLAYER_H
#include <QDateTime> #include <QDateTime>
#include <QObject> #include <QObject>
#include <QUndoStack> #include <QUndoStack>
#include <QVariant> #include <QVariant>
#include <QImage> #include <QImage>
#include <QDomNode>
#include "qgis.h" #include "qgis.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
class QgsRenderContext; class QgsRenderContext;
class QgsCoordinateReferenceSystem; class QgsCoordinateReferenceSystem;
class QDomNode;
class QDomDocument; class QDomDocument;
class QKeyEvent; class QKeyEvent;
class QPainter; class QPainter;
/** \ingroup core /** \ingroup core
* Base class for all map layer types. * Base class for all map layer types.
* This is the base class for all map layer types (vector, raster). * This is the base class for all map layer types (vector, raster).
*/ */
class CORE_EXPORT QgsMapLayer : public QObject class CORE_EXPORT QgsMapLayer : public QObject
{ {
skipping to change at line 91 skipping to change at line 90
/** Set the display name of the layer /** Set the display name of the layer
* @param name New name for the layer * @param name New name for the layer
*/ */
void setLayerName( const QString & name ); void setLayerName( const QString & name );
/** Get the display name of the layer /** Get the display name of the layer
* @return the layer name * @return the layer name
*/ */
QString const & name() const; QString const & name() const;
void setTitle( const QString& title ) { mTitle = title; }
const QString& title() const { return mTitle; }
void setAbstract( const QString& abstract ) { mAbstract = abstract; }
const QString& abstract() const { return mAbstract; }
/**Synchronises with changes in the datasource /**Synchronises with changes in the datasource
@note added in version 1.6*/ @note added in version 1.6*/
virtual void reload() {} virtual void reload() {}
/** This is the method that does the actual work of /** This is the method that does the actual work of
* drawing the layer onto a paint device. * drawing the layer onto a paint device.
* @param rendererContext describes the extents, * @param rendererContext describes the extents,
* resolumon etc. that should be used when rendering the * resolumon etc. that should be used when rendering the
* layer. * layer.
*/ */
skipping to change at line 130 skipping to change at line 135
*/ */
QString publicSource() const; QString publicSource() const;
/** Returns the source for the layer */ /** Returns the source for the layer */
QString const & source() const; QString const & source() const;
/** /**
* Returns the sublayers of this layer * Returns the sublayers of this layer
* (Useful for providers that manage their own layers, such as WMS) * (Useful for providers that manage their own layers, such as WMS)
*/ */
virtual QStringList subLayers(); virtual QStringList subLayers() const;
/** /**
* Reorders the *previously selected* sublayers of this layer from bott om to top * Reorders the *previously selected* sublayers of this layer from bott om to top
* (Useful for providers that manage their own layers, such as WMS) * (Useful for providers that manage their own layers, such as WMS)
*/ */
virtual void setLayerOrder( QStringList layers ); virtual void setLayerOrder( const QStringList &layers );
/** Set the visibility of the given sublayer name */ /** Set the visibility of the given sublayer name */
virtual void setSubLayerVisibility( QString name, bool vis ); virtual void setSubLayerVisibility( QString name, bool vis );
/** True if the layer can be edited */ /** True if the layer can be edited */
virtual bool isEditable() const; virtual bool isEditable() const;
/** sets state from Dom document /** sets state from Dom document
@param layer_node is Dom node corresponding to ``maplayer'' tag @param layer_node is Dom node corresponding to ``maplayer'' tag
@note @note
skipping to change at line 158 skipping to change at line 163
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. by QgsProject.
This, in turn, calls readXml(), which is over-rideable by sub-classe s so This, in turn, calls readXml(), which is over-rideable by sub-classe s 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(). Invoked by QgsProject::read().
@returns true if successful @returns true if successful
*/ */
bool readXML( QDomNode & layer_node ); bool readXML( const QDomNode& layer_node );
/** stores state in Dom node /** stores state in Dom node
@param layer_node is Dom node corresponding to ``projectlayers'' tag @param layer_node is Dom node corresponding to ``projectlayers'' tag
@param document is Dom document @param document is Dom document
@note @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. written by QgsProject.
This, in turn, calls writeXml(), which is over-rideable by sub-class es so This, in turn, calls writeXml(), which is over-rideable by sub-class es so
skipping to change at line 218 skipping to change at line 223
* If an operation returns 0 (e.g. draw()), this function * If an operation returns 0 (e.g. draw()), this function
* returns the text of the error associated with the failure. * returns the text of the error associated with the failure.
* Interactive users of this provider can then, for example, * Interactive users of this provider can then, for example,
* call a QMessageBox to display the contents. * call a QMessageBox to display the contents.
*/ */
virtual QString lastError(); virtual QString lastError();
/** Returns layer's spatial reference system /** Returns layer's spatial reference system
@note This was introduced in QGIS 1.4 @note This was introduced in QGIS 1.4
*/ */
const QgsCoordinateReferenceSystem& crs(); const QgsCoordinateReferenceSystem& crs() const;
/** Returns layer's spatial reference system /** Returns layer's spatial reference system
@note This method is here for API compatibility @note This method is here for API compatibility
and will be deprecated in 2.0 and will be deprecated in 2.0
@deprecated use crs() @deprecated use crs()
*/ */
Q_DECL_DEPRECATED const QgsCoordinateReferenceSystem& srs(); Q_DECL_DEPRECATED const QgsCoordinateReferenceSystem& srs();
/** Sets layer's spatial reference system /** Sets layer's spatial reference system
@note emitSignal added in 1.4 */ @note emitSignal added in 1.4 */
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true ); void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );
/** A convenience function to capitalise the layer name */ /** A convenience function to capitalise the layer name */
static QString capitaliseLayerName( const QString name ); static QString capitaliseLayerName( const QString name );
/** Retrieve the style URI for this layer
* (either as a .qml file on disk or as a
* record in the users style table in their personal qgis.db)
* @return a QString withe the style file name
* @see also loadNamedStyle () and saveNamedStyle ();
* @note This method was added in QGIS 1.8
*/
virtual QString styleURI( );
/** Retrieve the default style for this layer if one /** Retrieve the default style for this layer if one
* exists (either as a .qml file on disk or as a * exists (either as a .qml file on disk or as a
* record in the users style table in their personal qgis.db) * record in the users style table in their personal qgis.db)
* @param theResultFlag a reference to a flag that will be set to false if * @param theResultFlag a reference to a flag that will be set to false if
* we did not manage to load the default style. * we did not manage to load the default style.
* @return a QString with any status messages * @return a QString with any status messages
* @see also loadNamedStyle (); * @see also loadNamedStyle ();
*/ */
virtual QString loadDefaultStyle( bool & theResultFlag ); virtual QString loadDefaultStyle( bool & theResultFlag );
skipping to change at line 286 skipping to change at line 300
* is a file and save to that, if that fails the qgis.db styles * is a file and save to that, if that fails the qgis.db styles
* table will be used to create a style entry who's * table will be used to create a style entry who's
* key matches the URI. * key matches the URI.
* @param theResultFlag a reference to a flag that will be set to false if * @param theResultFlag a reference to a flag that will be set to false if
* we did not manage to save the default style. * we did not manage to save the default style.
* @return a QString with any status messages * @return a QString with any status messages
* @sa saveDefaultStyle() * @sa saveDefaultStyle()
*/ */
virtual QString saveNamedStyle( const QString theURI, bool & theResultF lag ); virtual QString saveNamedStyle( const QString theURI, bool & theResultF lag );
virtual QString saveSldStyle( const QString theURI, bool & theResultFla
g );
virtual QString loadSldStyle( const QString theURI, bool &theResultFlag
);
virtual bool readSld( const QDomNode& node, QString& errorMessage )
{ Q_UNUSED( node ); errorMessage = QString( "Layer type %1 not supporte
d" ).arg( type() ); return false; }
/** Read the symbology for the current layer from the Dom node supplied . /** Read the symbology for the current layer from the Dom node supplied .
* @param node node that will contain the symbology definition for this layer. * @param node node that will contain the symbology definition for this layer.
* @param errorMessage reference to string that will be updated with an y error messages * @param errorMessage reference to string that will be updated with an y error messages
* @return true in case of success. * @return true in case of success.
*/ */
virtual bool readSymbology( const QDomNode& node, QString& errorMessage ) = 0; virtual bool readSymbology( const QDomNode& node, QString& errorMessage ) = 0;
/** Write the symbology for the layer into the docment provided. /** Write the symbology for the layer into the docment provided.
* @param node the node that will have the style element added to it. * @param node the node that will have the style element added to it.
* @param doc the document that will have the QDomNode added. * @param doc the document that will have the QDomNode added.
skipping to change at line 332 skipping to change at line 352
float maximumScale(); float maximumScale();
/** Accessor and mutator for the scale based visilibility flag */ /** Accessor and mutator for the scale based visilibility flag */
void toggleScaleBasedVisibility( bool theVisibilityFlag ); void toggleScaleBasedVisibility( bool theVisibilityFlag );
bool hasScaleBasedVisibility(); bool hasScaleBasedVisibility();
/** Clear cached image /** Clear cached image
* added in 1.5 */ * added in 1.5 */
void clearCacheImage(); void clearCacheImage();
/** \brief Obtain Metadata for this layer */
virtual QString metadata();
/** Time stamp of data source in the moment when data/metadata were loa ded by provider */ /** Time stamp of data source in the moment when data/metadata were loa ded by provider */
virtual QDateTime timestamp() const { return QDateTime() ; } virtual QDateTime timestamp() const { return QDateTime() ; }
signals: signals:
/** Emit a signal to notify of a progress event */ /** Emit a signal to notify of a progress event */
void drawingProgress( int theProgress, int theTotalSteps ); void drawingProgress( int theProgress, int theTotalSteps );
/** Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar) */ /** Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar) */
void statusChanged( QString theStatus ); void statusChanged( QString theStatus );
skipping to change at line 376 skipping to change at line 399
protected: protected:
/** set whether layer is valid or not - should be used in constructor. /** set whether layer is valid or not - should be used in constructor.
\note added in v1.5 */ \note added in v1.5 */
void setValid( bool valid ); void setValid( bool valid );
/** called by readXML(), used by children to read state specific to the m from /** called by readXML(), used by children to read state specific to the m from
project files. project files.
*/ */
virtual bool readXml( QDomNode & layer_node ); virtual bool readXml( const QDomNode& layer_node );
/** called by writeXML(), used by children to write state specific to t hem to /** called by writeXML(), used by children to write state specific to t hem to
project files. project files.
*/ */
virtual bool writeXml( QDomNode & layer_node, QDomDocument & document ) ; virtual bool writeXml( QDomNode & layer_node, QDomDocument & document ) ;
/** Read custom properties from project file. Added in v1.4 /** Read custom properties from project file. Added in v1.4
@param layerNode note to read from @param layerNode note to read from
@param keyStartsWith reads only properties starting with the specifie d string (or all if the string is empty)*/ @param keyStartsWith reads only properties starting with the specifie d string (or all if the string is empty)*/
void readCustomProperties( const QDomNode& layerNode, const QString& ke yStartsWith = "" ); void readCustomProperties( const QDomNode& layerNode, const QString& ke yStartsWith = "" );
skipping to change at line 409 skipping to change at line 432
/** Indicates if the layer is valid and can be drawn */ /** Indicates if the layer is valid and can be drawn */
bool mValid; bool mValid;
/** data source description string, varies by layer type */ /** data source description string, varies by layer type */
QString mDataSource; QString mDataSource;
/** Name of the layer - used for display */ /** Name of the layer - used for display */
QString mLayerName; QString mLayerName;
/** layer's Spatial reference system */ QString mTitle;
QgsCoordinateReferenceSystem* mCRS;
/**Description of the layer*/
QString mAbstract;
private: private:
/** layer's spatial reference system.
private to make sure setCrs must be used and layerCrsChanged() is e
mitted */
QgsCoordinateReferenceSystem* mCRS;
/** private copy constructor - QgsMapLayer not copyable */ /** private copy constructor - QgsMapLayer not copyable */
QgsMapLayer( QgsMapLayer const & ); QgsMapLayer( QgsMapLayer const & );
/** private assign operator - QgsMapLayer not copyable */ /** private assign operator - QgsMapLayer not copyable */
QgsMapLayer & operator=( QgsMapLayer const & ); QgsMapLayer & operator=( QgsMapLayer const & );
/** Unique ID of this layer - used to refer to this layer in map layer registry */ /** Unique ID of this layer - used to refer to this layer in map layer registry */
QString mID; QString mID;
 End of changes. 14 change blocks. 
9 lines changed or deleted 41 lines changed or added


 qgsmaplayerregistry.h   qgsmaplayerregistry.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPLAYERREGISTRY_H #ifndef QGSMAPLAYERREGISTRY_H
#define QGSMAPLAYERREGISTRY_H #define QGSMAPLAYERREGISTRY_H
#include <QMap> #include <QMap>
#include <QObject> #include <QObject>
#include <QStringList>
class QString; class QString;
class QStringList;
class QgsMapLayer; class QgsMapLayer;
/** \ingroup core /** \ingroup core
* This class tracks map layers that are currently loaded and provides * This class tracks map layers that are currently loaded and provides
* a means to fetch a pointer to a map layer and delete it. * a means to fetch a pointer to a map layer and delete it.
*/ */
class CORE_EXPORT QgsMapLayerRegistry : public QObject class CORE_EXPORT QgsMapLayerRegistry : public QObject
{ {
Q_OBJECT Q_OBJECT
skipping to change at line 50 skipping to change at line 47
//! Returns the instance pointer, creating the object on the first call //! Returns the instance pointer, creating the object on the first call
static QgsMapLayerRegistry * instance(); static QgsMapLayerRegistry * instance();
/*! Return the number of registered layers. /*! Return the number of registered layers.
* *
* */ * */
int count(); int count();
~QgsMapLayerRegistry(); ~QgsMapLayerRegistry();
//! Retrieve a pointer to a loaded plugin by id //! Retrieve a pointer to a loaded layer by id
QgsMapLayer * mapLayer( QString theLayerId ); QgsMapLayer * mapLayer( QString theLayerId );
//! Retrieve the mapLayers collection (mainly intended for use by projectio ) //! Retrieve the mapLayers collection (mainly intended for use by proje ctio)
QMap<QString, QgsMapLayer*> & mapLayers(); QMap<QString, QgsMapLayer*> & mapLayers();
/** Add a layer to the map of loaded layers /** Add a layer to the map of loaded layers
@returns NULL if unable to add layer, otherwise pointer to newly add ed layer @returns NULL if unable to add layer, otherwise pointer to newly add ed layer
@note @note
As a side-effect QgsProject is made dirty. As a side-effect QgsProject is made dirty.
Emits signal that layer has been added only if theEmitSignal is true (by default). Emits signal that layer has been added only if theEmitSignal is true (by default).
Not emitting signal is useful when you want to use registry also for
layers Not emitting signal is useful when you want to use registry for laye
which won't be used in main map canvas but will be used in a special rs
one on a different canvas and don't want them added to the main canvas a
utomatically.
@note This method is deprecated since QGIS 1.8, you should use addMa
pLayers rather.
*/ */
QgsMapLayer *addMapLayer( QgsMapLayer * theMapLayer, bool theEmitSignal Q_DECL_DEPRECATED QgsMapLayer *addMapLayer( QgsMapLayer * theMapLayer,
= true ); bool theEmitSignal = true );
/** Add a list of layers to the map of loaded layers
@returns QList<QgsMapLayer *> - a list of the map layers that were a
dded
successfully. If a layer is invalid, or already exists in the regist
ry,
it will not be part of the returned QList.
@note added in QGIS 1.8
/** Remove a layer from qgis
@note
As a side-effect QgsProject is made dirty. As a side-effect QgsProject is made dirty.
Any canvases using that layer will need to remove it
theEmitSignal - see addMapLayer() If theEmitSignal is true (by default), a layersAdded( QList<QgsMapLa
yer *>)
signal will be emitted indicating that a batch of layers were added.
Not emitting signal is useful when you want to use registry for laye
rs
on a different canvas and don't want them added to the main canvas a
utomatically.
*/
QList<QgsMapLayer *> addMapLayers( QList<QgsMapLayer *> theMapLayers,
bool theEmitSignal = true );
/** Remove a layer from qgis
@note As a side-effect QgsProject is made dirty. Any canvases using
that layer will need to remove it
If theEmitSignal is true (by default), a layerWillBeRemoved( QString
theId )
signal will be emitted indicating to any listeners that the layer is
being removed.
The layer being removed is deleted as well as the registry The layer being removed is deleted as well as the registry
table entry. table entry.
@note This method is deprecated since QGIS 1.8, you should use remov eMapLayers rather.
*/ */
void removeMapLayer( QString theLayerId, bool theEmitSignal = true ); Q_DECL_DEPRECATED void removeMapLayer( QString theLayerId, bool theEmit
Signal = true );
/** Remove a set of layers from qgis
@note As a side-effect QgsProject is made dirty.
Any canvases using the affected layers will need to remove them
If theEmitSignal is true (by default), a layersRemoved( QStringList
theLayerIds )
signal will be emitted indicating to any listeners that the layers a
re being removed.
The layer being removed is deleted as well as the registry
table entry.
*/
void removeMapLayers( QStringList theLayerIds, bool theEmitSignal = tru
e );
/** Remove all registered layers /** Remove all registered layers
@note raises removedAll() @note raises removedAll()
As a side-effect QgsProject is made dirty. As a side-effect QgsProject is made dirty.
@note The layers are deleted as the registry is cleared! @note The layers are deleted as the registry is cleared!
*/ */
void removeAllMapLayers(); void removeAllMapLayers();
/* Clears all layer caches, resetting them to zero and /* Clears all layer caches, resetting them to zero and
* freeing up any memory they may have been using. Layer * freeing up any memory they may have been using. Layer
skipping to change at line 99 skipping to change at line 129
* @note this method was added in QGIS 1.4 * @note this method was added in QGIS 1.4
*/ */
void clearAllLayerCaches(); void clearAllLayerCaches();
/**Reload all provider data caches (currently used for WFS and WMS prov iders) /**Reload all provider data caches (currently used for WFS and WMS prov iders)
@note: this method was added in QGIS 1.6*/ @note: this method was added in QGIS 1.6*/
void reloadAllLayers(); void reloadAllLayers();
signals: signals:
/** Emitted when one or more layers are removed from the registry
@note intended to replace layerWillBeRemoved in QGIS 1.8
*/
void layersWillBeRemoved( QStringList theLayerIds );
/** emitted when a layer is removed from the registry /** emitted when a layer is removed from the registry
connected to main map canvas and overview map canvas remove() connected to main map canvas and overview map canvas remove()
@note we should deprecate this at some stage
*/ */
void layerWillBeRemoved( QString theLayerId ); void layerWillBeRemoved( QString theLayerId );
/** Emitted when one or more layers are added to the registry
@note intended to replace layerWasAdded in QGIS 1.8
*/
void layersAdded( QList<QgsMapLayer *> theMapLayers );
/** emitted when a layer is added to the registry /** emitted when a layer is added to the registry
connected to main map canvas and overview map canvas addLayer() connected to main map canvas and overview map canvas addLayer()
@note we should deprecate this at some stage
*/ */
void layerWasAdded( QgsMapLayer * theMapLayer ); void layerWasAdded( QgsMapLayer * theMapLayer );
/** emitted when ALL layers are removed at once /** emitted when ALL layers are removed at once
This could have been implemented by iteratively signalling This could have been implemented by iteratively signalling
layerWillBeRemoved() for each layer as it is removed. However, this layerWillBeRemoved() for each layer as it is removed. However, this
generally causes a cascade of effects that are unnecessary if we're generally causes a cascade of effects that are unnecessary if we're
ultimately removing all layers. E.g., removing the legend item ultimately removing all layers. E.g., removing the legend item
corresponding to the layer. Why bother doing that when you're just going corresponding to the layer. Why bother doing that when you're just going
to clear everything anyway? to clear everything anyway?
 End of changes. 15 change blocks. 
17 lines changed or deleted 71 lines changed or added


 qgsmapoverviewcanvas.h   qgsmapoverviewcanvas.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPOVERVIEWCANVAS_H #ifndef QGSMAPOVERVIEWCANVAS_H
#define QGSMAPOVERVIEWCANVAS_H #define QGSMAPOVERVIEWCANVAS_H
#include <QMouseEvent> #include <QMouseEvent>
#include <QWheelEvent> #include <QWheelEvent>
#include <QWidget> #include <QWidget>
#include <QStringList> #include <QStringList>
#include <QPixmap> #include <QPixmap>
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsmaprenderer.h   qgsmaprenderer.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPRENDER_H #ifndef QGSMAPRENDER_H
#define QGSMAPRENDER_H #define QGSMAPRENDER_H
#include <QMutex>
#include <QSize> #include <QSize>
#include <QStringList> #include <QStringList>
#include <QVector> #include <QVector>
#include "qgis.h" #include "qgis.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include "qgsrendercontext.h" #include "qgsrendercontext.h"
#include "qgsfeature.h"
class QDomDocument; class QDomDocument;
class QDomNode; class QDomNode;
class QPainter; class QPainter;
class QgsMapToPixel; class QgsMapToPixel;
class QgsMapLayer; class QgsMapLayer;
class QgsMapRenderer; class QgsMapRenderer;
class QgsScaleCalculator; class QgsScaleCalculator;
class QgsCoordinateReferenceSystem; class QgsCoordinateReferenceSystem;
class QgsDistanceArea; class QgsDistanceArea;
class QgsOverlayObjectPositionManager; class QgsOverlayObjectPositionManager;
class QgsVectorLayer; class QgsVectorLayer;
class QgsFeature;
struct QgsDiagramLayerSettings; struct QgsDiagramLayerSettings;
struct CORE_EXPORT QgsLabelPosition struct CORE_EXPORT QgsLabelPosition
{ {
QgsLabelPosition( int id, double r, const QVector< QgsPoint >& corners, c onst QgsRectangle& rect, double w, double h, const QString& layer, bool ups ide_down, bool diagram = false ): QgsLabelPosition( int id, double r, const QVector< QgsPoint >& corners, c onst QgsRectangle& rect, double w, double h, const QString& layer, bool ups ide_down, bool diagram = false ):
featureId( id ), rotation( r ), cornerPoints( corners ), labelRect( r ect ), width( w ), height( h ), layerID( layer ), upsideDown( upside_down ) , isDiagram( diagram ) {} featureId( id ), rotation( r ), cornerPoints( corners ), labelRect( r ect ), width( w ), height( h ), layerID( layer ), upsideDown( upside_down ) , isDiagram( diagram ) {}
QgsLabelPosition(): featureId( -1 ), rotation( 0 ), labelRect( QgsRectang le() ), width( 0 ), height( 0 ), layerID( "" ), upsideDown( false ), isDiag ram( false ) {} QgsLabelPosition(): featureId( -1 ), rotation( 0 ), labelRect( QgsRectang le() ), width( 0 ), height( 0 ), layerID( "" ), upsideDown( false ), isDiag ram( false ) {}
int featureId; int featureId;
double rotation; double rotation;
skipping to change at line 77 skipping to change at line 77
virtual ~QgsLabelingEngineInterface() {} virtual ~QgsLabelingEngineInterface() {}
//! called when we're going to start with rendering //! called when we're going to start with rendering
virtual void init( QgsMapRenderer* mp ) = 0; virtual void init( QgsMapRenderer* mp ) = 0;
//! called to find out whether the layer is used for labeling //! called to find out whether the layer is used for labeling
virtual bool willUseLayer( QgsVectorLayer* layer ) = 0; virtual bool willUseLayer( QgsVectorLayer* layer ) = 0;
//! called when starting rendering of a layer //! called when starting rendering of a layer
//! @note: this method was added in version 1.6 //! @note: this method was added in version 1.6
virtual int prepareLayer( QgsVectorLayer* layer, QSet<int>& attrIndices , QgsRenderContext& ctx ) = 0; virtual int prepareLayer( QgsVectorLayer* layer, QSet<int>& attrIndices , QgsRenderContext& ctx ) = 0;
//! adds a diagram layer to the labeling engine //! adds a diagram layer to the labeling engine
virtual int addDiagramLayer( QgsVectorLayer* layer, QgsDiagramLayerSett virtual int addDiagramLayer( QgsVectorLayer* layer, QgsDiagramLayerSett
ings* s ) { return 0; } ings* s )
{ Q_UNUSED( layer ); Q_UNUSED( s ); return 0; }
//! called for every feature //! called for every feature
virtual void registerFeature( QgsVectorLayer* layer, QgsFeature& feat, const QgsRenderContext& context = QgsRenderContext() ) = 0; virtual void registerFeature( QgsVectorLayer* layer, QgsFeature& feat, const QgsRenderContext& context = QgsRenderContext() ) = 0;
//! called for every diagram feature //! called for every diagram feature
virtual void registerDiagramFeature( QgsVectorLayer* layer, QgsFeature& virtual void registerDiagramFeature( QgsVectorLayer* layer, QgsFeature&
feat, const QgsRenderContext& context = QgsRenderContext() ) {}; feat, const QgsRenderContext& context = QgsRenderContext() )
{ Q_UNUSED( layer ); Q_UNUSED( feat ); Q_UNUSED( context ); }
//! called when the map is drawn and labels should be placed //! called when the map is drawn and labels should be placed
virtual void drawLabeling( QgsRenderContext& context ) = 0; virtual void drawLabeling( QgsRenderContext& context ) = 0;
//! called when we're done with rendering //! called when we're done with rendering
virtual void exit() = 0; virtual void exit() = 0;
//! return infos about labels at a given (map) position //! return infos about labels at a given (map) position
//! @note: this method was added in version 1.7 //! @note: this method was added in version 1.7
virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ) = 0; virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ) = 0;
//! called when passing engine among map renderers //! called when passing engine among map renderers
virtual QgsLabelingEngineInterface* clone() = 0; virtual QgsLabelingEngineInterface* clone() = 0;
skipping to change at line 119 skipping to change at line 121
//MAP_UNITS probably supported in future versions //MAP_UNITS probably supported in future versions
}; };
//! constructor //! constructor
QgsMapRenderer(); QgsMapRenderer();
//! destructor //! destructor
~QgsMapRenderer(); ~QgsMapRenderer();
//! starts rendering //! starts rendering
void render( QPainter* painter ); //! @ param forceWidthScale Force a specific scale factor for line widt
hs and marker sizes. Automatically calculated from output device DPI if 0
void render( QPainter* painter, double* forceWidthScale = 0 );
//! sets extent and checks whether suitable (returns false if not) //! sets extent and checks whether suitable (returns false if not)
bool setExtent( const QgsRectangle& extent ); bool setExtent( const QgsRectangle& extent );
//! returns current extent //! returns current extent
QgsRectangle extent() const; QgsRectangle extent() const;
const QgsMapToPixel* coordinateTransform() { return &( mRenderContext.m apToPixel() ); } const QgsMapToPixel* coordinateTransform() { return &( mRenderContext.m apToPixel() ); }
double scale() const { return mScale; } double scale() const { return mScale; }
skipping to change at line 249 skipping to change at line 252
void mapUnitsChanged(); void mapUnitsChanged();
//! emitted when layer's draw() returned false //! emitted when layer's draw() returned false
void drawError( QgsMapLayer* ); void drawError( QgsMapLayer* );
public slots: public slots:
//! called by signal from layer current being drawn //! called by signal from layer current being drawn
void onDrawingProgress( int current, int total ); void onDrawingProgress( int current, int total );
//! invalidate cached layer CRS
void invalidateCachedLayerCrs();
//! cached layer was destroyed
void cachedLayerDestroyed();
protected: protected:
//! adjust extent to fit the pixmap size //! adjust extent to fit the pixmap size
void adjustExtentToSize(); void adjustExtentToSize();
/** Convenience function to project an extent into the layer source /** Convenience function to project an extent into the layer source
* CRS, but also split it into two extents if it crosses * CRS, but also split it into two extents if it crosses
* the +/- 180 degree line. Modifies the given extent to be in the * the +/- 180 degree line. Modifies the given extent to be in the
* source CRS coordinates, and if it was split, returns true, and * source CRS coordinates, and if it was split, returns true, and
* also sets the contents of the r2 parameter * also sets the contents of the r2 parameter
*/ */
bool splitLayersExtent( QgsMapLayer* layer, QgsRectangle& extent, QgsRe ctangle& r2 ); bool splitLayersExtent( QgsMapLayer* layer, QgsRectangle& extent, QgsRe ctangle& r2 );
/**Creates an overlay object position manager subclass according to the current settings /**Creates an overlay object position manager subclass according to the current settings
@note this method was added in version 1.1*/ @note this method was added in version 1.1*/
QgsOverlayObjectPositionManager* overlayManagerFromSettings(); QgsOverlayObjectPositionManager* overlayManagerFromSettings();
protected:
//! indicates drawing in progress //! indicates drawing in progress
static bool mDrawing; static bool mDrawing;
//! map units per pixel //! map units per pixel
double mMapUnitsPerPixel; double mMapUnitsPerPixel;
//! Map scale at its current zool level //! Map scale at its current zool level
double mScale; double mScale;
//! scale calculator //! scale calculator
skipping to change at line 318 skipping to change at line 325
QgsDistanceArea* mDistArea; QgsDistanceArea* mDistArea;
//!Encapsulates context of rendering //!Encapsulates context of rendering
QgsRenderContext mRenderContext; QgsRenderContext mRenderContext;
//!Output units //!Output units
OutputUnits mOutputUnits; OutputUnits mOutputUnits;
//! Labeling engine (NULL by default) //! Labeling engine (NULL by default)
QgsLabelingEngineInterface* mLabelingEngine; QgsLabelingEngineInterface* mLabelingEngine;
//! Locks rendering loop for concurrent draws
QMutex mRenderMutex;
private:
QgsCoordinateTransform *tr( QgsMapLayer *layer );
QgsCoordinateTransform *mCachedTr;
QgsMapLayer *mCachedTrForLayer;
}; };
#endif #endif
 End of changes. 10 change blocks. 
9 lines changed or deleted 25 lines changed or added


 qgsmaptool.h   qgsmaptool.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPTOOL_H #ifndef QGSMAPTOOL_H
#define QGSMAPTOOL_H #define QGSMAPTOOL_H
#include <QCursor> #include <QCursor>
#include <QString> #include <QString>
#include <QObject> #include <QObject>
#ifdef HAVE_TOUCH
#include <QGestureEvent>
#endif
class QgsMapLayer; class QgsMapLayer;
class QgsMapCanvas; class QgsMapCanvas;
class QKeyEvent; class QKeyEvent;
class QMouseEvent; class QMouseEvent;
class QgsPoint; class QgsPoint;
class QgsRectangle; class QgsRectangle;
class QPoint; class QPoint;
class QAction; class QAction;
class QAbstractButton; class QAbstractButton;
skipping to change at line 66 skipping to change at line 69
//! Mouse release event for overriding. Default implementation does not hing. //! Mouse release event for overriding. Default implementation does not hing.
virtual void canvasReleaseEvent( QMouseEvent * e ); virtual void canvasReleaseEvent( QMouseEvent * e );
//! Key event for overriding. Default implementation does nothing. //! Key event for overriding. Default implementation does nothing.
virtual void keyPressEvent( QKeyEvent* e ); virtual void keyPressEvent( QKeyEvent* e );
//! Key event for overriding. Default implementation does nothing. //! Key event for overriding. Default implementation does nothing.
//! Added in version 1.1 //! Added in version 1.1
virtual void keyReleaseEvent( QKeyEvent* e ); virtual void keyReleaseEvent( QKeyEvent* e );
#ifdef HAVE_TOUCH
//! gesture event for overriding. Default implementation does nothing.
virtual bool gestureEvent( QGestureEvent* e );
#endif
//! Called when rendering has finished. Default implementation does not hing. //! Called when rendering has finished. Default implementation does not hing.
virtual void renderComplete(); virtual void renderComplete();
/** Use this to associate a QAction to this maptool. Then when the setM apTool /** Use this to associate a QAction to this maptool. Then when the setM apTool
* method of mapcanvas is called the action state will be set to on. * method of mapcanvas is called the action state will be set to on.
* Usually this will cause e.g. a toolbutton to appear pressed in and * Usually this will cause e.g. a toolbutton to appear pressed in and
* the previously used toolbutton to pop out. */ * the previously used toolbutton to pop out. */
void setAction( QAction* action ); void setAction( QAction* action );
/** Return associated action with map tool or NULL if no action is asso ciated */ /** Return associated action with map tool or NULL if no action is asso ciated */
 End of changes. 3 change blocks. 
1 lines changed or deleted 9 lines changed or added


 qgsmaptoolemitpoint.h   qgsmaptoolemitpoint.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2007 by Martin Dobias copyright : (C) 2007 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPTOOLEMITPOINT_H #ifndef QGSMAPTOOLEMITPOINT_H
#define QGSMAPTOOLEMITPOINT_H #define QGSMAPTOOLEMITPOINT_H
#include "qgspoint.h" #include "qgspoint.h"
#include "qgsmaptool.h" #include "qgsmaptool.h"
class QgsMapCanvas; class QgsMapCanvas;
/** \ingroup gui /** \ingroup gui
* A map tool that simply emits a point when clicking on the map. * A map tool that simply emits a point when clicking on the map.
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsmaptoolpan.h   qgsmaptoolpan.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPTOOLPAN_H #ifndef QGSMAPTOOLPAN_H
#define QGSMAPTOOLPAN_H #define QGSMAPTOOLPAN_H
#include "qgsmaptool.h" #include "qgsmaptool.h"
class QgsMapCanvas; class QgsMapCanvas;
/** \ingroup gui /** \ingroup gui
* A map tool for panning the map. * A map tool for panning the map.
* @see QgsMapTool * @see QgsMapTool
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsmaptoolzoom.h   qgsmaptoolzoom.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPTOOLZOOM_H #ifndef QGSMAPTOOLZOOM_H
#define QGSMAPTOOLZOOM_H #define QGSMAPTOOLZOOM_H
#include "qgsmaptool.h" #include "qgsmaptool.h"
#include <QRect> #include <QRect>
class QgsRubberBand; class QgsRubberBand;
/** \ingroup gui /** \ingroup gui
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsmaptopixel.h   qgsmaptopixel.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMAPTOPIXEL #ifndef QGSMAPTOPIXEL
#define QGSMAPTOPIXEL #define QGSMAPTOPIXEL
#include "qgspoint.h" #include "qgspoint.h"
#include <vector> #include <vector>
#include <cassert> #include <cassert>
class QgsPoint; class QgsPoint;
class QPoint; class QPoint;
skipping to change at line 77 skipping to change at line 76
given coordinates in place. Intended as a fast way to do the given coordinates in place. Intended as a fast way to do the
transform. */ transform. */
void transformInPlace( double& x, double& y ) const; void transformInPlace( double& x, double& y ) const;
/* Transform device coordinates to map coordinates. Modifies the /* Transform device coordinates to map coordinates. Modifies the
given coordinates in place. Intended as a fast way to do the given coordinates in place. Intended as a fast way to do the
transform. */ transform. */
void transformInPlace( std::vector<double>& x, void transformInPlace( std::vector<double>& x,
std::vector<double>& y ) const; std::vector<double>& y ) const;
#ifdef ANDROID
void transformInPlace( float& x, float& y ) const;
void transformInPlace( std::vector<float>& x,
std::vector<float>& y ) const;
#endif
QgsPoint toMapCoordinates( int x, int y ) const; QgsPoint toMapCoordinates( int x, int y ) const;
/*! Transform device coordinates to map (world) coordinates /*! Transform device coordinates to map (world) coordinates
@note: this method was added in version 1.6*/ @note: this method was added in version 1.6*/
QgsPoint toMapCoordinatesF( double x, double y ) const; QgsPoint toMapCoordinatesF( double x, double y ) const;
/*! Tranform device coordinates to map (world) coordinates /*! Tranform device coordinates to map (world) coordinates
* @param p Point to be converted to map cooordinates * @param p Point to be converted to map cooordinates
* @return QgsPoint in map coorndiates * @return QgsPoint in map coorndiates
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added


 qgsmarkersymbollayerv2.h   qgsmarkersymbollayerv2.h 
/**************************************************************************
*
qgsmarkersymbollayerv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSMARKERSYMBOLLAYERV2_H #ifndef QGSMARKERSYMBOLLAYERV2_H
#define QGSMARKERSYMBOLLAYERV2_H #define QGSMARKERSYMBOLLAYERV2_H
#include "qgssymbollayerv2.h" #include "qgssymbollayerv2.h"
#define DEFAULT_SIMPLEMARKER_NAME "circle" #define DEFAULT_SIMPLEMARKER_NAME "circle"
#define DEFAULT_SIMPLEMARKER_COLOR QColor(255,0,0) #define DEFAULT_SIMPLEMARKER_COLOR QColor(255,0,0)
#define DEFAULT_SIMPLEMARKER_BORDERCOLOR QColor(0,0,0) #define DEFAULT_SIMPLEMARKER_BORDERCOLOR QColor(0,0,0)
#define DEFAULT_SIMPLEMARKER_SIZE DEFAULT_POINT_SIZE #define DEFAULT_SIMPLEMARKER_SIZE DEFAULT_POINT_SIZE
skipping to change at line 31 skipping to change at line 45
public: public:
QgsSimpleMarkerSymbolLayerV2( QString name = DEFAULT_SIMPLEMARKER_NAME, QgsSimpleMarkerSymbolLayerV2( QString name = DEFAULT_SIMPLEMARKER_NAME,
QColor color = DEFAULT_SIMPLEMARKER_COLOR , QColor color = DEFAULT_SIMPLEMARKER_COLOR ,
QColor borderColor = DEFAULT_SIMPLEMARKER _BORDERCOLOR, QColor borderColor = DEFAULT_SIMPLEMARKER _BORDERCOLOR,
double size = DEFAULT_SIMPLEMARKER_SIZE, double size = DEFAULT_SIMPLEMARKER_SIZE,
double angle = DEFAULT_SIMPLEMARKER_ANGLE ); double angle = DEFAULT_SIMPLEMARKER_ANGLE );
// static stuff // static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPoint( const QPointF& point, QgsSymbolV2RenderContext& conte xt ); void renderPoint( const QPointF& point, QgsSymbolV2RenderContext& conte xt );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void writeSldMarker( QDomDocument &doc, QDomElement &element, QgsString
Map props ) const;
QString name() const { return mName; } QString name() const { return mName; }
void setName( QString name ) { mName = name; } void setName( QString name ) { mName = name; }
QColor borderColor() const { return mBorderColor; } QColor borderColor() const { return mBorderColor; }
void setBorderColor( QColor color ) { mBorderColor = color; } void setBorderColor( QColor color ) { mBorderColor = color; }
protected: protected:
void drawMarker( QPainter* p, QgsSymbolV2RenderContext& context ); void drawMarker( QPainter* p, QgsSymbolV2RenderContext& context );
skipping to change at line 90 skipping to change at line 107
class CORE_EXPORT QgsSvgMarkerSymbolLayerV2 : public QgsMarkerSymbolLayerV2 class CORE_EXPORT QgsSvgMarkerSymbolLayerV2 : public QgsMarkerSymbolLayerV2
{ {
public: public:
QgsSvgMarkerSymbolLayerV2( QString name = DEFAULT_SVGMARKER_NAME, QgsSvgMarkerSymbolLayerV2( QString name = DEFAULT_SVGMARKER_NAME,
double size = DEFAULT_SVGMARKER_SIZE, double size = DEFAULT_SVGMARKER_SIZE,
double angle = DEFAULT_SVGMARKER_ANGLE ); double angle = DEFAULT_SVGMARKER_ANGLE );
// static stuff // static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
//! Return a list of all available svg files //! Return a list of all available svg files
static QStringList listSvgFiles(); static QStringList listSvgFiles();
//! Get symbol's path from its name //! Get symbol's path from its name
static QString symbolNameToPath( QString name ); static QString symbolNameToPath( QString name );
//! Get symbols's name from its path //! Get symbols's name from its path
static QString symbolPathToName( QString path ); static QString symbolPathToName( QString path );
skipping to change at line 114 skipping to change at line 132
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPoint( const QPointF& point, QgsSymbolV2RenderContext& conte xt ); void renderPoint( const QPointF& point, QgsSymbolV2RenderContext& conte xt );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void writeSldMarker( QDomDocument &doc, QDomElement &element, QgsString
Map props ) const;
QString path() const { return mPath; } QString path() const { return mPath; }
void setPath( QString path ) { mPath = path; } void setPath( QString path );
QColor fillColor() const { return mFillColor; }
void setFillColor( const QColor& c ) { mFillColor = c; }
QColor outlineColor() const { return mOutlineColor; }
void setOutlineColor( const QColor& c ) { mOutlineColor = c; }
double outlineWidth() const { return mOutlineWidth; }
void setOutlineWidth( double w ) { mOutlineWidth = w; }
protected: protected:
void loadSvg(); void loadSvg();
QString mPath; QString mPath;
QPicture mPicture;
QPicture mSelPicture; //param(fill), param(outline), param(outline-width) are going
//to be replaced in memory
QColor mFillColor;
QColor mOutlineColor;
double mOutlineWidth;
double mOrigSize; double mOrigSize;
}; };
////////// //////////
#define POINT2MM(x) ( (x) * 25.4 / 72 ) // point is 1/72 of inch #define POINT2MM(x) ( (x) * 25.4 / 72 ) // point is 1/72 of inch
#define MM2POINT(x) ( (x) * 72 / 25.4 ) #define MM2POINT(x) ( (x) * 72 / 25.4 )
#define DEFAULT_FONTMARKER_FONT "Dingbats" #define DEFAULT_FONTMARKER_FONT "Dingbats"
#define DEFAULT_FONTMARKER_CHR QChar('A') #define DEFAULT_FONTMARKER_CHR QChar('A')
skipping to change at line 150 skipping to change at line 183
public: public:
QgsFontMarkerSymbolLayerV2( QString fontFamily = DEFAULT_FONTMARKER_FON T, QgsFontMarkerSymbolLayerV2( QString fontFamily = DEFAULT_FONTMARKER_FON T,
QChar chr = DEFAULT_FONTMARKER_CHR, QChar chr = DEFAULT_FONTMARKER_CHR,
double pointSize = DEFAULT_FONTMARKER_SIZE, double pointSize = DEFAULT_FONTMARKER_SIZE,
QColor color = DEFAULT_FONTMARKER_COLOR, QColor color = DEFAULT_FONTMARKER_COLOR,
double angle = DEFAULT_FONTMARKER_ANGLE ); double angle = DEFAULT_FONTMARKER_ANGLE );
// static stuff // static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context ); void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context ); void stopRender( QgsSymbolV2RenderContext& context );
void renderPoint( const QPointF& point, QgsSymbolV2RenderContext& conte xt ); void renderPoint( const QPointF& point, QgsSymbolV2RenderContext& conte xt );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void writeSldMarker( QDomDocument &doc, QDomElement &element, QgsString
Map props ) const;
// new methods // new methods
QString fontFamily() const { return mFontFamily; } QString fontFamily() const { return mFontFamily; }
void setFontFamily( QString family ) { mFontFamily = family; } void setFontFamily( QString family ) { mFontFamily = family; }
QChar character() const { return mChr; } QChar character() const { return mChr; }
void setCharacter( QChar ch ) { mChr = ch; } void setCharacter( QChar ch ) { mChr = ch; }
protected: protected:
 End of changes. 9 change blocks. 
3 lines changed or deleted 51 lines changed or added


 qgsmessageoutput.h   qgsmessageoutput.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMESSAGEOUTPUT_H #ifndef QGSMESSAGEOUTPUT_H
#define QGSMESSAGEOUTPUT_H #define QGSMESSAGEOUTPUT_H
#include <QString> #include <QString>
#include <QObject> #include <QObject>
class QgsMessageOutput; class QgsMessageOutput;
typedef QgsMessageOutput*( *MESSAGE_OUTPUT_CREATOR )(); typedef QgsMessageOutput*( *MESSAGE_OUTPUT_CREATOR )();
skipping to change at line 108 skipping to change at line 107
void destroyed(); void destroyed();
private: private:
//! stores current message //! stores current message
QString mMessage; QString mMessage;
//! stores current title //! stores current title
QString mTitle; QString mTitle;
MessageType mMsgType;
}; };
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsmessageviewer.h   qgsmessageviewer.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSMESSAGEVIEWER_H #ifndef QGSMESSAGEVIEWER_H
#define QGSMESSAGEVIEWER_H #define QGSMESSAGEVIEWER_H
#include <ui_qgsmessageviewer.h> #include <ui_qgsmessageviewer.h>
#include <qgisgui.h> #include <qgisgui.h>
#include "qgsmessageoutput.h" #include "qgsmessageoutput.h"
#include <QString> #include <QString>
/** \ingroup gui /** \ingroup gui
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsnetworkaccessmanager.h   qgsnetworkaccessmanager.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSNETWORKACCESSMANAGER_H #ifndef QGSNETWORKACCESSMANAGER_H
#define QGSNETWORKACCESSMANAGER_H #define QGSNETWORKACCESSMANAGER_H
#include <QList> #include <QList>
#include <QStringList> #include <QStringList>
#include <QNetworkAccessManager> #include <QNetworkAccessManager>
#include <QNetworkProxy> #include <QNetworkProxy>
/* /*
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgspallabeling.h   qgspallabeling.h 
skipping to change at line 49 skipping to change at line 49
namespace pal namespace pal
{ {
class Pal; class Pal;
class Layer; class Layer;
class LabelPosition; class LabelPosition;
} }
class QgsMapToPixel; class QgsMapToPixel;
class QgsFeature; class QgsFeature;
#include "qgspoint.h"
#include "qgspoint.h"
#include "qgsmaprenderer.h" // definition of QgsLabelingEngineInterface #include "qgsmaprenderer.h" // definition of QgsLabelingEngineInterface
#include "qgsexpression.h"
class QgsPalGeometry; class QgsPalGeometry;
class QgsVectorLayer; class QgsVectorLayer;
class CORE_EXPORT QgsPalLayerSettings class CORE_EXPORT QgsPalLayerSettings
{ {
public: public:
QgsPalLayerSettings(); QgsPalLayerSettings();
QgsPalLayerSettings( const QgsPalLayerSettings& s ); QgsPalLayerSettings( const QgsPalLayerSettings& s );
~QgsPalLayerSettings(); ~QgsPalLayerSettings();
skipping to change at line 101 skipping to change at line 102
BufferColor, BufferColor,
PositionX, //x-coordinate data defined label position PositionX, //x-coordinate data defined label position
PositionY, //y-coordinate data defined label position PositionY, //y-coordinate data defined label position
Hali, //horizontal alignment for data defined label position (Left, C enter, Right) Hali, //horizontal alignment for data defined label position (Left, C enter, Right)
Vali, //vertical alignment for data defined label position (Bottom, B ase, Half, Cap, Top) Vali, //vertical alignment for data defined label position (Bottom, B ase, Half, Cap, Top)
LabelDistance, LabelDistance,
Rotation //data defined rotation (only useful in connection with data defined position) Rotation //data defined rotation (only useful in connection with data defined position)
}; };
QString fieldName; QString fieldName;
/** Is this label made from a expression string eg FieldName || 'mm'
*/
bool isExpression;
/** Returns the QgsExpression for this label settings.
*/
QgsExpression* getLabelExpression();
Placement placement; Placement placement;
unsigned int placementFlags; unsigned int placementFlags;
QFont textFont; QFont textFont;
QColor textColor; QColor textColor;
bool enabled; bool enabled;
int priority; // 0 = low, 10 = high int priority; // 0 = low, 10 = high
bool obstacle; // whether it's an obstacle bool obstacle; // whether it's an obstacle
double dist; // distance from the feature (in mm) double dist; // distance from the feature (in mm)
double vectorScaleFactor; //scale factor painter units->pixels double vectorScaleFactor; //scale factor painter units->pixels
double rasterCompressFactor; //pixel resolution scale factor double rasterCompressFactor; //pixel resolution scale factor
int scaleMin, scaleMax; // disabled if both are zero int scaleMin, scaleMax; // disabled if both are zero
double bufferSize; //buffer size (in mm) double bufferSize; //buffer size (in mm)
QColor bufferColor; QColor bufferColor;
bool formatNumbers;
int decimals;
bool plusSign;
bool labelPerPart; // whether to label every feature's part or only the biggest one bool labelPerPart; // whether to label every feature's part or only the biggest one
bool mergeLines; bool mergeLines;
bool multiLineLabels; //draw labels on multiple lines if they contain ' \n'
double minFeatureSize; // minimum feature size to be labelled (in mm) double minFeatureSize; // minimum feature size to be labelled (in mm)
// Adds '<' or '>' to the label string pointing to the direction of the line / polygon ring // Adds '<' or '>' to the label string pointing to the direction of the line / polygon ring
// Works only if Placement == Line // Works only if Placement == Line
bool addDirectionSymbol; bool addDirectionSymbol;
bool fontSizeInMapUnits; //true if font size is in map units (otherwise in points) bool fontSizeInMapUnits; //true if font size is in map units (otherwise in points)
bool distInMapUnits; //true if distance is in map units (otherwise in m m) bool distInMapUnits; //true if distance is in map units (otherwise in m m)
QString wrapChar;
// called from register feature hook // called from register feature hook
void calculateLabelSize( const QFontMetricsF* fm, QString text, double& labelX, double& labelY ); void calculateLabelSize( const QFontMetricsF* fm, QString text, double& labelX, double& labelY );
// implementation of register feature hook // implementation of register feature hook
void registerFeature( QgsFeature& f, const QgsRenderContext& context ); void registerFeature( QgsVectorLayer* layer, QgsFeature& f, const QgsRe nderContext& context );
void readFromLayer( QgsVectorLayer* layer ); void readFromLayer( QgsVectorLayer* layer );
void writeToLayer( QgsVectorLayer* layer ); void writeToLayer( QgsVectorLayer* layer );
/**Set a property as data defined*/ /**Set a property as data defined*/
void setDataDefinedProperty( DataDefinedProperties p, int attributeInde x ); void setDataDefinedProperty( DataDefinedProperties p, int attributeInde x );
/**Set a property to static instead data defined*/ /**Set a property to static instead data defined*/
void removeDataDefinedProperty( DataDefinedProperties p ); void removeDataDefinedProperty( DataDefinedProperties p );
// temporary stuff: set when layer gets prepared // temporary stuff: set when layer gets prepared
pal::Layer* palLayer; pal::Layer* palLayer;
int fieldIndex; int fieldIndex;
QFontMetricsF* fontMetrics; QFontMetricsF* fontMetrics;
const QgsMapToPixel* xform; const QgsMapToPixel* xform;
const QgsCoordinateTransform* ct; const QgsCoordinateTransform* ct;
QgsPoint ptZero, ptOne; QgsPoint ptZero, ptOne;
QList<QgsPalGeometry*> geometries; QList<QgsPalGeometry*> geometries;
QgsGeometry* extentGeom;
/**Stores field indices for data defined layer properties*/ /**Stores field indices for data defined layer properties*/
QMap< DataDefinedProperties, int > dataDefinedProperties; QMap< DataDefinedProperties, int > dataDefinedProperties;
/**Calculates pixel size (considering output size should be in pixel or map units, scale factors and oversampling) /**Calculates pixel size (considering output size should be in pixel or map units, scale factors and oversampling)
@param size size to convert @param size size to convert
@param c rendercontext @param c rendercontext
@return font pixel size*/ @return font pixel size*/
int sizeToPixel( double size, const QgsRenderContext& c ) const; int sizeToPixel( double size, const QgsRenderContext& c ) const;
private: private:
/**Checks if a feature is larger than a minimum size (in mm) /**Checks if a feature is larger than a minimum size (in mm)
@return true if above size, false if below*/ @return true if above size, false if below*/
bool checkMinimumSizeMM( const QgsRenderContext& ct, QgsGeometry* geom, double minSize ) const; bool checkMinimumSizeMM( const QgsRenderContext& ct, QgsGeometry* geom, double minSize ) const;
QgsExpression* expression;
}; };
class CORE_EXPORT QgsLabelCandidate class CORE_EXPORT QgsLabelCandidate
{ {
public: public:
QgsLabelCandidate( QRectF r, double c ): rect( r ), cost( c ) {} QgsLabelCandidate( QRectF r, double c ): rect( r ), cost( c ) {}
QRectF rect; QRectF rect;
double cost; double cost;
}; };
skipping to change at line 219 skipping to change at line 233
//! called when we're done with rendering //! called when we're done with rendering
virtual void exit(); virtual void exit();
//! return infos about labels at a given (map) position //! return infos about labels at a given (map) position
virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ); virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p );
//! called when passing engine among map renderers //! called when passing engine among map renderers
virtual QgsLabelingEngineInterface* clone(); virtual QgsLabelingEngineInterface* clone();
void drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* painter, const QgsMapToPixel* xform ); void drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* painter, const QgsMapToPixel* xform );
//!drawLabel //!drawLabel
void drawLabel( pal::LabelPosition* label, QPainter* painter, const QFo nt& f, const QColor& c, const QgsMapToPixel* xform, double bufferSize = -1, \ void drawLabel( pal::LabelPosition* label, QPainter* painter, const QFo nt& f, const QColor& c, const QgsMapToPixel* xform, double bufferSize = -1,
const QColor& bufferColor = QColor( 255, 255, 255 ), bo ol drawBuffer = false ); const QColor& bufferColor = QColor( 255, 255, 255 ), bo ol drawBuffer = false );
static void drawLabelBuffer( QPainter* p, QString text, const QFont& fo nt, double size, QColor color ); static void drawLabelBuffer( QPainter* p, QString text, const QFont& fo nt, double size, QColor color );
protected: protected:
void initPal(); void initPal();
protected: protected:
// hashtable of layer settings, being filled during labeling // hashtable of layer settings, being filled during labeling
QHash<QgsVectorLayer*, QgsPalLayerSettings> mActiveLayers; QHash<QgsVectorLayer*, QgsPalLayerSettings> mActiveLayers;
 End of changes. 11 change blocks. 
5 lines changed or deleted 19 lines changed or added


 qgspenstylecombobox.h   qgspenstylecombobox.h 
/**************************************************************************
*
qgspenstylecombobox.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSPENSTYLECOMBOBOX_H #ifndef QGSPENSTYLECOMBOBOX_H
#define QGSPENSTYLECOMBOBOX_H #define QGSPENSTYLECOMBOBOX_H
#include <QComboBox> #include <QComboBox>
class GUI_EXPORT QgsPenStyleComboBox : public QComboBox class GUI_EXPORT QgsPenStyleComboBox : public QComboBox
{ {
Q_OBJECT Q_OBJECT
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgspluginlayer.h   qgspluginlayer.h 
/**************************************************************************
*
qgspluginlayer.h
---------------------
begin : January 2010
copyright : (C) 2010 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSPLUGINLAYER_H #ifndef QGSPLUGINLAYER_H
#define QGSPLUGINLAYER_H #define QGSPLUGINLAYER_H
#include "qgsmaplayer.h" #include "qgsmaplayer.h"
/** \ingroup core /** \ingroup core
Base class for plugin layers. These can be implemented by plugins Base class for plugin layers. These can be implemented by plugins
and registered in QgsPluginLayerRegistry. and registered in QgsPluginLayerRegistry.
In order to be readable from project files, they should set these attribu tes in layer DOM node: In order to be readable from project files, they should set these attribu tes in layer DOM node:
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgspluginlayerregistry.h   qgspluginlayerregistry.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSPLUGINLAYERREGSITRY_H #ifndef QGSPLUGINLAYERREGSITRY_H
#define QGSPLUGINLAYERREGSITRY_H #define QGSPLUGINLAYERREGSITRY_H
#include <QMap> #include <QMap>
#include <QDomNode> #include <QDomNode>
class QgsPluginLayer; class QgsPluginLayer;
/** \ingroup core /** \ingroup core
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgspoint.h   qgspoint.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSPOINT_H #ifndef QGSPOINT_H
#define QGSPOINT_H #define QGSPOINT_H
#include <qgis.h>
#include <iostream> #include <iostream>
#include <QString> #include <QString>
#include <QPoint> #include <QPoint>
/** \ingroup core /** \ingroup core
* A class to represent a vector. * A class to represent a vector.
* Currently no Z axis / 2.5D support is implemented. * Currently no Z axis / 2.5D support is implemented.
*/ */
class CORE_EXPORT QgsVector class CORE_EXPORT QgsVector
skipping to change at line 66 skipping to change at line 67
}; };
/** \ingroup core /** \ingroup core
* A class to represent a point geometry. * A class to represent a point geometry.
* Currently no Z axis / 2.5D support is implemented. * Currently no Z axis / 2.5D support is implemented.
*/ */
class CORE_EXPORT QgsPoint class CORE_EXPORT QgsPoint
{ {
public: public:
/// Default constructor /// Default constructor
QgsPoint() QgsPoint() : m_x( 0.0 ), m_y( 0.0 )
{} {}
/*! Create a point from another point */ /*! Create a point from another point */
QgsPoint( const QgsPoint& p ); QgsPoint( const QgsPoint& p );
/*! Create a point from x,y coordinates /*! Create a point from x,y coordinates
* @param x x coordinate * @param x x coordinate
* @param y y coordinate * @param y y coordinate
*/ */
QgsPoint( double x, double y ) QgsPoint( double x, double y )
skipping to change at line 149 skipping to change at line 150
QString wellKnownText() const; QString wellKnownText() const;
/**Returns the squared distance between this point and x,y*/ /**Returns the squared distance between this point and x,y*/
double sqrDist( double x, double y ) const; double sqrDist( double x, double y ) const;
/**Returns the squared distance between this and other point*/ /**Returns the squared distance between this and other point*/
double sqrDist( const QgsPoint& other ) const; double sqrDist( const QgsPoint& other ) const;
/**Returns the minimum distance between this point and a segment /**Returns the minimum distance between this point and a segment
@note added in QGIS 1.5*/ @note added in QGIS 1.5*/
double sqrDistToSegment( double x1, double y1, double x2, double y2, Qg sPoint& minDistPoint ) const; double sqrDistToSegment( double x1, double y1, double x2, double y2, Qg sPoint& minDistPoint, double epsilon = DEFAULT_SEGMENT_EPSILON ) const;
/**Calculates azimut between this point and other one (clockwise in deg ree, starting from north) /**Calculates azimut between this point and other one (clockwise in deg ree, starting from north)
@note: this function has been added in version 1.7*/ @note: this function has been added in version 1.7*/
double azimuth( const QgsPoint& other ); double azimuth( const QgsPoint& other );
//! equality operator //! equality operator
bool operator==( const QgsPoint &other ); bool operator==( const QgsPoint &other );
//! Inequality operator //! Inequality operator
bool operator!=( const QgsPoint &other ) const; bool operator!=( const QgsPoint &other ) const;
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added


 qgsproject.h   qgsproject.h 
skipping to change at line 20 skipping to change at line 20
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSPROJECT_H #ifndef QGSPROJECT_H
#define QGSPROJECT_H #define QGSPROJECT_H
#include <memory> #include <memory>
#include "qgsprojectversion.h" #include "qgsprojectversion.h"
#include <QObject> #include <QHash>
#include <QList> #include <QList>
#include <QObject>
#include <QPair> #include <QPair>
//#include <QDomDocument> //#include <QDomDocument>
class QFileInfo; class QFileInfo;
class QDomDocument; class QDomDocument;
class QDomElement;
class QDomNode; class QDomNode;
class QgsMapLayer;
class QgsProjectBadLayerHandler; class QgsProjectBadLayerHandler;
class QgsVectorLayer;
/** \ingroup core /** \ingroup core
* Reads and writes project states. * Reads and writes project states.
@note @note
Has two general kinds of state to make persistent. (I.e., to read and Has two general kinds of state to make persistent. (I.e., to read and
write.) First, Qgis proprietary information. Second plug-in information . write.) First, Qgis proprietary information. Second plug-in information .
A singleton since there shall only be one active project at a time; and A singleton since there shall only be one active project at a time; and
skipping to change at line 263 skipping to change at line 266
/** Return error message from previous read/write /** Return error message from previous read/write
@note added in 1.4 */ @note added in 1.4 */
QString error() const; QString error() const;
/** Change handler for missing layers. /** Change handler for missing layers.
Deletes old handler and takes ownership of the new one. Deletes old handler and takes ownership of the new one.
@note added in 1.4 */ @note added in 1.4 */
void setBadLayerHandler( QgsProjectBadLayerHandler* handler ); void setBadLayerHandler( QgsProjectBadLayerHandler* handler );
/**Returns project file path if layer is embedded from other project fi
le. Returns empty string if layer is not embedded*/
QString layerIsEmbedded( const QString& id ) const;
/**Creates a maplayer instance defined in an arbitrary project file. Ca
ller takes ownership
@return the layer or 0 in case of error
@note: added in version 1.8*/
//static QgsMapLayer* createEmbeddedLayer( const QString& layerId, cons
t QString& projectFilePath );
bool createEmbeddedLayer( const QString& layerId, const QString& projec
tFilePath, QList<QDomNode>& brokenNodes,
QList< QPair< QgsVectorLayer*, QDomElement >
>& vectorLayerList, bool saveFlag = true );
protected: protected:
/** Set error message from read/write operation /** Set error message from read/write operation
@note added in 1.4 */ @note added in 1.4 */
void setError( QString errorMessage ); void setError( QString errorMessage );
/** Clear error message /** Clear error message
@note added in 1.4 */ @note added in 1.4 */
void clearError(); void clearError();
//Creates layer and adds it to maplayer registry
bool addLayer( const QDomElement& layerElem, QList<QDomNode>& brokenNod
es, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList );
signals: signals:
//! emitted when project is being read //! emitted when project is being read
void readProject( const QDomDocument & ); void readProject( const QDomDocument & );
//! emitted when project is being written //! emitted when project is being written
void writeProject( QDomDocument & ); void writeProject( QDomDocument & );
//! emitted when an old project file is read. //! emitted when an old project file is read.
void oldProjectVersionWarning( QString ); void oldProjectVersionWarning( QString );
skipping to change at line 308 skipping to change at line 324
std::auto_ptr<Imp> imp_; std::auto_ptr<Imp> imp_;
static QgsProject * theProject_; static QgsProject * theProject_;
QPair< bool, QList<QDomNode> > _getMapLayers( QDomDocument const &doc ) ; QPair< bool, QList<QDomNode> > _getMapLayers( QDomDocument const &doc ) ;
QString mErrorMessage; QString mErrorMessage;
QgsProjectBadLayerHandler* mBadLayerHandler; QgsProjectBadLayerHandler* mBadLayerHandler;
/**Embeded layers which are defined in other projects. Key: layer id,
value: pair< project file path, save layer yes / no (e.g. if the layer
is part of an embedded group, loading/saving is done by the legend)
If the project file path is empty, QgsProject is going to ignore the
layer for saving (e.g. because it is part and managed by an embedded group
)*/
QHash< QString, QPair< QString, bool> > mEmbeddedLayers;
}; // QgsProject }; // QgsProject
/** Interface for classes that handle missing layer files when reading proj ect file. /** Interface for classes that handle missing layer files when reading proj ect file.
@note added in 1.4 */ @note added in 1.4 */
class CORE_EXPORT QgsProjectBadLayerHandler class CORE_EXPORT QgsProjectBadLayerHandler
{ {
public: public:
virtual void handleBadLayers( QList<QDomNode> layers, QDomDocument proj ectDom ) = 0; virtual void handleBadLayers( QList<QDomNode> layers, QDomDocument proj ectDom ) = 0;
virtual ~QgsProjectBadLayerHandler() {} virtual ~QgsProjectBadLayerHandler() {}
}; };
 End of changes. 9 change blocks. 
2 lines changed or deleted 32 lines changed or added


 qgsprojectbadlayerguihandler.h   qgsprojectbadlayerguihandler.h 
/**************************************************************************
*
qgsprojectbadlayerguihandler.h - handle bad layers
---------------------
begin : December 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSPROJECTBADLAYERGUIHANDLER_H #ifndef QGSPROJECTBADLAYERGUIHANDLER_H
#define QGSPROJECTBADLAYERGUIHANDLER_H #define QGSPROJECTBADLAYERGUIHANDLER_H
#include "qgsproject.h" #include "qgsproject.h"
/** \ingroup gui /** \ingroup gui
Handler for missing layers within project. Handler for missing layers within project.
Gives user a chance to select path to the missing layers. Gives user a chance to select path to the missing layers.
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgsprojectfiletransform.h   qgsprojectfiletransform.h 
skipping to change at line 25 skipping to change at line 25
* * * *
************************************************************************** */ ************************************************************************** */
/** \ingroup core /** \ingroup core
* Class to convert from older project file versions to newer. * Class to convert from older project file versions to newer.
* This class provides possibility to store a project file as a QDomDocumen t, * This class provides possibility to store a project file as a QDomDocumen t,
* and provides the ability to specify version of the project file, and * and provides the ability to specify version of the project file, and
* perform upgrades to a more recent version * perform upgrades to a more recent version
*/ */
/* $Id$ */
#ifndef QGSPROJECTFILETRANSFORM_H #ifndef QGSPROJECTFILETRANSFORM_H
#define QGSPROJECTFILETRANSFORM_H #define QGSPROJECTFILETRANSFORM_H
#include <QString> #include <QString>
#include <QDomDocument> #include <QDomDocument>
#include <vector> #include <vector>
#include "qgsprojectversion.h" #include "qgsprojectversion.h"
class QgsProjectFileTransform class QgsProjectFileTransform
{ {
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 qgsprojectionselector.h   qgsprojectionselector.h 
skipping to change at line 32 skipping to change at line 32
/** \ingroup gui /** \ingroup gui
* A widget for selecting a Coordinate reference system from a tree. * A widget for selecting a Coordinate reference system from a tree.
* @see QgsGenericProjectionSelector. * @see QgsGenericProjectionSelector.
@author Tim Sutton @author Tim Sutton
*/ */
class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProj ectionSelectorBase class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProj ectionSelectorBase
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsProjectionSelector( QWidget* parent, QgsProjectionSelector( QWidget* parent, const char *name = "", Qt::WFla
const char * name = "", gs fl = 0 );
Qt::WFlags fl = 0 );
~QgsProjectionSelector(); ~QgsProjectionSelector();
/** /**
* \brief Populate the proj tree view with user defined projection name s... * \brief Populate the proj tree view with user defined projection name s...
* *
* \param crsFilter a list of OGC Coordinate Reference Systems to filte r the * \param crsFilter a list of OGC Coordinate Reference Systems to filte r the
* list of projections by. This is useful in (e.g.) W MS situations * list of projections by. This is useful in (e.g.) W MS situations
* where you just want to offer what the WMS server ca n support. * where you just want to offer what the WMS server ca n support.
* *
* \todo Should this be public? * \todo Should this be public?
*/ */
void loadUserCrsList( QSet<QString> * crsFilter = 0 ); void loadUserCrsList( QSet<QString> *crsFilter = 0 );
/** /**
* \brief Populate the proj tree view with system projection names... * \brief Populate the proj tree view with system projection names...
* *
* \param crsFilter a list of OGC Coordinate Reference Systems to filte r the * \param crsFilter a list of OGC Coordinate Reference Systems to filte r the
* list of projections by. This is useful in (e.g.) W MS situations * list of projections by. This is useful in (e.g.) W MS situations
* where you just want to offer what the WMS server ca n support. * where you just want to offer what the WMS server ca n support.
* *
* \todo Should this be public? * \todo Should this be public?
*/ */
void loadCrsList( QSet<QString> * crsFilter = 0 ); void loadCrsList( QSet<QString> *crsFilter = 0 );
/*! /*!
* \brief Make the string safe for use in SQL statements. * \brief Make the string safe for use in SQL statements.
* This involves escaping single quotes, double quotes, backslashes, * This involves escaping single quotes, double quotes, backslashes,
* and optionally, percentage symbols. Percentage symbols are used * and optionally, percentage symbols. Percentage symbols are used
* as wildcards sometimes and so when using the string as part of the * as wildcards sometimes and so when using the string as part of the
* LIKE phrase of a select statement, should be escaped. * LIKE phrase of a select statement, should be escaped.
* \arg const QString in The input string to make safe. * \arg const QString in The input string to make safe.
* \return The string made safe for SQL statements. * \return The string made safe for SQL statements.
*/ */
skipping to change at line 115 skipping to change at line 113
* Sets this widget to filter the available projections to those listed * Sets this widget to filter the available projections to those listed
* by the given Coordinate Reference Systems. * by the given Coordinate Reference Systems.
* *
* \param crsFilter a list of OGC Coordinate Reference Systems to filte r the * \param crsFilter a list of OGC Coordinate Reference Systems to filte r the
* list of projections by. This is useful in (e.g.) W MS situations * list of projections by. This is useful in (e.g.) W MS situations
* where you just want to offer what the WMS server ca n support. * where you just want to offer what the WMS server ca n support.
* *
* \warning This function's behaviour is undefined if it is called afte r the widget is shown. * \warning This function's behaviour is undefined if it is called afte r the widget is shown.
*/ */
void setOgcWmsCrsFilter( QSet<QString> crsFilter ); void setOgcWmsCrsFilter( QSet<QString> crsFilter );
void on_lstCoordinateSystems_currentItemChanged( QTreeWidgetItem *curre
void on_pbnFind_clicked(); nt, QTreeWidgetItem *prev );
void on_lstRecent_currentItemChanged( QTreeWidgetItem *, QTreeWidgetIte void on_lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWi
m * ); dgetItem *prev );
void on_cbxHideDeprecated_stateChanged(); void on_cbxHideDeprecated_stateChanged();
void on_leSearch_textChanged( const QString & );
protected: protected:
/** Used to ensure the projection list view is actually populated */ /** Used to ensure the projection list view is actually populated */
void showEvent( QShowEvent * theEvent ); void showEvent( QShowEvent * theEvent );
/** Used to manage column sizes */ /** Used to manage column sizes */
void resizeEvent( QResizeEvent * theEvent ); void resizeEvent( QResizeEvent * theEvent );
private: private:
/** /**
skipping to change at line 151 skipping to change at line 149
/** /**
* \brief does the legwork of applying CRS Selection * \brief does the legwork of applying CRS Selection
* *
* \warning This function does nothing unless getUserList() and getUser ProjList() * \warning This function does nothing unless getUserList() and getUser ProjList()
* Have already been called * Have already been called
* *
* \warning This function only expands the parents of the selection and * \warning This function only expands the parents of the selection and
* does not scroll the list to the selection if the widget is not visible. * does not scroll the list to the selection if the widget is not visible.
* Therefore you will typically want to use this in a showEven t(). * Therefore you will typically want to use this in a showEven t().
*/ */
void applySelection(); void applySelection( int column = NONE, QString value = QString::null ) ;
/** /**
* \brief gets an arbitrary sqlite3 expression from the selection * \brief gets an arbitrary sqlite3 expression from the selection
* *
* \param e The sqlite3 expression (typically "srid" or "sridid") * \param e The sqlite3 expression (typically "srid" or "sridid")
*/ */
QString getSelectedExpression( QString e ); QString getSelectedExpression( QString e );
/** Show the user a warning if the srs database could not be found */ /** Show the user a warning if the srs database could not be found */
void showDBMissingWarning( const QString theFileName ); void showDBMissingWarning( const QString theFileName );
skipping to change at line 192 skipping to change at line 190
//! Has the Projection List been populated? //! Has the Projection List been populated?
bool mProjListDone; bool mProjListDone;
//! Has the User Projection List been populated? //! Has the User Projection List been populated?
bool mUserProjListDone; bool mUserProjListDone;
//! Has the Recent Projection List been populated? //! Has the Recent Projection List been populated?
bool mRecentProjListDone; bool mRecentProjListDone;
//! Is there a pending selection to be made by CRS Name? enum columns { NAME_COLUMN, AUTHID_COLUMN, QGIS_CRS_ID_COLUMN, NONE };
bool mCRSNameSelectionPending; int mSearchColumn;
QString mSearchValue;
//! Is there a pending selection to be made by CRS ID?
bool mCRSIDSelectionPending;
//! Is there a pending selection to be made by Authority ID?
bool mAuthIDSelectionPending;
//! The CRS Name that wants to be selected on this widget
QString mCRSNameSelection;
//! The CRS ID that wants to be selected on this widget
long mCRSIDSelection;
//! The Authority ID that wants to be selected on this widget bool mSkipFirstRecent;
QString mAuthIDSelection;
//! The set of OGC WMS CRSs that want to be applied to this widget //! The set of OGC WMS CRSs that want to be applied to this widget
QSet<QString> mCrsFilter; QSet<QString> mCrsFilter;
//! Most recently used projections (trimmed at 25 entries) //! Most recently used projections (trimmed at 25 entries)
QStringList mRecentProjections; QStringList mRecentProjections;
//! hide deprecated CRSes //! hide deprecated CRSes
void hideDeprecated( QTreeWidgetItem *item ); void hideDeprecated( QTreeWidgetItem *item );
private slots: private slots:
/**private handler for when user selects a cs
*it will cause wktSelected and sridSelected events to be spawned
*/
void coordinateSystemSelected( QTreeWidgetItem* );
//! get list of authorities //! get list of authorities
QStringList authorities(); QStringList authorities();
signals: signals:
void sridSelected( QString theSRID ); void sridSelected( QString theSRID );
//! Refresh any listening canvases //! Refresh any listening canvases
void refresh(); void refresh();
//! Let listeners know if find has focus so they can adjust the default button //! Let listeners know if find has focus so they can adjust the default button
void searchBoxHasFocus( bool ); void searchBoxHasFocus( bool );
}; };
 End of changes. 9 change blocks. 
31 lines changed or deleted 14 lines changed or added


 qgsprojectproperty.h   qgsprojectproperty.h 
skipping to change at line 21 skipping to change at line 21
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSPROJECTPROPERTY_H #ifndef QGSPROJECTPROPERTY_H
#define QGSPROJECTPROPERTY_H #define QGSPROJECTPROPERTY_H
#include <QHash> #include <QHash>
#include <QVariant> #include <QVariant>
#include <QStringList>
class QDomNode; class QDomNode;
class QDomElement; class QDomElement;
class QDomDocument; class QDomDocument;
class QStringList;
/** \ingroup core /** \ingroup core
* An Abstract Base Class for QGIS project property hierarchies. * An Abstract Base Class for QGIS project property hierarchies.
Each sub-class is either a QgsPropertyKey or QgsPropertyValue. QgsPrope rtyKeys can Each sub-class is either a QgsPropertyKey or QgsPropertyValue. QgsPrope rtyKeys can
contain either QgsPropertyKeys or QgsPropertyValues, thus describing an contain either QgsPropertyKeys or QgsPropertyValues, thus describing an
hierarchy. QgsPropertyValues are always graph leaves. hierarchy. QgsPropertyValues are always graph leaves.
@note @note
skipping to change at line 164 skipping to change at line 162
QDomDocument & document ); QDomDocument & document );
size_t count() const size_t count() const
{ return 0; } { return 0; }
/** return keys that do not contain other keys /** return keys that do not contain other keys
Since QgsPropertyValue isn't a key, don't do anything. Since QgsPropertyValue isn't a key, don't do anything.
*/ */
void entryList( QStringList & keyName, QStringList & entries ) const void entryList( QStringList & keyName, QStringList & entries ) const
{ /* NOP */ } { Q_UNUSED( keyName ); Q_UNUSED( entries ); /* NOP */ }
private: private:
/** We use QVariant as it's very handy to keep multiple types and provi des /** We use QVariant as it's very handy to keep multiple types and provi des
type conversions type conversions
*/ */
QVariant value_; QVariant value_;
}; // class QgsPropertyValue }; // class QgsPropertyValue
 End of changes. 4 change blocks. 
4 lines changed or deleted 2 lines changed or added


 qgsprovidercountcalcevent.h   qgsprovidercountcalcevent.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSPROVIDERCOUNTCALCEVENT_H #ifndef QGSPROVIDERCOUNTCALCEVENT_H
#define QGSPROVIDERCOUNTCALCEVENT_H #define QGSPROVIDERCOUNTCALCEVENT_H
#include <QEvent> #include <QEvent>
/** \ingroup core /** \ingroup core
* \brief A custom event that is designed to be fired when a layer count has been fully calculated. * \brief A custom event that is designed to be fired when a layer count has been fully calculated.
\author Brendan Morley \author Brendan Morley
\date March 2005 \date March 2005
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsproviderextentcalcevent.h   qgsproviderextentcalcevent.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSPROVIDEREXTENTCALCEVENT_H #ifndef QGSPROVIDEREXTENTCALCEVENT_H
#define QGSPROVIDEREXTENTCALCEVENT_H #define QGSPROVIDEREXTENTCALCEVENT_H
#include <QEvent> #include <QEvent>
class QgsRectangle; class QgsRectangle;
/** \ingroup core /** \ingroup core
* A custom event that is designed to be fired when a layer extent has been fully calculated. * A custom event that is designed to be fired when a layer extent has been fully calculated.
\author Brendan Morley \author Brendan Morley
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsprovidermetadata.h   qgsprovidermetadata.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSPROVIDERMETADATA_H #ifndef QGSPROVIDERMETADATA_H
#define QGSPROVIDERMETADATA_H #define QGSPROVIDERMETADATA_H
#include <QString> #include <QString>
/** \ingroup core /** \ingroup core
* Holds data provider key, description, and associated shared library file information. * Holds data provider key, description, and associated shared library file information.
The metadata class is used in a lazy load implementation in The metadata class is used in a lazy load implementation in
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsproviderregistry.h   qgsproviderregistry.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSPROVIDERREGISTRY_H #ifndef QGSPROVIDERREGISTRY_H
#define QGSPROVIDERREGISTRY_H #define QGSPROVIDERREGISTRY_H
#include <map> #include <map>
#include <QDir> #include <QDir>
#include <QLibrary>
#include <QString> #include <QString>
class QgsDataProvider; class QgsDataProvider;
class QgsProviderMetadata; class QgsProviderMetadata;
class QgsVectorLayer;
class QgsCoordinateReferenceSystem;
/** \ingroup core /** \ingroup core
* A registry / canonical manager of data providers. * A registry / canonical manager of data providers.
This is a Singleton class that manages data provider access. This is a Singleton class that manages data provider access.
*/ */
class CORE_EXPORT QgsProviderRegistry class CORE_EXPORT QgsProviderRegistry
{ {
public: public:
skipping to change at line 64 skipping to change at line 66
const QDir & libraryDirectory() const; const QDir & libraryDirectory() const;
/** Set library directory where to search for plugins */ /** Set library directory where to search for plugins */
void setLibraryDirectory( QDir const & path ); void setLibraryDirectory( QDir const & path );
/** Create an instance of the provider /** Create an instance of the provider
@param providerKey identificator of the provider @param providerKey identificator of the provider
@param dataSource string containing data source for the provider @param dataSource string containing data source for the provider
@return instance of provider or NULL on error @return instance of provider or NULL on error
*/ */
QgsDataProvider * getProvider( const QString & providerKey, QgsDataProvider *provider( const QString & providerKey,
const QString & dataSource ); const QString & dataSource );
QWidget *selectWidget( const QString & providerKey,
QWidget * parent = 0, Qt::WFlags fl = 0 );
/** Get pointer to provider function
@param providerKey identificator of the provider
@param functionName name of function
@return pointer to function or NULL on error
*/
void *function( const QString & providerKey,
const QString & functionName );
QLibrary *providerLibrary( const QString & providerKey ) const;
/** Return list of available providers by their keys */ /** Return list of available providers by their keys */
QStringList providerList() const; QStringList providerList() const;
/** Return metadata of the provider or NULL if not found */ /** Return metadata of the provider or NULL if not found */
const QgsProviderMetadata* providerMetadata( const QString& providerKey ) const; const QgsProviderMetadata* providerMetadata( const QString& providerKey ) const;
/** return vector file filter string /** return vector file filter string
Returns a string suitable for a QFileDialog of vector file formats Returns a string suitable for a QFileDialog of vector file formats
 End of changes. 4 change blocks. 
3 lines changed or deleted 18 lines changed or added


 qgspseudocolorshader.h   qgspseudocolorshader.h 
skipping to change at line 47 skipping to change at line 47
/** \brief generates and new RGB value based on original RGB value */ /** \brief generates and new RGB value based on original RGB value */
bool shade( double, double, double, int*, int*, int* ); bool shade( double, double, double, int*, int*, int* );
/** \brief Set the maximum value */ /** \brief Set the maximum value */
void setMaximumValue( double ); void setMaximumValue( double );
/** \brief Return the minimum value */ /** \brief Return the minimum value */
void setMinimumValue( double ); void setMinimumValue( double );
double classBreakMin1() const { return mClassBreakMin1; }
double classBreakMax1() const { return mClassBreakMax1; }
double classBreakMin2() const { return mClassBreakMin2; }
double classBreakMax2() const { return mClassBreakMax2; }
double classBreakMin3() const { return mClassBreakMin3; }
private: private:
void setClassBreaks(); void setClassBreaks();
double mBreakSize; double mBreakSize;
double mClassBreakMin1; double mClassBreakMin1;
double mClassBreakMax1; double mClassBreakMax1;
double mClassBreakMin2; double mClassBreakMin2;
double mClassBreakMax2; double mClassBreakMax2;
double mClassBreakMin3; double mClassBreakMin3;
}; };
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added


 qgsquickprint.h   qgsquickprint.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: plugin.h 7796 2007-12-16 22:11:38Z homann $ */
#ifndef QGSQUICKPRINT_H #ifndef QGSQUICKPRINT_H
#define QGSQUICKPRINT_H #define QGSQUICKPRINT_H
//QT4 includes //QT4 includes
#include <QObject> #include <QObject>
#include <QColor> #include <QColor>
#include <QPrinter> #include <QPrinter>
//QGIS includes //QGIS includes
#include <qgsmaprenderer.h> #include <qgsmaprenderer.h>
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsrasterbandstats.h   qgsrasterbandstats.h 
skipping to change at line 17 skipping to change at line 17
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgsrasterlayer.h 4380 2005-12-26 23:37:50Z timlinux $ */
#ifndef QGSRASTERBANDSTATS #ifndef QGSRASTERBANDSTATS
#define QGSRASTERBANDSTATS #define QGSRASTERBANDSTATS
#include <QString> #include <QString>
#include <QVector> #include <QVector>
#include <limits> #include <limits>
#include "qgscolorrampshader.h" #include "qgscolorrampshader.h"
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsrasterdataprovider.h   qgsrasterdataprovider.h 
skipping to change at line 377 skipping to change at line 378
/** If the provider supports it, return band stats for the /** If the provider supports it, return band stats for the
given band. Default behaviour is to blockwise read the data given band. Default behaviour is to blockwise read the data
and generate the stats unless the provider overloads this function. */ and generate the stats unless the provider overloads this function. */
virtual QgsRasterBandStats bandStatistics( int theBandNo ); virtual QgsRasterBandStats bandStatistics( int theBandNo );
/** \brief helper function to create zero padded band names */ /** \brief helper function to create zero padded band names */
QString generateBandName( int theBandNumber ) QString generateBandName( int theBandNumber )
{ {
return tr( "Band" ) + QString( " %1" ) .arg( theBandNumber, 1 + ( in t ) log10(( float ) bandCount() ), 10, QChar( '0' ) ); return tr( "Band" ) + QString( " %1" ) .arg( theBandNumber, 1 + ( in t ) log10(( float ) bandCount() ), 10, QChar( '0' ) );
}; }
/** /**
* Get metadata in a format suitable for feeding directly * Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab. * into a subset of the GUI raster properties "Metadata" tab.
*/ */
virtual QString metadata() = 0; virtual QString metadata() = 0;
/** \brief Identify raster value(s) found on the point position */ /** \brief Identify raster value(s) found on the point position */
virtual bool identify( const QgsPoint & point, QMap<QString, QString>& results ); virtual bool identify( const QgsPoint & point, QMap<QString, QString>& results );
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsrasterlayer.h   qgsrasterlayer.h 
skipping to change at line 21 skipping to change at line 21
* Frank Warmerdam - contributed bug fixes and migrated class to use all GD AL_C_API calls * Frank Warmerdam - contributed bug fixes and migrated class to use all GD AL_C_API calls
*/ */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSRASTERLAYER_H #ifndef QGSRASTERLAYER_H
#define QGSRASTERLAYER_H #define QGSRASTERLAYER_H
// //
// Includes // Includes
// //
#include <QColor> #include <QColor>
#include <QDateTime> #include <QDateTime>
#include <QVector> #include <QVector>
#include <QList> #include <QList>
#include <QMap> #include <QMap>
#include <QPair>
#include "qgis.h" #include "qgis.h"
#include "qgspoint.h" #include "qgspoint.h"
#include "qgsmaplayer.h" #include "qgsmaplayer.h"
#include "qgsrasterviewport.h" #include "qgsrasterviewport.h"
#include "qgscontrastenhancement.h" #include "qgscontrastenhancement.h"
#include "qgsrastertransparency.h" #include "qgsrastertransparency.h"
#include "qgsrastershader.h" #include "qgsrastershader.h"
#include "qgscolorrampshader.h" #include "qgscolorrampshader.h"
#include "qgsrastershaderfunction.h" #include "qgsrastershaderfunction.h"
skipping to change at line 395 skipping to change at line 395
/** \brief Mutator for mUserDefinedRGBMinimumMaximum */ /** \brief Mutator for mUserDefinedRGBMinimumMaximum */
void setUserDefinedRGBMinimumMaximum( bool theBool ) { mUserDefinedRGBM inimumMaximum = theBool; } void setUserDefinedRGBMinimumMaximum( bool theBool ) { mUserDefinedRGBM inimumMaximum = theBool; }
/** \brief Accessor to find out how many standard deviations are being plotted */ /** \brief Accessor to find out how many standard deviations are being plotted */
double standardDeviations() const { return mStandardDeviations; } double standardDeviations() const { return mStandardDeviations; }
/** \brief Accessor for transparent band name mapping */ /** \brief Accessor for transparent band name mapping */
QString transparentBandName() const { return mTransparencyBandName; } QString transparentBandName() const { return mTransparencyBandName; }
/** \brief [ data provider interface ] Does this layer use a provider /** \brief [ data provider interface ] Does this layer use a provider
for setting/retrieving data? */ for setting/retrieving data?
bool usesProvider(); * @deprecated in 2.0
*/
Q_DECL_DEPRECATED bool usesProvider();
/** \brief Accessor that returns the width of the (unclipped) raster * / /** \brief Accessor that returns the width of the (unclipped) raster * /
int width() { return mWidth; } int width() { return mWidth; }
// //
// Non Static methods // Non Static methods
// //
/** \brief Get the number of bands in this layer */ /** \brief Get the number of bands in this layer */
unsigned int bandCount(); unsigned int bandCount() const;
/** \brief Get the name of a band given its number */ /** \brief Get the name of a band given its number */
const QString bandName( int theBandNoInt ); const QString bandName( int theBandNoInt );
/** \brief Get the number of a band given its name. The name is the rew ritten name set /** \brief Get the number of a band given its name. The name is the rew ritten name set
* up in the constructor, and will not necessarily be the same as the name retrieved directly from gdal! * up in the constructor, and will not necessarily be the same as the name retrieved directly from gdal!
* If no matching band is found zero will be returned! */ * If no matching band is found zero will be returned! */
int bandNumber( const QString & theBandName ); int bandNumber( const QString & theBandName ) const;
/** \brief Get RasterBandStats for a band given its number (read only) */ /** \brief Get RasterBandStats for a band given its number (read only) */
const QgsRasterBandStats bandStatistics( int ); const QgsRasterBandStats bandStatistics( int );
/** \brief Get RasterBandStats for a band given its name (read only) * / /** \brief Get RasterBandStats for a band given its name (read only) * /
const QgsRasterBandStats bandStatistics( const QString & ); const QgsRasterBandStats bandStatistics( const QString & );
/** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the /** \brief Accessor for ths raster layers pyramid list. A pyramid list defines the
* POTENTIAL pyramids that can be in a raster. To know which of the pyr amid layers * POTENTIAL pyramids that can be in a raster. To know which of the pyr amid layers
* ACTUALLY exists you need to look at the existsFlag member in each st ruct stored in the * ACTUALLY exists you need to look at the existsFlag member in each st ruct stored in the
skipping to change at line 454 skipping to change at line 456
/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */ /** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
void computeMinimumMaximumFromLastExtent( QString theBand, double* theM inMax ); void computeMinimumMaximumFromLastExtent( QString theBand, double* theM inMax );
/** \brief Compute the actual minimum maximum pixel values based on th e current (last) display extent /** \brief Compute the actual minimum maximum pixel values based on th e current (last) display extent
\note added in v1.6 */ \note added in v1.6 */
void computeMinimumMaximumFromLastExtent( int theBand, double& theMin, double& theMax ); void computeMinimumMaximumFromLastExtent( int theBand, double& theMin, double& theMax );
/** \brief Get a pointer to the contrast enhancement for the selected b and */ /** \brief Get a pointer to the contrast enhancement for the selected b and */
QgsContrastEnhancement* contrastEnhancement( unsigned int theBand ); QgsContrastEnhancement* contrastEnhancement( unsigned int theBand );
const QgsContrastEnhancement* constContrastEnhancement( unsigned int th
eBand ) const;
/**Copies the symbology settings from another layer. Returns true in ca se of success*/ /**Copies the symbology settings from another layer. Returns true in ca se of success*/
bool copySymbologySettings( const QgsMapLayer& theOther ); bool copySymbologySettings( const QgsMapLayer& theOther );
/** \brief Get a pointer to the color table */ /** \brief Get a pointer to the color table */
QList<QgsColorRampShader::ColorRampItem>* colorTable( int theBandNoInt ); QList<QgsColorRampShader::ColorRampItem>* colorTable( int theBandNoInt );
/** Returns the data provider */ /** Returns the data provider */
QgsRasterDataProvider* dataProvider(); QgsRasterDataProvider* dataProvider();
/** Returns the data provider in a const-correct manner */ /** Returns the data provider in a const-correct manner */
skipping to change at line 511 skipping to change at line 515
/** \brief Currently returns always false */ /** \brief Currently returns always false */
bool isEditable() const; bool isEditable() const;
/** \brief [ data provider interface ] If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the fa ilure */ /** \brief [ data provider interface ] If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the fa ilure */
QString lastError(); QString lastError();
/** \brief [ data provider interface ] If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the fa ilure */ /** \brief [ data provider interface ] If an operation returns 0 (e.g. draw()), this function returns the text of the error associated with the fa ilure */
QString lastErrorTitle(); QString lastErrorTitle();
/**Returns a list with classification items (Text and color)
@note this method was added in version 1.8*/
QList< QPair< QString, QColor > > legendSymbologyItems() const;
/** \brief Get a legend image for this layer */ /** \brief Get a legend image for this layer */
QPixmap legendAsPixmap(); QPixmap legendAsPixmap();
/** \brief Overloaded version of above function that can print layer n ame onto legend */ /** \brief Overloaded version of above function that can print layer n ame onto legend */
QPixmap legendAsPixmap( bool ); QPixmap legendAsPixmap( bool );
/** \brief Use this method when you want an annotated legend suitable f or print output etc */ /** \brief Use this method when you want an annotated legend suitable f or print output etc */
QPixmap legendAsPixmap( int theLabelCount ); QPixmap legendAsPixmap( int theLabelCount );
/** \brief Accessor for maximum value user for contrast enhancement */ /** \brief Accessor for maximum value user for contrast enhancement */
skipping to change at line 536 skipping to change at line 544
/** \brief Obtain GDAL Metadata for this layer */ /** \brief Obtain GDAL Metadata for this layer */
QString metadata(); QString metadata();
/** \brief Accessor for minimum value user for contrast enhancement */ /** \brief Accessor for minimum value user for contrast enhancement */
double minimumValue( unsigned int theBand ); double minimumValue( unsigned int theBand );
/** \brief Accessor for minimum value user for contrast enhancement */ /** \brief Accessor for minimum value user for contrast enhancement */
double minimumValue( QString theBand ); double minimumValue( QString theBand );
/** \brief Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned */ /** \brief Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned */
QPixmap paletteAsPixmap( int theBand = 1 ); QPixmap paletteAsPixmap( int theBandNumber = 1 );
/** \brief [ data provider interface ] Which provider is being used fo /** \brief [ data provider interface ] Which provider is being used fo
r this Raster Layer? */ r this Raster Layer?
QString providerKey() const; * @note added in 2.0
*/
QString providerType() const;
/** \brief [ data provider interface ] Which provider is being used fo
r this Raster Layer?
* @deprecated use providerType()
*/
Q_DECL_DEPRECATED QString providerKey() const { return providerType();
}
/** \brief Returns the number of raster units per each raster pixel. In a world file, this is normally the first row (without the sign) */ /** \brief Returns the number of raster units per each raster pixel. In a world file, this is normally the first row (without the sign) */
double rasterUnitsPerPixel(); double rasterUnitsPerPixel();
/** \brief Read color table from GDAL raster band */ /** \brief Read color table from GDAL raster band */
// Keep this for QgsRasterLayerProperties // Keep this for QgsRasterLayerProperties
bool readColorTable( int theBandNumber, QList<QgsColorRampShader::Color RampItem>* theList ); bool readColorTable( int theBandNumber, QList<QgsColorRampShader::Color RampItem>* theList );
/** \brief Simple reset function that set the noDataValue back to the v alue stored in the first raster band */ /** \brief Simple reset function that set the noDataValue back to the v alue stored in the first raster band */
void resetNoDataValue(); void resetNoDataValue();
skipping to change at line 617 skipping to change at line 632
/** \brief Mutator for red band name (allows alternate mappings e.g. ma p blue as red color) */ /** \brief Mutator for red band name (allows alternate mappings e.g. ma p blue as red color) */
void setRedBandName( const QString & theBandName ); void setRedBandName( const QString & theBandName );
/** \brief Mutator for transparent band name mapping */ /** \brief Mutator for transparent band name mapping */
void setTransparentBandName( const QString & theBandName ); void setTransparentBandName( const QString & theBandName );
/** \brief [ data provider interface ] A wrapper function to emit a pr ogress update signal */ /** \brief [ data provider interface ] A wrapper function to emit a pr ogress update signal */
void showProgress( int theValue ); void showProgress( int theValue );
/** \brief Returns the sublayers of this layer - Useful for providers t hat manage their own layers, such as WMS */ /** \brief Returns the sublayers of this layer - Useful for providers t hat manage their own layers, such as WMS */
QStringList subLayers() const; virtual QStringList subLayers() const;
/** \brief Draws a thumbnail of the rasterlayer into the supplied pixma p pointer */ /** \brief Draws a thumbnail of the rasterlayer into the supplied pixma p pointer */
void thumbnailAsPixmap( QPixmap * theQPixmap ); void thumbnailAsPixmap( QPixmap * theQPixmap );
/** \brief Draws a thumbnail of the rasterlayer into the supplied QImag e pointer /** \brief Draws a thumbnail of the rasterlayer into the supplied QImag e pointer
* @note added in QGIS 1.6 * @note added in QGIS 1.6
* */ * */
void thumbnailAsImage( QImage * thepImage ); void thumbnailAsImage( QImage * thepImage );
/** \brief Emit a signal asking for a repaint. (inherited from maplayer ) */ /** \brief Emit a signal asking for a repaint. (inherited from maplayer ) */
void triggerRepaint(); void triggerRepaint();
// //
// Virtural methods // Virtual methods
// //
/** /**
* Reorders the *previously selected* sublayers of this layer from bott om to top * Reorders the *previously selected* sublayers of this layer from bott om to top
* *
* (Useful for providers that manage their own layers, such as WMS) * (Useful for providers that manage their own layers, such as WMS)
* *
*/ */
virtual void setLayerOrder( const QStringList & layers ); virtual void setLayerOrder( const QStringList &layers );
/** /**
* Set the visibility of the given sublayer name * Set the visibility of the given sublayer name
*/ */
virtual void setSubLayerVisibility( const QString & name, bool vis ); virtual void setSubLayerVisibility( QString name, bool vis );
/** Time stamp of data source in the moment when data/metadata were loa ded by provider */ /** Time stamp of data source in the moment when data/metadata were loa ded by provider */
virtual QDateTime timestamp() const { return mDataProvider->timestamp() ; } virtual QDateTime timestamp() const { return mDataProvider->timestamp() ; }
public slots: public slots:
/** \brief Create GDAL pyramid overviews */ /** \brief Create GDAL pyramid overviews */
QString buildPyramids( const RasterPyramidList &, QString buildPyramids( const RasterPyramidList &,
const QString & theResamplingMethod = "NEAREST" , const QString & theResamplingMethod = "NEAREST" ,
bool theTryInternalFlag = false ); bool theTryInternalFlag = false );
skipping to change at line 666 skipping to change at line 681
void populateHistogram( int theBandNoInt, void populateHistogram( int theBandNoInt,
int theBinCountInt = 256, int theBinCountInt = 256,
bool theIgnoreOutOfRangeFlag = true, bool theIgnoreOutOfRangeFlag = true,
bool theThoroughBandScanFlag = false ); bool theThoroughBandScanFlag = false );
void showStatusMessage( const QString & theMessage ); void showStatusMessage( const QString & theMessage );
/** \brief Propagate progress updates from GDAL up to the parent app */ /** \brief Propagate progress updates from GDAL up to the parent app */
void updateProgress( int, int ); void updateProgress( int, int );
/** \brief recieve progress signal from provider */ /** \brief receive progress signal from provider */
void onProgress( int, double, QString ); void onProgress( int, double, QString );
signals: signals:
/** \brief Signal for notifying listeners of long running processes */ /** \brief Signal for notifying listeners of long running processes */
void progressUpdate( int theValue ); void progressUpdate( int theValue );
/** /**
* This is emitted whenever data or metadata (e.g. color table, exten t) has changed * This is emitted whenever data or metadata (e.g. color table, exten t) has changed
* @note added in 1.7 * @note added in 1.7
*/ */
void dataChanged(); void dataChanged();
protected: protected:
/** \brief Read the symbology for the current layer from the Dom node s upplied */ /** \brief Read the symbology for the current layer from the Dom node s upplied */
bool readSymbology( const QDomNode& node, QString& errorMessage ); bool readSymbology( const QDomNode& node, QString& errorMessage );
/** \brief Reads layer specific state from project file Dom node */ /** \brief Reads layer specific state from project file Dom node */
bool readXml( QDomNode & layer_node ); bool readXml( const QDomNode& layer_node );
/** \brief Write the symbology for the layer into the docment provided */ /** \brief Write the symbology for the layer into the docment provided */
bool writeSymbology( QDomNode&, QDomDocument& doc, QString& errorMessag e ) const; bool writeSymbology( QDomNode&, QDomDocument& doc, QString& errorMessag e ) const;
/** \brief Write layer specific state to project file Dom node */ /** \brief Write layer specific state to project file Dom node */
bool writeXml( QDomNode & layer_node, QDomDocument & doc ); bool writeXml( QDomNode & layer_node, QDomDocument & doc );
private: private:
// //
// Private methods // Private methods
 End of changes. 15 change blocks. 
16 lines changed or deleted 34 lines changed or added


 qgsrasterprojector.h   qgsrasterprojector.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgsrasterprojector.h 15005 2011-01-08 16:35:21Z rblazek $ */
/* This code takes ideas from WarpBuilder in Geotools. /* This code takes ideas from WarpBuilder in Geotools.
* Thank you to Ing. Andrea Aime, Ing. Simone Giannecchini and GeoSolutions S.A.S. * Thank you to Ing. Andrea Aime, Ing. Simone Giannecchini and GeoSolutions S.A.S.
* See : http://geo-solutions.blogspot.com/2011/01/developers-corner-improv ing.html * See : http://geo-solutions.blogspot.com/2011/01/developers-corner-improv ing.html
*/ */
#ifndef QGSRASTERPROJECTOR_H #ifndef QGSRASTERPROJECTOR_H
#define QGSRASTERPROJECTOR_H #define QGSRASTERPROJECTOR_H
#include <QVector> #include <QVector>
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsrastershaderfunction.h   qgsrastershaderfunction.h 
skipping to change at line 45 skipping to change at line 45
/** \brief Return the minimum value */ /** \brief Return the minimum value */
virtual void setMinimumValue( double ); virtual void setMinimumValue( double );
/** \brief generates and new RGB value based on one input value */ /** \brief generates and new RGB value based on one input value */
virtual bool shade( double, int*, int*, int* ); virtual bool shade( double, int*, int*, int* );
/** \brief generates and new RGB value based on original RGB value */ /** \brief generates and new RGB value based on original RGB value */
virtual bool shade( double, double, double, int*, int*, int* ); virtual bool shade( double, double, double, int*, int*, int* );
double minimumMaximumRange() const { return mMinimumMaximumRange; }
double minimumValue() const { return mMinimumValue; }
double maximumValue() const { return mMaximumValue; }
protected: protected:
/** \brief User defineable maximum value for the shading function */ /** \brief User defineable maximum value for the shading function */
double mMaximumValue; double mMaximumValue;
/** \brief User defineable minimum value for the shading function */ /** \brief User defineable minimum value for the shading function */
double mMinimumValue; double mMinimumValue;
/** \brief Minimum maximum range for the shading function */ /** \brief Minimum maximum range for the shading function */
double mMinimumMaximumRange; double mMinimumMaximumRange;
}; };
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 qgsrasterviewport.h   qgsrasterviewport.h 
skipping to change at line 17 skipping to change at line 17
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgsrasterlayer.h 4380 2005-12-26 23:37:50Z timlinux $ */
#ifndef QGSRASTERVIEWPORT_H #ifndef QGSRASTERVIEWPORT_H
#define QGSRASTERVIEWPORT_H #define QGSRASTERVIEWPORT_H
#include <qgspoint.h> #include <qgspoint.h>
#include "qgscoordinatetransform.h" #include "qgscoordinatetransform.h"
/** \ingroup core /** \ingroup core
* This class provides details of the viewable area that a raster will * This class provides details of the viewable area that a raster will
* be rendered into. * be rendered into.
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsrectangle.h   qgsrectangle.h 
skipping to change at line 17 skipping to change at line 17
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSRECT_H #ifndef QGSRECT_H
#define QGSRECT_H #define QGSRECT_H
#include <iosfwd> #include <iosfwd>
class QString; class QString;
#include "qgspoint.h" #include "qgspoint.h"
skipping to change at line 126 skipping to change at line 125
*/ */
QgsRectangle & operator=( const QgsRectangle &r1 ); QgsRectangle & operator=( const QgsRectangle &r1 );
/** updates rectangle to include passed argument */ /** updates rectangle to include passed argument */
void unionRect( const QgsRectangle& rect ); void unionRect( const QgsRectangle& rect );
/** Returns true if the rectangle has finite boundaries. Will /** Returns true if the rectangle has finite boundaries. Will
return false if any of the rectangle boundaries are NaN or Inf. */ return false if any of the rectangle boundaries are NaN or Inf. */
bool isFinite() const; bool isFinite() const;
//! swap x/y
//! @note added in 1.9
void invert();
protected: protected:
// These are protected instead of private so that things like // These are protected instead of private so that things like
// the QgsPostGisBox3d can get at them. // the QgsPostGisBox3d can get at them.
double xmin; double xmin;
double ymin; double ymin;
double xmax; double xmax;
double ymax; double ymax;
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 qgsrenderer.h   qgsrenderer.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSRENDERER_H #ifndef QGSRENDERER_H
#define QGSRENDERER_H #define QGSRENDERER_H
class QgsFeature; class QgsFeature;
class QgsVectorLayer; class QgsVectorLayer;
class QPainter; class QPainter;
class QImage; class QImage;
class QDomNode;
class QDomDocument; class QDomDocument;
class QColor; class QColor;
#include "qgis.h" #include "qgis.h"
#include "qgsrendercontext.h" #include "qgsrendercontext.h"
#include <QList> #include <QList>
#include <QDomNode>
class QgsSymbol; class QgsSymbol;
class QBrush; class QBrush;
typedef QList<int> QgsAttributeList; typedef QList<int> QgsAttributeList;
/**Abstract base class for renderers. A renderer holds all the information necessary to draw the contents of a vector layer to a map canvas. The vecto r layer then passes each feature to paint to the renderer*/ /**Abstract base class for renderers. A renderer holds all the information necessary to draw the contents of a vector layer to a map canvas. The vecto r layer then passes each feature to paint to the renderer*/
class CORE_EXPORT QgsRenderer class CORE_EXPORT QgsRenderer
{ {
public: public:
skipping to change at line 116 skipping to change at line 115
/** Get selection color. Added in QGIS v1.4 */ /** Get selection color. Added in QGIS v1.4 */
static QColor selectionColor(); static QColor selectionColor();
/**Returns true if this renderer returns a pixmap in the render method (e.g. for point data or diagrams)*/ /**Returns true if this renderer returns a pixmap in the render method (e.g. for point data or diagrams)*/
virtual bool containsPixmap() const; virtual bool containsPixmap() const;
/**Returns true if this renderer uses its own transparency settings, e. g. differentiated by classification. /**Returns true if this renderer uses its own transparency settings, e. g. differentiated by classification.
This is a hint for QgsVectorLayer to not use the transparency setting on layer level in this cases*/ This is a hint for QgsVectorLayer to not use the transparency setting on layer level in this cases*/
virtual bool usesTransparency() const {return false;} virtual bool usesTransparency() const {return false;}
/**Returns renderer symbol for a feature. /**Returns renderer symbol for a feature.
@note: this method was added in version 1.6*/ @note: this method was added in version 1.6*/
virtual QgsSymbol* symbolForFeature( const QgsFeature* f ) { return 0;} virtual QgsSymbol* symbolForFeature( const QgsFeature* f ) { Q_UNUSED( f ); return 0;}
/**Scales a brush to a given raster scale factor (e.g. for printing)*/ /**Scales a brush to a given raster scale factor (e.g. for printing)*/
static void scaleBrush( QBrush& b, double rasterScaleFactor ); static void scaleBrush( QBrush& b, double rasterScaleFactor );
protected: protected:
/**Color to draw selected features - static so we can change it in proj props and automatically /**Color to draw selected features - static so we can change it in proj props and automatically
all renderers are updated*/ all renderers are updated*/
static QColor mSelectionColor; static QColor mSelectionColor;
/**Layer type*/ /**Layer type*/
 End of changes. 4 change blocks. 
3 lines changed or deleted 2 lines changed or added


 qgsrendererplugin.h   qgsrendererplugin.h 
skipping to change at line 33 skipping to change at line 33
class QgsRenderer; class QgsRenderer;
class QDialog; class QDialog;
class QString; class QString;
/**Interface class for renderer plugins. This kind of plugins is of plugin type QgisPlugin::RENDERER /**Interface class for renderer plugins. This kind of plugins is of plugin type QgisPlugin::RENDERER
and is capable to return a pointer to a concrete renderer and a dialog whi ch can be embedded into the and is capable to return a pointer to a concrete renderer and a dialog whi ch can be embedded into the
vector layer properties dialog in the main qgis application*/ vector layer properties dialog in the main qgis application*/
class QgsRendererPlugin: public QgisPlugin class QgsRendererPlugin: public QgisPlugin
{ {
public: public:
QgsRendererPlugin( const QString& name, const QString& description, con st QString& version ): QgisPlugin( name, description, version, QgisPlugin:: RENDERER ) {} QgsRendererPlugin( const QString& name, const QString& description, con st QString& category, const QString& version ): QgisPlugin( name, descripti on, category, version, QgisPlugin::RENDERER ) {}
virtual ~QgsRendererPlugin() {} virtual ~QgsRendererPlugin() {}
virtual QDialog* rendererDialog() = 0; virtual QDialog* rendererDialog() = 0;
virtual QgsRenderer* renderer() = 0; virtual QgsRenderer* renderer() = 0;
}; };
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsrendererv2.h   qgsrendererv2.h 
/**************************************************************************
*
qgsrendererv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSRENDERERV2_H #ifndef QGSRENDERERV2_H
#define QGSRENDERERV2_H #define QGSRENDERERV2_H
#include "qgis.h" #include "qgis.h"
#include <QList> #include <QList>
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
#include <QPair> #include <QPair>
#include <QPixmap> #include <QPixmap>
#include <QDomDocument>
class QDomDocument; #include <QDomElement>
class QDomElement;
class QgsSymbolV2; class QgsSymbolV2;
class QgsRenderContext; class QgsRenderContext;
class QgsFeature; class QgsFeature;
class QgsVectorLayer; class QgsVectorLayer;
typedef QMap<QString, QString> QgsStringMap;
typedef QList<QgsSymbolV2*> QgsSymbolV2List; typedef QList<QgsSymbolV2*> QgsSymbolV2List;
typedef QMap<QString, QgsSymbolV2* > QgsSymbolV2Map; typedef QMap<QString, QgsSymbolV2* > QgsSymbolV2Map;
typedef QList< QPair<QString, QPixmap> > QgsLegendSymbologyList; typedef QList< QPair<QString, QPixmap> > QgsLegendSymbologyList;
typedef QList< QPair<QString, QgsSymbolV2*> > QgsLegendSymbolList; typedef QList< QPair<QString, QgsSymbolV2*> > QgsLegendSymbolList;
#define RENDERER_TAG_NAME "renderer-v2" #define RENDERER_TAG_NAME "renderer-v2"
//////// ////////
// symbol levels // symbol levels
skipping to change at line 75 skipping to change at line 90
virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer ) = 0; virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer ) = 0;
virtual void stopRender( QgsRenderContext& context ) = 0; virtual void stopRender( QgsRenderContext& context ) = 0;
virtual QList<QString> usedAttributes() = 0; virtual QList<QString> usedAttributes() = 0;
virtual ~QgsFeatureRendererV2() {} virtual ~QgsFeatureRendererV2() {}
virtual QgsFeatureRendererV2* clone() = 0; virtual QgsFeatureRendererV2* clone() = 0;
virtual void renderFeature( QgsFeature& feature, QgsRenderContext& cont ext, int layer = -1, bool selected = false, bool drawVertexMarker = false ) ; virtual bool renderFeature( QgsFeature& feature, QgsRenderContext& cont ext, int layer = -1, bool selected = false, bool drawVertexMarker = false ) ;
//! for debugging //! for debugging
virtual QString dump(); virtual QString dump();
enum Capabilities
{
SymbolLevels = 1, // rendering with symbol levels (i.e. implement
s symbols(), symbolForFeature())
RotationField = 1 << 1, // rotate symbols by attribute value
MoreSymbolsPerFeature = 1 << 2 // may use more than one symbol to re
nder a feature: symbolsForFeature() will return them
};
//! returns bitwise OR-ed capabilities of the renderer
//! \note added in 2.0
virtual int capabilities() { return 0; }
//! for symbol levels //! for symbol levels
virtual QgsSymbolV2List symbols() = 0; virtual QgsSymbolV2List symbols() = 0;
bool usingSymbolLevels() const { return mUsingSymbolLevels; } bool usingSymbolLevels() const { return mUsingSymbolLevels; }
void setUsingSymbolLevels( bool usingSymbolLevels ) { mUsingSymbolLevel s = usingSymbolLevels; } void setUsingSymbolLevels( bool usingSymbolLevels ) { mUsingSymbolLevel s = usingSymbolLevels; }
bool usingFirstRule() const { return mUsingFirstRule; }
void setUsingFirstRule( bool usingFirstRule ) { mUsingFirstRule = using
FirstRule; }
//! create a renderer from XML element //! create a renderer from XML element
static QgsFeatureRendererV2* load( QDomElement& symbologyElem ); static QgsFeatureRendererV2* load( QDomElement& symbologyElem );
//! store renderer info to XML element //! store renderer info to XML element
virtual QDomElement save( QDomDocument& doc ); virtual QDomElement save( QDomDocument& doc );
//! create the SLD UserStyle element following the SLD v1.1 specs
//! @note added in 1.9
virtual QDomElement writeSld( QDomDocument& doc, const QgsVectorLayer &
layer ) const;
/** create a new renderer according to the information contained in
* the UserStyle element of a SLD style document
* @param node the node in the SLD document whose the UserStyle element
* is a child
* @param geomType the geometry type of the features, used to convert
* Symbolizer elements
* @param errorMessage it will contain the error message if something
* went wrong
* @return the renderer
* @note added in 1.9
*/
static QgsFeatureRendererV2* loadSld( const QDomNode &node, QGis::Geome
tryType geomType, QString &errorMessage );
//! used from subclasses to create SLD Rule elements following SLD v1.1
specs
//! @note added in 1.9
virtual void toSld( QDomDocument& doc, QDomElement &element ) const
{ element.appendChild( doc.createComment( QString( "FeatureRendererV2 %
1 not implemented yet" ).arg( type() ) ) ); }
//! return a list of symbology items for the legend //! return a list of symbology items for the legend
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize ); virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
//! return a list of item text / symbol //! return a list of item text / symbol
//! @note: this method was added in version 1.5 //! @note: this method was added in version 1.5
virtual QgsLegendSymbolList legendSymbolItems(); virtual QgsLegendSymbolList legendSymbolItems();
//! set type and size of editing vertex markers for subsequent renderin g //! set type and size of editing vertex markers for subsequent renderin g
void setVertexMarkerAppearance( int type, int size ); void setVertexMarkerAppearance( int type, int size );
//! return rotation field name (or empty string if not set or not suppo
rted by renderer)
//! @note added in 1.9
virtual QString rotationField() const { return ""; }
//! sets rotation field of renderer (if supported by the renderer)
//! @note added in 1.9
virtual void setRotationField( QString fieldName ) { Q_UNUSED( fieldNam
e ); }
//! return whether the renderer will render a feature or not.
//! Must be called between startRender() and stopRender() calls.
//! Default implementation uses symbolForFeature().
//! @note added in 1.9
virtual bool willRenderFeature( QgsFeature& feat ) { return symbolForFe
ature( feat ) != NULL; }
//! return list of symbols used for rendering the feature.
//! For renderers that do not support MoreSymbolsPerFeature it is more
efficient
//! to use symbolForFeature()
//! @note added in 1.9
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat );
protected: protected:
QgsFeatureRendererV2( QString type ); QgsFeatureRendererV2( QString type );
void renderFeatureWithSymbol( QgsFeature& feature,
QgsSymbolV2* symbol,
QgsRenderContext& context,
int layer,
bool selected,
bool drawVertexMarker );
//! render editing vertex marker at specified point //! render editing vertex marker at specified point
void renderVertexMarker( QPointF& pt, QgsRenderContext& context ); void renderVertexMarker( QPointF& pt, QgsRenderContext& context );
//! render editing vertex marker for a polyline //! render editing vertex marker for a polyline
void renderVertexMarkerPolyline( QPolygonF& pts, QgsRenderContext& cont ext ); void renderVertexMarkerPolyline( QPolygonF& pts, QgsRenderContext& cont ext );
//! render editing vertex marker for a polygon //! render editing vertex marker for a polygon
void renderVertexMarkerPolygon( QPolygonF& pts, QList<QPolygonF>* rings , QgsRenderContext& context ); void renderVertexMarkerPolygon( QPolygonF& pts, QList<QPolygonF>* rings , QgsRenderContext& context );
static unsigned char* _getPoint( QPointF& pt, QgsRenderContext& context , unsigned char* wkb ); static unsigned char* _getPoint( QPointF& pt, QgsRenderContext& context , unsigned char* wkb );
static unsigned char* _getLineString( QPolygonF& pts, QgsRenderContext& context, unsigned char* wkb ); static unsigned char* _getLineString( QPolygonF& pts, QgsRenderContext& context, unsigned char* wkb );
static unsigned char* _getPolygon( QPolygonF& pts, QList<QPolygonF>& ho les, QgsRenderContext& context, unsigned char* wkb ); static unsigned char* _getPolygon( QPolygonF& pts, QList<QPolygonF>& ho les, QgsRenderContext& context, unsigned char* wkb );
QString mType; QString mType;
bool mUsingSymbolLevels; bool mUsingSymbolLevels;
bool mUsingFirstRule;
/** The current type of editing marker */ /** The current type of editing marker */
int mCurrentVertexMarkerType; int mCurrentVertexMarkerType;
/** The current size of editing marker */ /** The current size of editing marker */
int mCurrentVertexMarkerSize; int mCurrentVertexMarkerSize;
}; };
#endif #endif // QGSRENDERERV2_H
 End of changes. 11 change blocks. 
9 lines changed or deleted 97 lines changed or added


 qgsrendererv2propertiesdialog.h   qgsrendererv2propertiesdialog.h 
/**************************************************************************
*
qgsrendererv2propertiesdialog.h
---------------------
begin : December 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSRENDERERV2PROPERTIESDIALOG_H #ifndef QGSRENDERERV2PROPERTIESDIALOG_H
#define QGSRENDERERV2PROPERTIESDIALOG_H #define QGSRENDERERV2PROPERTIESDIALOG_H
#include <QDialog> #include <QDialog>
#include "ui_qgsrendererv2propsdialogbase.h" #include "ui_qgsrendererv2propsdialogbase.h"
class QKeyEvent; class QKeyEvent;
skipping to change at line 31 skipping to change at line 46
public: public:
QgsRendererV2PropertiesDialog( QgsVectorLayer* layer, QgsStyleV2* style , bool embedded = false ); QgsRendererV2PropertiesDialog( QgsVectorLayer* layer, QgsStyleV2* style , bool embedded = false );
public slots: public slots:
//! called when user changes renderer type //! called when user changes renderer type
void rendererChanged(); void rendererChanged();
void apply(); void apply();
void onOK(); void onOK();
void showSymbolLevels();
void useOldSymbology(); void useOldSymbology();
signals: signals:
void useNewSymbology( bool ); void useNewSymbology( bool );
void forceChkUsingFirstRule();
void forceUncheckSymbolLevels();
protected: protected:
//! Reimplements dialog keyPress event so we can ignore it //! Reimplements dialog keyPress event so we can ignore it
void keyPressEvent( QKeyEvent * event ); void keyPressEvent( QKeyEvent * event );
QgsVectorLayer* mLayer; QgsVectorLayer* mLayer;
QgsStyleV2* mStyle; QgsStyleV2* mStyle;
QgsRendererV2Widget* mActiveWidget; QgsRendererV2Widget* mActiveWidget;
 End of changes. 3 change blocks. 
4 lines changed or deleted 24 lines changed or added


 qgsrendererv2registry.h   qgsrendererv2registry.h 
/**************************************************************************
*
qgsrendererv2registry.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSRENDERERV2REGISTRY_H #ifndef QGSRENDERERV2REGISTRY_H
#define QGSRENDERERV2REGISTRY_H #define QGSRENDERERV2REGISTRY_H
#include <QIcon> #include <QIcon>
#include <QMap> #include <QMap>
#include <QStringList> #include <QStringList>
#include <QDomElement>
#include "qgis.h"
class QgsFeatureRendererV2; class QgsFeatureRendererV2;
class QDomElement;
class QgsVectorLayer; class QgsVectorLayer;
class QgsStyleV2; class QgsStyleV2;
class QgsRendererV2Widget; class QgsRendererV2Widget;
/** /**
Stores metadata about one renderer class. Stores metadata about one renderer class.
@note It's necessary to implement createRenderer() function. @note It's necessary to implement createRenderer() function.
In C++ you can use QgsRendererV2Metadata convenience class. In C++ you can use QgsRendererV2Metadata convenience class.
*/ */
class CORE_EXPORT QgsRendererV2AbstractMetadata class CORE_EXPORT QgsRendererV2AbstractMetadata
{ {
public: public:
QgsRendererV2AbstractMetadata( QString name, QString visibleName, QIcon icon = QIcon() ) QgsRendererV2AbstractMetadata( QString name, QString visibleName, QIcon icon = QIcon() )
: mName( name ), mVisibleName( visibleName ), mIcon( icon ) {} : mName( name ), mVisibleName( visibleName ), mIcon( icon ) {}
virtual ~QgsRendererV2AbstractMetadata() {}
QString name() const { return mName; } QString name() const { return mName; }
QString visibleName() const { return mVisibleName; } QString visibleName() const { return mVisibleName; }
QIcon icon() const { return mIcon; } QIcon icon() const { return mIcon; }
void setIcon( const QIcon& icon ) { mIcon = icon; } void setIcon( const QIcon& icon ) { mIcon = icon; }
/** Return new instance of the renderer given the DOM element. Returns NULL on error. /** Return new instance of the renderer given the DOM element. Returns NULL on error.
* Pure virtual function: must be implemented in derived classes. */ * Pure virtual function: must be implemented in derived classes. */
virtual QgsFeatureRendererV2* createRenderer( QDomElement& elem ) = 0; virtual QgsFeatureRendererV2* createRenderer( QDomElement& elem ) = 0;
/** Return new instance of settings widget for the renderer. Returns NU LL on error. */ /** Return new instance of settings widget for the renderer. Returns NU LL on error. */
virtual QgsRendererV2Widget* createRendererWidget( QgsVectorLayer* laye r, QgsStyleV2* style, QgsFeatureRendererV2* renderer ) virtual QgsRendererV2Widget* createRendererWidget( QgsVectorLayer* laye r, QgsStyleV2* style, QgsFeatureRendererV2* renderer )
{ return NULL; } { Q_UNUSED( layer ); Q_UNUSED( style ); Q_UNUSED( renderer ); return NU
LL; }
virtual QgsFeatureRendererV2* createRendererFromSld( QDomElement& elem,
QGis::GeometryType geomType )
{ Q_UNUSED( elem ); Q_UNUSED( geomType ); return NULL; }
protected: protected:
//! name used within QGIS for identification (the same what renderer's type() returns) //! name used within QGIS for identification (the same what renderer's type() returns)
QString mName; QString mName;
//! name visible for users (translatable) //! name visible for users (translatable)
QString mVisibleName; QString mVisibleName;
//! icon to be shown in the renderer properties dialog //! icon to be shown in the renderer properties dialog
QIcon mIcon; QIcon mIcon;
}; };
typedef QgsFeatureRendererV2*( *QgsRendererV2CreateFunc )( QDomElement& ); typedef QgsFeatureRendererV2*( *QgsRendererV2CreateFunc )( QDomElement& );
typedef QgsRendererV2Widget*( *QgsRendererV2WidgetFunc )( QgsVectorLayer*, QgsStyleV2*, QgsFeatureRendererV2* ); typedef QgsRendererV2Widget*( *QgsRendererV2WidgetFunc )( QgsVectorLayer*, QgsStyleV2*, QgsFeatureRendererV2* );
typedef QgsFeatureRendererV2*( *QgsRendererV2CreateFromSldFunc )( QDomEleme nt&, QGis::GeometryType geomType );
/** /**
Convenience metadata class that uses static functions to create renderer a nd its widget. Convenience metadata class that uses static functions to create renderer a nd its widget.
*/ */
class CORE_EXPORT QgsRendererV2Metadata : public QgsRendererV2AbstractMetad ata class CORE_EXPORT QgsRendererV2Metadata : public QgsRendererV2AbstractMetad ata
{ {
public: public:
/** construct metadata */ /** construct metadata */
QgsRendererV2Metadata( QString name, QgsRendererV2Metadata( QString name,
QString visibleName, QString visibleName,
QgsRendererV2CreateFunc pfCreate, QgsRendererV2CreateFunc pfCreate,
QIcon icon = QIcon(), QIcon icon = QIcon(),
QgsRendererV2WidgetFunc pfWidget = NULL ) QgsRendererV2WidgetFunc pfWidget = NULL )
: QgsRendererV2AbstractMetadata( name, visibleName, icon ), mCreate : QgsRendererV2AbstractMetadata( name, visibleName, icon )
Func( pfCreate ), mWidgetFunc( pfWidget ) {} , mCreateFunc( pfCreate )
, mWidgetFunc( pfWidget )
, mCreateFromSldFunc( NULL )
{}
QgsRendererV2Metadata( QString name,
QString visibleName,
QgsRendererV2CreateFunc pfCreate,
QgsRendererV2CreateFromSldFunc pfCreateFromSld,
QIcon icon = QIcon(),
QgsRendererV2WidgetFunc pfWidget = NULL )
: QgsRendererV2AbstractMetadata( name, visibleName, icon )
, mCreateFunc( pfCreate )
, mWidgetFunc( pfWidget )
, mCreateFromSldFunc( pfCreateFromSld )
{}
virtual QgsFeatureRendererV2* createRenderer( QDomElement& elem ) { ret urn mCreateFunc ? mCreateFunc( elem ) : NULL; } virtual QgsFeatureRendererV2* createRenderer( QDomElement& elem ) { ret urn mCreateFunc ? mCreateFunc( elem ) : NULL; }
virtual QgsRendererV2Widget* createRendererWidget( QgsVectorLayer* laye r, QgsStyleV2* style, QgsFeatureRendererV2* renderer ) virtual QgsRendererV2Widget* createRendererWidget( QgsVectorLayer* laye r, QgsStyleV2* style, QgsFeatureRendererV2* renderer )
{ return mWidgetFunc ? mWidgetFunc( layer, style, renderer ) : NULL; } { return mWidgetFunc ? mWidgetFunc( layer, style, renderer ) : NULL; }
virtual QgsFeatureRendererV2* createRendererFromSld( QDomElement& elem,
QGis::GeometryType geomType )
{ return mCreateFromSldFunc ? mCreateFromSldFunc( elem, geomType ) : NU
LL; }
QgsRendererV2CreateFunc createFunction() const { return mCreateFunc; } QgsRendererV2CreateFunc createFunction() const { return mCreateFunc; }
QgsRendererV2WidgetFunc widgetFunction() const { return mWidgetFunc; } QgsRendererV2WidgetFunc widgetFunction() const { return mWidgetFunc; }
QgsRendererV2CreateFromSldFunc createFromSldFunction() const { return m CreateFromSldFunc; }
void setWidgetFunction( QgsRendererV2WidgetFunc f ) { mWidgetFunc = f; } void setWidgetFunction( QgsRendererV2WidgetFunc f ) { mWidgetFunc = f; }
protected: protected:
//! pointer to function that creates an instance of the renderer when l oading project / style //! pointer to function that creates an instance of the renderer when l oading project / style
QgsRendererV2CreateFunc mCreateFunc; QgsRendererV2CreateFunc mCreateFunc;
//! pointer to function that creates a widget for configuration of rend erer's params //! pointer to function that creates a widget for configuration of rend erer's params
QgsRendererV2WidgetFunc mWidgetFunc; QgsRendererV2WidgetFunc mWidgetFunc;
//! pointer to function that creates an instance of the renderer from S
LD
QgsRendererV2CreateFromSldFunc mCreateFromSldFunc;
}; };
/** /**
Registry of renderers. Registry of renderers.
This is a singleton, renderers can be added / removed at any time This is a singleton, renderers can be added / removed at any time
*/ */
class CORE_EXPORT QgsRendererV2Registry class CORE_EXPORT QgsRendererV2Registry
{ {
public: public:
 End of changes. 10 change blocks. 
4 lines changed or deleted 59 lines changed or added


 qgsrendererv2widget.h   qgsrendererv2widget.h 
/**************************************************************************
*
qgsrendererv2widget.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSRENDERERV2WIDGET_H #ifndef QGSRENDERERV2WIDGET_H
#define QGSRENDERERV2WIDGET_H #define QGSRENDERERV2WIDGET_H
#include <QWidget> #include <QWidget>
#include <QMenu>
class QgsVectorLayer; class QgsVectorLayer;
class QgsStyleV2; class QgsStyleV2;
class QgsSymbolV2; class QgsSymbolV2;
class QgsFeatureRendererV2; class QgsFeatureRendererV2;
class QgsSymbolV2SelectorDialog; class QgsSymbolV2SelectorDialog;
/** /**
Base class for renderer settings widgets Base class for renderer settings widgets
WORKFLOW: WORKFLOW:
- open renderer dialog with some RENDERER (never null!) - open renderer dialog with some RENDERER (never null!)
- find out which widget to use - find out which widget to use
- instantiate it and set in stacked widget - instantiate it and set in stacked widget
- on any change of renderer type, create some default (dummy?) version and change the stacked widget - on any change of renderer type, create some default (dummy?) version and change the stacked widget
- when clicked ok/apply, get the renderer from active widget and clone it f or the layer - when clicked ok/apply, get the renderer from active widget and clone it f or the layer
*/ */
class GUI_EXPORT QgsRendererV2Widget : public QWidget class GUI_EXPORT QgsRendererV2Widget : public QWidget
{ {
Q_OBJECT
public: public:
QgsRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style ); QgsRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style );
virtual ~QgsRendererV2Widget() {} virtual ~QgsRendererV2Widget() {}
//! return pointer to the renderer (no transfer of ownership) //! return pointer to the renderer (no transfer of ownership)
virtual QgsFeatureRendererV2* renderer() = 0; virtual QgsFeatureRendererV2* renderer() = 0;
//! show a dialog with renderer's symbol level settings
void showSymbolLevelsDialog( QgsFeatureRendererV2* r );
protected: protected:
QgsVectorLayer* mLayer; QgsVectorLayer* mLayer;
QgsStyleV2* mStyle; QgsStyleV2* mStyle;
QMenu* contextMenu;
/**Subclasses may provide the capability of changing multiple symbols a
t once by implementing the following two methods
and by connecting the slot contextMenuViewCategories(const QPoint&)*/
virtual QList<QgsSymbolV2*> selectedSymbols() { return QList<QgsSymbolV
2*>(); }
virtual void refreshSymbolView() {}
protected slots:
void contextMenuViewCategories( const QPoint& p );
/**Change color of selected symbols*/
void changeSymbolColor();
/**Change opacity of selected symbols*/
void changeSymbolTransparency();
/**Change units mm/map units of selected symbols*/
void changeSymbolUnit();
/**Change line widths of selected symbols*/
void changeSymbolWidth();
/**Change marker sizes of selected symbols*/
void changeSymbolSize();
}; };
//////////// ////////////
#include <QObject> #include <QObject>
class QMenu; class QMenu;
class QgsField; class QgsField;
typedef QMap<int, QgsField> QgsFieldMap; typedef QMap<int, QgsField> QgsFieldMap;
 End of changes. 5 change blocks. 
0 lines changed or deleted 49 lines changed or added


 qgsrubberband.h   qgsrubberband.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2006 by Tom Elwertowski Copyright : (C) 2006 by Tom Elwertowski
Email : telwertowski at users dot sourceforge dot net Email : telwertowski at users dot sourceforge dot net
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSRUBBERBAND_H #ifndef QGSRUBBERBAND_H
#define QGSRUBBERBAND_H #define QGSRUBBERBAND_H
#include "qgsmapcanvasitem.h" #include "qgsmapcanvasitem.h"
#include "qgsgeometry.h" #include "qgsgeometry.h"
#include <QBrush> #include <QBrush>
#include <QList> #include <QList>
#include <QPen> #include <QPen>
#include <QPolygon> #include <QPolygon>
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsrulebasedrendererv2widget.h   qgsrulebasedrendererv2widget.h 
skipping to change at line 26 skipping to change at line 26
#ifndef QGSRULEBASEDRENDERERV2WIDGET_H #ifndef QGSRULEBASEDRENDERERV2WIDGET_H
#define QGSRULEBASEDRENDERERV2WIDGET_H #define QGSRULEBASEDRENDERERV2WIDGET_H
#include "qgsrendererv2widget.h" #include "qgsrendererv2widget.h"
#include "qgsrulebasedrendererv2.h" #include "qgsrulebasedrendererv2.h"
class QMenu; class QMenu;
/////// ///////
#include <QTreeWidget> #include <QAbstractItemModel>
class GUI_EXPORT QgsRendererRulesTreeWidget : public QTreeWidget /*
{ Tree model for the rules:
Q_OBJECT
(invalid) == root node
+--- top level rule
+--- top level rule
*/
class QgsRuleBasedRendererV2Model : public QAbstractItemModel
{
public: public:
QgsRendererRulesTreeWidget( QWidget* parent = 0 ); QgsRuleBasedRendererV2Model( QgsRuleBasedRendererV2* r );
void setRenderer( QgsRuleBasedRendererV2* r ); virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
virtual QVariant data( const QModelIndex &index, int role = Qt::Display
Role ) const;
virtual QVariant headerData( int section, Qt::Orientation orientation,
int role = Qt::DisplayRole ) const;
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const
;
virtual int columnCount( const QModelIndex & = QModelIndex() ) const;
//! provide model index for parent's child item
virtual QModelIndex index( int row, int column, const QModelIndex &pare
nt = QModelIndex() ) const;
//! provide parent model index
virtual QModelIndex parent( const QModelIndex &index ) const;
enum Grouping { NoGrouping, GroupingByScale, GroupingByFilter }; // editing support
virtual bool setData( const QModelIndex & index, const QVariant & value
, int role = Qt::EditRole );
void setGrouping( Grouping g ); // drag'n'drop support
Qt::DropActions supportedDropActions() const;
QStringList mimeTypes() const;
QMimeData *mimeData( const QModelIndexList &indexes ) const;
bool dropMimeData( const QMimeData *data, Qt::DropAction action, int ro
w, int column, const QModelIndex &parent );
void populateRules(); bool removeRows( int row, int count, const QModelIndex & parent = QMode lIndex() );
protected: // new methods
void populateRulesNoGrouping();
void populateRulesGroupByScale();
void populateRulesGroupByFilter();
QString formatScaleRange( int minDenom, int maxDenom ); QgsRuleBasedRendererV2::Rule* ruleForIndex( const QModelIndex& index ) const;
QString formatScale( int denom, int size = 0 ); void insertRule( const QModelIndex& parent, int before, QgsRuleBasedRen
dererV2::Rule* newrule );
void updateRule( const QModelIndex& parent, int row );
void removeRule( const QModelIndex& index );
QgsRuleBasedRendererV2* mR; void willAddRules( const QModelIndex& parent, int count ); // call begi
Grouping mGrouping; nInsertRows
void finishedAddingRules(); // call endInsertRows
int mLongestMinDenom; protected:
int mLongestMaxDenom; QgsRuleBasedRendererV2* mR;
}; };
/////// ///////
#include "ui_qgsrulebasedrendererv2widget.h" #include "ui_qgsrulebasedrendererv2widget.h"
class GUI_EXPORT QgsRuleBasedRendererV2Widget : public QgsRendererV2Widget, private Ui::QgsRuleBasedRendererV2Widget class GUI_EXPORT QgsRuleBasedRendererV2Widget : public QgsRendererV2Widget, private Ui::QgsRuleBasedRendererV2Widget
{ {
Q_OBJECT Q_OBJECT
skipping to change at line 80 skipping to change at line 98
QgsRuleBasedRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer ); QgsRuleBasedRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer );
~QgsRuleBasedRendererV2Widget(); ~QgsRuleBasedRendererV2Widget();
virtual QgsFeatureRendererV2* renderer(); virtual QgsFeatureRendererV2* renderer();
public slots: public slots:
void addRule(); void addRule();
void editRule(); void editRule();
void editRule( const QModelIndex& index );
void removeRule(); void removeRule();
void increasePriority();
void decreasePriority();
void setGrouping();
void refineRuleScales(); void refineRuleScales();
void refineRuleCategories(); void refineRuleCategories();
void refineRuleRanges(); void refineRuleRanges();
void usingFirstRuleChanged( ); void setRenderingOrder();
void symbolLevelsEnabledChanged();
void forceNoSymbolLevels();
void forceUsingFirstRule();
signals:
void forceChkUsingFirstRule(); void currentRuleChanged( const QModelIndex& current = QModelIndex(), co nst QModelIndex& previous = QModelIndex() );
protected: protected:
void refineRule( int type ); void refineRule( int type );
QList<QgsRuleBasedRendererV2::Rule> refineRuleCategoriesGui( QgsRuleBas void refineRuleCategoriesGui( const QModelIndexList& index );
edRendererV2::Rule& initialRule ); void refineRuleRangesGui( const QModelIndexList& index );
QList<QgsRuleBasedRendererV2::Rule> refineRuleRangesGui( QgsRuleBasedRe void refineRuleScalesGui( const QModelIndexList& index );
ndererV2::Rule& initialRule );
QList<QgsRuleBasedRendererV2::Rule> refineRuleScalesGui( QgsRuleBasedRe QgsRuleBasedRendererV2::Rule* currentRule();
ndererV2::Rule& initialRule );
QList<QgsSymbolV2*> selectedSymbols();
void refreshSymbolView();
QgsRuleBasedRendererV2* mRenderer; QgsRuleBasedRendererV2* mRenderer;
QgsRuleBasedRendererV2Model* mModel;
QMenu* mRefineMenu; QMenu* mRefineMenu;
}; };
/////// ///////
#include <QDialog> #include <QDialog>
#include "ui_qgsrendererrulepropsdialogbase.h" #include "ui_qgsrendererrulepropsdialogbase.h"
class GUI_EXPORT QgsRendererRulePropsDialog : public QDialog, private Ui::Q gsRendererRulePropsDialog class GUI_EXPORT QgsRendererRulePropsDialog : public QDialog, private Ui::Q gsRendererRulePropsDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsRendererRulePropsDialog( const QgsRuleBasedRendererV2::Rule& rule, Q QgsRendererRulePropsDialog( QgsRuleBasedRendererV2::Rule* rule, QgsVect
gsVectorLayer* layer, QgsStyleV2* style ); orLayer* layer, QgsStyleV2* style );
~QgsRendererRulePropsDialog();
void updateRuleFromGui(); QgsRuleBasedRendererV2::Rule* rule() { return mRule; }
const QgsRuleBasedRendererV2::Rule& rule() { return mRule; }
public slots: public slots:
void testFilter(); void testFilter();
void buildExpression(); void buildExpression();
void accept();
protected: protected:
QgsRuleBasedRendererV2::Rule mRule; QgsRuleBasedRendererV2::Rule* mRule; // borrowed
QgsVectorLayer* mLayer; QgsVectorLayer* mLayer;
QgsStyleV2* mStyle; QgsStyleV2* mStyle;
QgsSymbolV2SelectorDialog* mSymbolSelector;
QgsSymbolV2* mSymbol; // a clone of original symbol
}; };
#endif // QGSRULEBASEDRENDERERV2WIDGET_H #endif // QGSRULEBASEDRENDERERV2WIDGET_H
 End of changes. 24 change blocks. 
41 lines changed or deleted 65 lines changed or added


 qgsrunprocess.h   qgsrunprocess.h 
skipping to change at line 20 skipping to change at line 20
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSRUNPROCESS_H #ifndef QGSRUNPROCESS_H
#define QGSRUNPROCESS_H #define QGSRUNPROCESS_H
#include <QObject> #include <QObject>
#include <QProcess> #include <QProcess>
class QgsMessageOutput; class QgsMessageOutput;
/** \ingroup core /** \ingroup core
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsscalecalculator.h   qgsscalecalculator.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSSCALECALCULATOR_H #ifndef QGSSCALECALCULATOR_H
#define QGSSCALECALCULATOR_H #define QGSSCALECALCULATOR_H
#include <qgis.h> #include <qgis.h>
class QString; class QString;
class QgsRectangle; class QgsRectangle;
/** \ingroup core /** \ingroup core
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgssearchquerybuilder.h   qgssearchquerybuilder.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSSEARCHQUERYBUILDER_H #ifndef QGSSEARCHQUERYBUILDER_H
#define QGSSEARCHQUERYBUILDER_H #define QGSSEARCHQUERYBUILDER_H
#include <map> #include <map>
#include <vector> #include <vector>
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QModelIndex> #include <QModelIndex>
#include "ui_qgsquerybuilderbase.h" #include "ui_qgsquerybuilderbase.h"
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgssearchstring.h   qgssearchstring.h 
skipping to change at line 18 skipping to change at line 18
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSSEARCHSTRING_H #ifndef QGSSEARCHSTRING_H
#define QGSSEARCHSTRING_H #define QGSSEARCHSTRING_H
#include <QString> #include <QString>
class QgsSearchTreeNode; class QgsSearchTreeNode;
/** \ingroup core /** \ingroup core
* A class to represent a search string. * A class to represent a search string.
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgssearchtreenode.h   qgssearchtreenode.h 
skipping to change at line 18 skipping to change at line 18
*************************************************************************** / *************************************************************************** /
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSSEARCHTREENODE_H #ifndef QGSSEARCHTREENODE_H
#define QGSSEARCHTREENODE_H #define QGSSEARCHTREENODE_H
#include <QMap> #include <QMap>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QVariant> #include <QVariant>
#include <QList> #include <QList>
skipping to change at line 58 skipping to change at line 57
enum Type enum Type
{ {
tOperator = 1, tOperator = 1,
tNumber, tNumber,
tColumnRef, tColumnRef,
tString, tString,
tNodeList, tNodeList,
}; };
//! possible operators //! possible operators
//! TODO: sync the python bindings
enum Operator enum Operator
{ {
// binary // binary
opAND = 1, opAND = 1,
opOR, opOR,
opNOT, opNOT,
// arithmetic // arithmetic
opPLUS, opPLUS,
opMINUS, opMINUS,
skipping to change at line 89 skipping to change at line 89
opATAN2, opATAN2,
// conversion // conversion
opTOINT, opTOINT,
opTOREAL, opTOREAL,
opTOSTRING, opTOSTRING,
// coordinates // coordinates
opX, opX,
opY, opY,
opXAT,
opYAT,
// measuring // measuring
opLENGTH, opLENGTH,
opAREA, opAREA,
opPERIMETER, opPERIMETER,
// feature id // feature id
opID, opID,
// comparison // comparison
skipping to change at line 118 skipping to change at line 120
opLike, // LIKE opLike, // LIKE
opILike, // ILIKE opILike, // ILIKE
opIN, // IN opIN, // IN
opNOTIN, // NOT IN opNOTIN, // NOT IN
// string handling // string handling
opCONCAT, opCONCAT,
opLOWER, opLOWER,
opUPPER, opUPPER,
opREPLACE, opREPLACE,
opREGEXPREPLACE,
opSTRLEN, opSTRLEN,
opSUBSTR, opSUBSTR,
opROWNUM opROWNUM
}; };
//! constructors //! constructors
QgsSearchTreeNode( Type type ); QgsSearchTreeNode( Type type );
QgsSearchTreeNode( double number ); QgsSearchTreeNode( double number );
QgsSearchTreeNode( Operator op, QgsSearchTreeNode* left, QgsSearchTreeN ode* right ); QgsSearchTreeNode( Operator op, QgsSearchTreeNode* left, QgsSearchTreeN ode* right );
skipping to change at line 271 skipping to change at line 274
valString, valString,
valNumber, valNumber,
valNull valNull
}; };
QgsSearchTreeValue() { mType = valNull; } QgsSearchTreeValue() { mType = valNull; }
QgsSearchTreeValue( QString string ) { mType = string.isNull() ? valNul l : valString; mString = string; } QgsSearchTreeValue( QString string ) { mType = string.isNull() ? valNul l : valString; mString = string; }
QgsSearchTreeValue( double number ) { mType = valNumber; mNumber = numb er; } QgsSearchTreeValue( double number ) { mType = valNumber; mNumber = numb er; }
QgsSearchTreeValue( int error, QString errorMsg ) { mType = valError; m Number = error; mString = errorMsg; } QgsSearchTreeValue( int error, QString errorMsg ) { mType = valError; m Number = error; mString = errorMsg; }
static int compare( QgsSearchTreeValue& value1, QgsSearchTreeValue& val static QgsSearchTreeValue compare( QgsSearchTreeValue& value1, QgsSearc
ue2, hTreeValue& value2,
Qt::CaseSensitivity = Qt::CaseSensitive ); Qt::CaseSensitivity = Qt::CaseSensit
ive );
bool isNumeric() { return mType == valNumber; } bool isNumeric() { return mType == valNumber; }
bool isError() { return mType == valError; } bool isError() { return mType == valError; }
bool isNull() { return mType == valNull; } bool isNull() { return mType == valNull; }
QString& string() { return mString; } QString& string() { return mString; }
double number() { return mNumber; } double number() { return mNumber; }
private: private:
Type mType; Type mType;
 End of changes. 5 change blocks. 
4 lines changed or deleted 8 lines changed or added


 qgssinglesymbolrenderer.h   qgssinglesymbolrenderer.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgssinglesymbolrenderer.h 5371 2006-04-25 01:52:13Z wonder $ */
#ifndef QGSSINGLESYMBOLRENDERER_H #ifndef QGSSINGLESYMBOLRENDERER_H
#define QGSSINGLESYMBOLRENDERER_H #define QGSSINGLESYMBOLRENDERER_H
#include <QMap> #include <QMap>
#include "qgsrenderer.h" #include "qgsrenderer.h"
#include "qgsrendercontext.h" #include "qgsrendercontext.h"
/**Render class to display all the features with a single QgsSymbol*/ /**Render class to display all the features with a single QgsSymbol*/
class CORE_EXPORT QgsSingleSymbolRenderer: public QgsRenderer class CORE_EXPORT QgsSingleSymbolRenderer: public QgsRenderer
skipping to change at line 69 skipping to change at line 68
void updateSymbolAttributes(); void updateSymbolAttributes();
/**Returns the renderers name*/ /**Returns the renderers name*/
virtual QString name() const; virtual QString name() const;
/**Returns a list containing mSymbol*/ /**Returns a list containing mSymbol*/
const QList<QgsSymbol*> symbols() const; const QList<QgsSymbol*> symbols() const;
/**Returns a deep copy of this renderer*/ /**Returns a deep copy of this renderer*/
QgsRenderer* clone() const; QgsRenderer* clone() const;
/**Returns renderer symbol for a feature /**Returns renderer symbol for a feature
@note: this method was added in version 1.6*/ @note: this method was added in version 1.6*/
QgsSymbol* symbolForFeature( const QgsFeature* f ) { return mSymbol0; } QgsSymbol* symbolForFeature( const QgsFeature* f ) { Q_UNUSED( f ); ret urn mSymbol0; }
protected: protected:
/**Object containing symbology information*/ /**Object containing symbology information*/
QgsSymbol *mSymbol0; QgsSymbol *mSymbol0;
QMap<QString, QgsSymbol*> mSymbols; QMap<QString, QgsSymbol*> mSymbols;
/**Cached copy of all underlying symbols required attribute fields*/ /**Cached copy of all underlying symbols required attribute fields*/
QgsAttributeList mSymbolAttributes; QgsAttributeList mSymbolAttributes;
}; };
inline const QgsSymbol* QgsSingleSymbolRenderer::symbol() const inline const QgsSymbol* QgsSingleSymbolRenderer::symbol() const
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 qgssinglesymbolrendererv2.h   qgssinglesymbolrendererv2.h 
/**************************************************************************
*
qgssinglesymbolrendererv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSINGLESYMBOLRENDERERV2_H #ifndef QGSSINGLESYMBOLRENDERERV2_H
#define QGSSINGLESYMBOLRENDERERV2_H #define QGSSINGLESYMBOLRENDERERV2_H
#include "qgis.h"
#include "qgsrendererv2.h" #include "qgsrendererv2.h"
class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2 class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
{ {
public: public:
QgsSingleSymbolRendererV2( QgsSymbolV2* symbol ); QgsSingleSymbolRendererV2( QgsSymbolV2* symbol );
virtual ~QgsSingleSymbolRendererV2(); virtual ~QgsSingleSymbolRendererV2();
skipping to change at line 39 skipping to change at line 54
//! @note added in 1.5 //! @note added in 1.5
void setSizeScaleField( QString fieldName ) { mSizeScaleField = fieldNa me; } void setSizeScaleField( QString fieldName ) { mSizeScaleField = fieldNa me; }
//! @note added in 1.5 //! @note added in 1.5
QString sizeScaleField() const { return mSizeScaleField; } QString sizeScaleField() const { return mSizeScaleField; }
virtual QString dump(); virtual QString dump();
virtual QgsFeatureRendererV2* clone(); virtual QgsFeatureRendererV2* clone();
virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
static QgsFeatureRendererV2* createFromSld( QDomElement& element, QGis:
:GeometryType geomType );
//! returns bitwise OR-ed capabilities of the renderer
//! \note added in 2.0
virtual int capabilities() { return SymbolLevels | RotationField; }
virtual QgsSymbolV2List symbols(); virtual QgsSymbolV2List symbols();
//! create renderer from XML element //! create renderer from XML element
static QgsFeatureRendererV2* create( QDomElement& element ); static QgsFeatureRendererV2* create( QDomElement& element );
//! store renderer info to XML element //! store renderer info to XML element
virtual QDomElement save( QDomDocument& doc ); virtual QDomElement save( QDomDocument& doc );
//! return a list of symbology items for the legend //! return a list of symbology items for the legend
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize ); virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
 End of changes. 3 change blocks. 
0 lines changed or deleted 32 lines changed or added


 qgssinglesymbolrendererv2widget.h   qgssinglesymbolrendererv2widget.h 
/**************************************************************************
*
qgssinglesymbolrendererv2widget.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSINGLESYMBOLRENDERERV2WIDGET_H #ifndef QGSSINGLESYMBOLRENDERERV2WIDGET_H
#define QGSSINGLESYMBOLRENDERERV2WIDGET_H #define QGSSINGLESYMBOLRENDERERV2WIDGET_H
#include "qgsrendererv2widget.h" #include "qgsrendererv2widget.h"
class QgsSingleSymbolRendererV2; class QgsSingleSymbolRendererV2;
class QgsSymbolV2SelectorDialog; class QgsSymbolV2SelectorDialog;
class QMenu; class QMenu;
skipping to change at line 30 skipping to change at line 44
~QgsSingleSymbolRendererV2Widget(); ~QgsSingleSymbolRendererV2Widget();
virtual QgsFeatureRendererV2* renderer(); virtual QgsFeatureRendererV2* renderer();
public slots: public slots:
void changeSingleSymbol(); void changeSingleSymbol();
void rotationFieldChanged( QString fldName ); void rotationFieldChanged( QString fldName );
void sizeScaleFieldChanged( QString fldName ); void sizeScaleFieldChanged( QString fldName );
void showSymbolLevels();
protected: protected:
QgsSingleSymbolRendererV2* mRenderer; QgsSingleSymbolRendererV2* mRenderer;
QgsSymbolV2SelectorDialog* mSelector; QgsSymbolV2SelectorDialog* mSelector;
QgsSymbolV2* mSingleSymbol; QgsSymbolV2* mSingleSymbol;
QgsRendererV2DataDefinedMenus* mDataDefinedMenus; QgsRendererV2DataDefinedMenus* mDataDefinedMenus;
}; };
#endif // QGSSINGLESYMBOLRENDERERV2WIDGET_H #endif // QGSSINGLESYMBOLRENDERERV2WIDGET_H
 End of changes. 2 change blocks. 
0 lines changed or deleted 25 lines changed or added


 qgssnapper.h   qgssnapper.h 
skipping to change at line 23 skipping to change at line 23
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSSNAPPER_H #ifndef QGSSNAPPER_H
#define QGSSNAPPER_H #define QGSSNAPPER_H
#include "qgspoint.h" #include "qgspoint.h"
#include "qgstolerance.h" #include "qgstolerance.h"
#include "qgsfeature.h"
#include <QList> #include <QList>
#include <QMultiMap> #include <QMultiMap>
class QgsMapRenderer; class QgsMapRenderer;
class QgsVectorLayer; class QgsVectorLayer;
class QPoint; class QPoint;
/** \ingroup core /** \ingroup core
* Represents the result of a snapping operation. * Represents the result of a snapping operation.
* */ * */
skipping to change at line 51 skipping to change at line 53
QgsPoint beforeVertex; QgsPoint beforeVertex;
/**The index of the vertex before snappedVertex /**The index of the vertex before snappedVertex
or -1 if no such vertex*/ or -1 if no such vertex*/
int beforeVertexNr; int beforeVertexNr;
/**The layer coordinates of the vertex after snappedVertex*/ /**The layer coordinates of the vertex after snappedVertex*/
QgsPoint afterVertex; QgsPoint afterVertex;
/**The index of the vertex after snappedVertex /**The index of the vertex after snappedVertex
or -1 if no such vertex*/ or -1 if no such vertex*/
int afterVertexNr; int afterVertexNr;
/**Index of the snapped geometry*/ /**Index of the snapped geometry*/
int snappedAtGeometry; QgsFeatureId snappedAtGeometry;
/**Layer where the snap occured*/ /**Layer where the snap occured*/
const QgsVectorLayer* layer; const QgsVectorLayer* layer;
}; };
/**A class that allows advanced snapping operations on a set of vector laye rs*/ /**A class that allows advanced snapping operations on a set of vector laye rs*/
class CORE_EXPORT QgsSnapper class CORE_EXPORT QgsSnapper
{ {
public: public:
/**Snap to vertex, to segment or both*/ /**Snap to vertex, to segment or both*/
enum SnappingType enum SnappingType
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 qgsspatialindex.h   qgsspatialindex.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSSPATIALINDEX_H #ifndef QGSSPATIALINDEX_H
#define QGSSPATIALINDEX_H #define QGSSPATIALINDEX_H
// forward declaration // forward declaration
namespace SpatialIndex namespace SpatialIndex
{ {
class IStorageManager; class IStorageManager;
class ISpatialIndex; class ISpatialIndex;
class Region;
class Point;
namespace StorageManager namespace StorageManager
{ {
class IBuffer; class IBuffer;
} }
} }
namespace Tools
{
namespace Geometry
{
class Region;
}
}
class QgsFeature; class QgsFeature;
class QgsRectangle; class QgsRectangle;
class QgsPoint; class QgsPoint;
#include <QList> #include <QList>
#include "qgsfeature.h"
class CORE_EXPORT QgsSpatialIndex class CORE_EXPORT QgsSpatialIndex
{ {
public: public:
/* creation of spatial index */ /* creation of spatial index */
/** create new spatial index that will be stored in memory */ /** create new spatial index that will be stored in memory */
//static QgsSpatialIndex* createMemoryIndex(); //static QgsSpatialIndex* createMemoryIndex();
skipping to change at line 75 skipping to change at line 71
/** add feature to index */ /** add feature to index */
bool insertFeature( QgsFeature& f ); bool insertFeature( QgsFeature& f );
/** remove feature from index */ /** remove feature from index */
bool deleteFeature( QgsFeature& f ); bool deleteFeature( QgsFeature& f );
/* queries */ /* queries */
/** returns features that intersect the specified rectangle */ /** returns features that intersect the specified rectangle */
QList<int> intersects( QgsRectangle rect ); QList<QgsFeatureId> intersects( QgsRectangle rect );
/** returns nearest neighbors (their count is specified by second param eter) */ /** returns nearest neighbors (their count is specified by second param eter) */
QList<int> nearestNeighbor( QgsPoint point, int neighbors ); QList<QgsFeatureId> nearestNeighbor( QgsPoint point, int neighbors );
protected: protected:
Tools::Geometry::Region rectToRegion( QgsRectangle rect ); SpatialIndex::Region rectToRegion( QgsRectangle rect );
bool featureInfo( QgsFeature& f, Tools::Geometry::Region& r, long& id ) ; bool featureInfo( QgsFeature& f, SpatialIndex::Region& r, QgsFeatureId &id );
private: private:
/** storage manager */ /** storage manager */
SpatialIndex::IStorageManager* mStorageManager; SpatialIndex::IStorageManager* mStorageManager;
/** buffer for index data */ /** buffer for index data */
SpatialIndex::StorageManager::IBuffer* mStorage; SpatialIndex::StorageManager::IBuffer* mStorage;
/** R-tree containing spatial index */ /** R-tree containing spatial index */
 End of changes. 9 change blocks. 
13 lines changed or deleted 9 lines changed or added


 qgsstylev2.h   qgsstylev2.h 
/**************************************************************************
*
qgsstylev2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSTYLEV2_H #ifndef QGSSTYLEV2_H
#define QGSSTYLEV2_H #define QGSSTYLEV2_H
#include <QMap> #include <QMap>
#include <QString> #include <QString>
#include "qgssymbollayerv2utils.h" // QgsStringMap #include "qgssymbollayerv2utils.h" // QgsStringMap
class QgsSymbolV2; class QgsSymbolV2;
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgsstylev2exportimportdialog.h   qgsstylev2exportimportdialog.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgsstylev2exportimportdialog.h 13187 2010-03-28 22:14:44Z jef $ */
#ifndef QGSSTYLEV2EXPORTIMPORTDIALOG_H #ifndef QGSSTYLEV2EXPORTIMPORTDIALOG_H
#define QGSSTYLEV2EXPORTIMPORTDIALOG_H #define QGSSTYLEV2EXPORTIMPORTDIALOG_H
#include <QDialog> #include <QDialog>
#include "ui_qgsstylev2exportimportdialogbase.h" #include "ui_qgsstylev2exportimportdialogbase.h"
class QgsStyleV2; class QgsStyleV2;
class QgsStyleV2ExportImportDialog : public QDialog, private Ui::QgsStyleV2 ExportImportDialogBase class QgsStyleV2ExportImportDialog : public QDialog, private Ui::QgsStyleV2 ExportImportDialogBase
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 qgsstylev2managerdialog.h   qgsstylev2managerdialog.h 
/**************************************************************************
*
qgsstylev2managerdialog.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSTYLEV2MANAGERDIALOG_H #ifndef QGSSTYLEV2MANAGERDIALOG_H
#define QGSSTYLEV2MANAGERDIALOG_H #define QGSSTYLEV2MANAGERDIALOG_H
#include <QDialog> #include <QDialog>
#include <QStandardItem> #include <QStandardItem>
#include "ui_qgsstylev2managerdialogbase.h" #include "ui_qgsstylev2managerdialogbase.h"
#include "qgscontexthelp.h" #include "qgscontexthelp.h"
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgssymbol.h   qgssymbol.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSSYMBOL_H #ifndef QGSSYMBOL_H
#define QGSSYMBOL_H #define QGSSYMBOL_H
#include "qgis.h" #include "qgis.h"
#include <QBrush> #include <QBrush>
#include <QPen> #include <QPen>
#include <QImage> #include <QImage>
class QDomNode; class QDomNode;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgssymbollayerv2.h   qgssymbollayerv2.h 
/**************************************************************************
*
qgssymbollayerv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLLAYERV2_H #ifndef QGSSYMBOLLAYERV2_H
#define QGSSYMBOLLAYERV2_H #define QGSSYMBOLLAYERV2_H
#include <QMap>
#include <QColor> #include <QColor>
#include <QMap>
#include <QPointF> #include <QPointF>
#include <QSet>
#include <QDomDocument>
#include <QDomElement>
#include "qgssymbolv2.h" #include "qgssymbolv2.h"
#include "qgssymbollayerv2utils.h" // QgsStringMap #include "qgssymbollayerv2utils.h" // QgsStringMap
class QPainter; class QPainter;
class QSize; class QSize;
class QPolygonF; class QPolygonF;
class QgsRenderContext; class QgsRenderContext;
class QgsSymbolV2;
class CORE_EXPORT QgsSymbolLayerV2 class CORE_EXPORT QgsSymbolLayerV2
{ {
public: public:
// not necessarily supported by all symbol layers... // not necessarily supported by all symbol layers...
virtual void setColor( const QColor& color ) { mColor = color; } virtual void setColor( const QColor& color ) { mColor = color; }
virtual QColor color() const { return mColor; } virtual QColor color() const { return mColor; }
virtual ~QgsSymbolLayerV2() {} virtual ~QgsSymbolLayerV2() {}
virtual QString layerType() const = 0; virtual QString layerType() const = 0;
virtual void startRender( QgsSymbolV2RenderContext& context ) = 0; virtual void startRender( QgsSymbolV2RenderContext& context ) = 0;
virtual void stopRender( QgsSymbolV2RenderContext& context ) = 0; virtual void stopRender( QgsSymbolV2RenderContext& context ) = 0;
virtual QgsSymbolLayerV2* clone() const = 0; virtual QgsSymbolLayerV2* clone() const = 0;
virtual void toSld( QDomDocument &doc, QDomElement &element, QgsStringM
ap props ) const
{ Q_UNUSED( props ); element.appendChild( doc.createComment( QString( "
SymbolLayerV2 %1 not implemented yet" ).arg( layerType() ) ) ); }
virtual QgsStringMap properties() const = 0; virtual QgsStringMap properties() const = 0;
virtual void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size ) = 0; virtual void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size ) = 0;
virtual QgsSymbolV2* subSymbol() { return NULL; } virtual QgsSymbolV2* subSymbol() { return NULL; }
// set layer's subsymbol. takes ownership of the passed symbol // set layer's subsymbol. takes ownership of the passed symbol
virtual bool setSubSymbol( QgsSymbolV2* symbol ) { delete symbol; retur n false; } virtual bool setSubSymbol( QgsSymbolV2* symbol ) { delete symbol; retur n false; }
QgsSymbolV2::SymbolType type() const { return mType; } QgsSymbolV2::SymbolType type() const { return mType; }
void setLocked( bool locked ) { mLocked = locked; } void setLocked( bool locked ) { mLocked = locked; }
bool isLocked() const { return mLocked; } bool isLocked() const { return mLocked; }
// used only with rending with symbol levels is turned on (0 = first pa ss, 1 = second, ...) // used only with rending with symbol levels is turned on (0 = first pa ss, 1 = second, ...)
void setRenderingPass( int renderingPass ) { mRenderingPass = rendering Pass; } void setRenderingPass( int renderingPass ) { mRenderingPass = rendering Pass; }
int renderingPass() const { return mRenderingPass; } int renderingPass() const { return mRenderingPass; }
// symbol layers normally only use additional attributes to provide dat
a defined settings
virtual QSet<QString> usedAttributes() const { return QSet<QString>();
}
protected: protected:
QgsSymbolLayerV2( QgsSymbolV2::SymbolType type, bool locked = false ) QgsSymbolLayerV2( QgsSymbolV2::SymbolType type, bool locked = false )
: mType( type ), mLocked( locked ), mRenderingPass( 0 ) {} : mType( type ), mLocked( locked ), mRenderingPass( 0 ) {}
QgsSymbolV2::SymbolType mType; QgsSymbolV2::SymbolType mType;
bool mLocked; bool mLocked;
QColor mColor; QColor mColor;
int mRenderingPass; int mRenderingPass;
// Configuration of selected symbology implementation // Configuration of selected symbology implementation
skipping to change at line 88 skipping to change at line 109
void setAngle( double angle ) { mAngle = angle; } void setAngle( double angle ) { mAngle = angle; }
double angle() const { return mAngle; } double angle() const { return mAngle; }
void setSize( double size ) { mSize = size; } void setSize( double size ) { mSize = size; }
double size() const { return mSize; } double size() const { return mSize; }
void setOffset( QPointF offset ) { mOffset = offset; } void setOffset( QPointF offset ) { mOffset = offset; }
QPointF offset() { return mOffset; } QPointF offset() { return mOffset; }
virtual void toSld( QDomDocument &doc, QDomElement &element, QgsStringM
ap props ) const;
virtual void writeSldMarker( QDomDocument &doc, QDomElement &element, Q
gsStringMap props ) const
{ Q_UNUSED( props ); element.appendChild( doc.createComment( QString( "
QgsMarkerSymbolLayerV2 %1 not implemented yet" ).arg( layerType() ) ) ); }
protected: protected:
QgsMarkerSymbolLayerV2( bool locked = false ); QgsMarkerSymbolLayerV2( bool locked = false );
double mAngle; double mAngle;
double mSize; double mSize;
QPointF mOffset; QPointF mOffset;
}; };
class CORE_EXPORT QgsLineSymbolLayerV2 : public QgsSymbolLayerV2 class CORE_EXPORT QgsLineSymbolLayerV2 : public QgsSymbolLayerV2
{ {
 End of changes. 8 change blocks. 
3 lines changed or deleted 45 lines changed or added


 qgssymbollayerv2registry.h   qgssymbollayerv2registry.h 
/**************************************************************************
*
qgssymbollayerv2registry.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLLAYERV2REGISTRY_H #ifndef QGSSYMBOLLAYERV2REGISTRY_H
#define QGSSYMBOLLAYERV2REGISTRY_H #define QGSSYMBOLLAYERV2REGISTRY_H
#include "qgssymbolv2.h" #include "qgssymbolv2.h"
#include "qgssymbollayerv2.h" #include "qgssymbollayerv2.h"
class QgsVectorLayer;
/** /**
Stores metadata about one symbol layer class. Stores metadata about one symbol layer class.
@note It's necessary to implement createSymbolLayer() function. @note It's necessary to implement createSymbolLayer() function.
In C++ you can use QgsSymbolLayerV2Metadata convenience class. In C++ you can use QgsSymbolLayerV2Metadata convenience class.
*/ */
class CORE_EXPORT QgsSymbolLayerV2AbstractMetadata class CORE_EXPORT QgsSymbolLayerV2AbstractMetadata
{ {
public: public:
QgsSymbolLayerV2AbstractMetadata( QString name, QString visibleName, Qg sSymbolV2::SymbolType type ) QgsSymbolLayerV2AbstractMetadata( QString name, QString visibleName, Qg sSymbolV2::SymbolType type )
: mName( name ), mVisibleName( visibleName ), mType( type ) {} : mName( name ), mVisibleName( visibleName ), mType( type ) {}
virtual ~QgsSymbolLayerV2AbstractMetadata() {}
QString name() const { return mName; } QString name() const { return mName; }
QString visibleName() const { return mVisibleName; } QString visibleName() const { return mVisibleName; }
QgsSymbolV2::SymbolType type() const { return mType; } QgsSymbolV2::SymbolType type() const { return mType; }
/** create a symbol layer of this type given the map of properties. */ /** create a symbol layer of this type given the map of properties. */
virtual QgsSymbolLayerV2* createSymbolLayer( const QgsStringMap& map ) = 0; virtual QgsSymbolLayerV2* createSymbolLayer( const QgsStringMap& map ) = 0;
/** create widget for symbol layer of this type. Can return NULL if the re's no GUI */ /** create widget for symbol layer of this type. Can return NULL if the re's no GUI */
virtual QgsSymbolLayerV2Widget* createSymbolLayerWidget() { return NULL virtual QgsSymbolLayerV2Widget* createSymbolLayerWidget( const QgsVecto
; } rLayer * ) { return NULL; }
/** create a symbol layer of this type given the map of properties. */
virtual QgsSymbolLayerV2* createSymbolLayerFromSld( QDomElement & ) { r
eturn NULL; }
protected: protected:
QString mName; QString mName;
QString mVisibleName; QString mVisibleName;
QgsSymbolV2::SymbolType mType; QgsSymbolV2::SymbolType mType;
}; };
typedef QgsSymbolLayerV2*( *QgsSymbolLayerV2CreateFunc )( const QgsStringMa p& ); typedef QgsSymbolLayerV2*( *QgsSymbolLayerV2CreateFunc )( const QgsStringMa p& );
typedef QgsSymbolLayerV2Widget*( *QgsSymbolLayerV2WidgetFunc )(); typedef QgsSymbolLayerV2Widget*( *QgsSymbolLayerV2WidgetFunc )( const QgsVe
ctorLayer* );
typedef QgsSymbolLayerV2*( *QgsSymbolLayerV2CreateFromSldFunc )( QDomElemen
t& );
/** /**
Convenience metadata class that uses static functions to create symbol lay er and its widget. Convenience metadata class that uses static functions to create symbol lay er and its widget.
*/ */
class CORE_EXPORT QgsSymbolLayerV2Metadata : public QgsSymbolLayerV2Abstrac tMetadata class CORE_EXPORT QgsSymbolLayerV2Metadata : public QgsSymbolLayerV2Abstrac tMetadata
{ {
public: public:
QgsSymbolLayerV2Metadata( QString name, QString visibleName, QgsSymbolLayerV2Metadata( QString name, QString visibleName,
QgsSymbolV2::SymbolType type, QgsSymbolV2::SymbolType type,
QgsSymbolLayerV2CreateFunc pfCreate, QgsSymbolLayerV2CreateFunc pfCreate,
QgsSymbolLayerV2WidgetFunc pfWidget = NULL ) QgsSymbolLayerV2WidgetFunc pfWidget = NULL )
: QgsSymbolLayerV2AbstractMetadata( name, visibleName, type ), mCre : QgsSymbolLayerV2AbstractMetadata( name, visibleName, type )
ateFunc( pfCreate ), mWidgetFunc( pfWidget ) {} , mCreateFunc( pfCreate )
, mWidgetFunc( pfWidget )
, mCreateFromSldFunc( NULL )
{}
QgsSymbolLayerV2Metadata( QString name, QString visibleName,
QgsSymbolV2::SymbolType type,
QgsSymbolLayerV2CreateFunc pfCreate,
QgsSymbolLayerV2CreateFromSldFunc pfCreateFro
mSld,
QgsSymbolLayerV2WidgetFunc pfWidget = NULL )
: QgsSymbolLayerV2AbstractMetadata( name, visibleName, type )
, mCreateFunc( pfCreate )
, mWidgetFunc( pfWidget )
, mCreateFromSldFunc( pfCreateFromSld )
{}
QgsSymbolLayerV2CreateFunc createFunction() const { return mCreateFunc; } QgsSymbolLayerV2CreateFunc createFunction() const { return mCreateFunc; }
QgsSymbolLayerV2WidgetFunc widgetFunction() const { return mWidgetFunc; } QgsSymbolLayerV2WidgetFunc widgetFunction() const { return mWidgetFunc; }
QgsSymbolLayerV2CreateFromSldFunc createFromSldFunction() const { retur n mCreateFromSldFunc; }
void setWidgetFunction( QgsSymbolLayerV2WidgetFunc f ) { mWidgetFunc = f; } void setWidgetFunction( QgsSymbolLayerV2WidgetFunc f ) { mWidgetFunc = f; }
virtual QgsSymbolLayerV2* createSymbolLayer( const QgsStringMap& map ) { return mCreateFunc ? mCreateFunc( map ) : NULL; } virtual QgsSymbolLayerV2* createSymbolLayer( const QgsStringMap& map ) { return mCreateFunc ? mCreateFunc( map ) : NULL; }
virtual QgsSymbolLayerV2Widget* createSymbolLayerWidget() { return mWid virtual QgsSymbolLayerV2Widget* createSymbolLayerWidget( const QgsVecto
getFunc ? mWidgetFunc() : NULL; } rLayer* vl ) { return mWidgetFunc ? mWidgetFunc( vl ) : NULL; }
virtual QgsSymbolLayerV2* createSymbolLayerFromSld( QDomElement& elem )
{ return mCreateFromSldFunc ? mCreateFromSldFunc( elem ) : NULL; }
protected: protected:
QgsSymbolLayerV2CreateFunc mCreateFunc; QgsSymbolLayerV2CreateFunc mCreateFunc;
QgsSymbolLayerV2WidgetFunc mWidgetFunc; QgsSymbolLayerV2WidgetFunc mWidgetFunc;
QgsSymbolLayerV2CreateFromSldFunc mCreateFromSldFunc;
}; };
/** /**
Registry of available symbol layer classes. Registry of available symbol layer classes.
Implemented as a singleton. Implemented as a singleton.
*/ */
class CORE_EXPORT QgsSymbolLayerV2Registry class CORE_EXPORT QgsSymbolLayerV2Registry
{ {
public: public:
skipping to change at line 83 skipping to change at line 122
//! return metadata for specified symbol layer. Returns NULL if not fou nd //! return metadata for specified symbol layer. Returns NULL if not fou nd
QgsSymbolLayerV2AbstractMetadata* symbolLayerMetadata( QString name ) c onst; QgsSymbolLayerV2AbstractMetadata* symbolLayerMetadata( QString name ) c onst;
//! register a new symbol layer type. Takes ownership of the metadata i nstance. //! register a new symbol layer type. Takes ownership of the metadata i nstance.
bool addSymbolLayerType( QgsSymbolLayerV2AbstractMetadata* metadata ); bool addSymbolLayerType( QgsSymbolLayerV2AbstractMetadata* metadata );
//! create a new instance of symbol layer given symbol layer name and p roperties //! create a new instance of symbol layer given symbol layer name and p roperties
QgsSymbolLayerV2* createSymbolLayer( QString name, const QgsStringMap& properties = QgsStringMap() ) const; QgsSymbolLayerV2* createSymbolLayer( QString name, const QgsStringMap& properties = QgsStringMap() ) const;
//! create a new instance of symbol layer given symbol layer name and S
LD
QgsSymbolLayerV2* createSymbolLayerFromSld( QString name, QDomElement &
element ) const;
//! return a list of available symbol layers for a specified symbol typ e //! return a list of available symbol layers for a specified symbol typ e
QStringList symbolLayersForType( QgsSymbolV2::SymbolType type ); QStringList symbolLayersForType( QgsSymbolV2::SymbolType type );
//! create a new instance of symbol layer for specified symbol type wit h default settings //! create a new instance of symbol layer for specified symbol type wit h default settings
static QgsSymbolLayerV2* defaultSymbolLayer( QgsSymbolV2::SymbolType ty pe ); static QgsSymbolLayerV2* defaultSymbolLayer( QgsSymbolV2::SymbolType ty pe );
protected: protected:
QgsSymbolLayerV2Registry(); QgsSymbolLayerV2Registry();
~QgsSymbolLayerV2Registry(); ~QgsSymbolLayerV2Registry();
 End of changes. 10 change blocks. 
7 lines changed or deleted 64 lines changed or added


 qgssymbollayerv2utils.h   qgssymbollayerv2utils.h 
/**************************************************************************
*
qgssymbollayerv2utils.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLLAYERV2UTILS_H #ifndef QGSSYMBOLLAYERV2UTILS_H
#define QGSSYMBOLLAYERV2UTILS_H #define QGSSYMBOLLAYERV2UTILS_H
#include <QMap> #include <QMap>
#include <Qt> #include <Qt>
#include <QtCore> #include <QtCore>
#include <QFont>
#include <QColor>
#include "qgssymbolv2.h" #include "qgssymbolv2.h"
#include "qgis.h"
class QgsSymbolV2;
class QgsSymbolLayerV2; class QgsSymbolLayerV2;
class QgsVectorColorRampV2; class QgsVectorColorRampV2;
typedef QMap<QString, QString> QgsStringMap; typedef QMap<QString, QString> QgsStringMap;
typedef QMap<QString, QgsSymbolV2* > QgsSymbolV2Map; typedef QMap<QString, QgsSymbolV2* > QgsSymbolV2Map;
class QColor;
class QDomDocument; class QDomDocument;
class QDomElement; class QDomElement;
class QIcon; class QIcon;
class QPixmap; class QPixmap;
class QPointF; class QPointF;
class QSize; class QSize;
class CORE_EXPORT QgsSymbolLayerV2Utils class CORE_EXPORT QgsSymbolLayerV2Utils
{ {
public: public:
static QString encodeColor( QColor color ); static QString encodeColor( QColor color );
static QColor decodeColor( QString str ); static QColor decodeColor( QString str );
static QString encodeSldAlpha( int alpha );
static int decodeSldAlpha( QString str );
static QString encodeSldFontStyle( QFont::Style style );
static QFont::Style decodeSldFontStyle( QString str );
static QString encodeSldFontWeight( int weight );
static int decodeSldFontWeight( QString str );
static QString encodePenStyle( Qt::PenStyle style ); static QString encodePenStyle( Qt::PenStyle style );
static Qt::PenStyle decodePenStyle( QString str ); static Qt::PenStyle decodePenStyle( QString str );
static QString encodePenJoinStyle( Qt::PenJoinStyle style ); static QString encodePenJoinStyle( Qt::PenJoinStyle style );
static Qt::PenJoinStyle decodePenJoinStyle( QString str ); static Qt::PenJoinStyle decodePenJoinStyle( QString str );
static QString encodePenCapStyle( Qt::PenCapStyle style ); static QString encodePenCapStyle( Qt::PenCapStyle style );
static Qt::PenCapStyle decodePenCapStyle( QString str ); static Qt::PenCapStyle decodePenCapStyle( QString str );
static QString encodeSldLineJoinStyle( Qt::PenJoinStyle style );
static Qt::PenJoinStyle decodeSldLineJoinStyle( QString str );
static QString encodeSldLineCapStyle( Qt::PenCapStyle style );
static Qt::PenCapStyle decodeSldLineCapStyle( QString str );
static QString encodeBrushStyle( Qt::BrushStyle style ); static QString encodeBrushStyle( Qt::BrushStyle style );
static Qt::BrushStyle decodeBrushStyle( QString str ); static Qt::BrushStyle decodeBrushStyle( QString str );
static QString encodeSldBrushStyle( Qt::BrushStyle style );
static Qt::BrushStyle decodeSldBrushStyle( QString str );
static QString encodePoint( QPointF point ); static QString encodePoint( QPointF point );
static QPointF decodePoint( QString str ); static QPointF decodePoint( QString str );
static QString encodeRealVector( const QVector<qreal>& v ); static QString encodeRealVector( const QVector<qreal>& v );
static QVector<qreal> decodeRealVector( const QString& s ); static QVector<qreal> decodeRealVector( const QString& s );
static QString encodeSldRealVector( const QVector<qreal>& v );
static QVector<qreal> decodeSldRealVector( const QString& s );
static QString encodeOutputUnit( QgsSymbolV2::OutputUnit unit ); static QString encodeOutputUnit( QgsSymbolV2::OutputUnit unit );
static QgsSymbolV2::OutputUnit decodeOutputUnit( QString str ); static QgsSymbolV2::OutputUnit decodeOutputUnit( QString str );
static QString encodeSldUom( QgsSymbolV2::OutputUnit unit, double *scal
eFactor );
static QgsSymbolV2::OutputUnit decodeSldUom( QString str, double *scale
Factor );
static QIcon symbolPreviewIcon( QgsSymbolV2* symbol, QSize size ); static QIcon symbolPreviewIcon( QgsSymbolV2* symbol, QSize size );
static QIcon symbolLayerPreviewIcon( QgsSymbolLayerV2* layer, QgsSymbol V2::OutputUnit u, QSize size ); static QIcon symbolLayerPreviewIcon( QgsSymbolLayerV2* layer, QgsSymbol V2::OutputUnit u, QSize size );
static QIcon colorRampPreviewIcon( QgsVectorColorRampV2* ramp, QSize si ze ); static QIcon colorRampPreviewIcon( QgsVectorColorRampV2* ramp, QSize si ze );
static QPixmap symbolPreviewPixmap( QgsSymbolV2* symbol, QSize size ); static QPixmap symbolPreviewPixmap( QgsSymbolV2* symbol, QSize size );
static QPixmap colorRampPreviewPixmap( QgsVectorColorRampV2* ramp, QSiz e size ); static QPixmap colorRampPreviewPixmap( QgsVectorColorRampV2* ramp, QSiz e size );
static QgsSymbolV2* loadSymbol( QDomElement& element ); static QgsSymbolV2* loadSymbol( QDomElement& element );
static QgsSymbolLayerV2* loadSymbolLayer( QDomElement& element ); static QgsSymbolLayerV2* loadSymbolLayer( QDomElement& element );
static QDomElement saveSymbol( QString name, QgsSymbolV2* symbol, QDomD ocument& doc, QgsSymbolV2Map* subSymbols = NULL ); static QDomElement saveSymbol( QString name, QgsSymbolV2* symbol, QDomD ocument& doc, QgsSymbolV2Map* subSymbols = NULL );
static bool createSymbolLayerV2ListFromSld( QDomElement& element, QGis:
:GeometryType geomType, QgsSymbolLayerV2List &layers );
static QgsSymbolLayerV2* createFillLayerFromSld( QDomElement &element )
;
static QgsSymbolLayerV2* createLineLayerFromSld( QDomElement &element )
;
static QgsSymbolLayerV2* createMarkerLayerFromSld( QDomElement &element
);
static bool convertPolygonSymbolizerToPointMarker( QDomElement &element
, QgsSymbolLayerV2List &layerList );
static bool hasExternalGraphic( QDomElement &element );
static bool hasWellKnownMark( QDomElement &element );
static bool needFontMarker( QDomElement &element );
static bool needSvgMarker( QDomElement &element );
static bool needEllipseMarker( QDomElement &element );
static bool needMarkerLine( QDomElement &element );
static bool needLinePatternFill( QDomElement &element );
static bool needPointPatternFill( QDomElement &element );
static bool needSvgFill( QDomElement &element );
static void fillToSld( QDomDocument &doc, QDomElement &element,
Qt::BrushStyle brushStyle, QColor color = QColor
() );
static bool fillFromSld( QDomElement &element,
Qt::BrushStyle &brushStyle, QColor &color );
static void lineToSld( QDomDocument &doc, QDomElement &element,
Qt::PenStyle penStyle, QColor color, double widt
h = -1,
const Qt::PenJoinStyle *penJoinStyle = 0, const
Qt::PenCapStyle *penCapStyle = 0,
const QVector<qreal> *customDashPattern = 0, dou
ble dashOffset = 0.0 );
static bool lineFromSld( QDomElement &element,
Qt::PenStyle &penStyle, QColor &color, double
&width,
Qt::PenJoinStyle *penJoinStyle = 0, Qt::PenCap
Style *penCapStyle = 0,
QVector<qreal> *customDashPattern = 0, double
*dashOffset = 0 );
static void externalGraphicToSld( QDomDocument &doc, QDomElement &eleme
nt,
QString path, QString mime,
QColor color, double size = -1 );
static bool externalGraphicFromSld( QDomElement &element,
QString &path, QString &mime,
QColor &color, double &size );
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &eleme
nt,
QString name, QColor color, QColor bo
rderColor = QColor(),
double borderWidth = -1, double size
= -1 );
static bool wellKnownMarkerFromSld( QDomElement &element,
QString &name, QColor &color, QColo
r &borderColor,
double &borderWidth, double &size )
;
static void externalMarkerToSld( QDomDocument &doc, QDomElement &elemen
t,
QString path, QString format, int *mar
kIndex = 0,
QColor color = QColor(), double size =
-1 );
static bool externalMarkerFromSld( QDomElement &element,
QString &path, QString &format, int
&markIndex,
QColor &color, double &size );
static void labelTextToSld( QDomDocument &doc, QDomElement &element, QS
tring label,
QFont font, QColor color = QColor(), double
size = -1 );
static void createRotationElement( QDomDocument &doc, QDomElement &elem
ent, QString rotationFunc );
static bool rotationFromSldElement( QDomElement &element, QString &rota
tionFunc );
static void createOpacityElement( QDomDocument &doc, QDomElement &eleme
nt, QString alphaFunc );
static bool opacityFromSldElement( QDomElement &element, QString &alpha
Func );
static void createDisplacementElement( QDomDocument &doc, QDomElement &
element, QPointF offset );
static bool displacementFromSldElement( QDomElement &element, QPointF &
offset );
static void createOnlineResourceElement( QDomDocument &doc, QDomElement
&element, QString path, QString format );
static bool onlineResourceFromSldElement( QDomElement &element, QString
&path, QString &format );
static void createGeometryElement( QDomDocument &doc, QDomElement &elem
ent, QString geomFunc );
static bool geometryFromSldElement( QDomElement &element, QString &geom
Func );
static bool createFunctionElement( QDomDocument &doc, QDomElement &elem
ent, QString function );
static bool functionFromSldElement( QDomElement &element, QString &func
tion );
static QDomElement createSvgParameterElement( QDomDocument &doc, QStrin
g name, QString value );
static QgsStringMap getSvgParameterList( QDomElement &element );
static QDomElement createVendorOptionElement( QDomDocument &doc, QStrin
g name, QString value );
static QgsStringMap getVendorOptionList( QDomElement &element );
static QgsStringMap parseProperties( QDomElement& element ); static QgsStringMap parseProperties( QDomElement& element );
static void saveProperties( QgsStringMap props, QDomDocument& doc, QDom Element& element ); static void saveProperties( QgsStringMap props, QDomDocument& doc, QDom Element& element );
static QgsSymbolV2Map loadSymbols( QDomElement& element ); static QgsSymbolV2Map loadSymbols( QDomElement& element );
static QDomElement saveSymbols( QgsSymbolV2Map& symbols, QString tagNam e, QDomDocument& doc ); static QDomElement saveSymbols( QgsSymbolV2Map& symbols, QString tagNam e, QDomDocument& doc );
static void clearSymbolMap( QgsSymbolV2Map& symbols ); static void clearSymbolMap( QgsSymbolV2Map& symbols );
static QgsVectorColorRampV2* loadColorRamp( QDomElement& element ); static QgsVectorColorRampV2* loadColorRamp( QDomElement& element );
static QDomElement saveColorRamp( QString name, QgsVectorColorRampV2* r amp, QDomDocument& doc ); static QDomElement saveColorRamp( QString name, QgsVectorColorRampV2* r amp, QDomDocument& doc );
skipping to change at line 85 skipping to change at line 204
/**Returns the line width scale factor depending on the unit and the pa int device*/ /**Returns the line width scale factor depending on the unit and the pa int device*/
static double lineWidthScaleFactor( QgsRenderContext& c, QgsSymbolV2::O utputUnit u ); static double lineWidthScaleFactor( QgsRenderContext& c, QgsSymbolV2::O utputUnit u );
/**Returns scale factor painter units -> pixel dimensions*/ /**Returns scale factor painter units -> pixel dimensions*/
static double pixelSizeScaleFactor( QgsRenderContext& c, QgsSymbolV2::O utputUnit u ); static double pixelSizeScaleFactor( QgsRenderContext& c, QgsSymbolV2::O utputUnit u );
/**Creates a render context for a pixel based device*/ /**Creates a render context for a pixel based device*/
static QgsRenderContext createRenderContext( QPainter* p ); static QgsRenderContext createRenderContext( QPainter* p );
/**Multiplies opacity of image pixel values with a (global) transparenc y value*/ /**Multiplies opacity of image pixel values with a (global) transparenc y value*/
static void multiplyImageOpacity( QImage* image, qreal alpha ); static void multiplyImageOpacity( QImage* image, qreal alpha );
/**Sorts the passed list in requested order*/ /**Sorts the passed list in requested order*/
static void sortVariantList( QList<QVariant>& list, Qt::SortOrder or static void sortVariantList( QList<QVariant>& list, Qt::SortOrder order
der ); );
/**Returns a point on the line from startPoint to directionPoint that i
s a certain distance away from the starting point*/
static QPointF pointOnLineWithDistance( const QPointF& startPoint, cons
t QPointF& directionPoint, double distance );
}; };
class QPolygonF; class QPolygonF;
//! calculate line shifted by a specified distance //! calculate line shifted by a specified distance
QPolygonF offsetLine( QPolygonF polyline, double dist ); QPolygonF offsetLine( QPolygonF polyline, double dist );
#endif #endif
 End of changes. 12 change blocks. 
5 lines changed or deleted 177 lines changed or added


 qgssymbollayerv2widget.h   qgssymbollayerv2widget.h 
/**************************************************************************
*
qgssymbollayerv2widget.h - symbol layer widgets
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLLAYERV2WIDGET_H #ifndef QGSSYMBOLLAYERV2WIDGET_H
#define QGSSYMBOLLAYERV2WIDGET_H #define QGSSYMBOLLAYERV2WIDGET_H
#include <QWidget> #include <QWidget>
class QgsSymbolLayerV2; class QgsSymbolLayerV2;
class QgsVectorLayer;
class GUI_EXPORT QgsSymbolLayerV2Widget : public QWidget class GUI_EXPORT QgsSymbolLayerV2Widget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSymbolLayerV2Widget( QWidget* parent ) : QWidget( parent ) {} QgsSymbolLayerV2Widget( QWidget* parent, const QgsVectorLayer* vl = 0 ) : QWidget( parent ), mVectorLayer( vl ) {}
virtual ~QgsSymbolLayerV2Widget() {} virtual ~QgsSymbolLayerV2Widget() {}
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ) = 0; virtual void setSymbolLayer( QgsSymbolLayerV2* layer ) = 0;
virtual QgsSymbolLayerV2* symbolLayer() = 0; virtual QgsSymbolLayerV2* symbolLayer() = 0;
protected:
const QgsVectorLayer* mVectorLayer;
signals: signals:
void changed(); void changed();
}; };
/////////// ///////////
#include "ui_widget_simpleline.h" #include "ui_widget_simpleline.h"
class QgsSimpleLineSymbolLayerV2; class QgsSimpleLineSymbolLayerV2;
class GUI_EXPORT QgsSimpleLineSymbolLayerV2Widget : public QgsSymbolLayerV2 Widget, private Ui::WidgetSimpleLine class GUI_EXPORT QgsSimpleLineSymbolLayerV2Widget : public QgsSymbolLayerV2 Widget, private Ui::WidgetSimpleLine
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSimpleLineSymbolLayerV2Widget( QWidget* parent = NULL ); QgsSimpleLineSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* pa rent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsSimpleLineSymbo lLayerV2Widget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsSimpleLineSymbolLayerV2Widget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void penWidthChanged(); void penWidthChanged();
void colorChanged(); void colorChanged();
void penStyleChanged(); void penStyleChanged();
void offsetChanged(); void offsetChanged();
skipping to change at line 69 skipping to change at line 88
#include "ui_widget_simplemarker.h" #include "ui_widget_simplemarker.h"
class QgsSimpleMarkerSymbolLayerV2; class QgsSimpleMarkerSymbolLayerV2;
class GUI_EXPORT QgsSimpleMarkerSymbolLayerV2Widget : public QgsSymbolLayer V2Widget, private Ui::WidgetSimpleMarker class GUI_EXPORT QgsSimpleMarkerSymbolLayerV2Widget : public QgsSymbolLayer V2Widget, private Ui::WidgetSimpleMarker
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSimpleMarkerSymbolLayerV2Widget( QWidget* parent = NULL ); QgsSimpleMarkerSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* parent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsSimpleMarkerSym bolLayerV2Widget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsSimpleMarkerSymbolLayerV2Widget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void setName(); void setName();
void setColorBorder(); void setColorBorder();
void setColorFill(); void setColorFill();
void setSize(); void setSize();
skipping to change at line 100 skipping to change at line 119
#include "ui_widget_simplefill.h" #include "ui_widget_simplefill.h"
class QgsSimpleFillSymbolLayerV2; class QgsSimpleFillSymbolLayerV2;
class GUI_EXPORT QgsSimpleFillSymbolLayerV2Widget : public QgsSymbolLayerV2 Widget, private Ui::WidgetSimpleFill class GUI_EXPORT QgsSimpleFillSymbolLayerV2Widget : public QgsSymbolLayerV2 Widget, private Ui::WidgetSimpleFill
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSimpleFillSymbolLayerV2Widget( QWidget* parent = NULL ); QgsSimpleFillSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* pa rent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsSimpleFillSymbo lLayerV2Widget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsSimpleFillSymbolLayerV2Widget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void setColor(); void setColor();
void setBorderColor(); void setBorderColor();
void setBrushStyle(); void setBrushStyle();
void borderWidthChanged(); void borderWidthChanged();
skipping to change at line 131 skipping to change at line 150
#include "ui_widget_markerline.h" #include "ui_widget_markerline.h"
class QgsMarkerLineSymbolLayerV2; class QgsMarkerLineSymbolLayerV2;
class GUI_EXPORT QgsMarkerLineSymbolLayerV2Widget : public QgsSymbolLayerV2 Widget, private Ui::WidgetMarkerLine class GUI_EXPORT QgsMarkerLineSymbolLayerV2Widget : public QgsSymbolLayerV2 Widget, private Ui::WidgetMarkerLine
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsMarkerLineSymbolLayerV2Widget( QWidget* parent = NULL ); QgsMarkerLineSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* pa rent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsMarkerLineSymbo lLayerV2Widget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsMarkerLineSymbolLayerV2Widget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void setInterval( double val ); void setInterval( double val );
void setMarker(); void setMarker();
void setRotate(); void setRotate();
skipping to change at line 165 skipping to change at line 184
#include "ui_widget_svgmarker.h" #include "ui_widget_svgmarker.h"
class QgsSvgMarkerSymbolLayerV2; class QgsSvgMarkerSymbolLayerV2;
class GUI_EXPORT QgsSvgMarkerSymbolLayerV2Widget : public QgsSymbolLayerV2W idget, private Ui::WidgetSvgMarker class GUI_EXPORT QgsSvgMarkerSymbolLayerV2Widget : public QgsSymbolLayerV2W idget, private Ui::WidgetSvgMarker
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSvgMarkerSymbolLayerV2Widget( QWidget* parent = NULL ); QgsSvgMarkerSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* par ent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsSvgMarkerSymbol LayerV2Widget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsSvgMarkerSymbolLayerV2Widget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void setName( const QModelIndex& idx ); void setName( const QModelIndex& idx );
void setSize(); void setSize();
void setAngle(); void setAngle();
void setOffset(); void setOffset();
void on_mFileToolButton_clicked();
void on_mFileLineEdit_textEdited( const QString& text );
void on_mChangeColorButton_clicked();
void on_mChangeBorderColorButton_clicked();
void on_mBorderWidthSpinBox_valueChanged( double d );
protected: protected:
void populateList(); void populateList();
//update gui for svg file (insert new path, update activation of gui el
ements for svg params)
void setGuiForSvg( const QgsSvgMarkerSymbolLayerV2* layer );
QgsSvgMarkerSymbolLayerV2* mLayer; QgsSvgMarkerSymbolLayerV2* mLayer;
}; };
/////////// ///////////
#include "ui_widget_linedecoration.h" #include "ui_widget_linedecoration.h"
class QgsLineDecorationSymbolLayerV2; class QgsLineDecorationSymbolLayerV2;
class GUI_EXPORT QgsLineDecorationSymbolLayerV2Widget : public QgsSymbolLay erV2Widget, private Ui::WidgetLineDecoration class GUI_EXPORT QgsLineDecorationSymbolLayerV2Widget : public QgsSymbolLay erV2Widget, private Ui::WidgetLineDecoration
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsLineDecorationSymbolLayerV2Widget( QWidget* parent = NULL ); QgsLineDecorationSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget * parent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsLineDecorationS ymbolLayerV2Widget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsLineDecorationSymbolLayerV2Widget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void colorChanged(); void colorChanged();
void penWidthChanged(); void penWidthChanged();
protected: protected:
skipping to change at line 224 skipping to change at line 250
#include "ui_widget_svgfill.h" #include "ui_widget_svgfill.h"
class QgsSVGFillSymbolLayer; class QgsSVGFillSymbolLayer;
class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerV2Widge t, private Ui::WidgetSVGFill class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerV2Widge t, private Ui::WidgetSVGFill
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSVGFillSymbolLayerWidget( QWidget* parent = NULL ); QgsSVGFillSymbolLayerWidget( const QgsVectorLayer* vl, QWidget* parent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsSVGFillSymbolLa yerWidget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsSVGFillSymbolLayerWidget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
protected: protected:
QgsSVGFillSymbolLayer* mLayer; QgsSVGFillSymbolLayer* mLayer;
//sets new output unit. Is called on combo box or spin box change //sets new output unit. Is called on combo box or spin box change
void setOutputUnit(); void setOutputUnit();
void insertIcons(); void insertIcons();
void updateOutlineIcon(); void updateOutlineIcon();
void updateParamGui();
private slots: private slots:
void on_mBrowseToolButton_clicked(); void on_mBrowseToolButton_clicked();
void on_mTextureWidthSpinBox_valueChanged( double d ); void on_mTextureWidthSpinBox_valueChanged( double d );
void on_mSVGLineEdit_textChanged( const QString & text ); void on_mSVGLineEdit_textChanged( const QString & text );
void setFile( const QModelIndex& item ); void setFile( const QModelIndex& item );
void on_mChangeOutlinePushButton_clicked(); void on_mChangeOutlinePushButton_clicked();
void on_mRotationSpinBox_valueChanged( double d ); void on_mRotationSpinBox_valueChanged( double d );
void on_mChangeColorButton_clicked();
void on_mChangeBorderColorButton_clicked();
void on_mBorderWidthSpinBox_valueChanged( double d );
}; };
////////// //////////
#include "ui_widget_linepatternfill.h"
class QgsLinePatternFillSymbolLayer;
class GUI_EXPORT QgsLinePatternFillSymbolLayerWidget : public QgsSymbolLaye
rV2Widget, private Ui::WidgetLinePatternFill
{
Q_OBJECT
public:
QgsLinePatternFillSymbolLayerWidget( const QgsVectorLayer* vl, QWidget*
parent = NULL );
static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret
urn new QgsLinePatternFillSymbolLayerWidget( vl ); }
virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer();
protected:
QgsLinePatternFillSymbolLayer* mLayer;
private slots:
void on_mAngleSpinBox_valueChanged( double d );
void on_mDistanceSpinBox_valueChanged( double d );
void on_mLineWidthSpinBox_valueChanged( double d );
void on_mOffsetSpinBox_valueChanged( double d );
void on_mColorPushButton_clicked();
void on_mOutlinePushButton_clicked();
};
//////////
#include "ui_widget_pointpatternfill.h"
class QgsPointPatternFillSymbolLayer;
class GUI_EXPORT QgsPointPatternFillSymbolLayerWidget: public QgsSymbolLaye
rV2Widget, private Ui::WidgetPointPatternFill
{
Q_OBJECT
public:
QgsPointPatternFillSymbolLayerWidget( const QgsVectorLayer* vl, QWidget
* parent = NULL );
static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret
urn new QgsPointPatternFillSymbolLayerWidget( vl ); }
virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer();
protected:
QgsPointPatternFillSymbolLayer* mLayer;
void updateMarkerIcon();
private slots:
void on_mHorizontalDistanceSpinBox_valueChanged( double d );
void on_mVerticalDistanceSpinBox_valueChanged( double d );
void on_mHorizontalDisplacementSpinBox_valueChanged( double d );
void on_mVerticalDisplacementSpinBox_valueChanged( double d );
void on_mChangeMarkerButton_clicked();
};
/////////
#include "ui_widget_fontmarker.h" #include "ui_widget_fontmarker.h"
class QgsFontMarkerSymbolLayerV2; class QgsFontMarkerSymbolLayerV2;
class CharacterWidget; class CharacterWidget;
class GUI_EXPORT QgsFontMarkerSymbolLayerV2Widget : public QgsSymbolLayerV2 Widget, private Ui::WidgetFontMarker class GUI_EXPORT QgsFontMarkerSymbolLayerV2Widget : public QgsSymbolLayerV2 Widget, private Ui::WidgetFontMarker
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsFontMarkerSymbolLayerV2Widget( QWidget* parent = NULL ); QgsFontMarkerSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* pa rent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsFontMarkerSymbo lLayerV2Widget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsFontMarkerSymbolLayerV2Widget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void setFontFamily( const QFont& font ); void setFontFamily( const QFont& font );
void setColor(); void setColor();
void setSize( double size ); void setSize( double size );
void setAngle( double angle ); void setAngle( double angle );
skipping to change at line 292 skipping to change at line 381
#include "ui_widget_centroidfill.h" #include "ui_widget_centroidfill.h"
class QgsCentroidFillSymbolLayerV2; class QgsCentroidFillSymbolLayerV2;
class GUI_EXPORT QgsCentroidFillSymbolLayerV2Widget : public QgsSymbolLayer V2Widget, private Ui::WidgetCentroidFill class GUI_EXPORT QgsCentroidFillSymbolLayerV2Widget : public QgsSymbolLayer V2Widget, private Ui::WidgetCentroidFill
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsCentroidFillSymbolLayerV2Widget( QWidget* parent = NULL ); QgsCentroidFillSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* parent = NULL );
static QgsSymbolLayerV2Widget* create() { return new QgsCentroidFillSym bolLayerV2Widget(); } static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsCentroidFillSymbolLayerV2Widget( vl ); }
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void setMarker(); void setMarker();
protected: protected:
void updateMarker(); void updateMarker();
 End of changes. 27 change blocks. 
19 lines changed or deleted 124 lines changed or added


 qgssymbollevelsv2dialog.h   qgssymbollevelsv2dialog.h 
/**************************************************************************
*
qgssymbollevelsv2dialog.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLLEVELSV2DIALOG_H #ifndef QGSSYMBOLLEVELSV2DIALOG_H
#define QGSSYMBOLLEVELSV2DIALOG_H #define QGSSYMBOLLEVELSV2DIALOG_H
#include <QDialog> #include <QDialog>
#include <QList> #include <QList>
#include "qgsrendererv2.h" #include "qgsrendererv2.h"
#include "ui_qgssymbollevelsv2dialogbase.h" #include "ui_qgssymbollevelsv2dialogbase.h"
class GUI_EXPORT QgsSymbolLevelsV2Dialog : public QDialog, private Ui::QgsS ymbolLevelsV2DialogBase class GUI_EXPORT QgsSymbolLevelsV2Dialog : public QDialog, private Ui::QgsS ymbolLevelsV2DialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSymbolLevelsV2Dialog( QgsSymbolV2List symbols, bool usingSymbolLevel s, QWidget* parent = NULL ); QgsSymbolLevelsV2Dialog( QgsLegendSymbolList list, bool usingSymbolLeve ls, QWidget* parent = NULL );
bool usingLevels() const; bool usingLevels() const;
// used by rule-based renderer (to hide checkbox to enable/disable orde
ring)
void setForceOrderingEnabled( bool enabled );
public slots: public slots:
void updateUi(); void updateUi();
void renderingPassChanged( int row, int column ); void renderingPassChanged( int row, int column );
protected: protected:
void populateTable(); void populateTable();
void setDefaultLevels(); void setDefaultLevels();
protected: protected:
//! maximal number of layers from all symbols //! maximal number of layers from all symbols
int mMaxLayers; int mMaxLayers;
QgsSymbolV2List mSymbols; QgsLegendSymbolList mList;
//! whether symbol layers always should be used (default false)
bool mForceOrderingEnabled;
}; };
#endif // QGSSYMBOLLEVELSV2DIALOG_H #endif // QGSSYMBOLLEVELSV2DIALOG_H
 End of changes. 4 change blocks. 
2 lines changed or deleted 31 lines changed or added


 qgssymbologyutils.h   qgssymbologyutils.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSSYMBOLOGYUTILS_H #ifndef QGSSYMBOLOGYUTILS_H
#define QGSSYMBOLOGYUTILS_H #define QGSSYMBOLOGYUTILS_H
#include <Qt> #include <Qt>
class QPixmap; class QPixmap;
class QString; class QString;
/**Namespace containing static methods which are useful for the symbology w idgets*/ /**Namespace containing static methods which are useful for the symbology w idgets*/
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgssymbologyv2conversion.h   qgssymbologyv2conversion.h 
/**************************************************************************
*
qgssymbologyv2conversion.h
---------------------
begin : December 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLOGYV2CONVERSION_H #ifndef QGSSYMBOLOGYV2CONVERSION_H
#define QGSSYMBOLOGYV2CONVERSION_H #define QGSSYMBOLOGYV2CONVERSION_H
class QgsSymbol; class QgsSymbol;
class QgsSymbolV2; class QgsSymbolV2;
class QgsVectorLayer; class QgsVectorLayer;
class CORE_EXPORT QgsSymbologyV2Conversion class CORE_EXPORT QgsSymbologyV2Conversion
{ {
public: public:
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgssymbolv2.h   qgssymbolv2.h 
/**************************************************************************
*
qgssymbolv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLV2_H #ifndef QGSSYMBOLV2_H
#define QGSSYMBOLV2_H #define QGSSYMBOLV2_H
#include "qgis.h" #include "qgis.h"
#include <QList> #include <QList>
#include <QMap> #include <QMap>
class QColor; class QColor;
class QImage; class QImage;
class QPainter; class QPainter;
class QSize; class QSize;
class QPointF; class QPointF;
class QPolygonF; class QPolygonF;
class QDomDocument;
class QDomElement;
//class //class
class QgsFeature;
class QgsSymbolLayerV2; class QgsSymbolLayerV2;
class QgsRenderContext; class QgsRenderContext;
class QgsVectorLayer;
typedef QMap<QString, QString> QgsStringMap; typedef QMap<QString, QString> QgsStringMap;
typedef QList<QgsSymbolLayerV2*> QgsSymbolLayerV2List; typedef QList<QgsSymbolLayerV2*> QgsSymbolLayerV2List;
class CORE_EXPORT QgsSymbolV2 class CORE_EXPORT QgsSymbolV2
{ {
public: public:
enum OutputUnit enum OutputUnit
{ {
skipping to change at line 75 skipping to change at line 94
//! delete symbol layer at specified index //! delete symbol layer at specified index
bool deleteSymbolLayer( int index ); bool deleteSymbolLayer( int index );
//! remove symbol layer from the list and return pointer to it //! remove symbol layer from the list and return pointer to it
QgsSymbolLayerV2* takeSymbolLayer( int index ); QgsSymbolLayerV2* takeSymbolLayer( int index );
//! delete layer at specified index and set a new one //! delete layer at specified index and set a new one
bool changeSymbolLayer( int index, QgsSymbolLayerV2* layer ); bool changeSymbolLayer( int index, QgsSymbolLayerV2* layer );
void startRender( QgsRenderContext& context ); void startRender( QgsRenderContext& context, const QgsVectorLayer* laye r = 0 );
void stopRender( QgsRenderContext& context ); void stopRender( QgsRenderContext& context );
void setColor( const QColor& color ); void setColor( const QColor& color );
QColor color(); QColor color();
void drawPreviewIcon( QPainter* painter, QSize size ); void drawPreviewIcon( QPainter* painter, QSize size );
QImage bigSymbolPreviewImage(); QImage bigSymbolPreviewImage();
QString dump(); QString dump();
virtual QgsSymbolV2* clone() const = 0; virtual QgsSymbolV2* clone() const = 0;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props
) const;
OutputUnit outputUnit() const { return mOutputUnit; } OutputUnit outputUnit() const { return mOutputUnit; }
void setOutputUnit( OutputUnit u ) { mOutputUnit = u; } void setOutputUnit( OutputUnit u ) { mOutputUnit = u; }
//! Get alpha transparency 1 for opaque, 0 for invisible
qreal alpha() const { return mAlpha; } qreal alpha() const { return mAlpha; }
//! Set alpha transparency 1 for opaque, 0 for invisible
void setAlpha( qreal alpha ) { mAlpha = alpha; } void setAlpha( qreal alpha ) { mAlpha = alpha; }
//! @note added in 1.5 //! @note added in 1.5
void setRenderHints( int hints ) { mRenderHints = hints; } void setRenderHints( int hints ) { mRenderHints = hints; }
//! @note added in 1.5 //! @note added in 1.5
int renderHints() { return mRenderHints; } int renderHints() const { return mRenderHints; }
QSet<QString> usedAttributes() const;
protected: protected:
QgsSymbolV2( SymbolType type, QgsSymbolLayerV2List layers ); // can't b e instantiated QgsSymbolV2( SymbolType type, QgsSymbolLayerV2List layers ); // can't b e instantiated
QgsSymbolLayerV2List cloneLayers() const; QgsSymbolLayerV2List cloneLayers() const;
//! check whether a symbol layer type can be used within the symbol //! check whether a symbol layer type can be used within the symbol
//! (marker-marker, line-line, fill-fill/line) //! (marker-marker, line-line, fill-fill/line)
//! @note added in 1.7 //! @note added in 1.7
bool isSymbolLayerCompatible( SymbolType t ); bool isSymbolLayerCompatible( SymbolType t );
skipping to change at line 126 skipping to change at line 151
qreal mAlpha; qreal mAlpha;
int mRenderHints; int mRenderHints;
}; };
/////////////////////// ///////////////////////
class CORE_EXPORT QgsSymbolV2RenderContext class CORE_EXPORT QgsSymbolV2RenderContext
{ {
public: public:
QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u , qreal alpha = 1.0, bool selected = false, int renderHints = 0 ); QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u , qreal alpha = 1.0, bool selected = false, int renderHints = 0, const Qg sFeature* f = 0 );
~QgsSymbolV2RenderContext(); ~QgsSymbolV2RenderContext();
QgsRenderContext& renderContext() { return mRenderContext; } QgsRenderContext& renderContext() { return mRenderContext; }
//void setRenderContext( QgsRenderContext& c ) { mRenderContext = c;} //void setRenderContext( QgsRenderContext& c ) { mRenderContext = c;}
QgsSymbolV2::OutputUnit outputUnit() const { return mOutputUnit; } QgsSymbolV2::OutputUnit outputUnit() const { return mOutputUnit; }
void setOutputUnit( QgsSymbolV2::OutputUnit u ) { mOutputUnit = u; } void setOutputUnit( QgsSymbolV2::OutputUnit u ) { mOutputUnit = u; }
//! Get alpha transparency 1 for opaque, 0 for invisible
qreal alpha() const { return mAlpha; } qreal alpha() const { return mAlpha; }
//! Set alpha transparency 1 for opaque, 0 for invisible
void setAlpha( qreal alpha ) { mAlpha = alpha; } void setAlpha( qreal alpha ) { mAlpha = alpha; }
bool selected() const { return mSelected; } bool selected() const { return mSelected; }
void setSelected( bool selected ) { mSelected = selected; } void setSelected( bool selected ) { mSelected = selected; }
//! @note added in 1.5 //! @note added in 1.5
int renderHints() const { return mRenderHints; } int renderHints() const { return mRenderHints; }
//! @note added in 1.5 //! @note added in 1.5
void setRenderHints( int hints ) { mRenderHints = hints; } void setRenderHints( int hints ) { mRenderHints = hints; }
void setFeature( const QgsFeature* f ) { mFeature = f; }
const QgsFeature* feature() const { return mFeature; }
void setLayer( const QgsVectorLayer* layer ) { mLayer = layer; }
const QgsVectorLayer* layer() const { return mLayer; }
// Color used for selections // Color used for selections
static QColor selectionColor(); static QColor selectionColor();
double outputLineWidth( double width ) const; double outputLineWidth( double width ) const;
double outputPixelSize( double size ) const; double outputPixelSize( double size ) const;
// workaround for sip 4.7. Don't use assignment - will fail with assert ion error // workaround for sip 4.7. Don't use assignment - will fail with assert ion error
QgsSymbolV2RenderContext& operator=( const QgsSymbolV2RenderContext& ); QgsSymbolV2RenderContext& operator=( const QgsSymbolV2RenderContext& );
private: private:
QgsRenderContext& mRenderContext; QgsRenderContext& mRenderContext;
QgsSymbolV2::OutputUnit mOutputUnit; QgsSymbolV2::OutputUnit mOutputUnit;
qreal mAlpha; qreal mAlpha;
bool mSelected; bool mSelected;
int mRenderHints; int mRenderHints;
const QgsFeature* mFeature; //current feature
const QgsVectorLayer* mLayer; //current vectorlayer
}; };
////////////////////// //////////////////////
class CORE_EXPORT QgsMarkerSymbolV2 : public QgsSymbolV2 class CORE_EXPORT QgsMarkerSymbolV2 : public QgsSymbolV2
{ {
public: public:
/** Create a marker symbol with one symbol layer: SimpleMarker with spe cified properties. /** Create a marker symbol with one symbol layer: SimpleMarker with spe cified properties.
This is a convenience method for easier creation of marker symbols. This is a convenience method for easier creation of marker symbols.
\note added in v1.7 \note added in v1.7
skipping to change at line 182 skipping to change at line 217
static QgsMarkerSymbolV2* createSimple( const QgsStringMap& properties ); static QgsMarkerSymbolV2* createSimple( const QgsStringMap& properties );
QgsMarkerSymbolV2( QgsSymbolLayerV2List layers = QgsSymbolLayerV2List() ); QgsMarkerSymbolV2( QgsSymbolLayerV2List layers = QgsSymbolLayerV2List() );
void setAngle( double angle ); void setAngle( double angle );
double angle(); double angle();
void setSize( double size ); void setSize( double size );
double size(); double size();
void renderPoint( const QPointF& point, QgsRenderContext& context, int layer = -1, bool selected = false ); void renderPoint( const QPointF& point, const QgsFeature* f, QgsRenderC ontext& context, int layer = -1, bool selected = false );
virtual QgsSymbolV2* clone() const; virtual QgsSymbolV2* clone() const;
}; };
class CORE_EXPORT QgsLineSymbolV2 : public QgsSymbolV2 class CORE_EXPORT QgsLineSymbolV2 : public QgsSymbolV2
{ {
public: public:
/** Create a line symbol with one symbol layer: SimpleLine with specifi ed properties. /** Create a line symbol with one symbol layer: SimpleLine with specifi ed properties.
This is a convenience method for easier creation of line symbols. This is a convenience method for easier creation of line symbols.
\note added in v1.7 \note added in v1.7
*/ */
static QgsLineSymbolV2* createSimple( const QgsStringMap& properties ); static QgsLineSymbolV2* createSimple( const QgsStringMap& properties );
QgsLineSymbolV2( QgsSymbolLayerV2List layers = QgsSymbolLayerV2List() ) ; QgsLineSymbolV2( QgsSymbolLayerV2List layers = QgsSymbolLayerV2List() ) ;
void setWidth( double width ); void setWidth( double width );
double width(); double width();
void renderPolyline( const QPolygonF& points, QgsRenderContext& context , int layer = -1, bool selected = false ); void renderPolyline( const QPolygonF& points, const QgsFeature* f, QgsR enderContext& context, int layer = -1, bool selected = false );
virtual QgsSymbolV2* clone() const; virtual QgsSymbolV2* clone() const;
}; };
class CORE_EXPORT QgsFillSymbolV2 : public QgsSymbolV2 class CORE_EXPORT QgsFillSymbolV2 : public QgsSymbolV2
{ {
public: public:
/** Create a fill symbol with one symbol layer: SimpleFill with specifi ed properties. /** Create a fill symbol with one symbol layer: SimpleFill with specifi ed properties.
This is a convenience method for easier creation of fill symbols. This is a convenience method for easier creation of fill symbols.
\note added in v1.7 \note added in v1.7
*/ */
static QgsFillSymbolV2* createSimple( const QgsStringMap& properties ); static QgsFillSymbolV2* createSimple( const QgsStringMap& properties );
QgsFillSymbolV2( QgsSymbolLayerV2List layers = QgsSymbolLayerV2List() ) ; QgsFillSymbolV2( QgsSymbolLayerV2List layers = QgsSymbolLayerV2List() ) ;
void setAngle( double angle ); void setAngle( double angle );
void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q gsRenderContext& context, int layer = -1, bool selected = false ); void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, c onst QgsFeature* f, QgsRenderContext& context, int layer = -1, bool selecte d = false );
virtual QgsSymbolV2* clone() const; virtual QgsSymbolV2* clone() const;
}; };
#endif #endif
/* /*
QgsSymbolV2* ps = new QgsPointSymbol(); QgsSymbolV2* ps = new QgsPointSymbol();
 End of changes. 17 change blocks. 
6 lines changed or deleted 51 lines changed or added


 qgssymbolv2propertiesdialog.h   qgssymbolv2propertiesdialog.h 
/**************************************************************************
*
qgssymbolv2propertiesdialog.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLV2PROPERTIESDIALOG_H #ifndef QGSSYMBOLV2PROPERTIESDIALOG_H
#define QGSSYMBOLV2PROPERTIESDIALOG_H #define QGSSYMBOLV2PROPERTIESDIALOG_H
#include "ui_qgssymbolv2propertiesdialogbase.h" #include "ui_qgssymbolv2propertiesdialogbase.h"
class QgsSymbolV2; class QgsSymbolV2;
class QgsSymbolLayerV2; class QgsSymbolLayerV2;
class QgsSymbolLayerV2Widget; class QgsSymbolLayerV2Widget;
class QgsVectorLayer;
class SymbolLayerItem; class SymbolLayerItem;
#include <QMap> #include <QMap>
class GUI_EXPORT QgsSymbolV2PropertiesDialog : public QDialog, private Ui:: DlgSymbolV2Properties class GUI_EXPORT QgsSymbolV2PropertiesDialog : public QDialog, private Ui:: DlgSymbolV2Properties
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSymbolV2PropertiesDialog( QgsSymbolV2* symbol, QWidget* parent = NUL L ); QgsSymbolV2PropertiesDialog( QgsSymbolV2* symbol, const QgsVectorLayer* vl, QWidget* parent = NULL );
public slots: public slots:
void moveLayerDown(); void moveLayerDown();
void moveLayerUp(); void moveLayerUp();
void addLayer(); void addLayer();
void removeLayer(); void removeLayer();
void lockLayer(); void lockLayer();
skipping to change at line 65 skipping to change at line 80
int currentLayerIndex(); int currentLayerIndex();
SymbolLayerItem* currentLayerItem(); SymbolLayerItem* currentLayerItem();
QgsSymbolLayerV2* currentLayer(); QgsSymbolLayerV2* currentLayer();
void moveLayerByOffset( int offset ); void moveLayerByOffset( int offset );
protected: // data protected: // data
QgsSymbolV2* mSymbol; QgsSymbolV2* mSymbol;
QMap<QString, QgsSymbolLayerV2Widget*> mWidgets; QMap<QString, QgsSymbolLayerV2Widget*> mWidgets;
const QgsVectorLayer* mVectorLayer;
}; };
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 27 lines changed or added


 qgssymbolv2selectordialog.h   qgssymbolv2selectordialog.h 
/**************************************************************************
*
qgssymbolv2selectordialog.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSSYMBOLV2SELECTORDIALOG_H #ifndef QGSSYMBOLV2SELECTORDIALOG_H
#define QGSSYMBOLV2SELECTORDIALOG_H #define QGSSYMBOLV2SELECTORDIALOG_H
#include <QDialog> #include <QDialog>
#include "ui_qgssymbolv2selectordialogbase.h" #include "ui_qgssymbolv2selectordialogbase.h"
class QgsStyleV2; class QgsStyleV2;
class QgsSymbolV2; class QgsSymbolV2;
class QgsVectorLayer;
class QMenu; class QMenu;
class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::Qg sSymbolV2SelectorDialogBase class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::Qg sSymbolV2SelectorDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsStyleV2* style, QWid get* parent = NULL, bool embedded = false ); QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsStyleV2* style, cons t QgsVectorLayer* vl, QWidget* parent = NULL, bool embedded = false );
//! return menu for "advanced" button - create it if doesn't exist and show the advanced button //! return menu for "advanced" button - create it if doesn't exist and show the advanced button
QMenu* advancedMenu(); QMenu* advancedMenu();
protected: protected:
void populateSymbolView(); void populateSymbolView();
void updateSymbolPreview(); void updateSymbolPreview();
void updateSymbolColor(); void updateSymbolColor();
void updateSymbolInfo(); void updateSymbolInfo();
skipping to change at line 57 skipping to change at line 72
void openStyleManager(); void openStyleManager();
signals: signals:
void symbolModified(); void symbolModified();
protected: protected:
QgsStyleV2* mStyle; QgsStyleV2* mStyle;
QgsSymbolV2* mSymbol; QgsSymbolV2* mSymbol;
QMenu* mAdvancedMenu; QMenu* mAdvancedMenu;
const QgsVectorLayer* mVectorLayer;
}; };
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 26 lines changed or added


 qgsuniquevaluerenderer.h   qgsuniquevaluerenderer.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id: qgsuniquevaluerenderer.h 5371 2006-04-25 01:52:13Z wonder $ */
#ifndef QGSUNIQUEVALUERENDERER_H #ifndef QGSUNIQUEVALUERENDERER_H
#define QGSUNIQUEVALUERENDERER_H #define QGSUNIQUEVALUERENDERER_H
#include "qgsrenderer.h" #include "qgsrenderer.h"
#include <QMap> #include <QMap>
class CORE_EXPORT QgsUniqueValueRenderer: public QgsRenderer class CORE_EXPORT QgsUniqueValueRenderer: public QgsRenderer
{ {
public: public:
QgsUniqueValueRenderer( QGis::GeometryType type ); QgsUniqueValueRenderer( QGis::GeometryType type );
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgsvectorcolorbrewercolorrampv2dialog.h   qgsvectorcolorbrewercolorrampv2dialog.h 
/**************************************************************************
*
qgsvectorcolorbrewercolorrampv2dialog.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSVECTORCOLORBREWERCOLORRAMPV2DIALOG_H #ifndef QGSVECTORCOLORBREWERCOLORRAMPV2DIALOG_H
#define QGSVECTORCOLORBREWERCOLORRAMPV2DIALOG_H #define QGSVECTORCOLORBREWERCOLORRAMPV2DIALOG_H
#include <QDialog> #include <QDialog>
#include "ui_qgsvectorcolorbrewercolorrampv2dialogbase.h" #include "ui_qgsvectorcolorbrewercolorrampv2dialogbase.h"
class QgsVectorColorBrewerColorRampV2; class QgsVectorColorBrewerColorRampV2;
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgsvectorcolorrampv2.h   qgsvectorcolorrampv2.h 
/**************************************************************************
*
qgsvectorcolorrampv2.h
---------------------
begin : November 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSVECTORCOLORRAMPV2_H #ifndef QGSVECTORCOLORRAMPV2_H
#define QGSVECTORCOLORRAMPV2_H #define QGSVECTORCOLORRAMPV2_H
#include <QColor> #include <QColor>
#include "qgssymbollayerv2.h" // for QgsStringMap #include "qgssymbollayerv2.h" // for QgsStringMap
class CORE_EXPORT QgsVectorColorRampV2 class CORE_EXPORT QgsVectorColorRampV2
{ {
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgsvectordataprovider.h   qgsvectordataprovider.h 
skipping to change at line 15 skipping to change at line 15
Copyright : (C) 2004 by Marco Hugentobler Copyright : (C) 2004 by Marco Hugentobler
email : marco.hugentobler@autoform.ch email : marco.hugentobler@autoform.ch
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSVECTORDATAPROVIDER_H #ifndef QGSVECTORDATAPROVIDER_H
#define QGSVECTORDATAPROVIDER_H #define QGSVECTORDATAPROVIDER_H
class QTextCodec; class QTextCodec;
#include <QList> #include <QList>
#include <QSet> #include <QSet>
#include <QMap> #include <QMap>
//QGIS Includes //QGIS Includes
#include "qgis.h" #include "qgis.h"
#include "qgsdataprovider.h" #include "qgsdataprovider.h"
#include "qgsfeature.h" #include "qgsfeature.h"
#include "qgsfield.h" #include "qgsfield.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
typedef QList<int> QgsAttributeList; typedef QList<int> QgsAttributeList;
typedef QSet<int> QgsFeatureIds;
typedef QSet<int> QgsAttributeIds; typedef QSet<int> QgsAttributeIds;
/** \ingroup core /** \ingroup core
* This is the base class for vector data providers. * This is the base class for vector data providers.
* *
* Data providers abstract the retrieval and writing (where supported) * Data providers abstract the retrieval and writing (where supported)
* of feature and attribute information from a spatial datasource. * of feature and attribute information from a spatial datasource.
* *
* *
*/ */
skipping to change at line 136 skipping to change at line 134
* Gets the feature at the given feature ID. * Gets the feature at the given feature ID.
* @param featureId of the feature to be returned * @param featureId of the feature to be returned
* @param feature which will receive the data * @param feature which will receive the data
* @param fetchGeometry flag which if true, will cause the geometry to be fetched from the provider * @param fetchGeometry flag which if true, will cause the geometry to be fetched from the provider
* @param fetchAttributes a list containing the indexes of the attribut e fields to copy * @param fetchAttributes a list containing the indexes of the attribut e fields to copy
* @return True when feature was found, otherwise false * @return True when feature was found, otherwise false
* *
* Default implementation traverses all features until it finds the one with correct ID. * Default implementation traverses all features until it finds the one with correct ID.
* In case the provider supports reading the feature directly, override this function. * In case the provider supports reading the feature directly, override this function.
*/ */
virtual bool featureAtId( int featureId, virtual bool featureAtId( QgsFeatureId featureId,
QgsFeature& feature, QgsFeature& feature,
bool fetchGeometry = true, bool fetchGeometry = true,
QgsAttributeList fetchAttributes = QgsAttribu teList() ); QgsAttributeList fetchAttributes = QgsAttribu teList() );
/** /**
* Get the next feature resulting from a select operation. * Get the next feature resulting from a select operation.
* @param feature feature which will receive data from the provider * @param feature feature which will receive data from the provider
* @return true when there was a feature to fetch, false when end was h it * @return true when there was a feature to fetch, false when end was h it
*/ */
virtual bool nextFeature( QgsFeature& feature ) = 0; virtual bool nextFeature( QgsFeature& feature ) = 0;
 End of changes. 3 change blocks. 
3 lines changed or deleted 1 lines changed or added


 qgsvectorfilewriter.h   qgsvectorfilewriter.h 
skipping to change at line 18 skipping to change at line 18
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef _QGSVECTORFILEWRITER_H_ #ifndef _QGSVECTORFILEWRITER_H_
#define _QGSVECTORFILEWRITER_H_ #define _QGSVECTORFILEWRITER_H_
#include "qgsvectorlayer.h" #include "qgsvectorlayer.h"
#include "qgsfield.h" #include "qgsfield.h"
#include <QPair> #include <QPair>
typedef void *OGRDataSourceH; typedef void *OGRDataSourceH;
skipping to change at line 57 skipping to change at line 56
enum WriterError enum WriterError
{ {
NoError = 0, NoError = 0,
ErrDriverNotFound, ErrDriverNotFound,
ErrCreateDataSource, ErrCreateDataSource,
ErrCreateLayer, ErrCreateLayer,
ErrAttributeTypeUnsupported, ErrAttributeTypeUnsupported,
ErrAttributeCreationFailed, ErrAttributeCreationFailed,
ErrProjection, // added in 1.5 ErrProjection, // added in 1.5
ErrFeatureWriteFailed, // added in 1.6 ErrFeatureWriteFailed, // added in 1.6
ErrInvalidLayer, // added in 2.0
}; };
/** Write contents of vector layer to a shapefile /** Write contents of vector layer to a shapefile
@deprecated Use writeAsVectorFormat instead*/ @deprecated Use writeAsVectorFormat instead*/
Q_DECL_DEPRECATED static WriterError writeAsShapefile( QgsVectorLayer* layer, Q_DECL_DEPRECATED static WriterError writeAsShapefile( QgsVectorLayer* layer,
const QString& shapefileName, const QString& shapefileName,
const QString& fileEncoding, const QString& fileEncoding,
const QgsCoordinateReferenceSystem *destCRS, const QgsCoordinateReferenceSystem *destCRS,
bool onlySelected = false, bool onlySelected = false,
QString *errorMessage = 0, QString *errorMessage = 0,
skipping to change at line 82 skipping to change at line 82
@note: this method was added in version 1.5*/ @note: this method was added in version 1.5*/
static WriterError writeAsVectorFormat( QgsVectorLayer* layer, static WriterError writeAsVectorFormat( QgsVectorLayer* layer,
const QString& fileName, const QString& fileName,
const QString& fileEncoding, const QString& fileEncoding,
const QgsCoordinateReferenceSys tem *destCRS, const QgsCoordinateReferenceSys tem *destCRS,
const QString& driverName = "ES RI Shapefile", const QString& driverName = "ES RI Shapefile",
bool onlySelected = false, bool onlySelected = false,
QString *errorMessage = 0, QString *errorMessage = 0,
const QStringList &datasourceOp tions = QStringList(), // added in 1.6 const QStringList &datasourceOp tions = QStringList(), // added in 1.6
const QStringList &layerOptions = QStringList(), // added in 1.6 const QStringList &layerOptions = QStringList(), // added in 1.6
bool skipAttributeCreation = fa bool skipAttributeCreation = fa
lse // added in 1.6 lse, // added in 1.6
QString *newFilename = 0 // add
ed in 1.9
); );
/** create shapefile and initialize it */ /** create shapefile and initialize it */
QgsVectorFileWriter( const QString& vectorFileName, QgsVectorFileWriter( const QString& vectorFileName,
const QString& fileEncoding, const QString& fileEncoding,
const QgsFieldMap& fields, const QgsFieldMap& fields,
QGis::WkbType geometryType, QGis::WkbType geometryType,
const QgsCoordinateReferenceSystem* srs, const QgsCoordinateReferenceSystem* srs,
const QString& driverName = "ESRI Shapefile", const QString& driverName = "ESRI Shapefile",
const QStringList &datasourceOptions = QStringList (), // added in 1.6 const QStringList &datasourceOptions = QStringList (), // added in 1.6
const QStringList &layerOptions = QStringList() // const QStringList &layerOptions = QStringList(), /
added in 1.6 / added in 1.6
QString *newFilename = 0 // added in 1.9
); );
/**Returns map with format filter string as key and OGR format key as v alue*/ /**Returns map with format filter string as key and OGR format key as v alue*/
static QMap< QString, QString> supportedFiltersAndFormats(); static QMap< QString, QString> supportedFiltersAndFormats();
/**Returns driver list that can be used for dialogs*/ /**Returns driver list that can be used for dialogs*/
static QMap< QString, QString> ogrDriverList(); static QMap< QString, QString> ogrDriverList();
/**Returns filter string that can be used for dialogs*/ /**Returns filter string that can be used for dialogs*/
static QString fileFilterString(); static QString fileFilterString();
skipping to change at line 119 skipping to change at line 121
WriterError hasError(); WriterError hasError();
/** retrieves error message /** retrieves error message
* @note added in 1.5 * @note added in 1.5
*/ */
QString errorMessage(); QString errorMessage();
/** add feature to the currently opened shapefile */ /** add feature to the currently opened shapefile */
bool addFeature( QgsFeature& feature ); bool addFeature( QgsFeature& feature );
QMap<int, int> attrIdxToOgrIdx() { return mAttrIdxToOgrIdx; }
/** close opened shapefile for writing */ /** close opened shapefile for writing */
~QgsVectorFileWriter(); ~QgsVectorFileWriter();
/** Delete a shapefile (and its accompanying shx / dbf / prf) /** Delete a shapefile (and its accompanying shx / dbf / prf)
* @param theFileName /path/to/file.shp * @param theFileName /path/to/file.shp
* @return bool true if the file was deleted successfully * @return bool true if the file was deleted successfully
*/ */
static bool deleteShapeFile( QString theFileName ); static bool deleteShapeFile( QString theFileName );
protected: protected:
 End of changes. 5 change blocks. 
5 lines changed or deleted 10 lines changed or added


 qgsvectorgradientcolorrampv2dialog.h   qgsvectorgradientcolorrampv2dialog.h 
/**************************************************************************
*
qgsvectorgradientcolorrampv2dialog.h
---------------------
begin : December 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSVECTORGRADIENTCOLORRAMPV2DIALOG_H #ifndef QGSVECTORGRADIENTCOLORRAMPV2DIALOG_H
#define QGSVECTORGRADIENTCOLORRAMPV2DIALOG_H #define QGSVECTORGRADIENTCOLORRAMPV2DIALOG_H
#include <QDialog> #include <QDialog>
#include "ui_qgsvectorgradientcolorrampv2dialogbase.h" #include "ui_qgsvectorgradientcolorrampv2dialogbase.h"
class QgsVectorGradientColorRampV2; class QgsVectorGradientColorRampV2;
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgsvectorlayer.h   qgsvectorlayer.h 
skipping to change at line 17 skipping to change at line 17
************************************************************************** */ ************************************************************************** */
/************************************************************************** * /************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSVECTORLAYER_H #ifndef QGSVECTORLAYER_H
#define QGSVECTORLAYER_H #define QGSVECTORLAYER_H
#include <QMap> #include <QMap>
#include <QSet> #include <QSet>
#include <QList> #include <QList>
#include <QStringList> #include <QStringList>
#include "qgis.h" #include "qgis.h"
skipping to change at line 55 skipping to change at line 54
class QgsVectorDataProvider; class QgsVectorDataProvider;
class QgsVectorOverlay; class QgsVectorOverlay;
class QgsSingleSymbolRendererV2; class QgsSingleSymbolRendererV2;
class QgsRectangle; class QgsRectangle;
class QgsVectorLayerJoinBuffer; class QgsVectorLayerJoinBuffer;
class QgsFeatureRendererV2; class QgsFeatureRendererV2;
class QgsDiagramRendererV2; class QgsDiagramRendererV2;
struct QgsDiagramLayerSettings; struct QgsDiagramLayerSettings;
typedef QList<int> QgsAttributeList; typedef QList<int> QgsAttributeList;
typedef QSet<int> QgsFeatureIds;
typedef QSet<int> QgsAttributeIds; typedef QSet<int> QgsAttributeIds;
/** @note added in 1.7 */ /** @note added in 1.7 */
struct CORE_EXPORT QgsVectorJoinInfo struct CORE_EXPORT QgsVectorJoinInfo
{ {
/**Join field in the target layer*/ /**Join field in the target layer*/
int targetField; int targetField;
/**Source layer*/ /**Source layer*/
QString joinLayerId; QString joinLayerId;
/**Join field in the source layer*/ /**Join field in the source layer*/
skipping to change at line 101 skipping to change at line 99
public: public:
enum EditType enum EditType
{ {
LineEdit, LineEdit,
UniqueValues, UniqueValues,
UniqueValuesEditable, UniqueValuesEditable,
ValueMap, ValueMap,
Classification, Classification,
EditRange, EditRange,
SliderRange, SliderRange,
CheckBox, /* added in 1.4 */ CheckBox, /* added in 1.4 */
FileName, FileName,
Enumeration, Enumeration,
Immutable, /* The attribute value should not be changed in the attr Immutable, /* The attribute value should not be changed in the at
ibute form*/ tribute form*/
Hidden, /* The attribute value should not be shown in the attrib Hidden, /* The attribute value should not be shown in the attr
ute form @added in 1.4 */ ibute form @added in 1.4 */
TextEdit, /* multiline edit @added in 1.4*/ TextEdit, /* multiline edit @added in 1.4*/
Calendar, /* calendar widget @added in 1.5 */ Calendar, /* calendar widget @added in 1.5 */
DialRange, /* dial range @added in 1.5 */ DialRange, /* dial range @added in 1.5 */
ValueRelation, /* value map from an table @added in 1.8 */
UuidGenerator, /* uuid generator - readonly and automatically intiali
zed @added in 1.9 */
}; };
struct RangeData struct RangeData
{ {
RangeData() {} RangeData() {}
RangeData( QVariant theMin, QVariant theMax, QVariant theStep ) RangeData( QVariant theMin, QVariant theMax, QVariant theStep )
: mMin( theMin ), mMax( theMax ), mStep( theStep ) {} : mMin( theMin ), mMax( theMax ), mStep( theStep ) {}
QVariant mMin; QVariant mMin;
QVariant mMax; QVariant mMax;
QVariant mStep; QVariant mStep;
}; };
struct ValueRelationData
{
ValueRelationData() {}
ValueRelationData( QString layer, QString key, QString value, bool al
lowNull, bool orderByValue )
: mLayer( layer ), mKey( key ), mValue( value ), mAllowNull( allo
wNull ), mOrderByValue( orderByValue ) {}
QString mLayer;
QString mKey;
QString mValue;
bool mAllowNull;
bool mOrderByValue;
};
/** Constructor */ /** Constructor */
QgsVectorLayer( QString path = QString::null, QString baseName = QStrin g::null, QgsVectorLayer( QString path = QString::null, QString baseName = QStrin g::null,
QString providerLib = QString::null, bool loadDefaultSt yleFlag = true ); QString providerLib = QString::null, bool loadDefaultSt yleFlag = true );
/** Destructor */ /** Destructor */
virtual ~QgsVectorLayer(); virtual ~QgsVectorLayer();
/** Returns the permanent storage type for this layer as a friendly nam e. */ /** Returns the permanent storage type for this layer as a friendly nam e. */
QString storageType() const; QString storageType() const;
skipping to change at line 260 skipping to change at line 273
/**Returns the WKBType or WKBUnknown in case of error*/ /**Returns the WKBType or WKBUnknown in case of error*/
QGis::WkbType wkbType() const; QGis::WkbType wkbType() const;
/** Return the provider type for this layer */ /** Return the provider type for this layer */
QString providerType() const; 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(). * @note Called by QgsMapLayer::readXML().
*/ */
virtual bool readXml( QDomNode & layer_node ); virtual bool readXml( const 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(). * @note Called by QgsMapLayer::writeXML().
*/ */
virtual bool writeXml( QDomNode & layer_node, QDomDocument & doc ); virtual bool writeXml( QDomNode & layer_node, QDomDocument & doc );
/** Read the symbology for the current layer from the Dom node supplied . /** Read the symbology for the current layer from the Dom node supplied .
* @param node node that will contain the symbology definition for this layer. * @param node node that will contain the symbology definition for this layer.
* @param errorMessage reference to string that will be updated with any error messages * @param errorMessage reference to string that will be updated with any error messages
* @return true in case of success. * @return true in case of success.
skipping to change at line 282 skipping to change at line 295
bool readSymbology( const QDomNode& node, QString& errorMessage ); bool readSymbology( const QDomNode& node, QString& errorMessage );
/** Write the symbology for the layer into the docment provided. /** Write the symbology for the layer into the docment provided.
* @param node the node that will have the style element added to it. * @param node the node that will have the style element added to it.
* @param doc the document that will have the QDomNode added. * @param doc the document that will have the QDomNode added.
* @param errorMessage reference to string that will be updated with a ny error messages * @param errorMessage reference to string that will be updated with a ny error messages
* @return true in case of success. * @return true in case of success.
*/ */
bool writeSymbology( QDomNode& node, QDomDocument& doc, QString& errorM essage ) const; bool writeSymbology( QDomNode& node, QDomDocument& doc, QString& errorM essage ) const;
bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage
) const;
bool readSld( const QDomNode& node, QString& errorMessage );
/** /**
* Number of features in the layer. This is necessary if features are * Number of features in the layer. This is necessary if features are
* added/deleted or the layer has been subsetted. If the data provider * added/deleted or the layer has been subsetted. If the data provider
* chooses not to support this feature, the total number of features * chooses not to support this feature, the total number of features
* can be returned. * can be returned.
* @return long containing number of features * @return long containing number of features
*/ */
virtual long featureCount() const; virtual long featureCount() const;
/** This function does nothing useful, it's kept only for compatibility . /** This function does nothing useful, it's kept only for compatibility .
skipping to change at line 332 skipping to change at line 348
/** /**
* fetch a feature (after select) * fetch a feature (after select)
* @param feature buffer to read the feature into * @param feature buffer to read the feature into
* @return true, if a feature was fetched, false, if there are no more features * @return true, if a feature was fetched, false, if there are no more features
*/ */
bool nextFeature( QgsFeature& feature ); bool nextFeature( QgsFeature& feature );
/**Gets the feature at the given feature id. Considers the changed, add ed, deleted and permanent features /**Gets the feature at the given feature id. Considers the changed, add ed, deleted and permanent features
@return true in case of success*/ @return true in case of success*/
bool featureAtId( int featureId, QgsFeature &f, bool fetchGeometries = true, bool fetchAttributes = true ); bool featureAtId( QgsFeatureId featureId, QgsFeature &f, bool fetchGeom etries = true, bool fetchAttributes = true );
/** Adds a feature /** Adds a feature
@param f feature to add @param f feature to add
@param alsoUpdateExtent If True, will also go to the effort of e.g. updating the extents. @param alsoUpdateExtent If True, will also go to the effort of e.g. updating the extents.
@return True in case of success and False in cas e of error @return True in case of success and False in cas e of error
*/ */
bool addFeature( QgsFeature& f, bool alsoUpdateExtent = true ); bool addFeature( QgsFeature& f, bool alsoUpdateExtent = true );
/** Updates an existing feature
@param f feature to update
@return True in case of success and False in cas
e of error
@note added in 1.8
*/
bool updateFeature( QgsFeature &f );
/** Insert a new vertex before the given vertex number, /** Insert a new vertex before the given vertex number,
* in the given ring, item (first number is index 0), and feature * in the given ring, item (first number is index 0), and feature
* Not meaningful for Point geometries * Not meaningful for Point geometries
*/ */
bool insertVertex( double x, double y, int atFeatureId, int beforeVerte x ); bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int be foreVertex );
/** Moves the vertex at the given position number, /** Moves the vertex at the given position number,
* ring and item (first number is index 0), and feature * ring and item (first number is index 0), and feature
* to the given coordinates * to the given coordinates
*/ */
bool moveVertex( double x, double y, int atFeatureId, int atVertex ); bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVe rtex );
/** Deletes a vertex from a feature /** Deletes a vertex from a feature
*/ */
bool deleteVertex( int atFeatureId, int atVertex ); bool deleteVertex( QgsFeatureId atFeatureId, int atVertex );
/** Deletes the selected features /** Deletes the selected features
* @return true in case of success and false otherwise * @return true in case of success and false otherwise
*/ */
bool deleteSelectedFeatures(); bool deleteSelectedFeatures();
/**Adds a ring to polygon/multipolygon features /**Adds a ring to polygon/multipolygon features
@return @return
0 in case of success, 0 in case of success,
1 problem with feature type, 1 problem with feature type,
2 ring not closed, 2 ring not closed,
3 ring not valid, 3 ring not valid,
4 ring crosses existing rings, 4 ring crosses existing rings,
5 no feature found where ring can be inserted*/ 5 no feature found where ring can be inserted*/
int addRing( const QList<QgsPoint>& ring ); int addRing( const QList<QgsPoint>& ring );
/**Adds a new island polygon to a multipolygon feature /**Adds a new part polygon to a multipart feature
@return @return
0 in case of success, 0 in case of success,
1 if selected feature is not multipolygon, 1 if selected feature is not multipart,
2 if ring is not a valid geometry, 2 if ring is not a valid geometry,
3 if new polygon ring not disjoint with existing rings, 3 if new polygon ring not disjoint with existing rings,
4 if no feature was selected, 4 if no feature was selected,
5 if several features are selected, 5 if several features are selected,
6 if selected geometry not found*/ 6 if selected geometry not found*/
int addIsland( const QList<QgsPoint>& ring ); int addPart( const QList<QgsPoint>& ring );
Q_DECL_DEPRECATED int addIsland( const QList<QgsPoint>& ring ) { return
addPart( ring ); }
/**Translates feature by dx, dy /**Translates feature by dx, dy
@param featureId id of the feature to translate @param featureId id of the feature to translate
@param dx translation of x-coordinate @param dx translation of x-coordinate
@param dy translation of y-coordinate @param dy translation of y-coordinate
@return 0 in case of success*/ @return 0 in case of success*/
int translateFeature( int featureId, double dx, double dy ); int translateFeature( QgsFeatureId featureId, double dx, double dy );
/**Splits features cut by the given line /**Splits features cut by the given line
@param splitLine line that splits the layer features @param splitLine line that splits the layer features
@param topologicalEditing true if topological editing is enabled @param topologicalEditing true if topological editing is enabled
@return 0 in case of success, 4 if there is a selection but no featu re split*/ @return 0 in case of success, 4 if there is a selection but no featu re split*/
int splitFeatures( const QList<QgsPoint>& splitLine, bool topologicalEd iting = false ); int splitFeatures( const QList<QgsPoint>& splitLine, bool topologicalEd iting = false );
/**Changes the specified geometry such that it has no intersections wit h other /**Changes the specified geometry such that it has no intersections wit h other
polygon (or multipolygon) geometries in this vector layer polygon (or multipolygon) geometries in this vector layer
@param geom geometry to modify @param geom geometry to modify
skipping to change at line 456 skipping to change at line 480
/**Snaps to segment or vertex within given tolerance /**Snaps to segment or vertex within given tolerance
@param startPoint point to snap (in layer coordinates) @param startPoint point to snap (in layer coordinates)
@param snappingTolerance distance tolerance for snapping @param snappingTolerance distance tolerance for snapping
@param snappingResults snapping results. Key is the distance between startPoint and snapping target @param snappingResults snapping results. Key is the distance between startPoint and snapping target
@param snap_to to segment / to vertex @param snap_to to segment / to vertex
@return 0 in case of success @return 0 in case of success
*/ */
int snapWithContext( const QgsPoint& startPoint, int snapWithContext( const QgsPoint& startPoint,
double snappingTolerance, double snappingTolerance,
QMultiMap < double, QMultiMap < double, QgsSnappingResult > &snappingR
QgsSnappingResult > & snappingResults, esults,
QgsSnapper::SnappingType snap_to ); QgsSnapper::SnappingType snap_to );
/**Synchronises with changes in the datasource /**Synchronises with changes in the datasource
@note added in version 1.6*/ @note added in version 1.6*/
virtual void reload(); virtual void reload();
/** Draws the layer /** Draws the layer
* @return false if an error occurred during drawing * @return false if an error occurred during drawing
*/ */
bool draw( QgsRenderContext& rendererContext ); bool draw( QgsRenderContext& rendererContext );
skipping to change at line 495 skipping to change at line 518
bool setReadOnly( bool readonly = true ); bool setReadOnly( bool readonly = true );
/** Sets whether some features are modified or not */ /** Sets whether some features are modified or not */
void setModified( bool modified = true, bool onlyGeometryWasModified = false ); void setModified( bool modified = true, bool onlyGeometryWasModified = false );
/** Make layer editable */ /** Make layer editable */
bool startEditing(); bool startEditing();
/** change feature's geometry /** change feature's geometry
@note added in version 1.2 */ @note added in version 1.2 */
bool changeGeometry( int fid, QgsGeometry* geom ); bool changeGeometry( QgsFeatureId fid, QgsGeometry* geom );
/** changed an attribute value (but does not commit it) */ /** changed an attribute value (but does not commit it) */
bool changeAttributeValue( int fid, int field, QVariant value, bool emi tSignal = true ); bool changeAttributeValue( QgsFeatureId fid, int field, QVariant value, bool emitSignal = true );
/** add an attribute field (but does not commit it) /** add an attribute field (but does not commit it)
returns true if the field was added returns true if the field was added
@note added in version 1.2 */ @note added in version 1.2 */
bool addAttribute( const QgsField &field ); bool addAttribute( const QgsField &field );
/** add an attribute field (but does not commit it) /** add an attribute field (but does not commit it)
returns true if the field was added returns true if the field was added
@deprecated */ @deprecated */
Q_DECL_DEPRECATED bool addAttribute( QString name, QString type ); Q_DECL_DEPRECATED bool addAttribute( QString name, QString type );
skipping to change at line 529 skipping to change at line 552
@note added in version 1.2*/ @note added in version 1.2*/
QString attributeDisplayName( int attributeIndex ) const; QString attributeDisplayName( int attributeIndex ) const;
/** delete an attribute field (but does not commit it) */ /** delete an attribute field (but does not commit it) */
bool deleteAttribute( int attr ); bool deleteAttribute( int attr );
/** Insert a copy of the given features into the layer (but does not c ommit it) */ /** Insert a copy of the given features into the layer (but does not c ommit it) */
bool addFeatures( QgsFeatureList features, bool makeSelected = true ); bool addFeatures( QgsFeatureList features, bool makeSelected = true );
/** delete a feature from the layer (but does not commit it) */ /** delete a feature from the layer (but does not commit it) */
bool deleteFeature( int fid ); bool deleteFeature( QgsFeatureId fid );
/** /**
Attempts to commit any changes to disk. Returns the result of the at tempt. Attempts to commit any changes to disk. Returns the result of the at tempt.
If a commit fails, the in-memory changes are left alone. If a commit fails, the in-memory changes are left alone.
This allows editing to continue if the commit failed on e.g. a This allows editing to continue if the commit failed on e.g. a
disallowed value in a Postgres database - the user can re-edit and tr y disallowed value in a Postgres database - the user can re-edit and tr y
again. again.
The commits occur in distinct stages, The commits occur in distinct stages,
skipping to change at line 588 skipping to change at line 611
/** set python function for edit form initialization (added in 1.4) */ /** set python function for edit form initialization (added in 1.4) */
void setEditFormInit( QString function ); void setEditFormInit( QString function );
/**access value map*/ /**access value map*/
QMap<QString, QVariant> &valueMap( int idx ); QMap<QString, QVariant> &valueMap( int idx );
/**access range */ /**access range */
RangeData &range( int idx ); RangeData &range( int idx );
/**access relations
* @note added in 1.8
**/
ValueRelationData &valueRelation( int idx );
/**Adds a new overlay to this class. QgsVectorLayer takes ownership of the object /**Adds a new overlay to this class. QgsVectorLayer takes ownership of the object
@note this method was added in version 1.1 @note this method was added in version 1.1
*/ */
void addOverlay( QgsVectorOverlay* overlay ); void addOverlay( QgsVectorOverlay* overlay );
/**Removes all overlays of a given type /**Removes all overlays of a given type
@note this method was added in version 1.1 @note this method was added in version 1.1
*/ */
void removeOverlay( const QString& typeName ); void removeOverlay( const QString& typeName );
skipping to change at line 669 skipping to change at line 697
/**Returns minimum value for an attribute column or invalid variant in case of error /**Returns minimum value for an attribute column or invalid variant in case of error
@note added in 1.7*/ @note added in 1.7*/
QVariant minimumValue( int index ); QVariant minimumValue( int index );
/**Returns maximum value for an attribute column or invalid variant in case of error /**Returns maximum value for an attribute column or invalid variant in case of error
@note added in 1.7*/ @note added in 1.7*/
QVariant maximumValue( int index ); QVariant maximumValue( int index );
public slots: public slots:
/** Select feature by its ID, optionally emit signal selectionChanged() */ /** Select feature by its ID, optionally emit signal selectionChanged() */
void select( int featureId, bool emitSignal = true ); void select( QgsFeatureId featureId, bool emitSignal = true );
/** Deselect feature by its ID, optionally emit signal selectionChanged () */ /** Deselect feature by its ID, optionally emit signal selectionChanged () */
void deselect( int featureId, bool emitSignal = true ); void deselect( QgsFeatureId featureId, bool emitSignal = true );
/** Clear selection */ /** Clear selection */
void removeSelection( bool emitSignal = true ); void removeSelection( bool emitSignal = true );
void triggerRepaint(); void triggerRepaint();
/** Update the extents for the layer. This is necessary if features are /** Update the extents for the layer. This is necessary if features are
* added/deleted or the layer has been subsetted. * added/deleted or the layer has been subsetted.
*/ */
virtual void updateExtents(); virtual void updateExtents();
/** Check if there is a join with a layer that will be removed /** Check if there is a join with a layer that will be removed
@note added in 1.7 */ @note added in 1.7 */
void checkJoinLayerRemove( QString theLayerId ); void checkJoinLayerRemove( QString theLayerId );
QString metadata();
signals: signals:
/** This signal is emited when selection was changed */ /** This signal is emited when selection was changed */
void selectionChanged(); void selectionChanged();
/** This signal is emitted when modifications has been done on layer */ /** This signal is emitted when modifications has been done on layer */
void layerModified( bool onlyGeometry ); void layerModified( bool onlyGeometry );
void editingStarted(); void editingStarted();
void editingStopped(); void editingStopped();
void attributeAdded( int idx ); void attributeAdded( int idx );
void attributeDeleted( int idx ); void attributeDeleted( int idx );
void featureAdded( int fid ); // added in 1.7 void featureAdded( QgsFeatureId fid ); // added in 1.7
void featureDeleted( int fid ); void featureDeleted( QgsFeatureId fid );
void layerDeleted(); void layerDeleted();
void attributeValueChanged( int fid, int idx, const QVariant & ); void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant &
);
void geometryChanged( QgsFeatureId fid, QgsGeometry &geom ); // added i
n 1.9
/** Signals emitted after committing changes /** Signals emitted after committing changes
\note added in v1.6 */ \note added in v1.6 */
void committedAttributesDeleted( const QString& layerId, const QgsAttri buteIds& deletedAttributeIds ); void committedAttributesDeleted( const QString& layerId, const QgsAttri buteIds& deletedAttributeIds );
void committedAttributesAdded( const QString& layerId, const QList<QgsF ield>& addedAttributes ); void committedAttributesAdded( const QString& layerId, const QList<QgsF ield>& addedAttributes );
void committedFeaturesAdded( const QString& layerId, const QgsFeatureLi st& addedFeatures ); void committedFeaturesAdded( const QString& layerId, const QgsFeatureLi st& addedFeatures );
void committedFeaturesRemoved( const QString& layerId, const QgsFeature Ids& deletedFeatureIds ); void committedFeaturesRemoved( const QString& layerId, const QgsFeature Ids& deletedFeatureIds );
void committedAttributeValuesChanges( const QString& layerId, const Qgs ChangedAttributesMap& changedAttributesValues ); void committedAttributeValuesChanges( const QString& layerId, const Qgs ChangedAttributesMap& changedAttributesValues );
void committedGeometriesChanges( const QString& layerId, const QgsGeome tryMap& changedGeometries ); void committedGeometriesChanges( const QString& layerId, const QgsGeome tryMap& changedGeometries );
skipping to change at line 752 skipping to change at line 783
* to the byte after the end of the line string binary data stream (WKB ). * to the byte after the end of the line string binary data stream (WKB ).
*/ */
unsigned char *drawLineString( unsigned char *WKBlinestring, QgsRenderC ontext &renderContext ); unsigned char *drawLineString( unsigned char *WKBlinestring, QgsRenderC ontext &renderContext );
/** Draw the polygon as given in the WKB format. Returns a pointer to /** Draw the polygon as given in the WKB format. Returns a pointer to
* the byte after the end of the polygon binary data stream (WKB). * the byte after the end of the polygon binary data stream (WKB).
*/ */
unsigned char *drawPolygon( unsigned char *WKBpolygon, QgsRenderContext &renderContext ); unsigned char *drawPolygon( unsigned char *WKBpolygon, QgsRenderContext &renderContext );
/** Goes through all features and finds a free id (e.g. to give it temp orarily to a not-commited feature) */ /** Goes through all features and finds a free id (e.g. to give it temp orarily to a not-commited feature) */
int findFreeId(); QgsFeatureId findFreeId();
/**Deletes the geometries in mCachedGeometries*/ /**Deletes the geometries in mCachedGeometries*/
void deleteCachedGeometries(); void deleteCachedGeometries();
/**Snaps to a geometry and adds the result to the multimap if it is wit hin the snapping result /**Snaps to a geometry and adds the result to the multimap if it is wit hin the snapping result
@param startPoint start point of the snap @param startPoint start point of the snap
@param featureId id of feature @param featureId id of feature
@param geom geometry to snap @param geom geometry to snap
@param sqrSnappingTolerance squared search tolerance of the snap @param sqrSnappingTolerance squared search tolerance of the snap
@param snappingResults list to which the result is appended @param snappingResults list to which the result is appended
@param snap_to snap to vertex or to segment @param snap_to snap to vertex or to segment
*/ */
void snapToGeometry( const QgsPoint& startPoint, int featureId, QgsGeom void snapToGeometry( const QgsPoint& startPoint,
etry* geom, double sqrSnappingTolerance, QgsFeatureId featureId,
QMultiMap<double, QgsSnappingResult>& snappingResu QgsGeometry* geom,
lts, QgsSnapper::SnappingType snap_to ) const; double sqrSnappingTolerance,
QMultiMap<double, QgsSnappingResult>& snappingResu
lts,
QgsSnapper::SnappingType snap_to ) const;
/**Little helper function that gives bounding box from a list of points . /**Little helper function that gives bounding box from a list of points .
@return 0 in case of success*/ @return 0 in case of success*/
int boundingBoxFromPointList( const QList<QgsPoint>& list, double& xmin , double& ymin, double& xmax, double& ymax ) const; int boundingBoxFromPointList( const QList<QgsPoint>& list, double& xmin , double& ymin, double& xmax, double& ymax ) const;
/**Reads vertex marker type from settings*/ /**Reads vertex marker type from settings*/
static QgsVectorLayer::VertexMarkerType currentVertexMarkerType(); static QgsVectorLayer::VertexMarkerType currentVertexMarkerType();
/**Reads vertex marker size from settings*/ /**Reads vertex marker size from settings*/
static int currentVertexMarkerSize(); static int currentVertexMarkerSize();
skipping to change at line 795 skipping to change at line 830
@param joinValue lookup value for join @param joinValue lookup value for join
@param attributes (join layer) attribute indices to add @param attributes (join layer) attribute indices to add
@param attributeIndexOffset index offset to get from join layer attri bute index to layer index*/ @param attributeIndexOffset index offset to get from join layer attri bute index to layer index*/
void addJoinedFeatureAttributes( QgsFeature& f, const QgsVectorJoinInfo & joinInfo, const QString& joinFieldName, const QVariant& joinValue, void addJoinedFeatureAttributes( QgsFeature& f, const QgsVectorJoinInfo & joinInfo, const QString& joinFieldName, const QVariant& joinValue,
const QgsAttributeList& attributes, in t attributeIndexOffset ); const QgsAttributeList& attributes, in t attributeIndexOffset );
/**Update feature with uncommited geometry updates*/ /**Update feature with uncommited geometry updates*/
void updateFeatureGeometry( QgsFeature &f ); void updateFeatureGeometry( QgsFeature &f );
/** Record changed geometry, store in active command (if any) */ /** Record changed geometry, store in active command (if any) */
void editGeometryChange( int featureId, QgsGeometry& geometry ); void editGeometryChange( QgsFeatureId featureId, QgsGeometry& geometry );
/** Record added feature, store in active command (if any) */ /** Record added feature, store in active command (if any) */
void editFeatureAdd( QgsFeature& feature ); void editFeatureAdd( QgsFeature& feature );
/** Record deleted feature, store in active command (if any) */ /** Record deleted feature, store in active command (if any) */
void editFeatureDelete( int featureId ); void editFeatureDelete( QgsFeatureId featureId );
/** Record changed attribute, store in active command (if any) */ /** Record changed attribute, store in active command (if any) */
void editAttributeChange( int featureId, int field, QVariant value ); void editAttributeChange( QgsFeatureId featureId, int field, QVariant v alue );
/** Stop version 2 renderer and selected renderer (if required) */ /** Stop version 2 renderer and selected renderer (if required) */
void stopRendererV2( QgsRenderContext& rendererContext, QgsSingleSymbol RendererV2* selRenderer ); void stopRendererV2( QgsRenderContext& rendererContext, QgsSingleSymbol RendererV2* selRenderer );
/**Updates an index in an attribute map to a new value (usually necessa ry because of a join operation)*/ /**Updates an index in an attribute map to a new value (usually necessa ry because of a join operation)*/
void updateAttributeMapIndex( QgsAttributeMap& map, int oldIndex, int n ewIndex ) const; void updateAttributeMapIndex( QgsAttributeMap& map, int oldIndex, int n ewIndex ) const;
/**Registers label and diagram layer /**Registers label and diagram layer
@param rendererContext render context @param rendererContext render context
@param attributes attributes needed for labeling and diagrams will be added to the list @param attributes attributes needed for labeling and diagrams will be added to the list
skipping to change at line 928 skipping to change at line 963
/**List of overlays. Vector overlays will be rendered on top of all map layers*/ /**List of overlays. Vector overlays will be rendered on top of all map layers*/
QList<QgsVectorOverlay*> mOverlays; QList<QgsVectorOverlay*> mOverlays;
QStringList mCommitErrors; QStringList mCommitErrors;
QMap< QString, EditType > mEditTypes; QMap< QString, EditType > mEditTypes;
QMap< QString, QMap<QString, QVariant> > mValueMaps; QMap< QString, QMap<QString, QVariant> > mValueMaps;
QMap< QString, RangeData > mRanges; QMap< QString, RangeData > mRanges;
QMap< QString, QPair<QString, QString> > mCheckedStates; QMap< QString, QPair<QString, QString> > mCheckedStates;
QMap< QString, ValueRelationData > mValueRelations;
QString mEditForm, mEditFormInit; QString mEditForm, mEditFormInit;
//annotation form for this layer //annotation form for this layer
QString mAnnotationForm; QString mAnnotationForm;
bool mFetching; bool mFetching;
QgsRectangle mFetchRect; QgsRectangle mFetchRect;
QgsAttributeList mFetchAttributes; QgsAttributeList mFetchAttributes;
QgsAttributeList mFetchProvAttributes; QgsAttributeList mFetchProvAttributes;
bool mFetchGeometry; bool mFetchGeometry;
QSet<int> mFetchConsidered; QSet<QgsFeatureId> mFetchConsidered;
QgsGeometryMap::iterator mFetchChangedGeomIt; QgsGeometryMap::iterator mFetchChangedGeomIt;
QgsFeatureList::iterator mFetchAddedFeaturesIt; QgsFeatureList::iterator mFetchAddedFeaturesIt;
//stores information about joined layers //stores information about joined layers
QgsVectorLayerJoinBuffer* mJoinBuffer; QgsVectorLayerJoinBuffer* mJoinBuffer;
//diagram rendering object. 0 if diagram drawing is disabled //diagram rendering object. 0 if diagram drawing is disabled
QgsDiagramRendererV2* mDiagramRenderer; QgsDiagramRendererV2* mDiagramRenderer;
//stores infos about diagram placement (placement type, priority, posit ion distance) //stores infos about diagram placement (placement type, priority, posit ion distance)
 End of changes. 33 change blocks. 
38 lines changed or deleted 82 lines changed or added


 qgsvectoroverlay.h   qgsvectoroverlay.h 
skipping to change at line 53 skipping to change at line 53
virtual void createOverlayObjects( const QgsRenderContext& renderContex t ) = 0; virtual void createOverlayObjects( const QgsRenderContext& renderContex t ) = 0;
/**Remove the overlay objects and release their memory*/ /**Remove the overlay objects and release their memory*/
void removeOverlayObjects(); void removeOverlayObjects();
/**Draw the overlay objects*/ /**Draw the overlay objects*/
virtual void drawOverlayObjects( QgsRenderContext& context ) const = 0; virtual void drawOverlayObjects( QgsRenderContext& context ) const = 0;
/**Gives direct access to oberlay objects*/ /**Gives direct access to oberlay objects*/
QMap<int, QgsOverlayObject*>* overlayObjects() {return &mOverlayObjects ;} QMap<QgsFeatureId, QgsOverlayObject*>* overlayObjects() {return &mOverl ayObjects;}
/**Describes the overlay type (e.g. "diagram" or "label")*/ /**Describes the overlay type (e.g. "diagram" or "label")*/
virtual QString typeName() const = 0; virtual QString typeName() const = 0;
/**Set attribute indices necessary to fetch*/ /**Set attribute indices necessary to fetch*/
void setAttributes( const QgsAttributeList& list ) {mAttributes = list; } void setAttributes( const QgsAttributeList& list ) {mAttributes = list; }
bool displayFlag() const {return mDisplayFlag;} bool displayFlag() const {return mDisplayFlag;}
/**Display yes/no*/ /**Display yes/no*/
skipping to change at line 83 skipping to change at line 83
/**Pointer to the vector layer for this overlay*/ /**Pointer to the vector layer for this overlay*/
QgsVectorLayer* mVectorLayer; QgsVectorLayer* mVectorLayer;
/**True if overlay should be displayed*/ /**True if overlay should be displayed*/
bool mDisplayFlag; bool mDisplayFlag;
/**A list with attribute indexes that are needed for overlay rendering* / /**A list with attribute indexes that are needed for overlay rendering* /
QgsAttributeList mAttributes; QgsAttributeList mAttributes;
/**Key: feature ids, value: the corresponding overlay objects. Normally , they are created for each redraw and deleted before the next redraw*/ /**Key: feature ids, value: the corresponding overlay objects. Normally , they are created for each redraw and deleted before the next redraw*/
QMap<int, QgsOverlayObject*> mOverlayObjects; QMap<QgsFeatureId, QgsOverlayObject*> mOverlayObjects;
/**Position constraints that may be set to be persistent after redraws. Key is the feature id, value the map point /**Position constraints that may be set to be persistent after redraws. Key is the feature id, value the map point
where the feature should be placed*/ where the feature should be placed*/
QMap<int, QgsPoint> mPositionConstraints; QMap<int, QgsPoint> mPositionConstraints;
private: private:
/**Default constructor forbidden*/ /**Default constructor forbidden*/
QgsVectorOverlay(); QgsVectorOverlay();
}; };
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgsvectorrandomcolorrampv2dialog.h   qgsvectorrandomcolorrampv2dialog.h 
/**************************************************************************
*
qgsvectorrandomcolorrampv2dialog.h
---------------------
begin : December 2009
copyright : (C) 2009 by Martin Dobias
email : wonder.sk at gmail.com
**************************************************************************
*
*
*
* This program is free software; you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation; either version 2 of the License, or
*
* (at your option) any later version.
*
*
*
**************************************************************************
*/
#ifndef QGSVECTORRANDOMCOLORRAMPV2DIALOG_H #ifndef QGSVECTORRANDOMCOLORRAMPV2DIALOG_H
#define QGSVECTORRANDOMCOLORRAMPV2DIALOG_H #define QGSVECTORRANDOMCOLORRAMPV2DIALOG_H
#include <QDialog> #include <QDialog>
#include "ui_qgsvectorrandomcolorrampv2dialogbase.h" #include "ui_qgsvectorrandomcolorrampv2dialogbase.h"
class QgsVectorRandomColorRampV2; class QgsVectorRandomColorRampV2;
 End of changes. 1 change blocks. 
0 lines changed or deleted 23 lines changed or added


 qgsvertexmarker.h   qgsvertexmarker.h 
skipping to change at line 15 skipping to change at line 15
copyright : (C) 2006 by Martin Dobias copyright : (C) 2006 by Martin Dobias
email : wonder.sk at gmail dot com email : wonder.sk at gmail dot com
************************************************************************** * ************************************************************************** *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
/* $Id$ */
#ifndef QGSVERTEXMARKER_H #ifndef QGSVERTEXMARKER_H
#define QGSVERTEXMARKER_H #define QGSVERTEXMARKER_H
#include "qgsmapcanvasitem.h" #include "qgsmapcanvasitem.h"
#include "qgspoint.h" #include "qgspoint.h"
class QPainter; class QPainter;
/** \ingroup gui /** \ingroup gui
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgszonalstatistics.h   qgszonalstatistics.h 
skipping to change at line 47 skipping to change at line 47
int calculateStatistics( QProgressDialog* p ); int calculateStatistics( QProgressDialog* p );
private: private:
QgsZonalStatistics(); QgsZonalStatistics();
/**Analysis what cells need to be considered to cover the bounding box of a feature /**Analysis what cells need to be considered to cover the bounding box of a feature
@return 0 in case of success*/ @return 0 in case of success*/
int cellInfoForBBox( const QgsRectangle& rasterBBox, const QgsRectangle & featureBBox, double cellSizeX, double cellSizeY, int cellInfoForBBox( const QgsRectangle& rasterBBox, const QgsRectangle & featureBBox, double cellSizeX, double cellSizeY,
int& offsetX, int& offsetY, int& nCellsX, int& nCe llsY ) const; int& offsetX, int& offsetY, int& nCellsX, int& nCe llsY ) const;
/**Returns statistics by considering the pixels where the center point is within the polygon (fast)*/ /**Returns statistics by considering the pixels where the center point is within the polygon (fast)*/
void statisticsFromMiddlePointTest( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY, \ void statisticsFromMiddlePointTest( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY,
double cellSizeX, double cellSizeY, const QgsRectangle& rasterBBox, double& sum, double& count ); double cellSizeX, double cellSizeY, const QgsRectangle& rasterBBox, double& sum, double& count );
void statisticsFromMiddlePointTest_improved( void* band, QgsGeometry* p oly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY, \ void statisticsFromMiddlePointTest_improved( void* band, QgsGeometry* p oly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY,
double cellSizeX, double cellSizeY, const QgsRectangle& rasterBBox, double& sum, double& count ); double cellSizeX, double cellSizeY, const QgsRectangle& rasterBBox, double& sum, double& count );
/**Returns statistics with precise pixel - polygon intersection test (s low) */ /**Returns statistics with precise pixel - polygon intersection test (s low) */
void statisticsFromPreciseIntersection( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY, \ void statisticsFromPreciseIntersection( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY,
double cellSizeX, double cellSi zeY, const QgsRectangle& rasterBBox, double& sum, double& count ); double cellSizeX, double cellSi zeY, const QgsRectangle& rasterBBox, double& sum, double& count );
QString mRasterFilePath; QString mRasterFilePath;
/**Raster band to calculate statistics from (defaults to 1)*/ /**Raster band to calculate statistics from (defaults to 1)*/
int mRasterBand; int mRasterBand;
QgsVectorLayer* mPolygonLayer; QgsVectorLayer* mPolygonLayer;
QString mAttributePrefix; QString mAttributePrefix;
/**The nodata value of the input layer*/ /**The nodata value of the input layer*/
float mInputNodataValue; float mInputNodataValue;
}; };
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 ui_qgscredentialdialog.h   ui_qgscredentialdialog.h 
/************************************************************************** ****** /************************************************************************** ******
** Form generated from reading UI file 'qgscredentialdialog.ui' ** Form generated from reading UI file 'qgscredentialdialog.ui'
** **
** Created: Wed Jun 13 13:27:00 2012 ** Created: Wed Jun 13 12:06:00 2012
** by: Qt User Interface Compiler version 4.7.4 ** by: Qt User Interface Compiler version 4.7.4
** **
** WARNING! All changes made in this file will be lost when recompiling UI file! ** WARNING! All changes made in this file will be lost when recompiling UI file!
*************************************************************************** *****/ *************************************************************************** *****/
#ifndef UI_QGSCREDENTIALDIALOG_H #ifndef UI_QGSCREDENTIALDIALOG_H
#define UI_QGSCREDENTIALDIALOG_H #define UI_QGSCREDENTIALDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QAction> #include <QtGui/QAction>
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ui_qgsdetaileditemwidgetbase.h   ui_qgsdetaileditemwidgetbase.h 
/************************************************************************** ****** /************************************************************************** ******
** Form generated from reading UI file 'qgsdetaileditemwidgetbase.ui' ** Form generated from reading UI file 'qgsdetaileditemwidgetbase.ui'
** **
** Created: Wed Jun 13 13:26:58 2012 ** Created: Wed Jun 13 12:05:58 2012
** by: Qt User Interface Compiler version 4.7.4 ** by: Qt User Interface Compiler version 4.7.4
** **
** WARNING! All changes made in this file will be lost when recompiling UI file! ** WARNING! All changes made in this file will be lost when recompiling UI file!
*************************************************************************** *****/ *************************************************************************** *****/
#ifndef UI_QGSDETAILEDITEMWIDGETBASE_H #ifndef UI_QGSDETAILEDITEMWIDGETBASE_H
#define UI_QGSDETAILEDITEMWIDGETBASE_H #define UI_QGSDETAILEDITEMWIDGETBASE_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QAction> #include <QtGui/QAction>
skipping to change at line 34 skipping to change at line 34
class Ui_QgsDetailedItemWidgetBase class Ui_QgsDetailedItemWidgetBase
{ {
public: public:
QGridLayout *gridLayout; QGridLayout *gridLayout;
QLabel *lblIcon; QLabel *lblIcon;
QLabel *lblTitle; QLabel *lblTitle;
QCheckBox *cbx; QCheckBox *cbx;
QWidget *widget; QWidget *widget;
QLabel *lblDetail; QLabel *lblDetail;
QLabel *lblCategory;
void setupUi(QWidget *QgsDetailedItemWidgetBase) void setupUi(QWidget *QgsDetailedItemWidgetBase)
{ {
if (QgsDetailedItemWidgetBase->objectName().isEmpty()) if (QgsDetailedItemWidgetBase->objectName().isEmpty())
QgsDetailedItemWidgetBase->setObjectName(QString::fromUtf8("Qgs DetailedItemWidgetBase")); QgsDetailedItemWidgetBase->setObjectName(QString::fromUtf8("Qgs DetailedItemWidgetBase"));
QgsDetailedItemWidgetBase->resize(246, 45); QgsDetailedItemWidgetBase->resize(246, 56);
gridLayout = new QGridLayout(QgsDetailedItemWidgetBase); gridLayout = new QGridLayout(QgsDetailedItemWidgetBase);
gridLayout->setSpacing(1); gridLayout->setSpacing(1);
gridLayout->setContentsMargins(0, 0, 0, 0); gridLayout->setContentsMargins(0, 0, 0, 0);
gridLayout->setObjectName(QString::fromUtf8("gridLayout")); gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
lblIcon = new QLabel(QgsDetailedItemWidgetBase); lblIcon = new QLabel(QgsDetailedItemWidgetBase);
lblIcon->setObjectName(QString::fromUtf8("lblIcon")); lblIcon->setObjectName(QString::fromUtf8("lblIcon"));
QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0); sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0); sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(lblIcon->sizePolicy().hasHeightForWidt h()); sizePolicy.setHeightForWidth(lblIcon->sizePolicy().hasHeightForWidt h());
skipping to change at line 108 skipping to change at line 109
sizePolicy4.setHorizontalStretch(0); sizePolicy4.setHorizontalStretch(0);
sizePolicy4.setVerticalStretch(0); sizePolicy4.setVerticalStretch(0);
sizePolicy4.setHeightForWidth(lblDetail->sizePolicy().hasHeightForW idth()); sizePolicy4.setHeightForWidth(lblDetail->sizePolicy().hasHeightForW idth());
lblDetail->setSizePolicy(sizePolicy4); lblDetail->setSizePolicy(sizePolicy4);
lblDetail->setScaledContents(false); lblDetail->setScaledContents(false);
lblDetail->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop ); lblDetail->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop );
lblDetail->setWordWrap(true); lblDetail->setWordWrap(true);
gridLayout->addWidget(lblDetail, 1, 1, 1, 1); gridLayout->addWidget(lblDetail, 1, 1, 1, 1);
lblCategory = new QLabel(QgsDetailedItemWidgetBase);
lblCategory->setObjectName(QString::fromUtf8("lblCategory"));
gridLayout->addWidget(lblCategory, 2, 1, 1, 1);
retranslateUi(QgsDetailedItemWidgetBase); retranslateUi(QgsDetailedItemWidgetBase);
QMetaObject::connectSlotsByName(QgsDetailedItemWidgetBase); QMetaObject::connectSlotsByName(QgsDetailedItemWidgetBase);
} // setupUi } // setupUi
void retranslateUi(QWidget *QgsDetailedItemWidgetBase) void retranslateUi(QWidget *QgsDetailedItemWidgetBase)
{ {
QgsDetailedItemWidgetBase->setWindowTitle(QApplication::translate(" QgsDetailedItemWidgetBase", "Form", 0, QApplication::UnicodeUTF8)); QgsDetailedItemWidgetBase->setWindowTitle(QApplication::translate(" QgsDetailedItemWidgetBase", "Form", 0, QApplication::UnicodeUTF8));
lblIcon->setText(QString()); lblIcon->setText(QString());
lblTitle->setText(QApplication::translate("QgsDetailedItemWidgetBas e", "Heading Label", 0, QApplication::UnicodeUTF8)); lblTitle->setText(QApplication::translate("QgsDetailedItemWidgetBas e", "Heading Label", 0, QApplication::UnicodeUTF8));
cbx->setText(QString()); cbx->setText(QString());
lblDetail->setText(QApplication::translate("QgsDetailedItemWidgetBa se", "Detail label", 0, QApplication::UnicodeUTF8)); lblDetail->setText(QApplication::translate("QgsDetailedItemWidgetBa se", "Detail label", 0, QApplication::UnicodeUTF8));
lblCategory->setText(QApplication::translate("QgsDetailedItemWidget Base", "Category label", 0, QApplication::UnicodeUTF8));
} // retranslateUi } // retranslateUi
}; };
namespace Ui { namespace Ui {
class QgsDetailedItemWidgetBase: public Ui_QgsDetailedItemWidgetBase {} ; class QgsDetailedItemWidgetBase: public Ui_QgsDetailedItemWidgetBase {} ;
} // namespace Ui } // namespace Ui
QT_END_NAMESPACE QT_END_NAMESPACE
 End of changes. 5 change blocks. 
2 lines changed or deleted 9 lines changed or added


 ui_qgsgenericprojectionselectorbase.h   ui_qgsgenericprojectionselectorbase.h 
/************************************************************************** ****** /************************************************************************** ******
** Form generated from reading UI file 'qgsgenericprojectionselectorbase.ui ' ** Form generated from reading UI file 'qgsgenericprojectionselectorbase.ui '
** **
** Created: Wed Jun 13 13:27:01 2012 ** Created: Wed Jun 13 12:06:01 2012
** by: Qt User Interface Compiler version 4.7.4 ** by: Qt User Interface Compiler version 4.7.4
** **
** WARNING! All changes made in this file will be lost when recompiling UI file! ** WARNING! All changes made in this file will be lost when recompiling UI file!
*************************************************************************** *****/ *************************************************************************** *****/
#ifndef UI_QGSGENERICPROJECTIONSELECTORBASE_H #ifndef UI_QGSGENERICPROJECTIONSELECTORBASE_H
#define UI_QGSGENERICPROJECTIONSELECTORBASE_H #define UI_QGSGENERICPROJECTIONSELECTORBASE_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QAction> #include <QtGui/QAction>
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ui_qgsmessageviewer.h   ui_qgsmessageviewer.h 
/************************************************************************** ****** /************************************************************************** ******
** Form generated from reading UI file 'qgsmessageviewer.ui' ** Form generated from reading UI file 'qgsmessageviewer.ui'
** **
** Created: Wed Jun 13 13:26:58 2012 ** Created: Wed Jun 13 12:05:58 2012
** by: Qt User Interface Compiler version 4.7.4 ** by: Qt User Interface Compiler version 4.7.4
** **
** WARNING! All changes made in this file will be lost when recompiling UI file! ** WARNING! All changes made in this file will be lost when recompiling UI file!
*************************************************************************** *****/ *************************************************************************** *****/
#ifndef UI_QGSMESSAGEVIEWER_H #ifndef UI_QGSMESSAGEVIEWER_H
#define UI_QGSMESSAGEVIEWER_H #define UI_QGSMESSAGEVIEWER_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QAction> #include <QtGui/QAction>
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ui_qgsprojectionselectorbase.h   ui_qgsprojectionselectorbase.h 
/************************************************************************** ****** /************************************************************************** ******
** Form generated from reading UI file 'qgsprojectionselectorbase.ui' ** Form generated from reading UI file 'qgsprojectionselectorbase.ui'
** **
** Created: Wed Jun 13 13:27:00 2012 ** Created: Wed Jun 13 12:06:00 2012
** by: Qt User Interface Compiler version 4.7.4 ** by: Qt User Interface Compiler version 4.7.4
** **
** WARNING! All changes made in this file will be lost when recompiling UI file! ** WARNING! All changes made in this file will be lost when recompiling UI file!
*************************************************************************** *****/ *************************************************************************** *****/
#ifndef UI_QGSPROJECTIONSELECTORBASE_H #ifndef UI_QGSPROJECTIONSELECTORBASE_H
#define UI_QGSPROJECTIONSELECTORBASE_H #define UI_QGSPROJECTIONSELECTORBASE_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QAction> #include <QtGui/QAction>
#include <QtGui/QApplication> #include <QtGui/QApplication>
#include <QtGui/QButtonGroup> #include <QtGui/QButtonGroup>
#include <QtGui/QCheckBox> #include <QtGui/QCheckBox>
#include <QtGui/QComboBox>
#include <QtGui/QGridLayout> #include <QtGui/QGridLayout>
#include <QtGui/QGroupBox>
#include <QtGui/QHBoxLayout> #include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView> #include <QtGui/QHeaderView>
#include <QtGui/QLabel> #include <QtGui/QLabel>
#include <QtGui/QLineEdit> #include <QtGui/QLineEdit>
#include <QtGui/QPushButton>
#include <QtGui/QSpacerItem> #include <QtGui/QSpacerItem>
#include <QtGui/QSplitter>
#include <QtGui/QTextEdit> #include <QtGui/QTextEdit>
#include <QtGui/QTreeWidget> #include <QtGui/QTreeWidget>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget> #include <QtGui/QWidget>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Ui_QgsProjectionSelectorBase class Ui_QgsProjectionSelectorBase
{ {
public: public:
QGridLayout *gridLayout; QGridLayout *gridLayout_2;
QTextEdit *teProjection;
QTreeWidget *lstCoordinateSystems;
QGroupBox *groupBox;
QVBoxLayout *verticalLayout;
QHBoxLayout *horizontalLayout_2;
QLabel *label;
QComboBox *cbxAuthority;
QLabel *label_2;
QComboBox *cbxMode;
QSpacerItem *horizontalSpacer;
QCheckBox *cbxHideDeprecated;
QHBoxLayout *horizontalLayout; QHBoxLayout *horizontalLayout;
QLabel *label_5;
QLineEdit *leSearch; QLineEdit *leSearch;
QPushButton *pbnFind;
QLabel *label_3; QLabel *label_3;
QSplitter *splitter;
QTreeWidget *lstRecent; QTreeWidget *lstRecent;
QWidget *layoutWidget;
QGridLayout *gridLayout;
QHBoxLayout *horizontalLayout_3;
QLabel *label_4;
QSpacerItem *horizontalSpacer_2;
QCheckBox *cbxHideDeprecated;
QTreeWidget *lstCoordinateSystems;
QTextEdit *teProjection;
void setupUi(QWidget *QgsProjectionSelectorBase) void setupUi(QWidget *QgsProjectionSelectorBase)
{ {
if (QgsProjectionSelectorBase->objectName().isEmpty()) if (QgsProjectionSelectorBase->objectName().isEmpty())
QgsProjectionSelectorBase->setObjectName(QString::fromUtf8("Qgs ProjectionSelectorBase")); QgsProjectionSelectorBase->setObjectName(QString::fromUtf8("Qgs ProjectionSelectorBase"));
QgsProjectionSelectorBase->resize(590, 358); QgsProjectionSelectorBase->resize(574, 390);
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferr ed); QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferr ed);
sizePolicy.setHorizontalStretch(0); sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0); sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(QgsProjectionSelectorBase->sizePolicy( ).hasHeightForWidth()); sizePolicy.setHeightForWidth(QgsProjectionSelectorBase->sizePolicy( ).hasHeightForWidth());
QgsProjectionSelectorBase->setSizePolicy(sizePolicy); QgsProjectionSelectorBase->setSizePolicy(sizePolicy);
QIcon icon; QIcon icon;
icon.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon:: Off); icon.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon:: Off);
QgsProjectionSelectorBase->setWindowIcon(icon); QgsProjectionSelectorBase->setWindowIcon(icon);
gridLayout = new QGridLayout(QgsProjectionSelectorBase); gridLayout_2 = new QGridLayout(QgsProjectionSelectorBase);
gridLayout->setSpacing(6); gridLayout_2->setSpacing(6);
gridLayout->setContentsMargins(3, 3, 3, 3); gridLayout_2->setContentsMargins(11, 11, 11, 11);
gridLayout->setObjectName(QString::fromUtf8("gridLayout")); gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
gridLayout->setVerticalSpacing(3); horizontalLayout = new QHBoxLayout();
teProjection = new QTextEdit(QgsProjectionSelectorBase); horizontalLayout->setSpacing(6);
teProjection->setObjectName(QString::fromUtf8("teProjection")); horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Minimu "));
m); label_5 = new QLabel(QgsProjectionSelectorBase);
sizePolicy1.setHorizontalStretch(0); label_5->setObjectName(QString::fromUtf8("label_5"));
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(teProjection->sizePolicy().hasHeightF
orWidth());
teProjection->setSizePolicy(sizePolicy1);
teProjection->setMinimumSize(QSize(0, 30));
teProjection->setMaximumSize(QSize(16777215, 50));
teProjection->setBaseSize(QSize(0, 50));
teProjection->setAutoFormatting(QTextEdit::AutoBulletList);
teProjection->setReadOnly(true);
gridLayout->addWidget(teProjection, 1, 0, 1, 1);
lstCoordinateSystems = new QTreeWidget(QgsProjectionSelectorBase);
lstCoordinateSystems->setObjectName(QString::fromUtf8("lstCoordinat
eSystems"));
lstCoordinateSystems->setAlternatingRowColors(true);
lstCoordinateSystems->setUniformRowHeights(true);
lstCoordinateSystems->setColumnCount(3);
gridLayout->addWidget(lstCoordinateSystems, 0, 0, 1, 1);
groupBox = new QGroupBox(QgsProjectionSelectorBase); horizontalLayout->addWidget(label_5);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
QSizePolicy sizePolicy2(QSizePolicy::MinimumExpanding, QSizePolicy:
:Minimum);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(groupBox->sizePolicy().hasHeightForWi
dth());
groupBox->setSizePolicy(sizePolicy2);
verticalLayout = new QVBoxLayout(groupBox);
verticalLayout->setSpacing(6);
verticalLayout->setContentsMargins(11, 11, 11, 11);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
horizontalLayout_2 = new QHBoxLayout();
horizontalLayout_2->setSpacing(6);
horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayo
ut_2"));
label = new QLabel(groupBox);
label->setObjectName(QString::fromUtf8("label"));
horizontalLayout_2->addWidget(label); leSearch = new QLineEdit(QgsProjectionSelectorBase);
leSearch->setObjectName(QString::fromUtf8("leSearch"));
cbxAuthority = new QComboBox(groupBox); horizontalLayout->addWidget(leSearch);
cbxAuthority->setObjectName(QString::fromUtf8("cbxAuthority"));
horizontalLayout_2->addWidget(cbxAuthority); gridLayout_2->addLayout(horizontalLayout, 0, 0, 1, 1);
label_2 = new QLabel(groupBox); label_3 = new QLabel(QgsProjectionSelectorBase);
label_2->setObjectName(QString::fromUtf8("label_2")); label_3->setObjectName(QString::fromUtf8("label_3"));
QFont font;
font.setBold(true);
font.setWeight(75);
label_3->setFont(font);
horizontalLayout_2->addWidget(label_2); gridLayout_2->addWidget(label_3, 1, 0, 1, 1);
cbxMode = new QComboBox(groupBox); splitter = new QSplitter(QgsProjectionSelectorBase);
cbxMode->setObjectName(QString::fromUtf8("cbxMode")); splitter->setObjectName(QString::fromUtf8("splitter"));
splitter->setOrientation(Qt::Vertical);
splitter->setChildrenCollapsible(true);
lstRecent = new QTreeWidget(splitter);
lstRecent->setObjectName(QString::fromUtf8("lstRecent"));
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Minimu
mExpanding);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(lstRecent->sizePolicy().hasHeightForW
idth());
lstRecent->setSizePolicy(sizePolicy1);
lstRecent->setMinimumSize(QSize(0, 105));
lstRecent->setMaximumSize(QSize(16777215, 200));
lstRecent->setAlternatingRowColors(true);
lstRecent->setRootIsDecorated(false);
lstRecent->setUniformRowHeights(true);
lstRecent->setColumnCount(3);
splitter->addWidget(lstRecent);
layoutWidget = new QWidget(splitter);
layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
gridLayout = new QGridLayout(layoutWidget);
gridLayout->setSpacing(6);
gridLayout->setContentsMargins(11, 11, 11, 11);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
gridLayout->setHorizontalSpacing(0);
gridLayout->setContentsMargins(0, 0, 0, 0);
horizontalLayout_3 = new QHBoxLayout();
horizontalLayout_3->setSpacing(6);
horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayo
ut_3"));
horizontalLayout_3->setContentsMargins(-1, 0, -1, -1);
label_4 = new QLabel(layoutWidget);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setFont(font);
horizontalLayout_2->addWidget(cbxMode); horizontalLayout_3->addWidget(label_4);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding , QSizePolicy::Minimum);
horizontalLayout_2->addItem(horizontalSpacer); horizontalLayout_3->addItem(horizontalSpacer_2);
cbxHideDeprecated = new QCheckBox(groupBox); cbxHideDeprecated = new QCheckBox(layoutWidget);
cbxHideDeprecated->setObjectName(QString::fromUtf8("cbxHideDeprecat ed")); cbxHideDeprecated->setObjectName(QString::fromUtf8("cbxHideDeprecat ed"));
QFont font1;
font1.setPointSize(9);
cbxHideDeprecated->setFont(font1);
horizontalLayout_2->addWidget(cbxHideDeprecated); horizontalLayout_3->addWidget(cbxHideDeprecated);
verticalLayout->addLayout(horizontalLayout_2);
horizontalLayout = new QHBoxLayout();
horizontalLayout->setSpacing(6);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout
"));
leSearch = new QLineEdit(groupBox);
leSearch->setObjectName(QString::fromUtf8("leSearch"));
horizontalLayout->addWidget(leSearch);
pbnFind = new QPushButton(groupBox);
pbnFind->setObjectName(QString::fromUtf8("pbnFind"));
pbnFind->setMaximumSize(QSize(100, 16777215));
pbnFind->setDefault(true);
horizontalLayout->addWidget(pbnFind); gridLayout->addLayout(horizontalLayout_3, 0, 0, 1, 1);
verticalLayout->addLayout(horizontalLayout); lstCoordinateSystems = new QTreeWidget(layoutWidget);
lstCoordinateSystems->setObjectName(QString::fromUtf8("lstCoordinat
eSystems"));
lstCoordinateSystems->setAlternatingRowColors(true);
lstCoordinateSystems->setUniformRowHeights(true);
lstCoordinateSystems->setColumnCount(3);
gridLayout->addWidget(groupBox, 2, 0, 1, 1); gridLayout->addWidget(lstCoordinateSystems, 1, 0, 1, 1);
label_3 = new QLabel(QgsProjectionSelectorBase); splitter->addWidget(layoutWidget);
label_3->setObjectName(QString::fromUtf8("label_3"));
gridLayout->addWidget(label_3, 3, 0, 1, 1); gridLayout_2->addWidget(splitter, 2, 0, 1, 1);
lstRecent = new QTreeWidget(QgsProjectionSelectorBase); teProjection = new QTextEdit(QgsProjectionSelectorBase);
lstRecent->setObjectName(QString::fromUtf8("lstRecent")); teProjection->setObjectName(QString::fromUtf8("teProjection"));
QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Fixed) teProjection->setMinimumSize(QSize(0, 40));
; teProjection->setMaximumSize(QSize(16777215, 90));
sizePolicy3.setHorizontalStretch(0); teProjection->setBaseSize(QSize(0, 40));
sizePolicy3.setVerticalStretch(0); teProjection->setAutoFormatting(QTextEdit::AutoBulletList);
sizePolicy3.setHeightForWidth(lstRecent->sizePolicy().hasHeightForW teProjection->setReadOnly(true);
idth());
lstRecent->setSizePolicy(sizePolicy3);
lstRecent->setMinimumSize(QSize(0, 105));
lstRecent->setMaximumSize(QSize(16777215, 105));
lstRecent->setAlternatingRowColors(true);
lstRecent->setRootIsDecorated(false);
lstRecent->setUniformRowHeights(true);
lstRecent->setColumnCount(3);
gridLayout->addWidget(lstRecent, 4, 0, 1, 1); gridLayout_2->addWidget(teProjection, 3, 0, 1, 1);
QWidget::setTabOrder(lstCoordinateSystems, teProjection); QWidget::setTabOrder(lstCoordinateSystems, teProjection);
QWidget::setTabOrder(teProjection, cbxAuthority); QWidget::setTabOrder(teProjection, leSearch);
QWidget::setTabOrder(cbxAuthority, cbxMode);
QWidget::setTabOrder(cbxMode, cbxHideDeprecated);
QWidget::setTabOrder(cbxHideDeprecated, leSearch);
QWidget::setTabOrder(leSearch, pbnFind);
QWidget::setTabOrder(pbnFind, lstRecent);
retranslateUi(QgsProjectionSelectorBase); retranslateUi(QgsProjectionSelectorBase);
QMetaObject::connectSlotsByName(QgsProjectionSelectorBase); QMetaObject::connectSlotsByName(QgsProjectionSelectorBase);
} // setupUi } // setupUi
void retranslateUi(QWidget *QgsProjectionSelectorBase) void retranslateUi(QWidget *QgsProjectionSelectorBase)
{ {
QgsProjectionSelectorBase->setWindowTitle(QApplication::translate(" QgsProjectionSelectorBase", "Coordinate Reference System Selector", 0, QApp lication::UnicodeUTF8)); QgsProjectionSelectorBase->setWindowTitle(QApplication::translate(" QgsProjectionSelectorBase", "Coordinate Reference System Selector", 0, QApp lication::UnicodeUTF8));
QTreeWidgetItem *___qtreewidgetitem = lstCoordinateSystems->headerI label_5->setText(QApplication::translate("QgsProjectionSelectorBase
tem(); ", "Filter", 0, QApplication::UnicodeUTF8));
label_3->setText(QApplication::translate("QgsProjectionSelectorBase
", "Recently used coordinate reference systems", 0, QApplication::UnicodeUT
F8));
QTreeWidgetItem *___qtreewidgetitem = lstRecent->headerItem();
___qtreewidgetitem->setText(2, QApplication::translate("QgsProjecti onSelectorBase", "ID", 0, QApplication::UnicodeUTF8)); ___qtreewidgetitem->setText(2, QApplication::translate("QgsProjecti onSelectorBase", "ID", 0, QApplication::UnicodeUTF8));
___qtreewidgetitem->setText(1, QApplication::translate("QgsProjecti onSelectorBase", "Authority ID", 0, QApplication::UnicodeUTF8)); ___qtreewidgetitem->setText(1, QApplication::translate("QgsProjecti onSelectorBase", "Authority ID", 0, QApplication::UnicodeUTF8));
___qtreewidgetitem->setText(0, QApplication::translate("QgsProjecti onSelectorBase", "Coordinate Reference System", 0, QApplication::UnicodeUTF 8)); ___qtreewidgetitem->setText(0, QApplication::translate("QgsProjecti onSelectorBase", "Coordinate Reference System", 0, QApplication::UnicodeUTF 8));
groupBox->setTitle(QApplication::translate("QgsProjectionSelectorBa label_4->setText(QApplication::translate("QgsProjectionSelectorBase
se", "Search", 0, QApplication::UnicodeUTF8)); ", "Coordinate reference systems of the world", 0, QApplication::UnicodeUTF
label->setText(QApplication::translate("QgsProjectionSelectorBase", 8));
"Authority", 0, QApplication::UnicodeUTF8));
label_2->setText(QApplication::translate("QgsProjectionSelectorBase
", "Search for", 0, QApplication::UnicodeUTF8));
cbxMode->clear();
cbxMode->insertItems(0, QStringList()
<< QApplication::translate("QgsProjectionSelectorBase", "ID", 0, Q
Application::UnicodeUTF8)
<< QApplication::translate("QgsProjectionSelectorBase", "Name", 0,
QApplication::UnicodeUTF8)
);
cbxHideDeprecated->setText(QApplication::translate("QgsProjectionSe lectorBase", "Hide deprecated CRSs", 0, QApplication::UnicodeUTF8)); cbxHideDeprecated->setText(QApplication::translate("QgsProjectionSe lectorBase", "Hide deprecated CRSs", 0, QApplication::UnicodeUTF8));
pbnFind->setText(QApplication::translate("QgsProjectionSelectorBase QTreeWidgetItem *___qtreewidgetitem1 = lstCoordinateSystems->header
", "Find", 0, QApplication::UnicodeUTF8)); Item();
label_3->setText(QApplication::translate("QgsProjectionSelectorBase
", "Recently used coordinate references systems", 0, QApplication::UnicodeU
TF8));
QTreeWidgetItem *___qtreewidgetitem1 = lstRecent->headerItem();
___qtreewidgetitem1->setText(2, QApplication::translate("QgsProject ionSelectorBase", "ID", 0, QApplication::UnicodeUTF8)); ___qtreewidgetitem1->setText(2, QApplication::translate("QgsProject ionSelectorBase", "ID", 0, QApplication::UnicodeUTF8));
___qtreewidgetitem1->setText(1, QApplication::translate("QgsProject ionSelectorBase", "Authority ID", 0, QApplication::UnicodeUTF8)); ___qtreewidgetitem1->setText(1, QApplication::translate("QgsProject ionSelectorBase", "Authority ID", 0, QApplication::UnicodeUTF8));
___qtreewidgetitem1->setText(0, QApplication::translate("QgsProject ionSelectorBase", "Coordinate Reference System", 0, QApplication::UnicodeUT F8)); ___qtreewidgetitem1->setText(0, QApplication::translate("QgsProject ionSelectorBase", "Coordinate Reference System", 0, QApplication::UnicodeUT F8));
} // retranslateUi } // retranslateUi
}; };
namespace Ui { namespace Ui {
class QgsProjectionSelectorBase: public Ui_QgsProjectionSelectorBase {} ; class QgsProjectionSelectorBase: public Ui_QgsProjectionSelectorBase {} ;
} // namespace Ui } // namespace Ui
 End of changes. 37 change blocks. 
147 lines changed or deleted 110 lines changed or added


 ui_qgsquerybuilderbase.h   ui_qgsquerybuilderbase.h 
/* /*
Query builder for vector layers Query builder for vector layers
*/ */
/************************************************************************** ****** /************************************************************************** ******
** Form generated from reading UI file 'qgsquerybuilderbase.ui' ** Form generated from reading UI file 'qgsquerybuilderbase.ui'
** **
** Created: Wed Jun 13 13:26:59 2012 ** Created: Wed Jun 13 12:05:59 2012
** by: Qt User Interface Compiler version 4.7.4 ** by: Qt User Interface Compiler version 4.7.4
** **
** WARNING! All changes made in this file will be lost when recompiling UI file! ** WARNING! All changes made in this file will be lost when recompiling UI file!
*************************************************************************** *****/ *************************************************************************** *****/
#ifndef UI_QGSQUERYBUILDERBASE_H #ifndef UI_QGSQUERYBUILDERBASE_H
#define UI_QGSQUERYBUILDERBASE_H #define UI_QGSQUERYBUILDERBASE_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QAction> #include <QtGui/QAction>
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/