Line3D.h   Line3D.h 
skipping to change at line 27 skipping to change at line 27
#ifndef LINE3D_H #ifndef LINE3D_H
#define LINE3D_H #define LINE3D_H
#include "Point3D.h" #include "Point3D.h"
#include "Node.h" #include "Node.h"
/**This class represents a line. It is implemented as a single directed lin ked list of nodes (with related Point3D objects). Attention: the points ins erted in a line are not deleted from Line3D*/ /**This class represents a line. It is implemented as a single directed lin ked list of nodes (with related Point3D objects). Attention: the points ins erted in a line are not deleted from Line3D*/
class ANALYSIS_EXPORT Line3D class ANALYSIS_EXPORT Line3D
{ {
private: private:
/**copy constructor, declared privat to not use it*/ /** copy constructor, declared private to not use it*/
Line3D( const Line3D& ); Line3D( const Line3D& );
/**assignment operator, declared privat to not use it*/ /** assignment operator, declared private to not use it*/
Line3D& operator=( const Line3D& ); Line3D& operator=( const Line3D& );
protected: protected:
Node* head; Node* head;
Node* z; Node* z;
Node* currentNode; Node* currentNode;
unsigned int size; unsigned int size;
unsigned int current; unsigned int current;
public: public:
Line3D(); Line3D();
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgis.h   qgis.h 
skipping to change at line 266 skipping to change at line 266
{ {
// 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
ProviderCountCalcEvent ProviderCountCalcEvent
}; };
/** Old search radius in % of canvas width
* @deprecated since 2.3, use DEFAULT_SEARCH_RADIUS_MM */
static const double DEFAULT_IDENTIFY_RADIUS; static const double DEFAULT_IDENTIFY_RADIUS;
/** Identify search radius in mm
* @note added in 2.3 */
static const double DEFAULT_SEARCH_RADIUS_MM;
//! Default threshold between map coordinates and device coordinates fo r map2pixel simplification //! Default threshold between map coordinates and device coordinates fo r map2pixel simplification
static const float DEFAULT_MAPTOPIXEL_THRESHOLD; static const float DEFAULT_MAPTOPIXEL_THRESHOLD;
/** Default highlight color. The transparency is expected to only be a
pplied to polygon
* fill. Lines and outlines are rendered opaque.
* @note added in 2.3 */
static const QColor DEFAULT_HIGHLIGHT_COLOR;
/** Default highlight buffer in mm.
* @note added in 2.3 */
static double DEFAULT_HIGHLIGHT_BUFFER_MM;
/** Default highlight line/outline minimum width in mm.
* @note added in 2.3 */
static double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM;
private: private:
// String representation of unit types (set in qgis.cpp) // String representation of unit types (set in qgis.cpp)
static const char *qgisUnitTypes[]; static const char *qgisUnitTypes[];
}; };
// hack to workaround warnings when casting void pointers // hack to workaround warnings when casting void pointers
// retrieved from QLibrary::resolve to function pointers. // retrieved from QLibrary::resolve to function pointers.
// It's assumed that this works on all systems supporting // It's assumed that this works on all systems supporting
// QLibrary // QLibrary
skipping to change at line 406 skipping to change at line 425
typedef QMap<QString, QString> QgsStringMap; typedef QMap<QString, QString> QgsStringMap;
/** qgssize is used instead of size_t, because size_t is stdlib type, unkno wn /** qgssize is used instead of size_t, because size_t is stdlib type, unkno wn
* by SIP, and it would be hard to define size_t correctly in SIP. * by SIP, and it would be hard to define size_t correctly in SIP.
* Currently used "unsigned long long" was introduced in C++11 (2011) * Currently used "unsigned long long" was introduced in C++11 (2011)
* but it was supported already before C++11 on common platforms. * but it was supported already before C++11 on common platforms.
* "unsigned long long int" gives syntax error in SIP. * "unsigned long long int" gives syntax error in SIP.
* KEEP IN SYNC WITH qgssize defined in SIP! */ * KEEP IN SYNC WITH qgssize defined in SIP! */
typedef unsigned long long qgssize; typedef unsigned long long qgssize;
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__c
lang__)
#define Q_NOWARN_DEPRECATED_PUSH \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
#define Q_NOWARN_DEPRECATED_POP \
_Pragma("GCC diagnostic pop")
#elif defined(_MSC_VER)
#define Q_NOWARN_DEPRECATED_PUSH \
__pragma(warning(push)) \
__pragma(warning(disable:4996))
#define Q_NOWARN_DEPRECATED_POP \
__pragma(warning(pop))
#else
#define Q_NOWARN_DEPRECATED_PUSH
#define Q_NOWARN_DEPRECATED_POP
#endif
// 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. 4 change blocks. 
0 lines changed or deleted 38 lines changed or added


 qgisgui.h   qgisgui.h 
skipping to change at line 47 skipping to change at line 47
* dialogs and all modal dialogs will look distinct from modeless dialogs . * dialogs and all modal dialogs will look distinct from modeless dialogs .
* Althought not the standard Mac modal look, it does lack the minimize * Althought not the standard Mac modal look, it does lack the minimize
* control which makes sense only for modeless dislogs. * control which makes sense only for modeless dislogs.
* *
* The Qt3 method of creating a true Mac modal dialog is deprecated in Qt 4 * The Qt3 method of creating a true Mac modal dialog is deprecated in Qt 4
* and should not be used due to conflicts with QMessageBox style dialogs . * and should not be used due to conflicts with QMessageBox style dialogs .
* *
* Qt::WindowMaximizeButtonHint is included but will be ignored if * Qt::WindowMaximizeButtonHint is included but will be ignored if
* the dialog is a fixed size and does not have a size grip. * the dialog is a fixed size and does not have a size grip.
*/ */
static const Qt::WFlags ModalDialogFlags = 0; static const Qt::WindowFlags ModalDialogFlags = 0;
/** /**
Open files, preferring to have the default file selector be the Open files, preferring to have the default file selector be the
last one used, if any; also, prefer to start in the last directory last one used, if any; also, prefer to start in the last directory
associated with filterName. associated with filterName.
@param filterName the name of the filter; used for persistent store key @param filterName the name of the filter; used for persistent store key
@param filters the file filters used for QFileDialog @param filters the file filters used for QFileDialog
@param selectedFiles string list of selected files; will be empty if no ne selected @param selectedFiles string list of selected files; will be empty if no ne selected
@param enc encoding? @param enc encoding?
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgisinterface.h   qgisinterface.h 
skipping to change at line 29 skipping to change at line 29
#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;
class QgsComposerView; class QgsComposerView;
class QgsMapLayer; class QgsFeature;
class QgsLayerTreeView;
class QgsLegendInterface;
class QgsMapCanvas; class QgsMapCanvas;
class QgsMapLayer;
class QgsMessageBar;
class QgsPluginManagerInterface;
class QgsRasterLayer; class QgsRasterLayer;
class QgsVectorLayer; class QgsVectorLayer;
class QgsLegendInterface;
class QgsPluginManagerInterface;
class QgsFeature;
class QgsMessageBar;
class QgsVectorLayerTools; class QgsVectorLayerTools;
#include <QObject> #include <QObject>
#include <QFont> #include <QFont>
#include <QPair> #include <QPair>
#include <map> #include <map>
#include <qgis.h> #include <qgis.h>
#ifdef _MSC_VER
# pragma warning( push )
# pragma warning( disable: 4996 ) // was declared deprecated
#endif
/** \ingroup gui /** \ingroup gui
* QgisInterface * QgisInterface
* Abstract base class defining interfaces exposed by QgisApp and * Abstract base class defining interfaces exposed by QgisApp and
* made available to plugins. * made available to plugins.
* *
* Only functionality exposed by QgisInterface can be used in plugins. * Only functionality exposed by QgisInterface can be used in plugins.
* This interface has to be implemented with application specific details. * This interface has to be implemented with application specific details.
* *
* QGIS implements it in QgisAppInterface class, 3rd party applications * QGIS implements it in QgisAppInterface class, 3rd party applications
* could provide their own implementation to be able to use plugins. * could provide their own implementation to be able to use plugins.
skipping to change at line 82 skipping to change at line 78
/** Virtual destructor */ /** Virtual destructor */
virtual ~QgisInterface(); virtual ~QgisInterface();
/** Get pointer to legend interface /** Get pointer to legend interface
\note added in 1.4 \note added in 1.4
*/ */
virtual QgsLegendInterface* legendInterface() = 0; virtual QgsLegendInterface* legendInterface() = 0;
virtual QgsPluginManagerInterface* pluginManagerInterface() = 0; virtual QgsPluginManagerInterface* pluginManagerInterface() = 0;
virtual QgsLayerTreeView* layerTreeView() = 0;
public slots: // TODO: do these functions really need to be slots? public slots: // TODO: do these functions really need to be slots?
/* Exposed functions */ /* Exposed functions */
//! Zoom to full extent of map layers //! Zoom to full extent of map layers
virtual void zoomFull() = 0; virtual void zoomFull() = 0;
//! Zoom to previous view extent //! Zoom to previous view extent
virtual void zoomToPrevious() = 0; virtual void zoomToPrevious() = 0;
skipping to change at line 212 skipping to change at line 210
*/ */
virtual QAction* addWebToolBarWidget( QWidget* widget ) = 0; virtual QAction* addWebToolBarWidget( QWidget* widget ) = 0;
//! Remove an action (icon) from the Web toolbar //! Remove an action (icon) from the Web toolbar
//! @note added in 2.0 //! @note added in 2.0
virtual void removeWebToolBarIcon( QAction *qAction ) = 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;
//! Add a toolbar
//! @note added in 2.3
virtual void addToolBar( QToolBar* toolbar, Qt::ToolBarArea area = Qt::
TopToolBarArea ) = 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 the message bar of the main app */ /** Return the message bar of the main app */
virtual QgsMessageBar * messageBar() = 0; virtual QgsMessageBar * messageBar() = 0;
/** Return mainwindows / composer views of running composer instances ( currently only one) */ /** Return mainwindows / composer views of running composer instances ( currently only one) */
skipping to change at line 532 skipping to change at line 534
virtual QAction *actionSaveAllEdits() = 0; virtual QAction *actionSaveAllEdits() = 0;
/** @note added in 1.9 */ /** @note added in 1.9 */
virtual QAction *actionRollbackEdits() = 0; virtual QAction *actionRollbackEdits() = 0;
/** @note added in 1.9 */ /** @note added in 1.9 */
virtual QAction *actionRollbackAllEdits() = 0; virtual QAction *actionRollbackAllEdits() = 0;
/** @note added in 1.9 */ /** @note added in 1.9 */
virtual QAction *actionCancelEdits() = 0; virtual QAction *actionCancelEdits() = 0;
/** @note added in 1.9 */ /** @note added in 1.9 */
virtual QAction *actionCancelAllEdits() = 0; virtual QAction *actionCancelAllEdits() = 0;
virtual QAction *actionLayerSaveAs() = 0; virtual QAction *actionLayerSaveAs() = 0;
/** @note deprecated in 2.4 - returns null pointer */
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
virtual QAction *actionLayerSelectionSaveAs() = 0; virtual QAction *actionLayerSelectionSaveAs() = 0;
virtual QAction *actionRemoveLayer() = 0; virtual QAction *actionRemoveLayer() = 0;
/** @note added in 1.9 */ /** @note added in 1.9 */
virtual QAction *actionDuplicateLayer() = 0; virtual QAction *actionDuplicateLayer() = 0;
virtual QAction *actionLayerProperties() = 0; virtual QAction *actionLayerProperties() = 0;
virtual QAction *actionAddToOverview() = 0; virtual QAction *actionAddToOverview() = 0;
virtual QAction *actionAddAllToOverview() = 0; virtual QAction *actionAddAllToOverview() = 0;
virtual QAction *actionRemoveAllFromOverview() = 0; virtual QAction *actionRemoveAllFromOverview() = 0;
virtual QAction *actionHideAllLayers() = 0; virtual QAction *actionHideAllLayers() = 0;
virtual QAction *actionShowAllLayers() = 0; virtual QAction *actionShowAllLayers() = 0;
skipping to change at line 626 skipping to change at line 632
that they're in a new project. Yes, projectRead() could have been that they're in a new project. Yes, projectRead() could have been
overloaded to be used in the case of new projects instead. However , overloaded to be used in the case of new projects instead. However ,
it's probably more semantically correct to have an entirely separat e it's probably more semantically correct to have an entirely separat e
signal for when this happens. signal for when this happens.
Added in 1.6 Added in 1.6
*/ */
void newProjectCreated(); void newProjectCreated();
}; };
#ifdef _MSC_VER
# pragma warning( pop )
# pragma warning( disable: 4190 )
#endif
// FIXME: also in core/qgis.h // FIXME: also in core/qgis.h
#ifndef QGISEXTERN #ifndef QGISEXTERN
#ifdef WIN32 #ifdef WIN32
# define QGISEXTERN extern "C" __declspec( dllexport ) # define QGISEXTERN extern "C" __declspec( dllexport )
#else #else
# define QGISEXTERN extern "C" # define QGISEXTERN extern "C"
#endif #endif
#endif #endif
#endif //#ifndef QGISINTERFACE_H #endif //#ifndef QGISINTERFACE_H
 End of changes. 8 change blocks. 
15 lines changed or deleted 17 lines changed or added


 qgsapplication.h   qgsapplication.h 
skipping to change at line 38 skipping to change at line 38
*/ */
#ifdef ANDROID #ifdef ANDROID
typedef void XEvent; typedef void XEvent;
#endif #endif
class CORE_EXPORT QgsApplication : public QApplication class CORE_EXPORT QgsApplication : public QApplication
{ {
Q_OBJECT Q_OBJECT
public: public:
static const char* QGIS_ORGANIZATION_NAME;
static const char* QGIS_ORGANIZATION_DOMAIN;
static const char* QGIS_APPLICATION_NAME;
//! @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 /** 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. when your app does not extend the QApplication class.
@note you will probably want to call initQgis too to load the provi ders in @note you will probably want to call initQgis too to load the provi ders in
the above case. the above case.
*/ */
static void init( QString customConfigPath = QString() ); static void init( QString customConfigPath = QString() );
skipping to change at line 273 skipping to change at line 276
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it . The * and then calls GDALDriverManager::AutoSkipDrivers() to unregister it . The
* driver name should be the short format of the Gdal driver name e.g. GTIFF. * driver name should be the short format of the Gdal driver name e.g. GTIFF.
* @note added in 2.0 * @note added in 2.0
*/ */
static void restoreGdalDriver( QString theDriver ); static void restoreGdalDriver( QString theDriver );
/** Returns the list of gdal drivers that should be skipped (based on /** Returns the list of gdal drivers that should be skipped (based on
* GDAL_SKIP environment variable) * GDAL_SKIP environment variable)
* @note added in 2.0 * @note added in 2.0
*/ */
static QStringList skippedGdalDrivers( ) { return ABISYM( mGdalSkipList ); } static QStringList skippedGdalDrivers() { return ABISYM( mGdalSkipList ); }
/** Apply the skipped drivers list to gdal /** Apply the skipped drivers list to gdal
* @see skipGdalDriver * @see skipGdalDriver
* @see restoreGdalDriver * @see restoreGdalDriver
* @see skippedGdalDrivers * @see skippedGdalDrivers
* @note added in 2.0 */ * @note added in 2.0 */
static void applyGdalSkippedDrivers(); static void applyGdalSkippedDrivers();
/** Get maximum concurrent thread count
* @note added in 2.4 */
static int maxThreads() { return ABISYM( mMaxThreads ); }
/** Set maximum concurrent thread count
* @note must be between 1 and \#cores, -1 means use all available core
s
* @note added in 2.4 */
static void setMaxThreads( int maxThreads );
#ifdef ANDROID #ifdef ANDROID
//dummy method to workaround sip generation issue issue //dummy method to workaround sip generation issue issue
bool x11EventFilter( XEvent * event ) bool x11EventFilter( XEvent * event )
{ {
return 0; return 0;
} }
#endif #endif
signals: signals:
//! @note not available in python bindings //! @note not available in python bindings
skipping to change at line 323 skipping to change at line 334
#ifdef _MSC_VER #ifdef _MSC_VER
/** configuration internal dir */ /** configuration internal dir */
static QString ABISYM( mCfgIntDir ); static QString ABISYM( mCfgIntDir );
#endif #endif
/** path to the output directory of the build. valid only when running from build directory */ /** path to the output directory of the build. valid only when running from build directory */
static QString ABISYM( mBuildOutputPath ); static QString ABISYM( mBuildOutputPath );
/** List of gdal drivers to be skipped. Uses GDAL_SKIP to exclude them. /** List of gdal drivers to be skipped. Uses GDAL_SKIP to exclude them.
* @see skipGdalDriver, restoreGdalDriver * @see skipGdalDriver, restoreGdalDriver
* @note added in 2.0 */ * @note added in 2.0 */
static QStringList ABISYM( mGdalSkipList ); static QStringList ABISYM( mGdalSkipList );
/**
* @note added in 2.4 */
static int ABISYM( mMaxThreads );
}; };
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 16 lines changed or added


 qgsatlascomposition.h   qgsatlascomposition.h 
skipping to change at line 36 skipping to change at line 36
class QgsComposerMap; class QgsComposerMap;
class QgsComposition; class QgsComposition;
class QgsVectorLayer; class QgsVectorLayer;
class QgsExpression; class QgsExpression;
/** \ingroup MapComposer /** \ingroup MapComposer
* Class used to render an Atlas, iterating over geometry features. * Class used to render an Atlas, iterating over geometry features.
* prepareForFeature() modifies the atlas map's extent to zoom on the given feature. * prepareForFeature() modifies the atlas map's extent to zoom on the given feature.
* This class is used for printing, exporting to PDF and images. * This class is used for printing, exporting to PDF and images.
* */ * @note This class should not be created directly. For the atlas to functi
on correctly
* the atlasComposition() property for QgsComposition should be used to ret
rieve a
* QgsAtlasComposition which is automatically created and attached to the c
omposition.
*/
class CORE_EXPORT QgsAtlasComposition : public QObject class CORE_EXPORT QgsAtlasComposition : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsAtlasComposition( QgsComposition* composition ); QgsAtlasComposition( QgsComposition* composition );
~QgsAtlasComposition(); ~QgsAtlasComposition();
/** Is the atlas generation enabled ? */ /**Returns whether the atlas generation is enabled
* @returns true if atlas is enabled
* @see setEnabled
*/
bool enabled() const { return mEnabled; } bool enabled() const { return mEnabled; }
void setEnabled( bool e );
/**Sets whether the atlas is enabled
* @param enabled set to true to enable to atlas
* @see enabled
*/
void setEnabled( bool enabled );
/**Returns the map used by the atlas /**Returns the map used by the atlas
* @deprecated Use QgsComposerMap::atlasDriven() instead * @deprecated Use QgsComposerMap::atlasDriven() instead
*/ */
QgsComposerMap* composerMap() const; Q_DECL_DEPRECATED QgsComposerMap* composerMap() const;
/**Sets the map used by the atlas /**Sets the map used by the atlas
* @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead * @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead
*/ */
void setComposerMap( QgsComposerMap* map ); Q_DECL_DEPRECATED void setComposerMap( QgsComposerMap* map );
/**Returns true if the atlas is set to hide the coverage layer
* @returns true if coverage layer is hidden
* @see setHideCoverage
*/
bool hideCoverage() const { return mHideCoverage; } bool hideCoverage() const { return mHideCoverage; }
/**Sets whether the coverage layer should be hidden in map items in the
composition
* @param hide set to true to hide the coverage layer
* @see hideCoverage
*/
void setHideCoverage( bool hide ); void setHideCoverage( bool hide );
/**Returns whether the atlas map uses a fixed scale /**Returns whether the atlas map uses a fixed scale
* @deprecated Use QgsComposerMap::atlasFixedScale() instead * @deprecated since 2.4 Use QgsComposerMap::atlasScalingMode() instead
*/ */
bool fixedScale() const; Q_DECL_DEPRECATED bool fixedScale() const;
/**Sets whether the atlas map should use a fixed scale /**Sets whether the atlas map should use a fixed scale
* @deprecated Use QgsComposerMap::setAtlasFixedScale( bool ) instead * @deprecated since 2.4 Use QgsComposerMap::setAtlasScalingMode() inst ead
*/ */
void setFixedScale( bool fixed ); Q_DECL_DEPRECATED void setFixedScale( bool fixed );
/**Returns the margin for the atlas map /**Returns the margin for the atlas map
* @deprecated Use QgsComposerMap::atlasMargin() instead * @deprecated Use QgsComposerMap::atlasMargin() instead
*/ */
float margin() const; Q_DECL_DEPRECATED float margin() const;
/**Sets the margin for the atlas map /**Sets the margin for the atlas map
* @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead * @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead
*/ */
void setMargin( float margin ); Q_DECL_DEPRECATED void setMargin( float margin );
/**Returns the filename expression used for generating output filenames
for each
* atlas page.
* @returns filename pattern
* @see setFilenamePattern
* @see filenamePatternErrorString
* @note This property has no effect when exporting to PDF if singleFil
e() is true
*/
QString filenamePattern() const { return mFilenamePattern; } QString filenamePattern() const { return mFilenamePattern; }
void setFilenamePattern( const QString& pattern );
/**Sets the filename expression used for generating output filenames fo
r each
* atlas page.
* @returns true if filename expression could be successful set, false
if expression is invalid
* @param pattern expression to use for output filenames
* @see filenamePattern
* @see filenamePatternErrorString
* @note This method has no effect when exporting to PDF if singleFile(
) is true
*/
bool setFilenamePattern( const QString& pattern );
/**Returns an error string from parsing the filename expression.
* @returns filename pattern parser error
* @see setFilenamePattern
* @see filenamePattern
*/
QString filenamePatternErrorString() const { return mFilenameParserErro
r; }
/**Returns the coverage layer used for the atlas features
* @returns atlas coverage layer
* @see setCoverageLayer
*/
QgsVectorLayer* coverageLayer() const { return mCoverageLayer; } QgsVectorLayer* coverageLayer() const { return mCoverageLayer; }
void setCoverageLayer( QgsVectorLayer* lmap );
/**Sets the coverage layer to use for the atlas features
* @param layer vector coverage layer
* @see coverageLayer
*/
void setCoverageLayer( QgsVectorLayer* layer );
/**Returns whether the atlas will be exported to a single file. This is
only
* applicable for PDF exports.
* @returns true if atlas will be exported to a single file
* @see setSingleFile
* @note This property is only used for PDF exports.
*/
bool singleFile() const { return mSingleFile; } bool singleFile() const { return mSingleFile; }
/**Sets whether the atlas should be exported to a single file. This is
only
* applicable for PDF exports.
* @param single set to true to export atlas to a single file.
* @see singleFile
* @note This method is only used for PDF exports.
*/
void setSingleFile( bool single ) { mSingleFile = single; } void setSingleFile( bool single ) { mSingleFile = single; }
bool sortFeatures() const { return mSortFeatures; } bool sortFeatures() const { return mSortFeatures; }
void setSortFeatures( bool doSort ) { mSortFeatures = doSort; } void setSortFeatures( bool doSort ) { mSortFeatures = doSort; }
bool sortAscending() const { return mSortAscending; } bool sortAscending() const { return mSortAscending; }
void setSortAscending( bool ascending ) { mSortAscending = ascending; } void setSortAscending( bool ascending ) { mSortAscending = ascending; }
bool filterFeatures() const { return mFilterFeatures; } bool filterFeatures() const { return mFilterFeatures; }
void setFilterFeatures( bool doFilter ) { mFilterFeatures = doFilter; } void setFilterFeatures( bool doFilter ) { mFilterFeatures = doFilter; }
QString featureFilter() const { return mFeatureFilter; } QString featureFilter() const { return mFeatureFilter; }
void setFeatureFilter( const QString& expression ) { mFeatureFilter = e xpression; } void setFeatureFilter( const QString& expression ) { mFeatureFilter = e xpression; }
int sortKeyAttributeIndex() const { return mSortKeyAttributeIdx; } /**Returns an error string from parsing the feature filter expression.
void setSortKeyAttributeIndex( int idx ) { mSortKeyAttributeIdx = idx; * @returns filename pattern parser error
} * @see setFilenamePattern
* @see filenamePattern
*/
QString featureFilterErrorString() const { return mFilterParserError; }
QString sortKeyAttributeName() const { return mSortKeyAttributeName; }
void setSortKeyAttributeName( QString fieldName ) { mSortKeyAttributeNa
me = fieldName; }
Q_DECL_DEPRECATED int sortKeyAttributeIndex() const;
Q_DECL_DEPRECATED void setSortKeyAttributeIndex( int idx );
/**Returns the current list of predefined scales for the atlas. This is
used
* for maps which are set to the predefined atlas scaling mode.
* @returns a vector of doubles representing predefined scales
* @see setPredefinedScales
* @see QgsComposerMap::atlasScalingMode
*/
const QVector<double>& predefinedScales() const { return mPredefinedSca
les; }
/**Sets the list of predefined scales for the atlas. This is used
* for maps which are set to the predefined atlas scaling mode.
* @param scales a vector of doubles representing predefined scales
* @see predefinedScales
* @see QgsComposerMap::atlasScalingMode
*/
void setPredefinedScales( const QVector<double>& scales );
/** Begins the rendering. Returns true if successful, false if no match ing atlas /** Begins the rendering. Returns true if successful, false if no match ing atlas
features found.*/ features found.*/
bool beginRender(); bool beginRender();
/** Ends the rendering. Restores original extent */ /** Ends the rendering. Restores original extent */
void endRender(); void endRender();
/** Returns the number of features in the coverage layer */ /** Returns the number of features in the coverage layer */
int numFeatures() const; int numFeatures() const;
/** Prepare the atlas map for the given feature. Sets the extent and co /**Prepare the atlas map for the given feature. Sets the extent and con
ntext variables */ text variables
void prepareForFeature( int i ); * @returns true if feature was successfully prepared
*/
/** Prepare the atlas map for the given feature. Sets the extent and co bool prepareForFeature( int i );
ntext variables */
void prepareForFeature( QgsFeature * feat ); /**Prepare the atlas map for the given feature. Sets the extent and con
text variables
* @returns true if feature was successfully prepared
*/
bool prepareForFeature( QgsFeature * feat );
/** Returns the current filename. Must be called after prepareForFeatur e( i ) */ /** Returns the current filename. Must be called after prepareForFeatur e( i ) */
const QString& currentFilename() const; const QString& currentFilename() const;
void writeXML( QDomElement& elem, QDomDocument& doc ) const; void writeXML( QDomElement& elem, QDomDocument& doc ) const;
void readXML( const QDomElement& elem, const QDomDocument& doc ); void readXML( const QDomElement& elem, const QDomDocument& doc );
QgsComposition* composition() { return mComposition; } QgsComposition* composition() { return mComposition; }
/** Requeries the current atlas coverage layer and applies filtering an d sorting. Returns /** Requeries the current atlas coverage layer and applies filtering an d sorting. Returns
skipping to change at line 153 skipping to change at line 251
/** emitted when atlas is enabled or disabled */ /** emitted when atlas is enabled or disabled */
void toggled( bool ); void toggled( bool );
/**Is emitted when the atlas has an updated status bar message for the composer window*/ /**Is emitted when the atlas has an updated status bar message for the composer window*/
void statusMsgChanged( QString message ); void statusMsgChanged( QString message );
/**Is emitted when the coverage layer for an atlas changes*/ /**Is emitted when the coverage layer for an atlas changes*/
void coverageLayerChanged( QgsVectorLayer* layer ); void coverageLayerChanged( QgsVectorLayer* layer );
/**Is emitted when atlas rendering has begun*/
void renderBegun();
/**Is emitted when atlas rendering has ended*/
void renderEnded();
/**Is emitted when the current atlas feature changes*/
void featureChanged( QgsFeature* feature );
private: private:
/**Updates the filename expression*/ /**Updates the filename expression.
void updateFilenameExpression(); * @returns true if expression was successfully parsed, false if expres
sion is invalid
*/
bool updateFilenameExpression();
/**Evaluates filename for current feature*/ /**Evaluates filename for current feature
void evalFeatureFilename(); * @returns true if feature filename was successfully evaluated
*/
bool evalFeatureFilename();
QgsComposition* mComposition; QgsComposition* mComposition;
bool mEnabled; bool mEnabled;
bool mHideCoverage; bool mHideCoverage;
QString mFilenamePattern; QString mFilenamePattern;
QgsVectorLayer* mCoverageLayer; QgsVectorLayer* mCoverageLayer;
bool mSingleFile; bool mSingleFile;
QgsCoordinateTransform mTransform; QgsCoordinateTransform mTransform;
skipping to change at line 185 skipping to change at line 296
// current atlas feature number // current atlas feature number
int mCurrentFeatureNo; int mCurrentFeatureNo;
public: public:
typedef QMap< QgsFeatureId, QVariant > SorterKeys; typedef QMap< QgsFeatureId, QVariant > SorterKeys;
private: private:
// value of field that is used for ordering of features // value of field that is used for ordering of features
SorterKeys mFeatureKeys; SorterKeys mFeatureKeys;
// key (attribute index) used for ordering // key (attribute index) used for ordering
int mSortKeyAttributeIdx; QString mSortKeyAttributeName;
// feature filtering // feature filtering
bool mFilterFeatures; bool mFilterFeatures;
// feature expression filter // feature expression filter
QString mFeatureFilter; QString mFeatureFilter;
// id of each iterated feature (after filtering and sorting) // id of each iterated feature (after filtering and sorting)
QVector<QgsFeatureId> mFeatureIds; QVector<QgsFeatureId> mFeatureIds;
QgsFeature mCurrentFeature; QgsFeature mCurrentFeature;
std::auto_ptr<QgsExpression> mFilenameExpr; std::auto_ptr<QgsExpression> mFilenameExpr;
// bounding box of the current feature transformed into map crs // bounding box of the current feature transformed into map crs
QgsRectangle mTransformedFeatureBounds; QgsRectangle mTransformedFeatureBounds;
QString mFilenameParserError;
QString mFilterParserError;
//forces all atlas enabled maps to redraw //forces all atlas enabled maps to redraw
void updateAtlasMaps(); void updateAtlasMaps();
//computes the extent of the current feature, in the crs of the specifi ed map //computes the extent of the current feature, in the crs of the specifi ed map
void computeExtent( QgsComposerMap *map ); void computeExtent( QgsComposerMap *map );
//list of predefined scales
QVector<double> mPredefinedScales;
}; };
#endif #endif
 End of changes. 27 change blocks. 
28 lines changed or deleted 160 lines changed or added


 qgsattributedialog.h   qgsattributedialog.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 QGSATTRIBUTEDIALOG_H #ifndef QGSATTRIBUTEDIALOG_H
#define QGSATTRIBUTEDIALOG_H #define QGSATTRIBUTEDIALOG_H
#include "qgsfeature.h" #include "qgsfeature.h"
#include "qgsattributeeditorcontext.h" #include "qgsattributeeditorcontext.h"
#include "qgsattributeform.h"
#include <QDialog>
#include <QPointer>
class QDialog;
class QLayout; class QLayout;
class QgsDistanceArea; class QgsDistanceArea;
class QgsFeature; class QgsFeature;
class QgsField; class QgsField;
class QgsHighlight; class QgsHighlight;
class QgsVectorLayer; class QgsVectorLayer;
class QgsVectorLayerTools; class QgsVectorLayerTools;
class GUI_EXPORT QgsAttributeDialog : public QObject class GUI_EXPORT QgsAttributeDialog : public QObject
skipping to change at line 77 skipping to change at line 80
/** Saves the size and position for the next time /** Saves the size and position for the next time
* this dialog box will be used. * this dialog box will be used.
*/ */
void saveGeometry(); void saveGeometry();
/** Restores the size and position from the last time /** Restores the size and position from the last time
* this dialog box was used. * this dialog box was used.
*/ */
void restoreGeometry(); void restoreGeometry();
/**
* @brief setHighlight
* @param h The highlight. Ownership is taken.
*/
void setHighlight( QgsHighlight *h ); void setHighlight( QgsHighlight *h );
QDialog *dialog() { return mDialog; } QDialog *dialog() { return mDialog; }
QgsFeature* feature() { return mFeature; } QgsAttributeForm* attributeForm() { return mAttributeForm; }
const QgsFeature* feature() { return &mAttributeForm->feature(); }
/** /**
* Is this dialog editable? * Is this dialog editable?
* *
* @return returns true, if this dialog was created in an editable mann er. * @return returns true, if this dialog was created in an editable mann er.
*/ */
bool editable() { return mEditable; } bool editable() { return mAttributeForm->editable(); }
/**
* Toggles the form mode between edit feature and add feature.
* If set to true, the dialog will be editable even with an invalid fea
ture.
* If set to true, the dialog will add a new feature when the form is a
ccepted.
*
* @param isAddDialog If set to true, turn this dialog into an add feat
ure dialog.
*/
void setIsAddDialog( bool isAddDialog ) { mAttributeForm->setIsAddDialo
g( isAddDialog ); }
/**
* Sets the edit command message (Undo) that will be used when the dial
og is accepted
*
* @param message The message
*/
void setEditCommandMessage( const QString& message ) { mAttributeForm->
setEditCommandMessage( message ); }
public slots: public slots:
void accept(); void accept();
//! Show the dialog and block the application until the dialog is close d. Ownership of this object is not changed.
int exec(); int exec();
void show();
void dialogDestroyed(); //! Show the dialog non-blocking. Reparents this dialog to be a child o
f the dialog form and is deleted when
//! closed.
void show();
protected: protected:
bool eventFilter( QObject *obj, QEvent *event ); bool eventFilter( QObject *obj, QEvent *e );
private slots:
void onDialogFinished( int result );
private: private:
void init(); void init( QgsVectorLayer* layer, QgsFeature* feature, QgsAttributeEdit orContext& context, QWidget* parent );
QDialog *mDialog; // Using a guarded pointer we can savely delete the dialog in the destr
uctor even
// when the dialog is this object's parent
QPointer<QDialog> mDialog;
QString mSettingsPath; QString mSettingsPath;
// Used to sync multiple widgets for the same field // Used to sync multiple widgets for the same field
QgsAttributeEditorContext mContext;
QgsVectorLayer *mLayer;
QgsFeature* mFeature;
bool mFeatureOwner;
QgsHighlight *mHighlight; QgsHighlight *mHighlight;
int mFormNr; int mFormNr;
bool mShowDialogButtons; bool mShowDialogButtons;
QString mReturnvarname; QString mReturnvarname;
QgsAttributeForm* mAttributeForm;
// true if this dialog is editable // true if this dialog is editable
bool mEditable; bool mEditable;
static int sFormCounter; static int sFormCounter;
static QString sSettingsPath; static QString sSettingsPath;
}; };
#endif #endif
 End of changes. 13 change blocks. 
12 lines changed or deleted 49 lines changed or added


 qgsattributeeditor.h   qgsattributeeditor.h 
skipping to change at line 27 skipping to change at line 27
#ifndef QGSATTRIBUTEEDITOR_H #ifndef QGSATTRIBUTEEDITOR_H
#define QGSATTRIBUTEEDITOR_H #define QGSATTRIBUTEEDITOR_H
#include <QVariant> #include <QVariant>
#include <QMetaType> #include <QMetaType>
#include <QGridLayout> #include <QGridLayout>
#include "qgsfeature.h" #include "qgsfeature.h"
#include "qgsrelationmanager.h" #include "qgsrelationmanager.h"
class QObject;
class QWidget;
class QComboBox;
class QListWidget;
class QgsAttributeEditorContext; class QgsAttributeEditorContext;
class QgsAttributeEditorElement; class QgsAttributeEditorElement;
class QgsDualView; class QgsDualView;
class QgsRelationManager; class QgsRelationManager;
class QgsVectorLayer; class QgsVectorLayer;
/* \brief create attribute widget for editing */ /**
* \brief create attribute widget for editing
*
* @deprecated
*/
class GUI_EXPORT QgsAttributeEditor : public QObject class GUI_EXPORT QgsAttributeEditor : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsAttributeEditor( QObject* parent, QgsVectorLayer* vl = 0, int idx = -1 ) QgsAttributeEditor( QObject* parent, QgsVectorLayer* vl = 0, int idx = -1 )
: QObject( parent ) : QObject( parent )
, mLayer( vl ) {
, mIdx( idx ) Q_UNUSED( vl )
{} Q_UNUSED( idx )
}
/** /**
* Creates or prepares a attribute editor widget * Creates or prepares a attribute editor widget
* @param parent The parent object * @param parent The parent object
* @param editor The widget to prepare. Set to null if it should be gen erated * @param editor The widget to prepare. Set to null if it should be gen erated
* @param vl The vector layer to use as data source * @param vl The vector layer to use as data source
* @param idx The field index this widget refers to * @param idx The field index this widget refers to
* @param value the value to initiate this widget with * @param value the value to initiate this widget with
* @param proxyWidgets an array of widgets, which will act as a value p roxy if the same field is inserted multiple times * @param proxyWidgets an array of widgets, which will act as a value p roxy if the same field is inserted multiple times
* *
* @deprecated * @deprecated
*/ */
static QWidget* createAttributeEditor( QWidget* parent, QWidget* editor , QgsVectorLayer* vl, int idx, const QVariant &value, QMap<int, QWidget*>& proxyWidgets ); static Q_DECL_DEPRECATED QWidget* createAttributeEditor( QWidget* paren t, QWidget* editor, QgsVectorLayer* vl, int idx, const QVariant &value, QMa p<int, QWidget*>& proxyWidgets );
/** /**
* Creates or prepares a attribute editor widget * Creates or prepares a attribute editor widget
* @param parent The parent object * @param parent The parent object
* @param editor The widget to prepare. Set to null if it should be gen erated * @param editor The widget to prepare. Set to null if it should be gen erated
* @param vl The vector layer to use as data source * @param vl The vector layer to use as data source
* @param idx The field index this widget refers to * @param idx The field index this widget refers to
* @param value the value to initiate this widget with * @param value the value to initiate this widget with
* *
*/ */
skipping to change at line 84 skipping to change at line 84
* @param parent The parent object * @param parent The parent object
* @param editor The widget to prepare. Set to null if it should be gen erated * @param editor The widget to prepare. Set to null if it should be gen erated
* @param vl The vector layer to use as data source * @param vl The vector layer to use as data source
* @param idx The field index this widget refers to * @param idx The field index this widget refers to
* @param value the value to initiate this widget with * @param value the value to initiate this widget with
* @param context the context used for the created attribute editor * @param context the context used for the created attribute editor
* *
*/ */
static QWidget* createAttributeEditor( QWidget* parent, QWidget* editor , QgsVectorLayer* vl, int idx, const QVariant& value, QgsAttributeEditorCon text& context ); static QWidget* createAttributeEditor( QWidget* parent, QWidget* editor , QgsVectorLayer* vl, int idx, const QVariant& value, QgsAttributeEditorCon text& context );
/**
* Creates a widget form a QgsAttributeEditorElement definition. Will r
ecursively generate containers and widgets.
* @param widgetDef The definition for the widget
* @param parent The parent object
* @param vl The vector layer to use as data source
* @param feat The feature to create the widget for
* @param context the context used for the created attribute editor
* @param [out] labelText An optional label text will be written into t
he referenced QString. It will be set to
* a QString::null value if no label should be shown
* @param [out] labelOnTop Will be set to true if the label should be p
laced on top of the field.
* If set to false, the label should be shown left or right of t
he field
*
*/
static QWidget *createWidgetFromDef( const QgsAttributeEditorElement* w
idgetDef, QWidget* parent, QgsVectorLayer* vl, const QgsFeature &feat, QgsA
ttributeEditorContext& context, QString& labelText, bool& labelOnTop );
static bool retrieveValue( QWidget *widget, QgsVectorLayer *vl, int idx , QVariant &value ); static bool retrieveValue( QWidget *widget, QgsVectorLayer *vl, int idx , QVariant &value );
static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, con st QVariant &value ); static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, con st QVariant &value );
private:
static QComboBox *comboBox( QWidget *editor, QWidget *parent );
static QListWidget *listWidget( QWidget *editor, QWidget *parent );
static QgsDualView* dualView( QWidget* editor, QWidget* parent );
public slots:
void selectFileName();
void selectDate();
void loadUrl( const QString & );
void loadPixmap( const QString & );
void updateUrl();
void openUrl();
void updateColor();
private:
QgsVectorLayer *mLayer;
int mIdx;
}; };
class GUI_EXPORT QgsStringRelay : public QObject
{
Q_OBJECT
public:
QgsStringRelay( QObject* parent = NULL )
: QObject( parent ) {}
void appendProxy( QWidget* proxy ) { mProxyList << proxy; }
public slots:
void changeText();
void changeText( QString str );
signals:
void textChanged( QString );
private:
QList<QWidget*> mProxyList;
};
Q_DECLARE_METATYPE( QgsStringRelay* )
#endif #endif
 End of changes. 7 change blocks. 
73 lines changed or deleted 10 lines changed or added


 qgsattributetablefiltermodel.h   qgsattributetablefiltermodel.h 
skipping to change at line 80 skipping to change at line 80
bool selectedOnTop(); bool selectedOnTop();
/** /**
* Specify a list of features, which the filter will accept. * Specify a list of features, which the filter will accept.
* The filter mode will automatically be adjusted to show only these fe atures (ShowFilteredList). * The filter mode will automatically be adjusted to show only these fe atures (ShowFilteredList).
* *
* @param ids The list of feature ids which will be accepted by the fi lter * @param ids The list of feature ids which will be accepted by the fi lter
*/ */
virtual void setFilteredFeatures( QgsFeatureIds ids ); virtual void setFilteredFeatures( QgsFeatureIds ids );
QgsFeatureIds filteredFeatures();
/** /**
* Set the filter mode the filter will use. * Set the filter mode the filter will use.
* *
* @param filterMode Sets the current mode of the filter * @param filterMode Sets the current mode of the filter
*/ */
void setFilterMode( FilterMode filterMode ); void setFilterMode( FilterMode filterMode );
FilterMode filterMode() { return mFilterMode; }
/** /**
* Returns the layer this filter acts on. * Returns the layer this filter acts on.
* *
* @return Abovementioned layer * @return Abovementioned layer
*/ */
inline QgsVectorLayer *layer() const { return masterModel()->layer(); } inline QgsVectorLayer *layer() const { return masterModel()->layer(); }
/** /**
* Returns the layerCache this filter acts on. * Returns the layerCache this filter acts on.
* *
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added


 qgsattributetablemodel.h   qgsattributetablemodel.h 
skipping to change at line 32 skipping to change at line 32
#include <QObject> #include <QObject>
#include <QHash> #include <QHash>
#include <QQueue> #include <QQueue>
#include <QMap> #include <QMap>
#include "qgsvectorlayer.h" // QgsAttributeList #include "qgsvectorlayer.h" // QgsAttributeList
#include "qgsvectorlayercache.h" #include "qgsvectorlayercache.h"
class QgsMapCanvas; class QgsMapCanvas;
class QgsMapLayerAction; class QgsMapLayerAction;
class QgsEditorWidgetFactory;
/** /**
* A model backed by a {@link QgsVectorLayerCache} which is able to provide * A model backed by a {@link QgsVectorLayerCache} which is able to provide
* feature/attribute information to a QAbstractItemView. * feature/attribute information to a QAbstractItemView.
* *
* @brief * @brief
* Is able to generate editor widgets for its QModelIndexes as well. * Is able to generate editor widgets for its QModelIndexes as well.
* Is mostly referred to as "master model" within this doc and the source. * Is mostly referred to as "master model" within this doc and the source.
* *
* @see <a href="http://doc.qt.digia.com/qt/model-view-programming.html">Qt Model View Programming</a> * @see <a href="http://doc.qt.digia.com/qt/model-view-programming.html">Qt Model View Programming</a>
skipping to change at line 63 skipping to change at line 64
}; };
public: public:
/** /**
* Constructor * Constructor
* @param layerCache A layer cache to use as backend * @param layerCache A layer cache to use as backend
* @param parent The parent QObject (owner) * @param parent The parent QObject (owner)
*/ */
QgsAttributeTableModel( QgsVectorLayerCache *layerCache, QObject *paren t = 0 ); QgsAttributeTableModel( QgsVectorLayerCache *layerCache, QObject *paren t = 0 );
virtual ~QgsAttributeTableModel();
/** /**
* Loads the layer into the model * Loads the layer into the model
* Preferably to be called, before basing any other models on this mode l * Preferably to be called, before basing any other models on this mode l
*/ */
virtual void loadLayer(); virtual void loadLayer();
/** /**
* Returns the number of rows * Returns the number of rows
* @param parent parent index * @param parent parent index
*/ */
skipping to change at line 258 skipping to change at line 257
*/ */
virtual void layerDeleted(); virtual void layerDeleted();
protected: protected:
QgsVectorLayerCache *mLayerCache; QgsVectorLayerCache *mLayerCache;
int mFieldCount; int mFieldCount;
mutable QgsFeature mFeat; mutable QgsFeature mFeat;
QgsAttributeList mAttributes; QgsAttributeList mAttributes;
QMap< int, const QMap<QString, QVariant> * > mValueMaps; QVector<QgsEditorWidgetFactory*> mWidgetFactories;
QVector<QVariant> mAttributeWidgetCaches;
QVector<QgsEditorWidgetConfig> mWidgetConfigs;
QHash<QgsFeatureId, int> mIdRowMap; QHash<QgsFeatureId, int> mIdRowMap;
QHash<int, QgsFeatureId> mRowIdMap; QHash<int, QgsFeatureId> mRowIdMap;
/** /**
* Gets mFieldCount, mAttributes and mValueMaps * Gets mFieldCount, mAttributes and mValueMaps
*/ */
virtual void loadAttributes(); virtual void loadAttributes();
private: private:
skipping to change at line 282 skipping to change at line 283
* @param fid feature id * @param fid feature id
* *
* @return feature exists * @return feature exists
*/ */
virtual bool loadFeatureAtId( QgsFeatureId fid ) const; virtual bool loadFeatureAtId( QgsFeatureId fid ) const;
QgsFeatureRequest mFeatureRequest; QgsFeatureRequest mFeatureRequest;
/** The currently cached column */ /** The currently cached column */
int mCachedField; int mCachedField;
/** Allows to cache one specific column (used for sorting) */ /** Allows caching of one specific column (used for sorting) */
QHash<QgsFeatureId, QVariant> mFieldCache; QHash<QgsFeatureId, QVariant> mFieldCache;
/** /**
* Holds the bounds of changed cells while an update operation is runni ng * Holds the bounds of changed cells while an update operation is runni ng
* top = min row * top = min row
* left = min column * left = min column
* bottom = max row * bottom = max row
* right = max column * right = max column
*/ */
QRect mChangedCellBounds; QRect mChangedCellBounds;
 End of changes. 4 change blocks. 
4 lines changed or deleted 5 lines changed or added


 qgsbusyindicatordialog.h   qgsbusyindicatordialog.h 
skipping to change at line 41 skipping to change at line 41
{ {
Q_OBJECT Q_OBJECT
public: public:
/** Constructor /** Constructor
* Modal busy indicator dialog with no buttons. * Modal busy indicator dialog with no buttons.
* @param message Text to show above busy progress indicator. * @param message Text to show above busy progress indicator.
* @param parent parent object (owner) * @param parent parent object (owner)
* @param fl widget flags * @param fl widget flags
* @note added in 1.9 * @note added in 1.9
*/ */
QgsBusyIndicatorDialog( const QString& message = "", QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags ); QgsBusyIndicatorDialog( const QString& message = "", QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
~QgsBusyIndicatorDialog(); ~QgsBusyIndicatorDialog();
QString message() const { return mMessage; } QString message() const { return mMessage; }
void setMessage( const QString& message ); void setMessage( const QString& message );
private: private:
QString mMessage; QString mMessage;
QLabel* mMsgLabel; QLabel* mMsgLabel;
}; };
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgscategorizedsymbolrendererv2.h   qgscategorizedsymbolrendererv2.h 
skipping to change at line 75 skipping to change at line 75
class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendere rV2 class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendere rV2
{ {
public: public:
QgsCategorizedSymbolRendererV2( QString attrName = QString(), QgsCatego ryList categories = QgsCategoryList() ); QgsCategorizedSymbolRendererV2( QString attrName = QString(), QgsCatego ryList categories = QgsCategoryList() );
virtual ~QgsCategorizedSymbolRendererV2(); virtual ~QgsCategorizedSymbolRendererV2();
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature ); virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer ); virtual void startRender( QgsRenderContext& context, const QgsFields& f ields );
virtual void stopRender( QgsRenderContext& context ); virtual void stopRender( QgsRenderContext& context );
virtual QList<QString> usedAttributes(); virtual QList<QString> usedAttributes();
virtual QString dump() const; virtual QString dump() const;
virtual QgsFeatureRendererV2* clone(); virtual QgsFeatureRendererV2* clone();
virtual void toSld( QDomDocument& doc, QDomElement &element ) const; virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
//! returns bitwise OR-ed capabilities of the renderer //! returns bitwise OR-ed capabilities of the renderer
//! \note added in 2.0 //! \note added in 2.0
virtual int capabilities() { return SymbolLevels | RotationField | Filt er; } virtual int capabilities() { return SymbolLevels | RotationField | Filt er; }
virtual QgsSymbolV2List symbols(); virtual QgsSymbolV2List symbols();
//! @note added in 2.0 //! @note added in 2.0
void updateSymbols( QgsSymbolV2 * sym ); void updateSymbols( QgsSymbolV2 * sym );
const QgsCategoryList& categories() { return mCategories; } const QgsCategoryList& categories() const { 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 );
void addCategory( const QgsRendererCategoryV2 &category ); void addCategory( const QgsRendererCategoryV2 &category );
bool deleteCategory( int catIndex ); bool deleteCategory( int catIndex );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgscategorizedsymbolrendererv2widget.h   qgscategorizedsymbolrendererv2widget.h 
skipping to change at line 84 skipping to change at line 84
public: public:
static QgsRendererV2Widget* create( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer ); static QgsRendererV2Widget* create( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer );
QgsCategorizedSymbolRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2 * style, QgsFeatureRendererV2* renderer ); QgsCategorizedSymbolRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2 * style, QgsFeatureRendererV2* renderer );
~QgsCategorizedSymbolRendererV2Widget(); ~QgsCategorizedSymbolRendererV2Widget();
virtual QgsFeatureRendererV2* renderer(); virtual QgsFeatureRendererV2* renderer();
public slots: public slots:
void changeCategorizedSymbol(); void changeCategorizedSymbol();
void categoryColumnChanged(); void categoryColumnChanged( QString field );
void categoriesDoubleClicked( const QModelIndex & idx ); void categoriesDoubleClicked( const QModelIndex & idx );
void addCategory(); void addCategory();
void addCategories(); void addCategories();
void deleteCategories(); void deleteCategories();
void deleteAllCategories(); void deleteAllCategories();
void setExpression();
void rotationFieldChanged( QString fldName ); void rotationFieldChanged( QString fldName );
void sizeScaleFieldChanged( QString fldName ); void sizeScaleFieldChanged( QString fldName );
void scaleMethodChanged( QgsSymbolV2::ScaleMethod scaleMethod ); void scaleMethodChanged( QgsSymbolV2::ScaleMethod scaleMethod );
void showSymbolLevels(); void showSymbolLevels();
void rowsMoved(); void rowsMoved();
protected: protected:
void updateUiFromRenderer(); void updateUiFromRenderer();
void updateCategorizedSymbolIcon(); void updateCategorizedSymbolIcon();
// Called by virtual refreshSymbolView() // Called by virtual refreshSymbolView()
void populateCategories(); void populateCategories();
//! populate column combo
void populateColumns();
//! 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 a list of indexes for the categories unders selection //! return a list of indexes for the categories unders selection
QList<int> selectedCategories(); QList<int> selectedCategories();
//! change the selected symbols alone for the change button, if there i s a selection //! change the selected symbols alone for the change button, if there i s a selection
void changeSelectedSymbols(); void changeSelectedSymbols();
void changeCategorySymbol(); void changeCategorySymbol();
 End of changes. 3 change blocks. 
5 lines changed or deleted 1 lines changed or added


 qgscharacterselectdialog.h   qgscharacterselectdialog.h 
skipping to change at line 35 skipping to change at line 35
class CharacterWidget; class CharacterWidget;
/** A dialog for selecting a single character from a single font /** A dialog for selecting a single character from a single font
*/ */
class GUI_EXPORT QgsCharacterSelectorDialog : public QDialog, private Ui::Q gsCharacterSelectorBase class GUI_EXPORT QgsCharacterSelectorDialog : public QDialog, private Ui::Q gsCharacterSelectorBase
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsCharacterSelectorDialog( QWidget* parent = 0, Qt::WFlags fl = QgisGu i::ModalDialogFlags ); QgsCharacterSelectorDialog( QWidget* parent = 0, Qt::WindowFlags fl = Q gisGui::ModalDialogFlags );
~QgsCharacterSelectorDialog(); ~QgsCharacterSelectorDialog();
public slots: public slots:
const QChar& selectCharacter( bool* gotChar, const QFont& font, const Q String& style ); const QChar& selectCharacter( bool* gotChar, const QFont& font, const Q String& style );
private slots: private slots:
void setCharacter( const QChar& chr ); void setCharacter( const QChar& chr );
protected: protected:
QChar mChar; QChar mChar;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgscollapsiblegroupbox.h   qgscollapsiblegroupbox.h 
skipping to change at line 32 skipping to change at line 32
#include <QGroupBox> #include <QGroupBox>
#include <QSettings> #include <QSettings>
#include <QPointer> #include <QPointer>
#include <QToolButton> #include <QToolButton>
#include <QMouseEvent> #include <QMouseEvent>
class QToolButton; class QToolButton;
class QScrollArea; class QScrollArea;
class QgsGroupBoxCollapseButton: public QToolButton class GUI_EXPORT QgsGroupBoxCollapseButton : public QToolButton
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsGroupBoxCollapseButton( QWidget *parent = 0 ) QgsGroupBoxCollapseButton( QWidget *parent = 0 )
: QToolButton( parent ), mAltDown( false ), mShiftDown( false ) {} : QToolButton( parent ), mAltDown( false ), mShiftDown( false ) {}
~QgsGroupBoxCollapseButton() {} ~QgsGroupBoxCollapseButton() {}
bool altDown() const { return mAltDown; } bool altDown() const { return mAltDown; }
skipping to change at line 77 skipping to change at line 77
* @note To add Collapsible properties in promoted QtDesigner widgets, you can add the following "Dynamic properties" by clicking on the green + in th e propreties palette: * @note To add Collapsible properties in promoted QtDesigner widgets, you can add the following "Dynamic properties" by clicking on the green + in th e propreties palette:
* bool collapsed, QString syncGroup * bool collapsed, QString syncGroup
*/ */
class GUI_EXPORT QgsCollapsibleGroupBoxBasic : public QGroupBox class GUI_EXPORT QgsCollapsibleGroupBoxBasic : public QGroupBox
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY( bool collapsed READ isCollapsed WRITE setCollapsed USER tru e ) Q_PROPERTY( bool collapsed READ isCollapsed WRITE setCollapsed USER tru e )
Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup ) Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
Q_PROPERTY( bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnEx pand )
public: public:
QgsCollapsibleGroupBoxBasic( QWidget *parent = 0 ); QgsCollapsibleGroupBoxBasic( QWidget *parent = 0 );
QgsCollapsibleGroupBoxBasic( const QString &title, QWidget *parent = 0 ); QgsCollapsibleGroupBoxBasic( const QString &title, QWidget *parent = 0 );
~QgsCollapsibleGroupBoxBasic(); ~QgsCollapsibleGroupBoxBasic();
bool isCollapsed() const { return mCollapsed; } bool isCollapsed() const { return mCollapsed; }
void setCollapsed( bool collapse ); void setCollapsed( bool collapse );
/** Named group which synchronizes collapsing action when triangle is c licked while holding alt modifier key */ /** Named group which synchronizes collapsing action when triangle is c licked while holding alt modifier key */
QString syncGroup() const { return mSyncGroup; } QString syncGroup() const { return mSyncGroup; }
void setSyncGroup( QString grp ); void setSyncGroup( QString grp );
//! set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded //! set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
void setScrollOnExpand( bool scroll ) { mScrollOnExpand = scroll; } void setScrollOnExpand( bool scroll ) { mScrollOnExpand = scroll; }
bool scrollOnExpand() {return mScrollOnExpand;}
signals: signals:
/** Signal emitted when groupbox collapsed/expanded state is changed, a nd when first shown */ /** Signal emitted when groupbox collapsed/expanded state is changed, a nd when first shown */
void collapsedStateChanged( bool collapsed ); void collapsedStateChanged( bool collapsed );
public slots: public slots:
void checkToggled( bool ckd ); void checkToggled( bool ckd );
void checkClicked( bool ckd ); void checkClicked( bool ckd );
void toggleCollapsed(); void toggleCollapsed();
protected: protected:
skipping to change at line 153 skipping to change at line 156
*/ */
class GUI_EXPORT QgsCollapsibleGroupBox : public QgsCollapsibleGroupBoxBasi c class GUI_EXPORT QgsCollapsibleGroupBox : public QgsCollapsibleGroupBoxBasi c
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY( bool collapsed READ isCollapsed WRITE setCollapsed USER tru e ) Q_PROPERTY( bool collapsed READ isCollapsed WRITE setCollapsed USER tru e )
Q_PROPERTY( bool saveCollapsedState READ saveCollapsedState WRITE setSa veCollapsedState ) Q_PROPERTY( bool saveCollapsedState READ saveCollapsedState WRITE setSa veCollapsedState )
Q_PROPERTY( bool saveCheckedState READ saveCheckedState WRITE setSaveCh eckedState ) Q_PROPERTY( bool saveCheckedState READ saveCheckedState WRITE setSaveCh eckedState )
Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup ) Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
Q_PROPERTY( bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnEx pand )
public: public:
QgsCollapsibleGroupBox( QWidget *parent = 0, QSettings* settings = 0 ); QgsCollapsibleGroupBox( QWidget *parent = 0, QSettings* settings = 0 );
QgsCollapsibleGroupBox( const QString &title, QWidget *parent = 0, QSet tings* settings = 0 ); QgsCollapsibleGroupBox( const QString &title, QWidget *parent = 0, QSet tings* settings = 0 );
~QgsCollapsibleGroupBox(); ~QgsCollapsibleGroupBox();
// set custom QSettings pointer if group box was already created from Q tDesigner promotion // set custom QSettings pointer if group box was already created from Q tDesigner promotion
void setSettings( QSettings* settings ); void setSettings( QSettings* settings );
//! set this to false to not save/restore collapsed state //! set this to false to not save/restore collapsed state
 End of changes. 4 change blocks. 
1 lines changed or deleted 5 lines changed or added


 qgscolorbutton.h   qgscolorbutton.h 
skipping to change at line 22 skipping to change at line 22
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSCOLORBUTTON_H #ifndef QGSCOLORBUTTON_H
#define QGSCOLORBUTTON_H #define QGSCOLORBUTTON_H
#include <QColorDialog> #include <QColorDialog>
#include <QPushButton> #include <QPushButton>
#include <QTemporaryFile> #include <QTemporaryFile>
class QMimeData;
/** \ingroup gui /** \ingroup gui
* \class QgsColorButton * \class QgsColorButton
* A cross platform button subclass for selecting colors. Will open a color chooser dialog when clicked. * A cross platform button subclass for selecting colors. Will open a color chooser dialog when clicked.
* Offers live updates to button from color chooser dialog * Offers live updates to button from color chooser dialog
* @note inherited base class moved from QToolButton to QPushButton in QGIS 1.9 * @note inherited base class moved from QToolButton to QPushButton in QGIS 1.9
*/ */
class GUI_EXPORT QgsColorButton: public QPushButton class GUI_EXPORT QgsColorButton: public QPushButton
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY( QString colorDialogTitle READ colorDialogTitle WRITE setCol
orDialogTitle )
Q_PROPERTY( bool acceptLiveUpdates READ acceptLiveUpdates WRITE setAcce
ptLiveUpdates )
Q_PROPERTY( QColor color READ color WRITE setColor )
Q_FLAGS( QColorDialog::ColorDialogOptions )
Q_PROPERTY( QColorDialog::ColorDialogOptions colorDialogOptions READ co
lorDialogOptions WRITE setColorDialogOptions )
public: public:
/** /**
* Construct a new color button. * Construct a new color button.
* *
* @param parent The parent QWidget for the dialog * @param parent The parent QWidget for the dialog
* @param cdt The title to show in the color chooser dialog * @param cdt The title to show in the color chooser dialog
* @param cdo Options for the color chooser dialog * @param cdo Options for the color chooser dialog
* @note changed in 1.9 * @note changed in 1.9
*/ */
skipping to change at line 130 skipping to change at line 137
* Is emitted, whenever a new color is accepted. The color is always va lid. * Is emitted, whenever a new color is accepted. The color is always va lid.
* In case the new color is the same, no signal is emitted, to avoid in finite loops. * In case the new color is the same, no signal is emitted, to avoid in finite loops.
* *
* @param color New color * @param color New color
* @note added in 1.9 * @note added in 1.9
*/ */
void colorChanged( const QColor &color ); void colorChanged( const QColor &color );
protected: protected:
void changeEvent( QEvent* e ); void changeEvent( QEvent* e );
#if 0 // causes too many cyclical updates, but may be needed on some platfo
rms
void paintEvent( QPaintEvent* e );
#endif
void showEvent( QShowEvent* e ); void showEvent( QShowEvent* e );
static const QPixmap& transpBkgrd(); static const QPixmap& transpBkgrd();
/**
* Reimplemented to detect right mouse button clicks on the color butto
n and allow dragging colors
*/
void mousePressEvent( QMouseEvent* e );
/**
* Reimplemented to allow dragging colors from button
*/
void mouseMoveEvent( QMouseEvent *e );
/**
* Reimplemented to accept dragged colors
*/
void dragEnterEvent( QDragEnterEvent * e ) ;
/**
* Reimplemented to accept dropped colors
*/
void dropEvent( QDropEvent *e );
private: private:
QString mColorDialogTitle; QString mColorDialogTitle;
QColor mColor; QColor mColor;
QColorDialog::ColorDialogOptions mColorDialogOptions; QColorDialog::ColorDialogOptions mColorDialogOptions;
bool mAcceptLiveUpdates; bool mAcceptLiveUpdates;
QTemporaryFile mTempPNG; QTemporaryFile mTempPNG;
bool mColorSet; // added in QGIS 2.1 bool mColorSet; // added in QGIS 2.1
QPoint mDragStartPosition;
/**
* Shows the color button context menu and handles copying and pasting
color values.
*/
void showContextMenu( QMouseEvent* event );
/**
* Creates mime data from the current color. Sets both the mime data's
color data, and the
* mime data's text with the color's hex code.
* @note added in 2.3
* @see colorFromMimeData
*/
QMimeData* createColorMimeData() const;
/**
* Attempts to parse mimeData as a color, either via the mime data's co
lor data or by
* parsing a textual representation of a color.
* @returns true if mime data could be intrepreted as a color
* @param mimeData mime data
* @param resultColor QColor to store evaluated color
* @note added in 2.3
* @see createColorMimeData
*/
bool colorFromMimeData( const QMimeData *mimeData, QColor &resultColor
);
#ifdef Q_OS_WIN
/**
* Expands a shortened Windows path to its full path name.
* @returns full path name.
* @param path a (possibly) shortened Windows path
* @note added in 2.3
*/
QString fullPath( const QString &path );
#endif
private slots: private slots:
void onButtonClicked(); void onButtonClicked();
/** /**
* Sets color for button, if valid. * Sets color for button, if valid.
* *
* @note added in 1.9 * @note added in 1.9
*/ */
void setValidColor( const QColor& newColor ); void setValidColor( const QColor& newColor );
}; };
 End of changes. 5 change blocks. 
4 lines changed or deleted 71 lines changed or added


 qgscomposerarrow.h   qgscomposerarrow.h 
skipping to change at line 66 skipping to change at line 66
void setStartMarker( const QString& svgPath ); void setStartMarker( const QString& svgPath );
QString startMarker() const {return mStartMarkerFile;} QString startMarker() const {return mStartMarkerFile;}
void setEndMarker( const QString& svgPath ); void setEndMarker( const QString& svgPath );
QString endMarker() const {return mEndMarkerFile;} QString endMarker() const {return mEndMarkerFile;}
QColor arrowColor() const { return mArrowColor; } QColor arrowColor() const { return mArrowColor; }
void setArrowColor( const QColor& c ) { mArrowColor = c; } void setArrowColor( const QColor& c ) { mArrowColor = c; }
MarkerMode markerMode() const { return mMarkerMode;} MarkerMode markerMode() const { return mMarkerMode;}
void setMarkerMode( MarkerMode mode ) {mMarkerMode = mode;} void setMarkerMode( MarkerMode mode );
/** stores state in Dom element /** stores state in Dom element
* @param elem is Dom element corresponding to 'Composer' tag * @param elem is Dom element corresponding to 'Composer' tag
* @param doc document * @param doc 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 the document to read * @param doc is the document to read
skipping to change at line 91 skipping to change at line 91
enum MarkerType enum MarkerType
{ {
StartMarker, StartMarker,
EndMarker EndMarker
}; };
QPointF mStartPoint; QPointF mStartPoint;
QPointF mStopPoint; QPointF mStopPoint;
/**Considering the rectangle as spanning [x[0], x[1]] x [y[0], y[1]], t
hese
* indices specify which index {0, 1} corresponds to the start point
* coordinate of the respective dimension*/
int mStartXIdx;
int mStartYIdx;
QPen mPen; QPen mPen;
QBrush mBrush; QBrush mBrush;
/**Width of the arrow marker in mm. May be specified by the user. The h eight is automatically adapted*/ /**Width of the arrow marker in mm. May be specified by the user. The h eight is automatically adapted*/
double mArrowHeadWidth; double mArrowHeadWidth;
/**Height of the arrow marker in mm. Is calculated from arrow marker wi dth and apsect ratio of svg*/ /**Height of the arrow marker in mm. Is calculated from arrow marker wi dth and apsect ratio of svg*/
double mStartArrowHeadHeight; double mStartArrowHeadHeight;
double mStopArrowHeadHeight; double mStopArrowHeadHeight;
/**Path to the start marker file*/ /**Path to the start marker file*/
QString mStartMarkerFile; QString mStartMarkerFile;
/**Path to the end marker file*/ /**Path to the end marker file*/
QString mEndMarkerFile; QString mEndMarkerFile;
/**Default marker, no marker or svg marker*/ /**Default marker, no marker or svg marker*/
MarkerMode mMarkerMode; MarkerMode mMarkerMode;
QColor mArrowColor; QColor mArrowColor;
/**Indicates QGIS version to mimic bounding box behaviour for. The line
placement changed in version 2.4, so a value
* of 22 is used to indicate that the line should be drawn using the ol
der placement routine.
*/
int mBoundsBehaviour;
/**Adapts the item scene rect to contain the start point, the stop poin t including the arrow marker and the outline. /**Adapts the item scene rect to contain the start point, the stop poin t including the arrow marker and the outline.
Needs to be called whenever the arrow width/height, the outline wit h or the endpoints are changed*/ Needs to be called whenever the arrow width/height, the outline wit h or the endpoints are changed*/
void adaptItemSceneRect(); void adaptItemSceneRect();
/**Computes the margin around the line necessary to include the markers
*/
double computeMarkerMargin() const;
/**Draws the default marker at the line end*/ /**Draws the default marker at the line end*/
void drawHardcodedMarker( QPainter* p, MarkerType type ); void drawHardcodedMarker( QPainter* p, MarkerType type );
/**Draws a user-defined marker (must be an svg file)*/ /**Draws a user-defined marker (must be an svg file)*/
void drawSVGMarker( QPainter* p, MarkerType type, const QString& marker Path ); void drawSVGMarker( QPainter* p, MarkerType type, const QString& marker Path );
/**Apply default graphics settings*/ /**Apply default graphics settings*/
void initGraphicsSettings(); void initGraphicsSettings();
}; };
#endif // QGSCOMPOSERARROW_H #endif // QGSCOMPOSERARROW_H
 End of changes. 4 change blocks. 
1 lines changed or deleted 17 lines changed or added


 qgscomposerattributetable.h   qgscomposerattributetable.h 
skipping to change at line 26 skipping to change at line 26
************************************************************************** */ ************************************************************************** */
#ifndef QGSCOMPOSERATTRIBUTETABLE_H #ifndef QGSCOMPOSERATTRIBUTETABLE_H
#define QGSCOMPOSERATTRIBUTETABLE_H #define QGSCOMPOSERATTRIBUTETABLE_H
#include "qgscomposertable.h" #include "qgscomposertable.h"
class QgsComposerMap; class QgsComposerMap;
class QgsVectorLayer; class QgsVectorLayer;
/**Helper class for sorting, takes into account sorting column and ascendin g / descending*/ /**Helper class for sorting tables, takes into account sorting column and a scending / descending*/
class CORE_EXPORT QgsComposerAttributeTableCompare class CORE_EXPORT QgsComposerAttributeTableCompare
{ {
public: public:
QgsComposerAttributeTableCompare(); QgsComposerAttributeTableCompare();
bool operator()( const QgsAttributeMap& m1, const QgsAttributeMap& m2 ) ; bool operator()( const QgsAttributeMap& m1, const QgsAttributeMap& m2 ) ;
/**Sets column number to sort by
* @param col column number for sorting
*/
void setSortColumn( int col ) { mCurrentSortColumn = col; } void setSortColumn( int col ) { mCurrentSortColumn = col; }
/**Sets sort order for column sorting
* @param asc set to true to sort in ascending order, false to sort in
descending order
*/
void setAscending( bool asc ) { mAscending = asc; } void setAscending( bool asc ) { mAscending = asc; }
private: private:
int mCurrentSortColumn; int mCurrentSortColumn;
bool mAscending; bool mAscending;
}; };
/**A table class that displays a vector attribute table*/ /**A table class that displays a vector attribute table*/
class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsComposerAttributeTable( QgsComposition* composition ); QgsComposerAttributeTable( QgsComposition* composition );
~QgsComposerAttributeTable(); ~QgsComposerAttributeTable();
/** return correct graphics item type. Added in v1.7 */ /** return correct graphics item type. Added in v1.7 */
virtual int type() const { return ComposerAttributeTable; } virtual int type() const { return ComposerAttributeTable; }
/** \brief Reimplementation of QCanvasItem::paint*/ /** \brief Reimplementation of QCanvasItem::paint*/
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget ); virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
/**Writes properties specific to attribute tables
* @param elem an existing QDomElement in which to store the attribute
table's properties.
* @param doc QDomDocument for the destination xml.
* @see readXML
*/
bool writeXML( QDomElement& elem, QDomDocument & doc ) const; bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
/**Reads the properties specific to an attribute table from xml.
* @param itemElem a QDomElement holding the attribute table's desired
properties.
* @param doc QDomDocument for the source xml.
* @see writeXML
*/
bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
void setVectorLayer( QgsVectorLayer* vl ); /**Sets the vector layer from which to display feature attributes
const QgsVectorLayer* vectorLayer() const { return mVectorLayer; } * @param layer Vector layer for attribute table
* @see vectorLayer
*/
void setVectorLayer( QgsVectorLayer* layer );
/**Returns the vector layer the attribute table is currently using
* @returns attribute table's current vector layer
* @see setVectorLayer
*/
QgsVectorLayer* vectorLayer() const { return mVectorLayer; }
/**Resets the attribute table's columns to match the vector layer's fie
lds
* @note added in 2.3
* @see setVectorLayer
*/
void resetColumns();
/**Sets the composer map to use to limit the extent of features shown i
n the
* attribute table. This setting only has an effect if setDisplayOnlyVi
sibleFeatures is
* set to true. Changing the composer map forces the table to refetch f
eatures from its
* vector layer, and may result in the table changing size to accommoda
te the new displayed
* feature attributes.
* @param map QgsComposerMap which drives the extents of the table's fe
atures
* @see composerMap
* @see setDisplayOnlyVisibleFeatures
*/
void setComposerMap( const QgsComposerMap* map ); void setComposerMap( const QgsComposerMap* map );
/**Returns the composer map whose extents are controlling the features
shown in the
* table. The extents of the map are only used if displayOnlyVisibleFea
tures() is true.
* @returns composer map controlling the attribute table
* @see setComposerMap
* @see displayOnlyVisibleFeatures
*/
const QgsComposerMap* composerMap() const { return mComposerMap; } const QgsComposerMap* composerMap() const { return mComposerMap; }
void setMaximumNumberOfFeatures( int nr ) { mMaximumNumberOfFeatures = /**Sets the maximum number of features shown by the table. Changing thi
nr; } s setting may result
* in the attribute table changing its size to accommodate the new numb
er of rows, and requires
* the table to refetch features from its vector layer.
* @param features maximum number of features to show in the table
* @see maximumNumberOfFeatures
*/
void setMaximumNumberOfFeatures( int features );
/**Returns the maximum number of features to be shown by the table.
* @returns maximum number of features
* @see setMaximumNumberOfFeatures
*/
int maximumNumberOfFeatures() const { return mMaximumNumberOfFeatures; } int maximumNumberOfFeatures() const { return mMaximumNumberOfFeatures; }
void setDisplayOnlyVisibleFeatures( bool b ) { mShowOnlyVisibleFeatures /**Sets attribute table to only show features which are visible in a co
= b; } mposer map item. Changing
* this setting forces the table to refetch features from its vector la
yer, and may result in
* the table changing size to accommodate the new displayed feature att
ributes.
* @param visibleOnly set to true to show only visible features
* @see displayOnlyVisibleFeatures
* @see setComposerMap
*/
void setDisplayOnlyVisibleFeatures( bool visibleOnly );
/**Returns true if the table is set to show only features visible on a
corresponding
* composer map item.
* @returns true if table only shows visible features
* @see composerMap
* @see setDisplayOnlyVisibleFeatures
*/
bool displayOnlyVisibleFeatures() const { return mShowOnlyVisibleFeatur es; } bool displayOnlyVisibleFeatures() const { return mShowOnlyVisibleFeatur es; }
QSet<int> displayAttributes() const { return mDisplayAttributes; } /**Returns true if a feature filter is active on the attribute table
void setDisplayAttributes( const QSet<int>& attr ) { mDisplayAttributes * @returns bool state of the feature filter
= attr; } * @note added in 2.3
* @see setFilterFeatures
* @see featureFilter
*/
bool filterFeatures() const { return mFilterFeatures; }
/**Sets whether the feature filter is active for the attribute table. C
hanging
* this setting forces the table to refetch features from its vector la
yer, and may result in
* the table changing size to accommodate the new displayed feature att
ributes.
* @param filter Set to true to enable the feature filter
* @note added in 2.3
* @see filterFeatures
* @see setFeatureFilter
*/
void setFilterFeatures( bool filter );
/**Returns the current expression used to filter features for the table
. The filter is only
* active if filterFeatures() is true.
* @returns feature filter expression
* @note added in 2.3
* @see setFeatureFilter
* @see filterFeatures
*/
QString featureFilter() const { return mFeatureFilter; }
/**Sets the expression used for filtering features in the table. The fi
lter is only
* active if filterFeatures() is set to true. Changing this setting for
ces the table
* to refetch features from its vector layer, and may result in
* the table changing size to accommodate the new displayed feature att
ributes.
* @param expression filter to use for selecting which features to disp
lay in the table
* @note added in 2.3
* @see featureFilter
* @see setFilterFeatures
*/
void setFeatureFilter( const QString& expression );
/**Returns the attributes fields which are shown by the table.
* @returns a QSet of integers refering to the attributes in the vector
layer. If
* result is an empty QSet than all feature attributes will be shown.
* @see setDisplayAttributes
* @deprecated use QgsComposerTable::columns() instead
*/
Q_DECL_DEPRECATED QSet<int> displayAttributes() const;
/**Sets the attributes to display in the table.
* @param attr QSet of integer values refering to the attributes from t
he vector layer to show.
* Set to an empty QSet to show all feature attributes.
* @param refresh set to true to force the table to refetch features fr
om its vector layer
* and immediately update the display of the table. This may result in
the table changing size
* to accommodate the new displayed feature attributes.
* @see displayAttributes
*/
void setDisplayAttributes( const QSet<int>& attr, bool refresh = true )
;
QMap<int, QString> fieldAliasMap() const { return mFieldAliasMap; } /**Returns the attribute field aliases, which control how fields are na
void setFieldAliasMap( const QMap<int, QString>& map ) { mFieldAliasMap med in the table's
= map; } * header row.
* @returns a QMap of integers to strings, where the string is the fiel
d's alias and the
* integer is the field index from the associated vector layer.
* @see setFieldAliasMap
* @deprecated use QgsComposerTable::columns() instead
*/
Q_DECL_DEPRECATED QMap<int, QString> fieldAliasMap() const;
/**Adapts mMaximumNumberOfFeatures depending on the rectangle height*/ /**Sets the attribute field aliases, which control how fields are named
in the table's
* header row.
* @param map QMap of integers to strings, where the string is the alia
s to use for the
* corresponding field, and the integer is the field index from the vec
tor layer
* @see fieldAliasMap
* @deprecated use QgsComposerTable::columns() instead
*/
Q_DECL_DEPRECATED void setFieldAliasMap( const QMap<int, QString>& map
);
/**Adapts mMaximumNumberOfFeatures depending on the rectangle height. C
alling this forces
* the table to refetch features from its vector layer and immediately
updates the display
* of the table.
* @see maximumNumberOfFeatures
* @see setMaximumNumberOfFeatures
*/
void setSceneRect( const QRectF& rectangle ); void setSceneRect( const QRectF& rectangle );
// @note not available in python bindings /**Sets the attributes to use to sort the table's features.
void setSortAttributes( const QList<QPair<int, bool> > att ) { mSortInf * @param att QList integers/bool pairs, where the integer refers to th
ormation = att; } e attribute index and
* the bool sets the sort order for the attribute. If true the attribut
e is sorted ascending,
* if false, the attribute is sorted in descending order. Note that fea
tures are sorted
* after the maximum number of displayed features have been fetched fro
m the vector layer's
* provider.
* @see sortAttributes
* @deprecated use QgsComposerTable::columns() instead
* @note not available in python bindings
*/
Q_DECL_DEPRECATED void setSortAttributes( const QList<QPair<int, bool>
> att );
// @note not available in python bindings /**Returns the attributes used to sort the table's features.
QList<QPair<int, bool> > sortAttributes() const { return mSortInformati * @returns a QList of integer/bool pairs, where the integer refers to
on; } the attribute index and
* the bool to the sort order for the attribute. If true the attribute
is sorted ascending,
* if false, the attribute is sorted in descending order.
* @note not available in python bindings
*/
QList<QPair<int, bool> > sortAttributes() const;
protected: /**Queries the attribute table's vector layer for attributes to show in
/**Retrieves feature attributes the table.
* @param attributeMaps list of QgsAttributeMaps where the fetched feat
ure attributes will be stored
* @returns true if attributes were successfully fetched
* @note not available in python bindings * @note not available in python bindings
*/ */
bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps ); bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps );
//! @note not available in python bindings
QMap<int, QString> getHeaderLabels() const;
private: private:
/**Associated vector layer*/ /**Associated vector layer*/
QgsVectorLayer* mVectorLayer; QgsVectorLayer* mVectorLayer;
/**Associated composer map (used to display the visible features)*/ /**Associated composer map (used to display the visible features)*/
const QgsComposerMap* mComposerMap; const QgsComposerMap* mComposerMap;
/**Maximum number of features that is displayed*/ /**Maximum number of features that is displayed*/
int mMaximumNumberOfFeatures; int mMaximumNumberOfFeatures;
/**Shows only the features that are visible in the associated composer map (true by default)*/ /**Shows only the features that are visible in the associated composer map (true by default)*/
bool mShowOnlyVisibleFeatures; bool mShowOnlyVisibleFeatures;
/**List of attribute indices to display (or all attributes if list is e /**True if feature filtering enabled*/
mpty)*/ bool mFilterFeatures;
QSet<int> mDisplayAttributes; /**Feature filter expression*/
/**Map of attribute name aliases. The aliases might be different to tho QString mFeatureFilter;
se of QgsVectorLayer (but those from the vector layer are the default)*/
QMap<int, QString> mFieldAliasMap; /**Returns a list of attribute indices corresponding to displayed field
s in the table.
/**Contains information about sort attribute index / ascending (true/fa * @note kept for compatibility with 2.0 api only
lse). First entry has the highest priority*/ */
QList< QPair<int, bool> > mSortInformation; QList<int> fieldsToDisplay() const;
/**Inserts aliases from vector layer as starting configuration to the a /**Restores a field alias map from a pre 2.4 format project file format
lias map*/ * @param map QMap of integers to strings, where the string is the alia
void initializeAliasMap(); s to use for the
/**Returns the attribute name to display in the item (attribute name or * corresponding field, and the integer is the field index from the vec
an alias if present)*/ tor layer
QString attributeDisplayName( int attributeIndex, const QString& name ) */
const; void restoreFieldAliasMap( const QMap<int, QString>& map );
private slots: private slots:
/**Checks if this vector layer will be removed (and sets mVectorLayer t o 0 if yes) */ /**Checks if this vector layer will be removed (and sets mVectorLayer t o 0 if yes) */
void removeLayer( QString layerId ); void removeLayer( QString layerId );
signals: signals:
/**This signal is emitted if the maximum number of feature changes (int eractively)*/ /**This signal is emitted if the maximum number of feature changes (int eractively)*/
void maximumNumberOfFeaturesChanged( int n ); void maximumNumberOfFeaturesChanged( int n );
}; };
 End of changes. 19 change blocks. 
43 lines changed or deleted 245 lines changed or added


 qgscomposereffect.h   qgscomposereffect.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 QGSCOMPOSEREFFECT_H #ifndef QGSCOMPOSEREFFECT_H
#define QGSCOMPOSEREFFECT_H #define QGSCOMPOSEREFFECT_H
#include <QtGui>
#include <QGraphicsEffect> #include <QGraphicsEffect>
#include <QPainter>
class CORE_EXPORT QgsComposerEffect : public QGraphicsEffect class CORE_EXPORT QgsComposerEffect : public QGraphicsEffect
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsComposerEffect(); QgsComposerEffect();
~QgsComposerEffect(); ~QgsComposerEffect();
void setCompositionMode( const QPainter::CompositionMode &compositionMo de ); void setCompositionMode( const QPainter::CompositionMode &compositionMo de );
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgscomposerhtml.h   qgscomposerhtml.h 
skipping to change at line 23 skipping to change at line 23
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSCOMPOSERHTML_H #ifndef QGSCOMPOSERHTML_H
#define QGSCOMPOSERHTML_H #define QGSCOMPOSERHTML_H
#include "qgscomposermultiframe.h" #include "qgscomposermultiframe.h"
#include <QUrl> #include <QUrl>
class QWebPage; class QWebPage;
class QImage;
class CORE_EXPORT QgsComposerHtml: public QgsComposerMultiFrame class CORE_EXPORT QgsComposerHtml: public QgsComposerMultiFrame
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsComposerHtml( QgsComposition* c, bool createUndoCommands ); QgsComposerHtml( QgsComposition* c, bool createUndoCommands );
QgsComposerHtml(); QgsComposerHtml();
~QgsComposerHtml(); ~QgsComposerHtml();
void setUrl( const QUrl& url ); void setUrl( const QUrl& url );
const QUrl& url() const { return mUrl; } const QUrl& url() const { return mUrl; }
QSizeF totalSize() const; QSizeF totalSize() const;
void render( QPainter* p, const QRectF& renderExtent ); void render( QPainter* p, const QRectF& renderExtent );
bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const; bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
bool readXML( const QDomElement& itemElem, const QDomDocument& doc, boo l ignoreFrames = false ); bool readXML( const QDomElement& itemElem, const QDomDocument& doc, boo l ignoreFrames = false );
void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true ); void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true );
//overriden to break frames without dividing lines of text
double findNearbyPageBreak( double yPos );
/**Returns whether html item is using smart breaks. Smart breaks preven
t
* the html frame contents from breaking mid-way though a line of text.
* @returns true if html item is using smart breaks
* @see setUseSmartBreaks
*/
bool useSmartBreaks() const { return mUseSmartBreaks; }
/**Sets whether the html item should use smart breaks. Smart breaks pre
vent
* the html frame contents from breaking mid-way though a line of text.
* @param useSmartBreaks set to true to prevent content from breaking
* mid-way through a line of text
* @see useSmartBreaks
*/
void setUseSmartBreaks( bool useSmartBreaks );
/**Sets the maximum distance allowed when calculating where to place pa
ge breaks
* in the html. This distance is the maximum amount of empty space allo
wed
* at the bottom of a frame after calculating the optimum break locatio
n. Setting
* a larger value will result in better choice of page break location,
but more
* wasted space at the bottom of frames. This setting is only effective
if
* useSmartBreaks is true.
* @param maxBreakDistance maximum amount of empty space to leave when
calculating
* page break locations
* @note added in 2.3
* @see maxBreakDistance
* @see setUseSmartBreaks
*/
void setMaxBreakDistance( double maxBreakDistance );
/**Returns the maximum distance allowed when calculating where to place
page breaks
* in the html. This distance is the maximum amount of empty space allo
wed
* at the bottom of a frame after calculating the optimum break locatio
n. This setting
* is only effective if useSmartBreaks is true.
* @returns maximum amount of empty space to leave when calculating pag
e break locations
* @note added in 2.3
* @see setMaxBreakDistance
* @see useSmartBreaks
*/
double maxBreakDistance() const { return mMaxBreakDistance; }
public slots:
/**Reloads the html source from the url and redraws the item.
* @see setUrl
* @see url
*/
void loadHtml();
private slots: private slots:
void frameLoaded( bool ok ); void frameLoaded( bool ok );
private: private:
QUrl mUrl; QUrl mUrl;
QWebPage* mWebPage; QWebPage* mWebPage;
bool mLoaded; bool mLoaded;
QSizeF mSize; //total size in mm QSizeF mSize; //total size in mm
double mHtmlUnitsToMM; double mHtmlUnitsToMM;
QImage* mRenderedPage;
bool mUseSmartBreaks;
double mMaxBreakDistance;
double htmlUnitsToMM(); //calculate scale factor double htmlUnitsToMM(); //calculate scale factor
//renders a snapshot of the page to a cached image
void renderCachedImage();
}; };
#endif // QGSCOMPOSERHTML_H #endif // QGSCOMPOSERHTML_H
 End of changes. 4 change blocks. 
0 lines changed or deleted 70 lines changed or added


 qgscomposeritem.h   qgscomposeritem.h 
skipping to change at line 136 skipping to change at line 136
@param dx move in x-direction (canvas coordinates) @param dx move in x-direction (canvas coordinates)
@param dy move in y-direction(canvas coordinates)*/ @param dy move in y-direction(canvas coordinates)*/
virtual void moveContent( double dx, double dy ) { Q_UNUSED( dx ); Q_UN USED( dy ); } virtual void moveContent( double dx, double dy ) { Q_UNUSED( dx ); Q_UN USED( dy ); }
/**Zoom content of item. Does nothing per default (but implemented in c omposer map) /**Zoom content of item. Does nothing per default (but implemented in c omposer map)
@param delta value from wheel event that describes magnitude and dire ction (positive /negative number) @param delta value from wheel event that describes magnitude and dire ction (positive /negative number)
@param x x-position of mouse cursor (in item coordinates) @param x x-position of mouse cursor (in item coordinates)
@param y y-position of mouse cursor (in item coordinates)*/ @param y y-position of mouse cursor (in item coordinates)*/
virtual void zoomContent( int delta, double x, double y ) { Q_UNUSED( d elta ); Q_UNUSED( x ); Q_UNUSED( y ); } virtual void zoomContent( int delta, double x, double y ) { Q_UNUSED( d elta ); Q_UNUSED( x ); Q_UNUSED( y ); }
/**Gets the page the item is currently on.
* @returns page number for item
* @see pagePos
* @see updatePagePos
* @note this method was added in version 2.4
*/
int page() const;
/**Returns the item's position relative to its current page.
* @returns position relative to the page's top left corner.
* @see page
* @see updatePagePos
* @note this method was added in version 2.4
*/
QPointF pagePos() const;
/**Moves the item so that it retains its relative position on the page
* when the paper size changes.
* @param newPageWidth new width of the page in mm
* @param newPageHeight new height of the page in mm
* @see page
* @see pagePos
* @note this method was added in version 2.4
*/
void updatePagePos( double newPageWidth, double newPageHeight );
/**Moves the item to a new position (in canvas coordinates)*/ /**Moves the item to a new position (in canvas coordinates)*/
void setItemPosition( double x, double y, ItemPositionMode itemPoint = UpperLeft ); void setItemPosition( double x, double y, ItemPositionMode itemPoint = UpperLeft, int page = -1 );
/**Sets item position and width / height in one go /**Sets item position and width / height in one go
@param x item position x @param x item position x
@param y item position y @param y item position y
@param width item width @param width item width
@param height item height @param height item height
@param itemPoint item position mode @param itemPoint item position mode
@param posIncludesFrame set to true if the position and size argument s include the item's frame border @param posIncludesFrame set to true if the position and size argument s include the item's frame border
@param page if page > 0, y is interpreted as relative to the origin o f the specified page, if page <= 0, y is in absolute canvas coordinates
@note: this method was added in version 1.6*/ @note: this method was added in version 1.6*/
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false ); void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false, int page = -1 );
/**Returns item's last used position mode. /**Returns item's last used position mode.
@note: This property has no effect on actual's item position, which i s always the top-left corner. @note: This property has no effect on actual's item position, which i s always the top-left corner.
@note: this method was added in version 2.0*/ @note: this method was added in version 2.0*/
ItemPositionMode lastUsedPositionMode() { return mLastUsedPositionMode; } ItemPositionMode lastUsedPositionMode() { return mLastUsedPositionMode; }
/**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*/
virtual void setSceneRect( const QRectF& rectangle ); virtual void setSceneRect( const QRectF& rectangle );
skipping to change at line 200 skipping to change at line 226
void setFrameEnabled( bool drawFrame ); void setFrameEnabled( bool drawFrame );
/** Sets frame outline width /** Sets frame outline width
* @param outlineWidth new width for outline frame * @param outlineWidth new width for outline frame
* @returns nothing * @returns nothing
* @note introduced in 2.2 * @note introduced in 2.2
* @see setFrameEnabled * @see setFrameEnabled
*/ */
virtual void setFrameOutlineWidth( double outlineWidth ); virtual void setFrameOutlineWidth( double outlineWidth );
/** Returns the frame's outline width. Only used if hasFrame is true.
* @returns Frame outline width
* @note introduced in 2.3
* @see hasFrame
* @see setFrameOutlineWidth
*/
double frameOutlineWidth() const { return pen().widthF(); }
/** Returns the join style used for drawing the item's frame
* @returns Join style for outline frame
* @note introduced in 2.3
* @see hasFrame
* @see setFrameJoinStyle
*/
Qt::PenJoinStyle frameJoinStyle() const { return mFrameJoinStyle; }
/** Sets join style used when drawing the item's frame
* @param style Join style for outline frame
* @returns nothing
* @note introduced in 2.3
* @see setFrameEnabled
* @see frameJoinStyle
*/
void setFrameJoinStyle( Qt::PenJoinStyle style );
/** Returns the estimated amount the item's frame bleeds outside the it em's /** Returns the estimated amount the item's frame bleeds outside the it em's
* actual rectangle. For instance, if the item has a 2mm frame outline , then * actual rectangle. For instance, if the item has a 2mm frame outline , then
* 1mm of this frame is drawn outside the item's rect. In this case th e * 1mm of this frame is drawn outside the item's rect. In this case th e
* return value will be 1.0 * return value will be 1.0
* @note introduced in 2.2 * @note introduced in 2.2
*/ */
virtual double estimatedFrameBleed() const; virtual double estimatedFrameBleed() const;
/** Returns the item's rectangular bounds, including any bleed caused b y the item's frame. /** Returns the item's rectangular bounds, including any bleed caused b y the item's frame.
* The bounds are returned in the item's coordinate system (see Qt's Q GraphicsItem docs for * The bounds are returned in the item's coordinate system (see Qt's Q GraphicsItem docs for
skipping to change at line 231 skipping to change at line 281
* @see hasBackground * @see hasBackground
*/ */
bool hasBackground() const {return mBackground;} bool hasBackground() const {return mBackground;}
/** Set whether this item has a Background drawn around it or not. /** Set whether this item has a Background drawn around it or not.
* @param drawBackground draw Background * @param drawBackground draw Background
* @returns nothing * @returns nothing
* @note introduced in 2.0 * @note introduced in 2.0
* @see hasBackground * @see hasBackground
*/ */
void setBackgroundEnabled( bool drawBackground ) {mBackground = drawBac kground;} void setBackgroundEnabled( bool drawBackground ) { mBackground = drawBa ckground; }
/** Gets the background color for this item /** Gets the background color for this item
* @returns background color * @returns background color
* @note introduced in 2.0 * @note introduced in 2.0
*/ */
QColor backgroundColor() const { return mBackgroundColor; } QColor backgroundColor() const { return mBackgroundColor; }
/** Sets the background color for this item /** Sets the background color for this item
* @param backgroundColor new background color * @param backgroundColor new background color
* @returns nothing * @returns nothing
* @note introduced in 2.0 * @note introduced in 2.0
*/ */
void setBackgroundColor( const QColor& backgroundColor ); void setBackgroundColor( const QColor& backgroundColor );
/** Returns the item's composition blending mode */ /** Returns the item's composition blending mode */
QPainter::CompositionMode blendMode() const {return mBlendMode;} QPainter::CompositionMode blendMode() const { return mBlendMode; }
/** Sets the item's composition blending mode*/ /** Sets the item's composition blending mode*/
void setBlendMode( QPainter::CompositionMode blendMode ); void setBlendMode( QPainter::CompositionMode blendMode );
/** Returns the item's transparency */ /** Returns the item's transparency */
int transparency() const {return mTransparency;} int transparency() const { return mTransparency; }
/** Sets the item's transparency */ /** Sets the item's transparency */
void setTransparency( int transparency ); void setTransparency( int transparency );
/** Returns true if effects (eg blend modes) are enabled for the item /** Returns true if effects (eg blend modes) are enabled for the item
* @note introduced in 2.0 * @note introduced in 2.0
*/ */
bool effectsEnabled() const {return mEffectsEnabled;} bool effectsEnabled() const { return mEffectsEnabled; }
/** Sets whether effects (eg blend modes) are enabled for the item /** Sets whether effects (eg blend modes) are enabled for the item
* @note introduced in 2.0 * @note introduced in 2.0
*/ */
void setEffectsEnabled( bool effectsEnabled ); void setEffectsEnabled( bool effectsEnabled );
/**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; }
QgsComposition* composition() {return mComposition;} QgsComposition* composition() {return mComposition;}
virtual void beginItemCommand( const QString& text ) { beginCommand( te xt ); } virtual void beginItemCommand( const QString& text ) { beginCommand( te xt ); }
/**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 );
virtual void endItemCommand() { endCommand(); } virtual void endItemCommand() { endCommand(); }
skipping to change at line 292 skipping to change at line 342
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 around 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 * @param p painter to use
nst QFont& font, Qt::AlignmentFlag halignment = Qt::AlignLeft, Qt::Alignmen * @param rect rectangle to draw into
tFlag valignment = Qt::AlignTop ) const; * @param text text to draw
* @param font font to use
* @param halignment optional horizontal alignment
* @param valignment optional vertical alignment
* @param flags allows for passing Qt::TextFlags to control appearance
of rendered text
*/
void drawText( QPainter* p, const QRectF& rect, const QString& text, co
nst QFont& font, Qt::AlignmentFlag halignment = Qt::AlignLeft, Qt::Alignmen
tFlag valignment = Qt::AlignTop, int flags = Qt::TextWordWrap ) 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*/
double fontHeightCharacterMM( const QFont& font, const QChar& c ) const ; double fontHeightCharacterMM( const QFont& font, const QChar& c ) const ;
/**Returns the font ascent in Millimeters (considers upscaling and down scaling with FONT_WORKAROUND_SCALE*/ /**Returns the font ascent in Millimeters (considers upscaling and down scaling with FONT_WORKAROUND_SCALE*/
double fontAscentMillimeters( const QFont& font ) const; double fontAscentMillimeters( const QFont& font ) const;
/**Returns the font ascent in Millimeters (considers upscaling and down scaling with FONT_WORKAROUND_SCALE*/ /**Returns the font descent in Millimeters (considers upscaling and dow nscaling with FONT_WORKAROUND_SCALE*/
double fontDescentMillimeters( const QFont& font ) const; double fontDescentMillimeters( const QFont& font ) const;
/**Returns the font height in Millimeters (considers upscaling and down
scaling with FONT_WORKAROUND_SCALE.
* Font height equals the font ascent+descent+1 (for baseline).
* @note Added in version 2.4
*/
double fontHeightMillimeters( const QFont& font ) const;
/**Calculates font to from point size to pixel size*/ /**Calculates font to from point size to pixel size*/
double pixelFontSize( double pointSize ) const; double pixelFontSize( double pointSize ) const;
/**Returns a font where size is in pixel and font size is upscaled with FONT_WORKAROUND_SCALE*/ /**Returns a font where size is in pixel and font size is upscaled with FONT_WORKAROUND_SCALE*/
QFont scaledFontPixelSize( const QFont& font ) const; QFont scaledFontPixelSize( const QFont& font ) const;
/**Locks / unlocks the item position for mouse drags /**Locks / unlocks the item position for mouse drags
@note this method was added in version 1.2*/ @note this method was added in version 1.2*/
void setPositionLock( bool lock ); void setPositionLock( bool lock );
/**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; }
/**Returns the rotation for the composer item /**Returns the rotation for the composer item
@note this method was added in version 2.1*/ @note this method was added in version 2.1*/
double itemRotation() const {return mItemRotation;} double itemRotation() const { return mItemRotation; }
/**Returns the rotation for the composer item /**Returns the rotation for the composer item
* @deprecated Use itemRotation() * @deprecated Use itemRotation()
* instead * instead
*/ */
double rotation() const {return mItemRotation;} Q_DECL_DEPRECATED double rotation() const { return mItemRotation; }
/**Updates item, with the possibility to do custom update for subclasse s*/ /**Updates item, with the possibility to do custom update for subclasse s*/
virtual void updateItem() { QGraphicsRectItem::update(); } virtual void updateItem() { QGraphicsRectItem::update(); }
/**Get item's id (which is not necessarly unique) /**Get item's id (which is not necessarly unique)
@note this method was added in version 1.7*/ @note this method was added in version 1.7*/
QString id() const { return mId; } QString id() const { return mId; }
/**Set item's id (which is not necessarly unique) /**Set item's id (which is not necessarly unique)
@note this method was added in version 1.7*/ @note this method was added in version 1.7*/
virtual void setId( const QString& id ); virtual void setId( const QString& id );
/**Get item identification name /**Get item identification name
@note this method was added in version 2.0 @note this method was added in version 2.0
@note there is not setter since one can't manually set the id*/ @note there is not setter since one can't manually set the id*/
QString uuid() const { return mUuid; } QString uuid() const { return mUuid; }
/**Get the number of layers that this item requires for exporting as la
yers
* @returns 0 if this item is to be placed on the same layer as the pre
vious item,
* 1 if it should be placed on its own layer, and >1 if it requires mul
tiple export layers
* @note this method was added in version 2.4
*/
virtual int numberExportLayers() const { return 0; }
/**Sets the current layer to draw for exporting
* @param layerIdx can be set to -1 to draw all item layers, and must b
e less than numberExportLayers()
* @note this method was added in version 2.4
*/
virtual void setCurrentExportLayer( int layerIdx = -1 ) { mCurrentExpor
tLayer = layerIdx; }
public slots: public slots:
/**Sets the item rotation /**Sets the item rotation
* @deprecated Use setItemRotation( double rotation ) instead * @deprecated Use setItemRotation( double rotation ) instead
*/ */
virtual void setRotation( double r ); virtual void setRotation( double r );
/**Sets the item rotation /**Sets the item rotation
@param r item rotation in degrees @param r item rotation in degrees
@param adjustPosition set to true if item should be shifted so that r otation occurs @param adjustPosition set to true if item should be shifted so that r otation occurs
around item center. If false, rotation occurs around item origin around item center. If false, rotation occurs around item origin
skipping to change at line 385 skipping to change at line 462
QGraphicsRectItem* mBoundingResizeRectangle; QGraphicsRectItem* mBoundingResizeRectangle;
QGraphicsLineItem* mHAlignSnapItem; QGraphicsLineItem* mHAlignSnapItem;
QGraphicsLineItem* mVAlignSnapItem; QGraphicsLineItem* mVAlignSnapItem;
/**True if item fram needs to be painted*/ /**True if item fram needs to be painted*/
bool mFrame; bool mFrame;
/**True if item background needs to be painted*/ /**True if item background needs to be painted*/
bool mBackground; bool mBackground;
/**Background color*/ /**Background color*/
QColor mBackgroundColor; QColor mBackgroundColor;
/**Frame join style*/
Qt::PenJoinStyle mFrameJoinStyle;
/**True if item position and size cannot be changed with mouse move /**True if item position and size cannot be changed with mouse move
@note: this member was added in version 1.2*/ @note: this member was added in version 1.2*/
bool mItemPositionLocked; bool mItemPositionLocked;
/**Backup to restore item appearance if no view scale factor is availab le*/ /**Backup to restore item appearance if no view scale factor is availab le*/
mutable double mLastValidViewScaleFactor; mutable double mLastValidViewScaleFactor;
/**Item rotation in degrees, clockwise*/ /**Item rotation in degrees, clockwise*/
double mItemRotation; double mItemRotation;
skipping to change at line 408 skipping to change at line 487
bool mEffectsEnabled; bool mEffectsEnabled;
QgsComposerEffect *mEffect; QgsComposerEffect *mEffect;
/**Item transparency*/ /**Item transparency*/
int mTransparency; int mTransparency;
/**The item's position mode /**The item's position mode
@note: this member was added in version 2.0*/ @note: this member was added in version 2.0*/
ItemPositionMode mLastUsedPositionMode; ItemPositionMode mLastUsedPositionMode;
/**The layer that needs to be exported
@note: if -1, all layers are to be exported
@note: this member was added in version 2.4*/
int mCurrentExportLayer;
/**Draw selection boxes around item*/ /**Draw selection boxes around item*/
virtual void drawSelectionBoxes( QPainter* p ); virtual void drawSelectionBoxes( QPainter* p );
/**Draw black frame around item*/ /**Draw black frame around item*/
virtual void drawFrame( QPainter* p ); virtual void drawFrame( QPainter* p );
/**Draw background*/ /**Draw background*/
virtual void drawBackground( QPainter* p ); virtual void drawBackground( QPainter* p );
/**Draws arrowhead*/ /**Draws arrowhead*/
skipping to change at line 444 skipping to change at line 528
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, doubl e rotation ) const; bool imageSizeConsideringRotation( double& width, double& height, doubl e rotation ) const;
/**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
* @deprecated Use bool imageSizeConsideringRotation( double& width, do uble& height, double rotation ) * @deprecated Use bool imageSizeConsideringRotation( double& width, do uble& height, double rotation )
* instead * instead
*/ */
bool imageSizeConsideringRotation( double& width, double& height ) cons t; Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, dou ble& height ) const;
/**Calculates the largest scaled version of originalRect which fits wit hin boundsRect, when it is rotated by /**Calculates the largest scaled version of originalRect which fits wit hin boundsRect, when it is rotated by
* a specified amount * a specified amount
@param originalRect QRectF to be rotated and scaled @param originalRect QRectF to be rotated and scaled
@param boundsRect QRectF specifying the bounds which the rotated an d scaled rectangle must fit within @param boundsRect QRectF specifying the bounds which the rotated an d scaled rectangle must fit within
@param rotation the rotation in degrees to be applied to the rectan gle @param rotation the rotation in degrees to be applied to the rectan gle
*/ */
QRectF largestRotatedRectWithinBounds( QRectF originalRect, QRectF boun dsRect, double rotation ) const; QRectF largestRotatedRectWithinBounds( QRectF originalRect, QRectF boun dsRect, double rotation ) const;
/**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, double rotation ) const; bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double wi dth, double height, double rotation ) const;
/**Calculates corner point after rotation and scaling /**Calculates corner point after rotation and scaling
* @deprecated Use bool cornerPointOnRotatedAndScaledRect( double& x, d ouble& y, double width, double height, double rotation ) * @deprecated Use bool cornerPointOnRotatedAndScaledRect( double& x, d ouble& y, double width, double height, double rotation )
* instead * instead
*/ */
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double wi dth, double height ) const; Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, do uble& y, double width, double height ) const;
/**Calculates width / height of the bounding box of a rotated rectangle */ /**Calculates width / height of the bounding box of a rotated rectangle */
void sizeChangedByRotation( double& width, double& height, double rotat ion ); void sizeChangedByRotation( double& width, double& height, double rotat ion );
/**Calculates width / height of the bounding box of a rotated rectangle /**Calculates width / height of the bounding box of a rotated rectangle
* @deprecated Use void sizeChangedByRotation( double& width, double& he ight, double rotation ) * @deprecated Use void sizeChangedByRotation( double& width, double& he ight, double rotation )
* instead * instead
*/ */
void sizeChangedByRotation( double& width, double& height ); Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& he ight );
/**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;
/**Return horizontal align snap item. Creates a new graphics line if 0* / /**Return horizontal align snap item. Creates a new graphics line if 0* /
QGraphicsLineItem* hAlignSnapItem(); QGraphicsLineItem* hAlignSnapItem();
void deleteHAlignSnapItem(); void deleteHAlignSnapItem();
 End of changes. 22 change blocks. 
19 lines changed or deleted 110 lines changed or added


 qgscomposeritemcommand.h   qgscomposeritemcommand.h 
skipping to change at line 121 skipping to change at line 121
TableGridStrokeWidth, TableGridStrokeWidth,
//composer shape //composer shape
ShapeCornerRadius, ShapeCornerRadius,
ShapeOutlineWidth, ShapeOutlineWidth,
//composer arrow //composer arrow
ArrowOutlineWidth, ArrowOutlineWidth,
ArrowHeadWidth, ArrowHeadWidth,
//item //item
ItemOutlineWidth, ItemOutlineWidth,
ItemMove, ItemMove,
ItemRotation ItemRotation,
ItemTransparency
}; };
QgsComposerMergeCommand( Context c, QgsComposerItem* item, const QStrin g& text ); QgsComposerMergeCommand( Context c, QgsComposerItem* item, const QStrin g& text );
~QgsComposerMergeCommand(); ~QgsComposerMergeCommand();
bool mergeWith( const QUndoCommand * command ); bool mergeWith( const QUndoCommand * command );
int id() const { return ( int )mContext; } int id() const { return ( int )mContext; }
private: private:
Context mContext; Context mContext;
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 qgscomposerlabel.h   qgscomposerlabel.h 
skipping to change at line 77 skipping to change at line 77
Qt::AlignmentFlag hAlign() const { return mHAlignment; } Qt::AlignmentFlag hAlign() const { return mHAlignment; }
/** Mutator for the horizontal alignment of the label /** Mutator for the horizontal alignment of the label
* @param a alignment * @param a alignment
* @returns void * @returns void
*/ */
void setHAlign( Qt::AlignmentFlag a ) {mHAlignment = a;} void setHAlign( Qt::AlignmentFlag a ) {mHAlignment = a;}
/** Mutator for the vertical alignment of the label /** Mutator for the vertical alignment of the label
* @param a alignment * @param a alignment
* @returns void * @returns void
*/ */
void setVAlign( Qt::AlignmentFlag a ) {mVAlignment = a;} void setVAlign( Qt::AlignmentFlag a ) { mVAlignment = a; }
//!brief Accessor for the margin of the label //!brief Accessor for the margin of the label
double margin() {return mMargin;} double margin() { return mMargin; }
//!brief Mutator for the margin of the label //!brief Mutator for the margin of the label
void setMargin( double m ) {mMargin = m;} void setMargin( double m ) { mMargin = m; }
/**Sets text color /**Sets text color
@note: this function was added in version 1.4*/ @note: this function was added in version 1.4*/
void setFontColor( const QColor& c ) {mFontColor = c;} void setFontColor( const QColor& c ) { mFontColor = c; }
/**Get font color /**Get font color
@note: this function was added in version 1.4*/ @note: this function was added in version 1.4*/
QColor fontColor() const {return mFontColor;} QColor fontColor() const { return mFontColor; }
/** stores state in Dom element /** stores state in Dom element
* @param elem is Dom element corresponding to 'Composer' tag * @param elem is Dom element corresponding to 'Composer' tag
* @param doc document * @param doc 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 element corresponding to 'ComposerLabel' ta g * @param itemElem is Dom element corresponding to 'ComposerLabel' ta g
* @param doc document * @param doc document
*/ */
bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
public slots:
void refreshExpressionContext();
private slots: private slots:
void loadingHtmlFinished( bool ); void loadingHtmlFinished( bool );
private: private:
// Text // Text
QString mText; QString mText;
// Html state // Html state
int mHtmlState; int mHtmlState;
double mHtmlUnitsToMM; double mHtmlUnitsToMM;
 End of changes. 6 change blocks. 
5 lines changed or deleted 8 lines changed or added


 qgscomposerlegend.h   qgscomposerlegend.h 
skipping to change at line 61 skipping to change at line 61
/**Sets item box to the whole content*/ /**Sets item box to the whole content*/
void adjustBoxSize(); void adjustBoxSize();
/**Returns pointer to the legend model*/ /**Returns pointer to the legend model*/
QgsLegendModel* model() {return &mLegendModel;} QgsLegendModel* model() {return &mLegendModel;}
//setters and getters //setters and getters
void setTitle( const QString& t ) {mTitle = t;} void setTitle( const QString& t ) {mTitle = t;}
QString title() const {return mTitle;} QString title() const {return mTitle;}
/**Returns the alignment of the legend title
* @returns Qt::AlignmentFlag for the legend title
* @note added in 2.3
* @see setTitleAlignment
*/
Qt::AlignmentFlag titleAlignment() const { return mTitleAlignment; }
/**Sets the alignment of the legend title
* @param alignment Text alignment for drawing the legend title
* @note added in 2.3
* @see titleAlignment
*/
void setTitleAlignment( Qt::AlignmentFlag alignment ) { mTitleAlignment
= alignment; }
/** Returns reference to modifiable style */ /** Returns reference to modifiable style */
QgsComposerLegendStyle & rstyle( QgsComposerLegendStyle::Style s ) { re turn mStyleMap[s]; } QgsComposerLegendStyle & rstyle( QgsComposerLegendStyle::Style s ) { re turn mStyleMap[s]; }
/** Returns style */ /** Returns style */
QgsComposerLegendStyle style( QgsComposerLegendStyle::Style s ) const { return mStyleMap.value( s ); } QgsComposerLegendStyle style( QgsComposerLegendStyle::Style s ) const { return mStyleMap.value( s ); }
void setStyle( QgsComposerLegendStyle::Style s, const QgsComposerLegend Style style ) { mStyleMap[s] = style; } void setStyle( QgsComposerLegendStyle::Style s, const QgsComposerLegend Style style ) { mStyleMap[s] = style; }
QFont styleFont( QgsComposerLegendStyle::Style s ) const { return style ( s ).font(); } QFont styleFont( QgsComposerLegendStyle::Style s ) const { return style ( s ).font(); }
/** Set style font */ /** Set style font */
void setStyleFont( QgsComposerLegendStyle::Style s, const QFont& f ); void setStyleFont( QgsComposerLegendStyle::Style s, const QFont& f );
skipping to change at line 156 skipping to change at line 169
double mSymbolHeight; double mSymbolHeight;
/**Width of WMS legendGraphic pixmap*/ /**Width of WMS legendGraphic pixmap*/
double mWmsLegendWidth; double mWmsLegendWidth;
/**Height of WMS legendGraphic pixmap*/ /**Height of WMS legendGraphic pixmap*/
double mWmsLegendHeight; double mWmsLegendHeight;
/** Spacing between lines when wrapped */ /** Spacing between lines when wrapped */
double mlineSpacing; double mlineSpacing;
/** Title alignment, one of Qt::AlignLeft, Qt::AlignHCenter, Qt::AlignR
ight) */
Qt::AlignmentFlag mTitleAlignment;
/** Number of legend columns */ /** Number of legend columns */
int mColumnCount; int mColumnCount;
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;
/** Allow splitting layers into multiple columns */ /** Allow splitting layers into multiple columns */
bool mSplitLayer; bool mSplitLayer;
skipping to change at line 217 skipping to change at line 233
}; };
/** Create list of atoms according to current layer splitting mode */ /** Create list of atoms according to current layer splitting mode */
QList<Atom> createAtomList( QStandardItem* rootItem, bool splitLayer ); QList<Atom> createAtomList( QStandardItem* rootItem, bool splitLayer );
/** Divide atoms to columns and set columns on atoms */ /** Divide atoms to columns and set columns on atoms */
void setColumns( QList<Atom>& atomList ); void setColumns( QList<Atom>& atomList );
QgsComposerLegend(); //forbidden QgsComposerLegend(); //forbidden
/**Draws title in the legend using the title font and the specified ali
gnment
* If no painter is specified, function returns the required width/heig
ht to draw the title.
*/
QSizeF drawTitle( QPainter* painter = 0, QPointF point = QPointF(), Qt: :AlignmentFlag halignment = Qt::AlignLeft ); QSizeF drawTitle( QPainter* painter = 0, QPointF point = QPointF(), Qt: :AlignmentFlag halignment = Qt::AlignLeft );
/**Draws a group item and all subitems /**Draws a group item and all subitems
* Returns list of sizes of layers and groups including this group. * Returns list of sizes of layers and groups including this group.
*/ */
QSizeF drawGroupItemTitle( QgsComposerGroupItem* groupItem, QPainter* p ainter = 0, QPointF point = QPointF() ); QSizeF drawGroupItemTitle( QgsComposerGroupItem* groupItem, QPainter* p ainter = 0, QPointF point = QPointF() );
/**Draws a layer item and all subitems*/ /**Draws a layer item and all subitems*/
QSizeF drawLayerItemTitle( QgsComposerLayerItem* layerItem, QPainter* p ainter = 0, QPointF point = QPointF() ); QSizeF drawLayerItemTitle( QgsComposerLayerItem* layerItem, QPainter* p ainter = 0, QPointF point = QPointF() );
Nucleon drawSymbolItem( QgsComposerLegendItem* symbolItem, QPainter* pa inter = 0, QPointF point = QPointF(), double labelXOffset = 0. ); Nucleon drawSymbolItem( QgsComposerLegendItem* symbolItem, QPainter* pa inter = 0, QPointF point = QPointF(), double labelXOffset = 0. );
/**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 drawSymbolV2( QPainter* p, QgsSymbolV2* s, double currentYCoord, d ouble& currentXPosition, double& symbolHeight ) const; void drawSymbolV2( QPainter* p, QgsSymbolV2* s, double currentYCoord, d ouble& currentXPosition, double& symbolHeight, int opacity = 255 ) const;
/** Draw atom and return its actual size, the atom is drawn with the sp ace above it /** Draw atom and return its actual size, the atom is drawn with the sp ace above it
* so that first atoms in column are all aligned to the same line rega rdles their * so that first atoms in column are all aligned to the same line rega rdles their
* style top space */ * style top space */
QSizeF drawAtom( Atom atom, QPainter* painter = 0, QPointF point = QPoi ntF() ); QSizeF drawAtom( Atom atom, QPainter* painter = 0, QPointF point = QPoi ntF() );
double spaceAboveAtom( Atom atom ); double spaceAboveAtom( Atom atom );
/**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;
 End of changes. 4 change blocks. 
1 lines changed or deleted 24 lines changed or added


 qgscomposermap.h   qgscomposermap.h 
skipping to change at line 95 skipping to change at line 95
enum GridAnnotationFormat enum GridAnnotationFormat
{ {
Decimal = 0, Decimal = 0,
DegreeMinute, DegreeMinute,
DegreeMinuteSecond DegreeMinuteSecond
}; };
enum GridFrameStyle enum GridFrameStyle
{ {
NoGridFrame = 0, NoGridFrame = 0,
Zebra //black / white pattern Zebra // black/white pattern
}; };
/**Enum for different frame borders*/ /**Enum for different frame borders*/
enum Border enum Border
{ {
Left, Left,
Right, Right,
Bottom, Bottom,
Top Top
}; };
/** Scaling modes used for the serial rendering (atlas)
*/
enum AtlasScalingMode
{
Fixed, /*< The current scale of the map is used for each feature
of the atlas */
Predefined, /*< A scale is chosen from the predefined scales. The sma
llest scale from
the list of scales where the atlas feature is fully vis
ible is chosen.
@see QgsAtlasComposition::setPredefinedScales.
@note This mode is only valid for polygon or line atlas
coverage layers
*/
Auto /*< The extent is adjusted so that each feature is fully
visible.
A margin is applied around the center @see setAtlasMarg
in
@note This mode is only valid for polygon or line atlas
coverage layers*/
};
/** \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
@param forceWidthScale force wysiwyg line widths / marker sizes @param forceWidthScale force wysiwyg line widths / marker sizes
*/ */
void draw( QPainter *painter, const QgsRectangle& extent, const QSizeF& size, double dpi, double* forceWidthScale = 0 ); 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 */
skipping to change at line 163 skipping to change at line 178
/**Sets new Extent for the current atlas preview and changes width, hei ght (and implicitely also scale). /**Sets new Extent for the current atlas preview and changes width, hei ght (and implicitely also scale).
Atlas preview extents are only temporary, and are regenerated wheneve r the atlas feature changes Atlas preview extents are only temporary, and are regenerated wheneve r the atlas feature changes
*/ */
void setNewAtlasFeatureExtent( const QgsRectangle& extent ); void setNewAtlasFeatureExtent( const QgsRectangle& extent );
/**Called when atlas preview is toggled, to force map item to update it s extent and redraw*/ /**Called when atlas preview is toggled, to force map item to update it s extent and redraw*/
void toggleAtlasPreview(); void toggleAtlasPreview();
/**Returns a pointer to the current map extent, which is either the ori ginal user specified /**Returns a pointer to the current map extent, which is either the ori ginal user specified
extent or the temporary atlas-driven feature extent depending on the * extent or the temporary atlas-driven feature extent depending on the
current atlas state of the composition. current atlas state
Both a const and non-const version are included.*/ * of the composition. Both a const and non-const version are included.
* @returns pointer to current map extent
* @see visibleExtentPolygon
*/
QgsRectangle* currentMapExtent(); QgsRectangle* currentMapExtent();
const QgsRectangle* currentMapExtent() const; const QgsRectangle* currentMapExtent() const;
PreviewMode previewMode() const {return mPreviewMode;} PreviewMode previewMode() const {return mPreviewMode;}
void setPreviewMode( PreviewMode 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
skipping to change at line 192 skipping to change at line 210
@note this function was added in version 1.2*/ @note this function was added in version 1.2*/
void setLayerSet( const QStringList& layerSet ) {mLayerSet = layerSet;} void setLayerSet( const QStringList& layerSet ) {mLayerSet = layerSet;}
/**Stores the current layer set of the qgis mapcanvas in mLayerSet*/ /**Stores the current layer set of the qgis mapcanvas in mLayerSet*/
void storeCurrentLayerSet(); void storeCurrentLayerSet();
// Set cache outdated // Set cache outdated
void setCacheUpdated( bool u = false ); void setCacheUpdated( bool u = false );
QgsRectangle extent() const {return mExtent;} QgsRectangle extent() const {return mExtent;}
const QgsMapRenderer* mapRenderer() const {return mMapRenderer;} //! @deprecated since 2.4 - use mapSettings() - may return 0 if not ini
tialized with QgsMapRenderer
Q_DECL_DEPRECATED const QgsMapRenderer* mapRenderer() const;
/**Sets offset values to shift image (useful for live updates when movi ng item content)*/ /**Sets offset values to shift image (useful for live updates when movi ng item content)*/
void setOffset( double xOffset, double yOffset ); void setOffset( double xOffset, double yOffset );
/**True if composer map renders a WMS layer*/ /**True if composer map renders a WMS layer*/
bool containsWMSLayer() const; bool containsWMSLayer() const;
/**True if composer map contains layers with blend modes or flattened l ayers for vectors */ /**True if composer map contains layers with blend modes or flattened l ayers for vectors */
bool containsAdvancedEffects() const; bool containsAdvancedEffects() const;
skipping to change at line 349 skipping to change at line 368
/**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;}
/**Sets rotation for the map - this does not affect the composer item s hape, only the /**Sets rotation for the map - this does not affect the composer item s hape, only the
way the map is drawn within the item way the map is drawn within the item
* @deprecated Use setMapRotation( double rotation ) instead * @deprecated Use setMapRotation( double rotation ) instead
*/ */
void setRotation( double r ); Q_DECL_DEPRECATED void setRotation( double r );
/**Returns the rotation used for drawing the map within the composer it em /**Returns the rotation used for drawing the map within the composer it em
* @deprecated Use mapRotation() instead * @deprecated Use mapRotation() instead
*/ */
double rotation() const { return mMapRotation;}; Q_DECL_DEPRECATED double rotation() const { return mMapRotation;};
/**Sets rotation for the map - this does not affect the composer item s hape, only the /**Sets rotation for the map - this does not affect the composer item s hape, only the
way the map is drawn within the item way the map is drawn within the item
@note this function was added in version 2.1*/ @note this function was added in version 2.1*/
void setMapRotation( double r ); void setMapRotation( double r );
/**Returns the rotation used for drawing the map within the composer it em*/ /**Returns the rotation used for drawing the map within the composer it em*/
double mapRotation() const { return mMapRotation;}; double mapRotation() const { return mMapRotation;};
void updateItem(); void updateItem();
skipping to change at line 414 skipping to change at line 434
void setGridBlendMode( QPainter::CompositionMode blendMode ); void setGridBlendMode( QPainter::CompositionMode blendMode );
/**Sets mId to a number not yet used in the composition. mId is kept if it is not in use. /**Sets mId to a number not yet used in the composition. mId is kept if it is not in use.
Usually, this function is called before adding the composer map to the composition*/ Usually, this function is called before adding the composer map to the composition*/
void assignFreeId(); void assignFreeId();
/**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
* @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation ) * @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation )
* instead * instead
*/ */
bool imageSizeConsideringRotation( double& width, double& height ) cons t; Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, dou ble& height ) const;
/**Calculates corner point after rotation and scaling /**Calculates corner point after rotation and scaling
* @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) * @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
* instead * instead
*/ */
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double wi dth, double height ) const; Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, do uble& y, double width, double height ) const;
/**Calculates width / height of the bounding box of a rotated rectangle /**Calculates width / height of the bounding box of a rotated rectangle
* @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width , double& height, double rotation ) * @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width , double& height, double rotation )
* instead * instead
*/ */
void sizeChangedByRotation( double& width, double& height ); Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& he ight );
/** Returns true if the map extent is set to follow the current atlas f /**Returns whether the map extent is set to follow the current atlas fe
eature */ ature.
* @returns true if map will follow the current atlas feature.
* @see setAtlasDriven
* @see atlasScalingMode
*/
bool atlasDriven() const { return mAtlasDriven; } bool atlasDriven() const { return mAtlasDriven; }
/** Set to true if the map extents should be set by the current atlas f
eature */ /**Sets whether the map extent will follow the current atlas feature.
* @param enabled set to true if the map extents should be set by the c
urrent atlas feature.
* @see atlasDriven
* @see setAtlasScalingMode
*/
void setAtlasDriven( bool enabled ) { mAtlasDriven = enabled; } void setAtlasDriven( bool enabled ) { mAtlasDriven = enabled; }
/** Returns true if the map uses a fixed scale when in atlas mode */ /**Returns true if the map uses a fixed scale when in atlas mode
bool atlasFixedScale() const { return mAtlasFixedScale; } * @deprecated since 2.4 Use atlasScalingMode() instead
/** Set to true if the map should use a fixed scale when in atlas mode */
*/ Q_DECL_DEPRECATED bool atlasFixedScale() const;
void setAtlasFixedScale( bool fixed ) { mAtlasFixedScale = fixed; }
/**Set to true if the map should use a fixed scale when in atlas mode
* @deprecated since 2.4 Use setAtlasScalingMode() instead
*/
Q_DECL_DEPRECATED void setAtlasFixedScale( bool fixed );
/**Returns the current atlas scaling mode. This controls how the map's
extents
* are calculated for the current atlas feature when an atlas compositi
on
* is enabled.
* @returns the current scaling mode
* @note this parameter is only used if atlasDriven() is true
* @see setAtlasScalingMode
* @see atlasDriven
*/
AtlasScalingMode atlasScalingMode() const { return mAtlasScalingMode; }
/**Sets the current atlas scaling mode. This controls how the map's ext
ents
* are calculated for the current atlas feature when an atlas compositi
on
* is enabled.
* @param mode atlas scaling mode to set
* @note this parameter is only used if atlasDriven() is true
* @see atlasScalingMode
* @see atlasDriven
*/
void setAtlasScalingMode( AtlasScalingMode mode ) { mAtlasScalingMode =
mode; }
/** Returns the margin size (percentage) used when the map is in atlas /**Returns the margin size (percentage) used when the map is in atlas m
mode */ ode.
* @returns margin size in percentage to leave around the atlas feature
's extent
* @note this is only used if atlasScalingMode() is Auto.
* @see atlasScalingMode
* @see setAtlasMargin
*/
double atlasMargin() const { return mAtlasMargin; } double atlasMargin() const { return mAtlasMargin; }
/** Sets the margin size (percentage) used when the map is in atlas mod
e */ /**Sets the margin size (percentage) used when the map is in atlas mode
.
* @param margin size in percentage to leave around the atlas feature's
extent
* @note this is only used if atlasScalingMode() is Auto.
* @see atlasScalingMode
* @see atlasMargin
*/
void setAtlasMargin( double margin ) { mAtlasMargin = margin; } void setAtlasMargin( double margin ) { mAtlasMargin = margin; }
/** Sets whether updates to the composer map are enabled. */
void setUpdatesEnabled( bool enabled ) { mUpdatesEnabled = enabled; }
/** Returns whether updates to the composer map are enabled. */
bool updatesEnabled() const { return mUpdatesEnabled; }
/**Get the number of layers that this item requires for exporting as la
yers
* @returns 0 if this item is to be placed on the same layer as the pre
vious item,
* 1 if it should be placed on its own layer, and >1 if it requires mul
tiple export layers
* @note this method was added in version 2.4
*/
int numberExportLayers() const;
/**Returns a polygon representing the current visible map extent, consi
dering map extents and rotation.
* If the map rotation is 0, the result is the same as currentMapExtent
* @returns polygon with the four corner points representing the visibl
e map extent. The points are
* clockwise, starting at the top-left point
* @see currentMapExtent
*/
QPolygonF visibleExtentPolygon() const;
signals: signals:
void extentChanged(); void extentChanged();
/**Is emitted on rotation change to notify north arrow pictures*/ /**Is emitted on rotation change to notify north arrow pictures*/
void mapRotationChanged( double newRotation ); void mapRotationChanged( double newRotation );
/**Is emitted when the map has been prepared for atlas rendering, just
before actual rendering*/
void preparedForAtlas();
public slots: public slots:
/**Called if map canvas has changed*/ /**Called if map canvas has changed*/
void updateCachedImage( ); void updateCachedImage( );
/**Call updateCachedImage if item is in render mode*/ /**Call updateCachedImage if item is in render mode*/
void renderModeUpdateCachedImage(); void renderModeUpdateCachedImage();
void overviewExtentChanged(); void overviewExtentChanged();
private: private:
enum AnnotationCoordinate enum AnnotationCoordinate
{ {
Longitude = 0, Longitude = 0,
Latitude Latitude
}; };
// Pointer to map renderer of the QGIS main map. Note that QgsComposerM
ap uses a different map renderer,
//it just copies some properties from the main map renderer.
QgsMapRenderer *mMapRenderer;
/**Unique identifier*/ /**Unique identifier*/
int mId; int mId;
// Map region in map units realy used for rendering // Map region in map units realy used for rendering
// It can be the same as mUserExtent, but it can be bigger in on dimens ion if mCalculate==Scale, // It can be the same as mUserExtent, but it can be bigger in on dimens ion if mCalculate==Scale,
// so that full rectangle in paper is used. // so that full rectangle in paper is used.
QgsRectangle mExtent; QgsRectangle mExtent;
// Current temporary map region in map units. This is overwritten when atlas feature changes. It's also // Current temporary map region in map units. This is overwritten when atlas feature changes. It's also
// used when the user changes the map extent and an atlas preview is en abled. This allows the user // used when the user changes the map extent and an atlas preview is en abled. This allows the user
skipping to change at line 521 skipping to change at line 606
int mOverviewFrameMapId; int mOverviewFrameMapId;
/**Drawing style for overview farme*/ /**Drawing style for overview farme*/
QgsFillSymbolV2* mOverviewFrameMapSymbol; QgsFillSymbolV2* mOverviewFrameMapSymbol;
QgsLineSymbolV2* mGridLineSymbol; QgsLineSymbolV2* mGridLineSymbol;
/**Blend mode for overview*/ /**Blend mode for overview*/
QPainter::CompositionMode mOverviewBlendMode; QPainter::CompositionMode mOverviewBlendMode;
bool mOverviewInverted; bool mOverviewInverted;
/** Centering mode for overview */ /** Centering mode for overview */
bool mOverviewCentered; bool mOverviewCentered;
/** Whether updates to the map are enabled */
bool mUpdatesEnabled;
/**Establishes signal/slot connection for update in case of layer chang e*/ /**Establishes signal/slot connection for update in case of layer chang e*/
void connectUpdateSlot(); void connectUpdateSlot();
/**Removes layer ids from mLayerSet that are no longer present in the q gis main map*/ /**Removes layer ids from mLayerSet that are no longer present in the q gis main map*/
void syncLayerSet(); void syncLayerSet();
/**True if coordinate grid has to be displayed*/ /**True if coordinate grid has to be displayed*/
bool mGridEnabled; bool mGridEnabled;
/**Solid or crosses*/ /**Solid or crosses*/
GridStyle mGridStyle; GridStyle mGridStyle;
skipping to change at line 594 skipping to change at line 682
QGraphicsView* mMapCanvas; QGraphicsView* mMapCanvas;
/**True if annotation items, rubber band, etc. from the main canvas sho uld be displayed*/ /**True if annotation items, rubber band, etc. from the main canvas sho uld be displayed*/
bool mDrawCanvasItems; bool mDrawCanvasItems;
/**Adjusts an extent rectangle to match the provided item width and hei ght, so that extent /**Adjusts an extent rectangle to match the provided item width and hei ght, so that extent
* center of extent remains the same */ * center of extent remains the same */
void adjustExtentToItemShape( double itemWidth, double itemHeight, QgsR ectangle& extent ) const; void adjustExtentToItemShape( double itemWidth, double itemHeight, QgsR ectangle& extent ) const;
/**True if map is being controlled by an atlas*/ /**True if map is being controlled by an atlas*/
bool mAtlasDriven; bool mAtlasDriven;
/**True if map uses a fixed scale when controlled by an atlas*/ /**Current atlas scaling mode*/
bool mAtlasFixedScale; AtlasScalingMode mAtlasScalingMode;
/**Margin size for atlas driven extents (percentage of feature size)*/ /**Margin size for atlas driven extents (percentage of feature size) -
when in auto scaling mode*/
double mAtlasMargin; double mAtlasMargin;
/**Returns a list of the layers to render for this map item*/ /**Returns a list of the layers to render for this map item*/
QStringList layersToRender(); QStringList layersToRender() const;
/**Draws the map grid*/ /**Draws the map grid*/
void drawGrid( QPainter* p ); void drawGrid( QPainter* p );
void drawGridFrame( QPainter* p, const QList< QPair< double, QLineF > > & hLines, const QList< QPair< double, QLineF > >& vLines ); void drawGridFrame( QPainter* p, const QList< QPair< double, QLineF > > & hLines, const QList< QPair< double, QLineF > >& vLines );
/**Draw coordinates for mGridAnnotationType Coordinate /**Draw coordinates for mGridAnnotationType Coordinate
@param p drawing painter @param p drawing painter
@param hLines horizontal coordinate lines in item coordinates @param hLines horizontal coordinate lines in item coordinates
@param vLines vertical coordinate lines in item coordinates*/ @param vLines vertical coordinate lines in item coordinates*/
void drawCoordinateAnnotations( QPainter* p, const QList< QPair< double , QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines ); void drawCoordinateAnnotations( QPainter* p, const QList< QPair< double , QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines );
void drawCoordinateAnnotation( QPainter* p, const QPointF& pos, QString annotationString ); void drawCoordinateAnnotation( QPainter* p, const QPointF& pos, QString annotationString );
skipping to change at line 629 skipping to change at line 717
@return 0 in case of success*/ @return 0 in case of success*/
int xGridLines( QList< QPair< double, QLineF > >& lines ) const; int xGridLines( QList< QPair< double, QLineF > >& lines ) const;
/**Returns the grid lines for the y-coordinates. Not vertical in case o f rotation /**Returns the grid lines for the y-coordinates. Not vertical in case o f rotation
@return 0 in case of success*/ @return 0 in case of success*/
int yGridLines( QList< QPair< double, QLineF > >& lines ) const; int yGridLines( QList< QPair< double, QLineF > >& lines ) const;
/**Returns extent that considers mOffsetX / mOffsetY (during content mo ve)*/ /**Returns extent that considers mOffsetX / mOffsetY (during content mo ve)*/
QgsRectangle transformedExtent() const; QgsRectangle transformedExtent() const;
/**Returns extent that considers rotation and shift with mOffsetX / mOf fsetY*/ /**Returns extent that considers rotation and shift with mOffsetX / mOf fsetY*/
QPolygonF transformedMapPolygon() const; QPolygonF transformedMapPolygon() const;
double maxExtension() const; double maxExtension() const;
/**Returns the polygon of the map extent. If rotation == 0, the result
is the same as mExtent
@param poly out: the result polygon with the four corner points. The po
ints are clockwise, starting at the top-left point
@return true in case of success*/
void mapPolygon( QPolygonF& poly ) const;
/** mapPolygon variant using a given extent */ /** mapPolygon variant using a given extent */
void mapPolygon( const QgsRectangle& extent, QPolygonF& poly ) const; void mapPolygon( const QgsRectangle& extent, QPolygonF& poly ) const;
/**Calculates the extent to request and the yShift of the top-left poin t in case of rotation.*/ /**Calculates the extent to request and the yShift of the top-left poin t in case of rotation.*/
void requestedExtent( QgsRectangle& extent ) const; void requestedExtent( QgsRectangle& extent ) const;
/**Scales a composer map shift (in MM) and rotates it by mRotation /**Scales a composer map shift (in MM) and rotates it by mRotation
@param xShift in: shift in x direction (in item units), out: xShift in map units @param xShift in: shift in x direction (in item units), out: xShift in map units
@param yShift in: shift in y direction (in item units), out: yShift in map units*/ @param yShift in: shift in y direction (in item units), out: yShift in map units*/
void transformShift( double& xShift, double& yShift ) const; void transformShift( double& xShift, double& yShift ) const;
/**Transforms map coordinates to item coordinates (considering rotation and move offset)*/ /**Transforms map coordinates to item coordinates (considering rotation and move offset)*/
QPointF mapToItemCoords( const QPointF& mapCoords ) const; QPointF mapToItemCoords( const QPointF& mapCoords ) const;
/**Returns the item border of a point (in item coordinates)*/ /**Returns the item border of a point (in item coordinates)*/
Border borderForLineCoord( const QPointF& p ) const; Border borderForLineCoord( const QPointF& p ) const;
void drawCanvasItems( QPainter* painter, const QStyleOptionGraphicsItem * itemStyle ); void drawCanvasItems( QPainter* painter, const QStyleOptionGraphicsItem * itemStyle );
void drawCanvasItem( QGraphicsItem* item, QPainter* painter, const QSty leOptionGraphicsItem* itemStyle ); void drawCanvasItem( QGraphicsItem* item, QPainter* painter, const QSty leOptionGraphicsItem* itemStyle );
QPointF composerMapPosForItem( const QGraphicsItem* item ) const; QPointF composerMapPosForItem( const QGraphicsItem* item ) const;
void sortGridLinesOnBorders( const QList< QPair< double, QLineF > >& hL ines, const QList< QPair< double, QLineF > >& vLines, QMap< double, double >& leftFrameEntries, void sortGridLinesOnBorders( const QList< QPair< double, QLineF > >& hL ines, const QList< QPair< double, QLineF > >& vLines, QMap< double, double >& leftFrameEntries,
QMap< double, double >& rightFrameEntries, QMap< double, double >& topFrameEntries, QMap< double, double >& bottomFra meEntries ) const; QMap< double, double >& rightFrameEntries, QMap< double, double >& topFrameEntries, QMap< double, double >& bottomFra meEntries ) const;
void drawGridFrameBorder( QPainter* p, const QMap< double, double >& bo rderPos, Border border ); void drawGridFrameBorder( QPainter* p, const QMap< double, double >& bo rderPos, Border border );
void drawGridLine( const QLineF& line, QPainter* p ); void drawGridLine( const QLineF& line, QgsRenderContext& context );
void drawOverviewMapExtent( QPainter* p ); void drawOverviewMapExtent( QPainter* p );
void createDefaultOverviewFrameSymbol(); void createDefaultOverviewFrameSymbol();
void createDefaultGridLineSymbol(); void createDefaultGridLineSymbol();
void initGridAnnotationFormatFromProject(); void initGridAnnotationFormatFromProject();
enum PartType
{
Background,
Layer,
Grid,
OverviewMapExtent,
Frame,
SelectionBoxes
};
/**Test if a part of the copmosermap needs to be drawn, considering mCu
rrentExportLayer*/
bool shouldDrawPart( PartType part ) const;
}; };
#endif #endif
 End of changes. 23 change blocks. 
39 lines changed or deleted 155 lines changed or added


 qgscomposermousehandles.h   qgscomposermousehandles.h 
skipping to change at line 93 skipping to change at line 93
bool isDragging() { return mIsDragging; } bool isDragging() { return mIsDragging; }
/**Returns true is user is currently resizing with the handles */ /**Returns true is user is currently resizing with the handles */
bool isResizing() { return mIsResizing; } bool isResizing() { return mIsResizing; }
protected: protected:
void mouseMoveEvent( QGraphicsSceneMouseEvent* event ); void mouseMoveEvent( QGraphicsSceneMouseEvent* event );
void mouseReleaseEvent( QGraphicsSceneMouseEvent* event ); void mouseReleaseEvent( QGraphicsSceneMouseEvent* event );
void mousePressEvent( QGraphicsSceneMouseEvent* event ); void mousePressEvent( QGraphicsSceneMouseEvent* event );
void mouseDoubleClickEvent( QGraphicsSceneMouseEvent* event );
void hoverMoveEvent( QGraphicsSceneHoverEvent * event ); void hoverMoveEvent( QGraphicsSceneHoverEvent * event );
void hoverLeaveEvent( QGraphicsSceneHoverEvent * event ); void hoverLeaveEvent( QGraphicsSceneHoverEvent * event );
public slots: public slots:
/**Sets up listeners to sizeChanged signal for all selected items*/ /**Sets up listeners to sizeChanged signal for all selected items*/
void selectionChanged(); void selectionChanged();
/**Redraws handles when selected item size changes*/ /**Redraws handles when selected item size changes*/
void selectedItemSizeChanged(); void selectedItemSizeChanged();
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 qgscomposermultiframe.h   qgscomposermultiframe.h 
skipping to change at line 21 skipping to change at line 21
* 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 QGSCOMPOSERMULTIFRAME_H #ifndef QGSCOMPOSERMULTIFRAME_H
#define QGSCOMPOSERMULTIFRAME_H #define QGSCOMPOSERMULTIFRAME_H
#include <QObject> #include <QObject>
#include <QSizeF> #include <QSizeF>
#include <QPointF>
class QgsComposerFrame; class QgsComposerFrame;
class QgsComposerItem; class QgsComposerItem;
class QgsComposition; class QgsComposition;
class QDomDocument; class QDomDocument;
class QDomElement; class QDomElement;
class QRectF; class QRectF;
class QPainter; class QPainter;
/**Abstract base class for composer entries with the ability to distribute the content to several frames (items)*/ /**Abstract base class for composer entries with the ability to distribute the content to several frames (items)*/
skipping to change at line 51 skipping to change at line 52
RepeatUntilFinished //duplicates last frame to next page to fit the t otal size RepeatUntilFinished //duplicates last frame to next page to fit the t otal size
}; };
QgsComposerMultiFrame( QgsComposition* c, bool createUndoCommands ); QgsComposerMultiFrame( QgsComposition* c, bool createUndoCommands );
virtual ~QgsComposerMultiFrame(); virtual ~QgsComposerMultiFrame();
virtual QSizeF totalSize() const = 0; virtual QSizeF totalSize() const = 0;
virtual void render( QPainter* p, const QRectF& renderExtent ) = 0; virtual void render( QPainter* p, const QRectF& renderExtent ) = 0;
virtual void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true ) = 0; virtual void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true ) = 0;
/**Finds the optimal position to break a frame at.
* @param yPos maximum vertical position for break
* @returns the optimal breakable position which occurs in the multi fr
ame close
* to and before the specified yPos
* @note added in version 2.3*/
virtual double findNearbyPageBreak( double yPos ) { return yPos; }
void removeFrame( int i ); void removeFrame( int i );
void update(); void update();
void setResizeMode( ResizeMode mode ); void setResizeMode( ResizeMode mode );
ResizeMode resizeMode() const { return mResizeMode; } ResizeMode resizeMode() const { return mResizeMode; }
virtual bool writeXML( QDomElement& elem, QDomDocument & doc, bool igno reFrames = false ) const = 0; virtual bool writeXML( QDomElement& elem, QDomDocument & doc, bool igno reFrames = false ) const = 0;
bool _writeXML( QDomElement& elem, QDomDocument& doc, bool ignoreFrames = false ) const; bool _writeXML( QDomElement& elem, QDomDocument& doc, bool ignoreFrames = false ) const;
skipping to change at line 78 skipping to change at line 86
/**Removes and deletes all frames from mComposition*/ /**Removes and deletes all frames from mComposition*/
void deleteFrames(); void deleteFrames();
/** Return the number of frames associated with this multiframeset. /** Return the number of frames associated with this multiframeset.
@note added in 2.0, replaces nFrames @note added in 2.0, replaces nFrames
**/ **/
int frameCount() const { return mFrameItems.size(); } int frameCount() const { return mFrameItems.size(); }
QgsComposerFrame* frame( int i ) const; QgsComposerFrame* frame( int i ) const;
/**Creates a new frame and adds it to the multi frame and composition.
* @param currentFrame an existing QgsComposerFrame from which to copy
the size
* and general frame properties (eg frame style, background, rendering
settings).
* @param pos position of top-left corner of the new frame
* @param size size of the new frame
* @returns new QgsComposerFrame
* @note added in version 2.3
*/
QgsComposerFrame* createNewFrame( QgsComposerFrame* currentFrame, QPoin
tF pos, QSizeF size );
public slots:
/**Recalculates the portion of the multiframe item which is shown in ea
ch of it's
* component frames. If the resize mode is set to anything but UseExist
ingFrames then
* this may cause new frames to be added or frames to be removed, in or
der to fit
* the current size of the multiframe's content.
*/
void recalculateFrameSizes();
protected: protected:
QgsComposition* mComposition; QgsComposition* mComposition;
QList<QgsComposerFrame*> mFrameItems; QList<QgsComposerFrame*> mFrameItems;
ResizeMode mResizeMode; ResizeMode mResizeMode;
/**True: creates QgsMultiFrameCommands on internal changes (e.g. changi ng frames )*/ /**True: creates QgsMultiFrameCommands on internal changes (e.g. changi ng frames )*/
bool mCreateUndoCommands; bool mCreateUndoCommands;
protected slots: protected slots:
void recalculateFrameSizes();
/**Called before a frame is going to be removed (update frame list)*/ /**Called before a frame is going to be removed (update frame list)*/
void handleFrameRemoval( QgsComposerItem* item ); void handleFrameRemoval( QgsComposerItem* item );
/**Adapts to changed number of pages if resize type is RepeatOnEveryPag e*/ /**Adapts to changed number of pages if resize type is RepeatOnEveryPag e*/
void handlePageChange(); void handlePageChange();
private: private:
QgsComposerMultiFrame(); //forbidden QgsComposerMultiFrame(); //forbidden
bool mIsRecalculatingSize;
signals: signals:
void changed(); void changed();
}; };
#endif // QGSCOMPOSERMULTIFRAME_H #endif // QGSCOMPOSERMULTIFRAME_H
 End of changes. 5 change blocks. 
1 lines changed or deleted 36 lines changed or added


 qgscomposerpicture.h   qgscomposerpicture.h 
skipping to change at line 26 skipping to change at line 26
************************************************************************** */ ************************************************************************** */
#ifndef QGSCOMPOSERPICTURE_H #ifndef QGSCOMPOSERPICTURE_H
#define QGSCOMPOSERPICTURE_H #define QGSCOMPOSERPICTURE_H
#include "qgscomposeritem.h" #include "qgscomposeritem.h"
#include <QFile> #include <QFile>
#include <QImage> #include <QImage>
#include <QSvgRenderer> #include <QSvgRenderer>
class QgsComposerMap; class QgsComposerMap;
class QgsExpression;
/** \ingroup MapComposer /** \ingroup MapComposer
* A composer class that displays svg files or raster format (jpg, png, ... ) * A composer class that displays svg files or raster format (jpg, png, ... )
* */ * */
class CORE_EXPORT QgsComposerPicture: public QgsComposerItem class CORE_EXPORT QgsComposerPicture: public QgsComposerItem
{ {
Q_OBJECT Q_OBJECT
public: public:
/*! Controls how pictures are scaled within the item's frame
*/
enum ResizeMode
{
Zoom, /*!< enlarges image to fit frame while maintaining aspect ratio
of picture */
Stretch, /*!< stretches image to fit frame, ignores aspect ratio */
Clip, /*!< draws image at original size and clips any portion which f
alls outside frame */
ZoomResizeFrame, /*!< enlarges image to fit frame, then resizes frame
to fit resultant image */
FrameToImageSize /*!< sets size of frame to match original size of im
age without scaling */
};
/*! Format of source image
*/
enum Mode
{
SVG,
RASTER,
Unknown
};
QgsComposerPicture( QgsComposition *composition ); QgsComposerPicture( QgsComposition *composition );
~QgsComposerPicture(); ~QgsComposerPicture();
/** return correct graphics item type. Added in v1.7 */ /** return correct graphics item type. Added in v1.7 */
virtual int type() const { return ComposerPicture; } virtual int type() const { return ComposerPicture; }
/**Reimplementation of QCanvasItem::paint*/ /**Reimplementation of QCanvasItem::paint*/
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyl e, QWidget* pWidget ); void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyl e, QWidget* pWidget );
/**Sets the source file of the image (may be svg or a raster format)*/ /**Sets the source file of the image (may be svg or a raster format). T
his is only used if
* usePictureExpression() is false.
* @param path full path to the source image
* @see usePictureExpression
* @see pictureFile
*/
void setPictureFile( const QString& path ); void setPictureFile( const QString& path );
/**Returns the path of the source image file. This is only used if
* usePictureExpression() is false.
* @returns path to the source image
* @see usePictureExpression
* @see setPictureFile
*/
QString pictureFile() const; QString pictureFile() const;
/**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 and resizes the svg symbol / image* / corresponds to 1 scene size unit and resizes the svg symbol / image* /
void setSceneRect( const QRectF& rectangle ); void setSceneRect( const QRectF& rectangle );
/** stores state in Dom element /** stores state in Dom element
* @param elem is Dom element corresponding to 'Composer' tag * @param elem is Dom element corresponding to 'Composer' tag
* @param doc is Dom document * @param doc is Dom document
*/ */
skipping to change at line 66 skipping to change at line 100
/** 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 );
/**Returns the rotation used for drawing the picture within the compose r item /**Returns the rotation used for drawing the picture within the compose r item
* @deprecated Use pictureRotation() instead * @deprecated Use pictureRotation() instead
*/ */
double rotation() const { return mPictureRotation;}; Q_DECL_DEPRECATED double rotation() const { return mPictureRotation; }
/**Returns the rotation used for drawing the picture within the item /**Returns the rotation used for drawing the picture within the item's
@note this function was added in version 2.1*/ frame
double pictureRotation() const { return mPictureRotation;}; * @returns picture rotation in degrees
* @note added in 2.2
* @see setPictureRotation
* @see rotationMap
*/
double pictureRotation() const { return mPictureRotation; }
/**Sets the map object for rotation (by id). A value of -1 disables the /**Sets the map object for rotation (by id). A value of -1 disables the
map rotation*/ map
* rotation. If this is set then the picture will be rotated by the sa
me
* amount as the specified map object. This is useful especially for
* syncing north arrows with a map item.
* @param composerMapId composer map id to sync rotation with
* @see setPictureRotation
* @see rotationMap
*/
void setRotationMap( int composerMapId ); void setRotationMap( int composerMapId );
/**Returns the id of the rotation map*/
/**Returns the id of the rotation map. A value of -1 means map rotatio
n is
* disabled. If this is set then the picture is rotated by the same am
ount
* as the specified map object.
* @returns id of map object
* @see setRotationMap
* @see useRotationMap
*/
int rotationMap() const; int rotationMap() const;
/**True if the rotation is taken from a map item*/
bool useRotationMap() const {return mRotationMap;} /**True if the picture rotation is matched to a map item.
* @returns true if rotation map is in use
* @see rotationMap
* @see setRotationMap
*/
bool useRotationMap() const { return mRotationMap; }
/**Returns the resize mode used for drawing the picture within the comp
oser
* item's frame.
* @returns resize mode of picture
* @note added in 2.3
* @see setResizeMode
*/
ResizeMode resizeMode() const { return mResizeMode; }
/**Sets the picture's anchor point, which controls how it is placed
* within the picture item's frame.
* @param anchor anchor point for picture
* @note added in 2.3
* @see pictureAnchor
*/
void setPictureAnchor( QgsComposerItem::ItemPositionMode anchor );
/**Returns the picture's current anchor, which controls how it is place
d
* within the picture item's frame.
* @returns anchor point for picture
* @note added in 2.3
* @see setPictureAnchor
*/
ItemPositionMode pictureAnchor() const { return mPictureAnchor; }
/**Returns whether the picture item is using an expression for the imag
e source.
* @returns true if the picture is using an expression for the source,
false if
* it is using a single static file path for the source.
* @note added in 2.3
* @see setUsePictureExpression
* @see pictureFile
* @see pictureExpression
*/
bool usePictureExpression() const { return mUseSourceExpression; }
/**Returns the expression the item is using for the picture source. Thi
s is only
* used if usePictureExpression() is true.
* @returns expression for the picture item's image path
* @note added in 2.3
* @see setPictureExpression
* @see usePictureExpression
*/
QString pictureExpression() const { return mSourceExpression; }
/**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
* @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation ) * @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation )
* instead * instead
*/ */
bool imageSizeConsideringRotation( double& width, double& height ) cons t; Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, dou ble& height ) const;
/**Calculates corner point after rotation and scaling /**Calculates corner point after rotation and scaling
* @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) * @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
* instead * instead
*/ */
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double wi dth, double height ) const; Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, do uble& y, double width, double height ) const;
/**Calculates width / height of the bounding box of a rotated rectangle /**Calculates width / height of the bounding box of a rotated rectangle
* @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width * @deprecated Use QgsComposerItem::sizeChangedByRotation( double& widt
, double& height, double rotation ) h, double& height, double rotation )
* instead * instead
*/ */
void sizeChangedByRotation( double& width, double& height ); Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& he
ight );
/**Returns the current picture mode (image format).
* @returns picture mode
* @note added in 2.3
*/
Mode mode() const { return mMode; }
public slots: public slots:
/**Sets the picture rotation within the item bounds. This does not affe /**Sets the picture rotation within the item bounds. This does not affe
ct the item rectangle, ct
only the way the picture is drawn within the item. * the item rectangle, only the way the picture is drawn within the ite
m.
* @deprecated Use setPictureRotation( double rotation ) instead * @deprecated Use setPictureRotation( double rotation ) instead
*/ */
virtual void setRotation( double r ); virtual void setRotation( double r );
/**Sets the picture rotation within the item bounds. This does not affe /**Sets the picture rotation within the item bounds. This does not affe
ct the item rectangle, ct
only the way the picture is drawn within the item. * the item's frame, only the way the picture is drawn within the item.
@note this function was added in version 2.1*/ * @param r rotation in degrees clockwise
* @see pictureRotation
* @note added in 2.2
*/
virtual void setPictureRotation( double r ); virtual void setPictureRotation( double r );
/**Sets the resize mode used for drawing the picture within the item bo
unds.
* @param mode ResizeMode to use for image file
* @note added in 2.3
* @see resizeMode
*/
virtual void setResizeMode( ResizeMode mode );
/**Sets whether the picture should use an expression based image source
path
* @param useExpression set to true to use an expression based image so
urce,
* set to false to use a single image source path
* @note added in 2.3
* @see usePictureExpression
* @see setPictureFile
* @see setPictureExpression
*/
virtual void setUsePictureExpression( bool useExpression );
/**Sets an expression to use for the picture source. This expression is
only
* used if usePictureExpression() is true.
* @param expression to use for picture path
* @note added in 2.3
* @see setUsePictureExpression
* @see pictureExpression
*/
virtual void setPictureExpression( QString expression );
/**Recalculates the source image (if using an expression for picture's
source)
* and reloads and redraws the picture.
* @note added in 2.3
*/
void refreshPicture();
/**Prepares the picture's source expression after it is altered or the
compositions
* atlas coverage layer changes.
* @note added in 2.3
*/
void updatePictureExpression();
/**Forces a recalculation of the picture's frame size
* @note added in 2.3
*/
void recalculateSize();
signals: signals:
/**Is emitted on picture rotation change*/ /**Is emitted on picture rotation change*/
void pictureRotationChanged( double newRotation ); void pictureRotationChanged( double newRotation );
private: private:
enum Mode //SVG or raster graphic format
{
SVG,
RASTER,
Unknown
};
//default constructor is forbidden //default constructor is forbidden
QgsComposerPicture(); QgsComposerPicture();
/**Calculates bounding rect for svg file (mSourcefile) such that aspect ratio is correct*/ /**Calculates bounding rect for svg file (mSourcefile) such that aspect ratio is correct*/
QRectF boundedSVGRect( double deviceWidth, double deviceHeight ); QRectF boundedSVGRect( double deviceWidth, double deviceHeight );
/**Calculates bounding rect for image such that aspect ratio is correct */ /**Calculates bounding rect for image such that aspect ratio is correct */
QRectF boundedImageRect( double deviceWidth, double deviceHeight ); QRectF boundedImageRect( double deviceWidth, double deviceHeight );
/**Returns size of current raster or svg picture */ /**Returns size of current raster or svg picture */
QSizeF pictureSize(); QSizeF pictureSize();
QImage mImage; QImage mImage;
QSvgRenderer mSVG; QSvgRenderer mSVG;
QFile mSourceFile; QFile mSourceFile;
Mode mMode; Mode mMode;
bool mUseSourceExpression;
QString mSourceExpression;
QSize mDefaultSvgSize; QSize mDefaultSvgSize;
/**Image rotation*/ /**Image rotation*/
double mPictureRotation; double mPictureRotation;
/**Map that sets the rotation (or 0 if this picture uses map independen t rotation)*/ /**Map that sets the rotation (or 0 if this picture uses map independen t rotation)*/
const QgsComposerMap* mRotationMap; const QgsComposerMap* mRotationMap;
/**Width of the picture (in mm)*/ /**Width of the picture (in mm)*/
double mPictureWidth; double mPictureWidth;
/**Height of the picture (in mm)*/ /**Height of the picture (in mm)*/
double mPictureHeight; double mPictureHeight;
ResizeMode mResizeMode;
QgsComposerItem::ItemPositionMode mPictureAnchor;
QgsExpression* mPictureExpr;
/**loads an image file into the picture item and redraws the item*/
void loadPicture( const QFile &file );
/**evaluates the picture expression and returns the calculated image pa
th*/
QString evalPictureExpression();
/**sets up the picture item and connects to relevant signals*/
void init();
/**Returns part of a raster image which will be shown, given current pi
cture
* anchor settings
*/
QRect clippedImageRect( double &boundRectWidthMM, double &boundRectHeig
htMM, QSize imageRectPixels );
}; };
#endif #endif
 End of changes. 18 change blocks. 
31 lines changed or deleted 222 lines changed or added


 qgscomposerscalebar.h   qgscomposerscalebar.h 
skipping to change at line 118 skipping to change at line 118
/**@note: this method was added in version 1.8*/ /**@note: this method was added in version 1.8*/
void setAlignment( Alignment a ); void setAlignment( Alignment a );
/**@note: this method was added in version 1.9*/ /**@note: this method was added in version 1.9*/
ScaleBarUnits units() const { return mUnits; } ScaleBarUnits units() const { return mUnits; }
/**@note: this method was added in version 1.9*/ /**@note: this method was added in version 1.9*/
void setUnits( ScaleBarUnits u ); void setUnits( ScaleBarUnits u );
/** Returns the join style used for drawing lines in the scalebar
* @returns Join style for lines
* @note introduced in 2.3
* @see setLineJoinStyle
*/
Qt::PenJoinStyle lineJoinStyle() const { return mLineJoinStyle; }
/** Sets join style used when drawing the lines in the scalebar
* @param style Join style for lines
* @returns nothing
* @note introduced in 2.3
* @see lineJoinStyle
*/
void setLineJoinStyle( Qt::PenJoinStyle style );
/** Returns the cap style used for drawing lines in the scalebar
* @returns Cap style for lines
* @note introduced in 2.3
* @see setLineCapStyle
*/
Qt::PenCapStyle lineCapStyle() const { return mLineCapStyle; }
/** Sets cap style used when drawing the lines in the scalebar
* @param style Cap style for lines
* @returns nothing
* @note introduced in 2.3
* @see lineCapStyle
*/
void setLineCapStyle( Qt::PenCapStyle style );
/**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( ScaleBarUnits u = Meters ); void applyDefaultSize( ScaleBarUnits u = Meters );
/**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 206 skipping to change at line 234
/**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; Alignment mAlignment;
ScaleBarUnits mUnits; ScaleBarUnits mUnits;
Qt::PenJoinStyle mLineJoinStyle;
Qt::PenCapStyle mLineCapStyle;
/**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();
/**Returns diagonal of composer map in selected units (map units / mete rs / feet / nautical miles)*/ /**Returns diagonal of composer map in selected units (map units / mete rs / feet / nautical miles)*/
double mapWidth() const; double mapWidth() const;
}; };
#endif //QGSCOMPOSERSCALEBAR_H #endif //QGSCOMPOSERSCALEBAR_H
 End of changes. 2 change blocks. 
0 lines changed or deleted 31 lines changed or added


 qgscomposershape.h   qgscomposershape.h 
skipping to change at line 63 skipping to change at line 63
*/ */
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 );
//setters and getters //setters and getters
QgsComposerShape::Shape shapeType() const {return mShape;} QgsComposerShape::Shape shapeType() const { return mShape; }
void setShapeType( QgsComposerShape::Shape s ) {mShape = s;} void setShapeType( QgsComposerShape::Shape s ) { mShape = s; }
/**Sets radius for rounded rectangle corners. Added in v2.1 */ /**Sets radius for rounded rectangle corners. Added in v2.1 */
void setCornerRadius( double radius ); void setCornerRadius( double radius );
/**Returns the radius for rounded rectangle corners*/ /**Returns the radius for rounded rectangle corners*/
double cornerRadius() const { return mCornerRadius; }; double cornerRadius() const { return mCornerRadius; };
/**Sets the QgsFillSymbolV2 used to draw the shape. Must also call setU seSymbolV2( true ) to /**Sets the QgsFillSymbolV2 used to draw the shape. Must also call setU seSymbolV2( true ) to
* enable drawing with a symbol. * enable drawing with a symbol.
* Note: added in version 2.1*/ * Note: added in version 2.1*/
void setShapeStyleSymbol( QgsFillSymbolV2* symbol ); void setShapeStyleSymbol( QgsFillSymbolV2* symbol );
/**Returns the QgsFillSymbolV2 used to draw the shape. /**Returns the QgsFillSymbolV2 used to draw the shape.
* Note: added in version 2.1*/ * Note: added in version 2.1*/
QgsFillSymbolV2* shapeStyleSymbol() { return mShapeStyleSymbol; } QgsFillSymbolV2* shapeStyleSymbol() { return mShapeStyleSymbol; }
/**Controls whether the shape should be drawn using a QgsFillSymbolV2. /**Controls whether the shape should be drawn using a QgsFillSymbolV2.
* Note: Added in v2.1 */ * Note: Added in v2.1 */
void setUseSymbolV2( bool useSymbolV2 ); void setUseSymbolV2( bool useSymbolV2 );
/**Depending on the symbol style, the bounding rectangle can be larger
than the shape
@note this function was added in version 2.3*/
QRectF boundingRect() const;
/**Sets new scene rectangle bounds and recalculates hight and extent. R
eimplemented from
* QgsComposerItem as it needs to call updateBoundingRect after the sha
pe's size changes
*/
void setSceneRect( const QRectF& rectangle );
protected: protected:
/* reimplement drawFrame, since it's not a rect, but a custom shape */ /* reimplement drawFrame, since it's not a rect, but a custom shape */
virtual void drawFrame( QPainter* p ); virtual void drawFrame( QPainter* p );
/* reimplement drawBackground, since it's not a rect, but a custom shap e */ /* reimplement drawBackground, since it's not a rect, but a custom shap e */
virtual void drawBackground( QPainter* p ); virtual void drawBackground( QPainter* p );
/**reimplement estimatedFrameBleed, since frames on shapes are drawn us ing symbology /**reimplement estimatedFrameBleed, since frames on shapes are drawn us ing symbology
* rather than the item's pen */ * rather than the item's pen */
virtual double estimatedFrameBleed() const; virtual double estimatedFrameBleed() const;
public slots: public slots:
skipping to change at line 107 skipping to change at line 116
private: private:
/**Ellipse, rectangle or triangle*/ /**Ellipse, rectangle or triangle*/
Shape mShape; Shape mShape;
double mCornerRadius; double mCornerRadius;
bool mUseSymbolV2; bool mUseSymbolV2;
QgsFillSymbolV2* mShapeStyleSymbol; QgsFillSymbolV2* mShapeStyleSymbol;
double mMaxSymbolBleed;
/**Current bounding rectangle of shape*/
QRectF mCurrentRectangle;
/* draws the custom shape */ /* draws the custom shape */
void drawShape( QPainter* p ); void drawShape( QPainter* p );
/* draws the custom shape using symbol v2*/ /* draws the custom shape using symbol v2*/
void drawShapeUsingSymbol( QPainter* p ); void drawShapeUsingSymbol( QPainter* p );
/* creates the default shape symbol */ /* creates the default shape symbol */
void createDefaultShapeStyleSymbol(); void createDefaultShapeStyleSymbol();
/**Returns a point on the line from startPoint to directionPoint that i s a certain distance away from the starting point*/ /**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; QPointF pointOnLineWithDistance( const QPointF& startPoint, const QPoin tF& directionPoint, double distance ) const;
/**Updates the bounding rect of this item*/
void updateBoundingRect();
}; };
#endif // QGSCOMPOSERSHAPEITEM_H #endif // QGSCOMPOSERSHAPEITEM_H
 End of changes. 4 change blocks. 
2 lines changed or deleted 20 lines changed or added


 qgscomposertable.h   qgscomposertable.h 
skipping to change at line 25 skipping to change at line 25
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSCOMPOSERTABLE_H #ifndef QGSCOMPOSERTABLE_H
#define QGSCOMPOSERTABLE_H #define QGSCOMPOSERTABLE_H
#include "qgscomposeritem.h" #include "qgscomposeritem.h"
#include "qgscomposition.h" #include "qgscomposition.h"
#include "qgsfeature.h" #include "qgsfeature.h"
#include <QSet> #include <QSet>
#include <QObject>
class QgsComposerTableColumn;
/**A class to display feature attributes in the print composer*/ /**A class to display feature attributes in the print composer*/
class CORE_EXPORT QgsComposerTable: public QgsComposerItem class CORE_EXPORT QgsComposerTable: public QgsComposerItem
{ {
Q_OBJECT
public: public:
/*! Controls how headers are horizontally aligned in a table
*/
enum HeaderHAlignment
{
FollowColumn, /*!< header uses the same alignment as the column */
HeaderLeft, /*!< align headers left */
HeaderCenter, /*!< align headers to center */
HeaderRight /*!< align headers right */
};
QgsComposerTable( QgsComposition* composition ); QgsComposerTable( QgsComposition* composition );
virtual ~QgsComposerTable(); virtual ~QgsComposerTable();
/** return correct graphics item type. Added in v1.7 */ /** return correct graphics item type. Added in v1.7 */
virtual int type() const { return ComposerTable; } virtual int type() const { return ComposerTable; }
/** \brief Reimplementation of QCanvasItem::paint*/ /** \brief Reimplementation of QCanvasItem::paint*/
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget ); virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
virtual bool writeXML( QDomElement& elem, QDomDocument & doc ) const = 0; virtual bool writeXML( QDomElement& elem, QDomDocument & doc ) const = 0;
virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) = 0; virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) = 0;
void setLineTextDistance( double d ) { mLineTextDistance = d; } /**Sets the margin distance between cell borders and their contents.
* @param d margin for cell contents
* @see lineTextDistance
*/
void setLineTextDistance( double d );
/**Returns the margin distance between cell borders and their contents.
* @returns margin for cell contents
* @see setLineTextDistance
*/
double lineTextDistance() const { return mLineTextDistance; } double lineTextDistance() const { return mLineTextDistance; }
void setHeaderFont( const QFont& f ) { mHeaderFont = f;} /**Sets the font used to draw header text in the table.
* @param f font for header cells
* @see headerFont
* @see setContentFont
*/
void setHeaderFont( const QFont& f );
/**Returns the font used to draw header text in the table.
* @returns font for header cells
* @see setHeaderFont
* @see contentFont
*/
QFont headerFont() const { return mHeaderFont; } QFont headerFont() const { return mHeaderFont; }
void setContentFont( const QFont& f ) { mContentFont = f; } /**Sets the horizontal alignment for table headers
* @param alignment Horizontal alignment for table header cells
* @note added in 2.3
* @see headerHAlignment
*/
void setHeaderHAlignment( const HeaderHAlignment alignment );
/**Returns the horizontal alignment for table headers
* @returns Horizontal alignment for table header cells
* @note added in 2.3
* @see setHeaderHAlignment
*/
HeaderHAlignment headerHAlignment() const { return mHeaderHAlignment; }
/**Sets the font used to draw text in table body cells.
* @param f font for table cells
* @see contentFont
* @see setHeaderFont
*/
void setContentFont( const QFont& f );
/**Returns the font used to draw text in table body cells.
* @returns font for table cells
* @see setContentFont
* @see headerFont
*/
QFont contentFont() const { return mContentFont; } QFont contentFont() const { return mContentFont; }
void setShowGrid( bool show ) { mShowGrid = show;} /**Sets whether grid lines should be drawn in the table
* @param show set to true to show grid lines
* @see showGrid
* @see setGridStrokeWidth
* @see setGridColor
*/
void setShowGrid( bool show );
/**Returns whether grid lines are drawn in the table
* @returns true if grid lines are shown
* @see setShowGrid
* @see gridStrokeWidth
* @see gridColor
*/
bool showGrid() const { return mShowGrid; } bool showGrid() const { return mShowGrid; }
void setGridStrokeWidth( double w ) { mGridStrokeWidth = w; } /**Sets the width for grid lines in the table.
* @param w grid line width
* @see gridStrokeWidth
* @see setShowGrid
* @see setGridColor
*/
void setGridStrokeWidth( double w );
/**Returns the width of grid lines in the table.
* @returns grid line width
* @see setGridStrokeWidth
* @see showGrid
* @see gridColor
*/
double gridStrokeWidth() const { return mGridStrokeWidth; } double gridStrokeWidth() const { return mGridStrokeWidth; }
/**Sets color used for grid lines in the table.
* @param c grid line color
* @see gridColor
* @see setShowGrid
* @see setGridStrokeWidth
*/
void setGridColor( const QColor& c ) { mGridColor = c; } void setGridColor( const QColor& c ) { mGridColor = c; }
/**Returns the color used for grid lines in the table.
* @returns grid line color
* @see setGridColor
* @see showGrid
* @see gridStrokeWidth
*/
QColor gridColor() const { return mGridColor; } QColor gridColor() const { return mGridColor; }
/**Adapts the size of the frame to match the content. This is normally /**Returns the text used in the column headers for the table.
done in the paint method, but sometimes * @returns QMap of int to QString, where the int is the column index (
it needs to be done before the first render*/ starting at 0),
void adjustFrameToSize(); * and the string is the text to use for the column's header
* @note added in 2.3
* @note not available in python bindings
*/
virtual QMap<int, QString> headerLabels() const;
//TODO - make this more generic for next API break, eg rename as getRow
Values, use QStringList rather than
//QgsAttributeMap
/**Fetches the text used for the rows of the table.
* @returns true if attribute text was successfully retrieved.
* @param attributeMaps QList of QgsAttributeMap to store retrieved row
data in
* @note not available in python bindings
*/
virtual bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMap
s ) { Q_UNUSED( attributeMaps ); return false; }
/**Returns a pointer to the list of QgsComposerTableColumns shown in th
e table
* @returns pointer to list of columns in table
* @note added in 2.3
* @see setColumns
*/
QList<QgsComposerTableColumn*>* columns() { return &mColumns; }
/**Replaces the columns in the table with a specified list of QgsCompos
erTableColumns.
* @param columns list of QgsComposerTableColumns to show in table
* @note added in 2.3
* @see columns
*/
void setColumns( QList<QgsComposerTableColumn*> columns );
public slots:
/**Refreshes the attributes shown in the table by querying the vector l
ayer for new data.
* This also causes the column widths and size of the table to change t
o accommodate the
* new data.
* @note added in 2.3
* @see adjustFrameToSize
*/
virtual void refreshAttributes();
/**Adapts the size of the frame to match the content. First, the optima
l width of the columns
* is recalculated by checking the maximum width of attributes shown in
the table. Then, the
* table is resized to fit its contents. This slot utilises the table's
attribute cache so
* that a re-query of the vector layer is not required.
* @note added in 2.3
* @see refreshAttributes
*/
virtual void adjustFrameToSize();
protected: protected:
/**Distance between table lines and text*/ /**Distance between table lines and text*/
double mLineTextDistance; double mLineTextDistance;
QFont mHeaderFont; QFont mHeaderFont;
QFont mContentFont; QFont mContentFont;
HeaderHAlignment mHeaderHAlignment;
bool mShowGrid; bool mShowGrid;
double mGridStrokeWidth; double mGridStrokeWidth;
QColor mGridColor; QColor mGridColor;
/**Retrieves feature attributes*/ QList<QgsAttributeMap> mAttributeMaps;
//! @note not available in python bindings QMap<int, double> mMaxColumnWidthMap;
virtual bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMap
s ) { Q_UNUSED( attributeMaps ); return false; } QList<QgsComposerTableColumn*> mColumns;
virtual QMap<int, QString> getHeaderLabels() const { return QMap<int, Q
String>(); } //= 0; /**Calculates the maximum width of text shown in columns.
/**Calculate the maximum width values of the vector attributes*/ * @param maxWidthMap QMap of int to double in which to store the maxim
um widths. The int will be filled
* with the column number and the double with the maximum width of text
present in the column.
* @param attributeMaps list of attribute values for each row shown in
the table
* @note not available in python bindings
* @see adaptItemFrame
*/
virtual bool calculateMaxColumnWidths( QMap<int, double>& maxWidthMap, const QList<QgsAttributeMap>& attributeMaps ) const; virtual bool calculateMaxColumnWidths( QMap<int, double>& maxWidthMap, const QList<QgsAttributeMap>& attributeMaps ) const;
/**Adapts the size of the item frame to match the content*/
//! @note not available in python bindings /**Adapts the size of the item frame to match the table's content.
* @param maxWidthMap QMap of int to double, where the int contains the
column number and the double is the
* maximum width of text present in the column.
* @param attributeMaps list of attribute values for each row shown in
the table
* @note not available in python bindings
* @see calculateMaxColumnWidths
*/
void adaptItemFrame( const QMap<int, double>& maxWidthMap, const QList< QgsAttributeMap>& attributeMaps ); void adaptItemFrame( const QMap<int, double>& maxWidthMap, const QList< QgsAttributeMap>& attributeMaps );
/**Draws the horizontal grid lines for the table.
* @param p destination painter for grid lines
* @param nAttributes number of attribute rows shown in table
* @see drawVerticalGridLines
*/
void drawHorizontalGridLines( QPainter* p, int nAttributes ); void drawHorizontalGridLines( QPainter* p, int nAttributes );
//! @note not available in python bindings
/**Draws the vertical grid lines for the table.
* @param p destination painter for grid lines
* @param maxWidthMap QMap of int to double, where the int contains the
column number and the double is the
* maximum width of text present in the column.
* @note not available in python bindings
* @see drawVerticalGridLines
* @see calculateMaxColumnWidths
*/
void drawVerticalGridLines( QPainter* p, const QMap<int, double>& maxWi dthMap ); void drawVerticalGridLines( QPainter* p, const QMap<int, double>& maxWi dthMap );
/**Writes common table properties to xml for storage.
* @param itemElem an existing QDomElement in which to store the table'
s properties.
* @param doc QDomDocument for the destination xml.
* @see tableReadXML
* @see writeXML
*/
bool tableWriteXML( QDomElement& itemElem, QDomDocument& doc ) const; bool tableWriteXML( QDomElement& itemElem, QDomDocument& doc ) const;
/**Reads the table's common properties from xml.
* @param itemElem a QDomElement holding the table's desired properties
.
* @param doc QDomDocument for the source xml.
* @see tableWriteXML
* @see readXML
*/
bool tableReadXML( const QDomElement& itemElem, const QDomDocument& doc ); bool tableReadXML( const QDomElement& itemElem, const QDomDocument& doc );
}; };
#endif // QGSCOMPOSERTABLE_H #endif // QGSCOMPOSERTABLE_H
 End of changes. 18 change blocks. 
19 lines changed or deleted 224 lines changed or added


 qgscomposertexttable.h   qgscomposertexttable.h 
skipping to change at line 33 skipping to change at line 33
/**A text table item that reads text from string lists*/ /**A text table item that reads text from string lists*/
class CORE_EXPORT QgsComposerTextTable: public QgsComposerTable class CORE_EXPORT QgsComposerTextTable: public QgsComposerTable
{ {
public: public:
QgsComposerTextTable( QgsComposition* c ); QgsComposerTextTable( QgsComposition* c );
~QgsComposerTextTable(); ~QgsComposerTextTable();
/** return correct graphics item type. Added in v1.7 */ /** return correct graphics item type. Added in v1.7 */
virtual int type() const { return ComposerTextTable; } virtual int type() const { return ComposerTextTable; }
void setHeaderLabels( const QStringList& l ) { mHeaderLabels = l; } /**Sets the text to use for the header row for the table
* @param labels list of strings to use for each column's header row
* @see headerLabels
*/
void setHeaderLabels( const QStringList& labels );
/**Adds a row to the table
* @param row list of strings to use for each cell's value in the newly
added row
* @note If row is shorter than the number of columns in the table than
blank cells
* will be inserted at the end of the row. If row contains more strings
then the number
* of columns in the table then these extra strings will be ignored.
*/
void addRow( const QStringList& row ) { mRowText.append( row ); } void addRow( const QStringList& row ) { mRowText.append( row ); }
/**Writes properties specific to text tables
* @param elem an existing QDomElement in which to store the text table
's properties.
* @param doc QDomDocument for the destination xml.
* @see readXML
*/
bool writeXML( QDomElement& elem, QDomDocument & doc ) const; bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
/**Reads the properties specific to a text table from xml.
* @param itemElem a QDomElement holding the text table's desired prope
rties.
* @param doc QDomDocument for the source xml.
* @see writeXML
*/
bool readXML( const QDomElement& itemElem, const QDomDocument& doc ); bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
protected: /**Queries the text table for text to show in the cells.
//! @note not available in python bindings * @param attributeMaps list of QgsAttributeMaps where the cell text wi
bool getFeatureAttributes( QList<QgsAttributes>& attributes ); ll be stored
QMap<int, QString> getHeaderLabels() const; * @returns true if attribute values were successfully set from table's
text
* @note not available in python bindings
*/
bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps );
private: private:
/**Column titles*/
QStringList mHeaderLabels;
/**One stringlist per row*/ /**One stringlist per row*/
QList< QStringList > mRowText; QList< QStringList > mRowText;
}; };
#endif // QGSCOMPOSERTEXTTABLE_H #endif // QGSCOMPOSERTEXTTABLE_H
 End of changes. 5 change blocks. 
7 lines changed or deleted 36 lines changed or added


 qgscomposerview.h   qgscomposerview.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 QGSCOMPOSERVIEW_H #ifndef QGSCOMPOSERVIEW_H
#define QGSCOMPOSERVIEW_H #define QGSCOMPOSERVIEW_H
#include <QGraphicsView> #include <QGraphicsView>
#include "qgsaddremoveitemcommand.h" #include "qgsaddremoveitemcommand.h"
#include "qgsprevieweffect.h" // for QgsPreviewEffect::PreviewMode
class QDomDocument; class QDomDocument;
class QDomElement; 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;
skipping to change at line 93 skipping to change at line 94
PasteModeInPlace PasteModeInPlace
}; };
enum ToolStatus enum ToolStatus
{ {
Inactive, Inactive,
Active, Active,
ActiveUntilMouseRelease ActiveUntilMouseRelease
}; };
QgsComposerView( QWidget* parent = 0, const char* name = 0, Qt::WFlags f = 0 ); QgsComposerView( QWidget* parent = 0, const char* name = 0, Qt::WindowF lags 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();
/**Cuts or copies the selected items*/ /**Cuts or copies the selected items*/
void copyItems( ClipboardMode mode ); void copyItems( ClipboardMode mode );
skipping to change at line 122 skipping to change at line 123
/**Deselects all items*/ /**Deselects all items*/
void selectNone(); void selectNone();
/**Inverts current selection*/ /**Inverts current selection*/
void selectInvert(); void selectInvert();
QgsComposerView::Tool currentTool() const {return mCurrentTool;} QgsComposerView::Tool currentTool() const {return mCurrentTool;}
void setCurrentTool( QgsComposerView::Tool t ); void setCurrentTool( QgsComposerView::Tool t );
/**Sets composition (derived from QGraphicsScene)*/ /**Sets the composition for the view. If the composition is being set m
anually and not by a QgsComposer, then this must
* be set BEFORE adding any items to the composition.
*/
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();
/**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; }
/**Update rulers with current scene rect*/ /**Update rulers with current scene rect*/
void updateRulers(); void updateRulers();
void setHorizontalRuler( QgsComposerRuler* r ) { mHorizontalRuler = r; } void setHorizontalRuler( QgsComposerRuler* r ) { mHorizontalRuler = r; }
void setVerticalRuler( QgsComposerRuler* r ) { mVerticalRuler = r; } void setVerticalRuler( QgsComposerRuler* r ) { mVerticalRuler = r; }
/**Set zoom level, where a zoom level of 1.0 corresponds to 100%*/ /**Set zoom level, where a zoom level of 1.0 corresponds to 100%*/
void setZoomLevel( double zoomLevel ); void setZoomLevel( double zoomLevel );
/**Sets whether a preview effect should be used to alter the view's app
earance
* @param enabled Set to true to enable the preview effect on the view
* @note added in 2.3
* @see setPreviewMode
*/
void setPreviewModeEnabled( bool enabled );
/**Sets the preview mode which should be used to modify the view's appe
arance. Preview modes are only used
* if setPreviewMode is set to true.
* @param mode PreviewMode to be used to draw the view
* @note added in 2.3
* @see setPreviewModeEnabled
*/
void setPreviewMode( QgsPreviewEffect::PreviewMode mode );
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 );
skipping to change at line 207 skipping to change at line 225
/**True if user is currently panning by holding the space key*/ /**True if user is currently panning by holding the space key*/
bool mKeyPanning; bool mKeyPanning;
/**True if user is currently dragging with the move item content tool*/ /**True if user is currently dragging with the move item content tool*/
bool mMovingItemContent; bool mMovingItemContent;
QPoint mMouseLastXY; QPoint mMouseLastXY;
QPoint mMouseCurrentXY; QPoint mMouseCurrentXY;
QPoint mMousePressStartPos; QPoint mMousePressStartPos;
QgsPreviewEffect* mPreviewEffect;
/**Returns the default mouse cursor for a tool*/ /**Returns the default mouse cursor for a tool*/
QCursor defaultCursorForTool( Tool currentTool ); QCursor defaultCursorForTool( Tool currentTool );
/**Zoom composition from a mouse wheel event*/ /**Zoom composition from a mouse wheel event*/
void wheelZoom( QWheelEvent * event ); void wheelZoom( QWheelEvent * event );
/**Redraws the rubber band*/ /**Redraws the rubber band*/
void updateRubberBand( QPointF & pos ); void updateRubberBand( QPointF & pos );
/**Removes the rubber band and cleans up*/ /**Removes the rubber band and cleans up*/
void removeRubberBand(); void removeRubberBand();
skipping to change at line 245 skipping to change at line 265
void actionFinished(); void actionFinished();
/**Is emitted when mouse cursor coordinates change*/ /**Is emitted when mouse cursor coordinates change*/
void cursorPosChanged( QPointF ); void cursorPosChanged( QPointF );
/**Is emitted when the view zoom changes*/ /**Is emitted when the view zoom changes*/
void zoomLevelChanged(); void zoomLevelChanged();
/**Emitted before composerview is shown*/ /**Emitted before composerview is shown*/
void composerViewShow( QgsComposerView* ); void composerViewShow( QgsComposerView* );
/**Emitted before composerview is hidden*/ /**Emitted before composerview is hidden*/
void composerViewHide( QgsComposerView* ); void composerViewHide( QgsComposerView* );
/**Emitted when the composition is set for the view*/
void compositionSet( QgsComposition* );
}; };
#endif #endif
 End of changes. 7 change blocks. 
2 lines changed or deleted 28 lines changed or added


 qgscomposition.h   qgscomposition.h 
skipping to change at line 35 skipping to change at line 35
#include <QList> #include <QList>
#include <QPair> #include <QPair>
#include <QSet> #include <QSet>
#include <QUndoStack> #include <QUndoStack>
#include <QPrinter> #include <QPrinter>
#include <QPainter> #include <QPainter>
#include "qgsaddremoveitemcommand.h" #include "qgsaddremoveitemcommand.h"
#include "qgscomposeritemcommand.h" #include "qgscomposeritemcommand.h"
#include "qgsatlascomposition.h" #include "qgsatlascomposition.h"
#include "qgspaperitem.h"
class QgisApp; class QgisApp;
class QgsComposerFrame; class QgsComposerFrame;
class QgsComposerMap; class QgsComposerMap;
class QgsPaperItem;
class QGraphicsRectItem; class QGraphicsRectItem;
class QgsMapRenderer; class QgsMapRenderer;
class QDomElement; class QDomElement;
class QgsComposerArrow; class QgsComposerArrow;
class QgsComposerMouseHandles; class QgsComposerMouseHandles;
class QgsComposerHtml; class QgsComposerHtml;
class QgsComposerItem; class QgsComposerItem;
class QgsComposerLabel; class QgsComposerLabel;
class QgsComposerLegend; class QgsComposerLegend;
class QgsComposerMap; class QgsComposerMap;
skipping to change at line 93 skipping to change at line 93
Dots, Dots,
Crosses Crosses
}; };
enum ZValueDirection enum ZValueDirection
{ {
ZValueBelow, ZValueBelow,
ZValueAbove ZValueAbove
}; };
//! @deprecated since 2.4 - use the constructor with QgsMapSettings
Q_DECL_DEPRECATED QgsComposition( QgsMapRenderer* mapRenderer );
explicit QgsComposition( const QgsMapSettings& mapSettings );
/**Composition atlas modes*/ /**Composition atlas modes*/
enum AtlasMode enum AtlasMode
{ {
AtlasOff, // Composition is not being controlled by an atlas AtlasOff, // Composition is not being controlled by an atlas
PreviewAtlas, // An atlas composition is being previewed in the app PreviewAtlas, // An atlas composition is being previewed in the app
ExportAtlas // The composition is being exported as an atlas ExportAtlas // The composition is being exported as an atlas
}; };
QgsComposition( QgsMapRenderer* mapRenderer );
~QgsComposition(); ~QgsComposition();
/**Changes size of paper item*/ /**Changes size of paper item. Also moves all items so that they retain
* their same relative position to the top left corner of their current
page.
*/
void setPaperSize( double width, double height ); void setPaperSize( double width, double height );
/**Returns height of paper item*/ /**Returns height of paper item*/
double paperHeight() const; double paperHeight() const;
/**Returns width of paper item*/ /**Returns width of paper item*/
double paperWidth() const; double paperWidth() const;
double spaceBetweenPages() const { return mSpaceBetweenPages; } double spaceBetweenPages() const { return mSpaceBetweenPages; }
skipping to change at line 217 skipping to change at line 222
/**Return composer items of a specific type /**Return composer items of a specific type
@note not available in python bindings @note not available in python bindings
*/ */
template<class T> void composerItems( QList<T*>& itemList ); template<class T> void composerItems( QList<T*>& itemList );
/**Returns the composer map with specified id /**Returns the composer map with specified id
@return QgsComposerMap or 0 pointer if the composer map item does not exist*/ @return QgsComposerMap or 0 pointer if the composer map item does not exist*/
const QgsComposerMap* getComposerMapById( int id ) const; const QgsComposerMap* getComposerMapById( int id ) const;
/*Returns the composer html with specified id (a string as named in the /**Returns the composer html with specified id (a string as named in th e
composer user interface item properties). composer user interface item properties).
@note Added in QGIS 2.0 @note Added in QGIS 2.0
@param id - A QString representing the id of the item. @param item the item.
@return QgsComposerHtml pointer or 0 pointer if no such item exists. @return QgsComposerHtml pointer or 0 pointer if no such item exists.
*/ */
const QgsComposerHtml* getComposerHtmlByItem( QgsComposerItem *item ) c onst; const QgsComposerHtml* getComposerHtmlByItem( QgsComposerItem *item ) c onst;
/**Returns a composer item given its text identifier. /**Returns a composer item given its text identifier.
Ids are not necessarely unique, but this function returns only one e lement. Ids are not necessarely unique, but this function returns only one e lement.
@note added in 2.0 @note added in 2.0
@param theId - A QString representing the identifier of the item to @param theId - A QString representing the identifier of the item to
retrieve. retrieve.
@return QgsComposerItem pointer or 0 pointer if no such item exists. @return QgsComposerItem pointer or 0 pointer if no such item exists.
**/ */
const QgsComposerItem* getComposerItemById( QString theId ) const; const QgsComposerItem* getComposerItemById( QString theId ) const;
/**Returns a composer item given its unique identifier. /**Returns a composer item given its unique identifier.
@note added in 2.0 @note added in 2.0
@param theUuid A QString representing the UUID of the item to @param theUuid A QString representing the UUID of the item to
**/ **/
const QgsComposerItem* getComposerItemByUuid( QString theUuid ) const; const QgsComposerItem* getComposerItemByUuid( QString theUuid ) const;
int printResolution() const {return mPrintResolution;} int printResolution() const {return mPrintResolution;}
void setPrintResolution( int dpi ) {mPrintResolution = dpi;} void setPrintResolution( int dpi );
bool printAsRaster() const {return mPrintAsRaster;} bool printAsRaster() const {return mPrintAsRaster;}
void setPrintAsRaster( bool enabled ) { mPrintAsRaster = enabled; } void setPrintAsRaster( bool enabled ) { mPrintAsRaster = enabled; }
bool generateWorldFile() const { return mGenerateWorldFile; } bool generateWorldFile() const { return mGenerateWorldFile; }
void setGenerateWorldFile( bool enabled ) { mGenerateWorldFile = enable d; } void setGenerateWorldFile( bool enabled ) { mGenerateWorldFile = enable d; }
QgsComposerMap* worldFileMap() const { return mWorldFileMap; } QgsComposerMap* worldFileMap() const { return mWorldFileMap; }
void setWorldFileMap( QgsComposerMap* map ) { mWorldFileMap = map; } void setWorldFileMap( QgsComposerMap* map ) { mWorldFileMap = map; }
/**Returns true if a composition should use advanced effects such as bl end modes /**Returns true if a composition should use advanced effects such as bl end modes
@note added in 1.9*/ @note added in 1.9*/
bool useAdvancedEffects() const {return mUseAdvancedEffects;} bool useAdvancedEffects() const {return mUseAdvancedEffects;}
/**Used to enable or disable advanced effects such as blend modes in a composition /**Used to enable or disable advanced effects such as blend modes in a composition
@note: added in version 1.9*/ @note: added in version 1.9*/
void setUseAdvancedEffects( bool effectsEnabled ); void setUseAdvancedEffects( bool effectsEnabled );
/**Returns pointer to map renderer of qgis map canvas*/ /**Returns pointer to map renderer of qgis map canvas*/
QgsMapRenderer* mapRenderer() {return mMapRenderer;} //! @deprecated since 2.4 - use mapSettings() instead. May return null
if not initialized with QgsMapRenderer
Q_DECL_DEPRECATED QgsMapRenderer* mapRenderer() {return mMapRenderer;}
//! Return setting of QGIS map canvas
//! @note added in 2.4
const QgsMapSettings& mapSettings() const { return mMapSettings; }
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)*/
skipping to change at line 417 skipping to change at line 427
//printing //printing
/** Prepare the printer for printing */ /** Prepare the printer for printing */
void beginPrint( QPrinter& printer ); void beginPrint( QPrinter& printer );
/** Prepare the printer for printing in a PDF */ /** Prepare the printer for printing in a PDF */
void beginPrintAsPDF( QPrinter& printer, const QString& file ); void beginPrintAsPDF( QPrinter& printer, const QString& file );
/** Print on a preconfigured printer */ /** Print on a preconfigured printer */
void doPrint( QPrinter& printer, QPainter& painter ); void doPrint( QPrinter& printer, QPainter& painter );
/** Convenience function that prepares the printer and prints */ /**Convenience function that prepares the printer and prints
void print( QPrinter &printer ); * @returns true if print was successful
*/
bool print( QPrinter &printer );
/** Convenience function that prepares the printer for printing in PDF /**Convenience function that prepares the printer for printing in PDF a
and prints */ nd prints
void exportAsPDF( const QString& file ); * @returns true if export was successful
*/
bool exportAsPDF( const QString& file );
//! print composer page to image //! print composer page to image
//! If the image does not fit into memory, a null image is returned //! If the image does not fit into memory, a null image is returned
QImage printPageAsRaster( int page ); QImage printPageAsRaster( int page );
/**Render a page to a paint device /**Render a page to a paint device
@note added in version 1.9*/ @note added in version 1.9*/
void renderPage( QPainter* p, int page ); void renderPage( QPainter* p, int page );
/** Compute world file parameters */ /** Compute world file parameters */
skipping to change at line 446 skipping to change at line 460
/**Resizes a QRectF relative to the change from boundsBefore to boundsA fter*/ /**Resizes a QRectF relative to the change from boundsBefore to boundsA fter*/
static void relativeResizeRect( QRectF& rectToResize, const QRectF& bou ndsBefore, const QRectF& boundsAfter ); static void relativeResizeRect( QRectF& rectToResize, const QRectF& bou ndsBefore, const QRectF& boundsAfter );
/**Returns a scaled position given a before and after range*/ /**Returns a scaled position given a before and after range*/
static double relativePosition( double position, double beforeMin, doub le beforeMax, double afterMin, double afterMax ); static double relativePosition( double position, double beforeMin, doub le beforeMax, double afterMin, double afterMax );
/** Returns the current atlas mode of the composition */ /** Returns the current atlas mode of the composition */
QgsComposition::AtlasMode atlasMode() const { return mAtlasMode; } QgsComposition::AtlasMode atlasMode() const { return mAtlasMode; }
/** Sets the current atlas mode of the composition. Returns false if th e mode could not be changed. */ /** Sets the current atlas mode of the composition. Returns false if th e mode could not be changed. */
bool setAtlasMode( QgsComposition::AtlasMode mode ); bool setAtlasMode( QgsComposition::AtlasMode mode );
/** Return pages in the correct order
@note composerItems(QList< QgsPaperItem* > &) may not return pages in
the correct order
@note added in version 2.4*/
QList< QgsPaperItem* > pages() { return mPages; }
public slots: public slots:
/**Casts object to the proper subclass type and calls corresponding ite mAdded signal*/ /**Casts object to the proper subclass type and calls corresponding ite mAdded signal*/
void sendItemAddedSignal( QgsComposerItem* item ); void sendItemAddedSignal( QgsComposerItem* item );
/**Updates the scene bounds of the composition /**Updates the scene bounds of the composition
@note added in version 2.2*/ @note added in version 2.2*/
void updateBounds(); void updateBounds();
/**Forces items in the composition to refresh. For instance, this cause
s maps to redraw
* and rebuild cached images, html items to reload their source url, an
d attribute tables
* to refresh their contents.
@note added in version 2.3*/
void refreshItems();
/**Clears any selected items and sets an item as the current selection.
* @param item item to set as selected
* @note added in version 2.3*/
void setSelectedItem( QgsComposerItem* item );
protected:
void init();
private: private:
/**Pointer to map renderer of QGIS main map*/ /**Pointer to map renderer of QGIS main map*/
QgsMapRenderer* mMapRenderer; QgsMapRenderer* mMapRenderer;
const QgsMapSettings& mMapSettings;
QgsComposition::PlotStyle mPlotStyle; QgsComposition::PlotStyle mPlotStyle;
double mPageWidth; double mPageWidth;
double mPageHeight; double mPageHeight;
QList< QgsPaperItem* > mPages; QList< QgsPaperItem* > mPages;
double mSpaceBetweenPages; //space in preview between pages double mSpaceBetweenPages; //space in preview between pages
/**Drawing style for page*/ /**Drawing style for page*/
QgsFillSymbolV2* mPageStyleSymbol; QgsFillSymbolV2* mPageStyleSymbol;
void createDefaultPageStyleSymbol(); void createDefaultPageStyleSymbol();
skipping to change at line 554 skipping to change at line 589
void deleteAndRemoveMultiFrames(); void deleteAndRemoveMultiFrames();
static QString encodeStringForXML( const QString& str ); static QString encodeStringForXML( const QString& str );
bool mPreventCursorChange; bool mPreventCursorChange;
signals: signals:
void paperSizeChanged(); void paperSizeChanged();
void nPagesChanged(); void nPagesChanged();
/**Is emitted when the compositions print resolution changes*/
void printResolutionChanged();
/**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*/ /**Is emitted when new composer arrow has been added to the view*/
void composerArrowAdded( QgsComposerArrow* arrow ); void composerArrowAdded( QgsComposerArrow* arrow );
/**Is emitted when a new composer html has been added to the view*/ /**Is emitted when a new composer html has been added to the view*/
void composerHtmlFrameAdded( QgsComposerHtml* html, QgsComposerFrame* f rame ); void composerHtmlFrameAdded( QgsComposerHtml* html, QgsComposerFrame* f rame );
/**Is emitted when new composer label has been added to the view*/ /**Is emitted when new composer label has been added to the view*/
void composerLabelAdded( QgsComposerLabel* label ); void composerLabelAdded( QgsComposerLabel* label );
/**Is emitted when new composer map has been added to the view*/ /**Is emitted when new composer map has been added to the view*/
void composerMapAdded( QgsComposerMap* map ); void composerMapAdded( QgsComposerMap* map );
skipping to change at line 577 skipping to change at line 615
void composerLegendAdded( QgsComposerLegend* legend ); void composerLegendAdded( QgsComposerLegend* legend );
/**Is emitted when a new composer picture has been added*/ /**Is emitted when a new composer picture has been added*/
void composerPictureAdded( QgsComposerPicture* picture ); void composerPictureAdded( QgsComposerPicture* picture );
/**Is emitted when a new composer shape has been added*/ /**Is emitted when a new composer shape has been added*/
void composerShapeAdded( QgsComposerShape* shape ); void composerShapeAdded( QgsComposerShape* shape );
/**Is emitted when a new composer table has been added*/ /**Is emitted when a new composer table has been added*/
void composerTableAdded( QgsComposerAttributeTable* table ); void composerTableAdded( QgsComposerAttributeTable* table );
/**Is emitted when a composer item has been removed from the scene*/ /**Is emitted when a composer item has been removed from the scene*/
void itemRemoved( QgsComposerItem* ); void itemRemoved( QgsComposerItem* );
/**Is emitted when item in the composition must be refreshed*/
void refreshItemsTriggered();
/**Is emitted when the composition has an updated status bar message fo r the composer window*/ /**Is emitted when the composition has an updated status bar message fo r the composer window*/
void statusMsgChanged( QString message ); void statusMsgChanged( QString message );
}; };
template<class T> void QgsComposition::composerItems( QList<T*>& itemList ) template<class T> void QgsComposition::composerItems( QList<T*>& itemList )
{ {
itemList.clear(); itemList.clear();
QList<QGraphicsItem *> graphicsItemList = items(); QList<QGraphicsItem *> graphicsItemList = items();
QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin(); QList<QGraphicsItem *>::iterator itemIt = graphicsItemList.begin();
for ( ; itemIt != graphicsItemList.end(); ++itemIt ) for ( ; itemIt != graphicsItemList.end(); ++itemIt )
 End of changes. 18 change blocks. 
14 lines changed or deleted 60 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 "2.2.0-Valmiera" #define VERSION "2.4.0-Chugiak"
//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 220 //#define VERSION_INT 240
#define VERSION_INT 20200 #define VERSION_INT 20400
#define ABISYM(x) x ## 20200 #define ABISYM(x) x ## 20400
//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 "Valmiera" #define RELEASE_NAME "Chugiak"
#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/ut/testing/qgis/2.2.0" #define CMAKE_INSTALL_PREFIX "/home/ut/testing/qgis/2.4.0"
#define CMAKE_SOURCE_DIR "/home/ut/repository/qgis/install/qgis-2.2.0" #define CMAKE_SOURCE_DIR "/home/ut/repository/qgis/install/qgis-2.4.0"
#define QSCINTILLA_VERSION_STR "" #define QSCINTILLA_VERSION_STR ""
//used by Mac to find system Qt plugins when bundle is run from build direc
tory
#define QTPLUGINSDIR "/usr/plugins"
//used by Mac to find system Open Scene Graph plugins when bundle is run fr #if defined( __APPLE__ )
om build directory //used by Mac to find system or bundle resources relative to amount of bund
ling
#define QGIS_MACAPP_BUNDLE
#endif
#define QT_PLUGINS_DIR "/usr/plugins"
#define OSG_PLUGINS_PATH "" #define OSG_PLUGINS_PATH ""
/* #undef USING_NMAKE */ /* #undef USING_NMAKE */
#define HAVE_POSTGRESQL #define HAVE_POSTGRESQL
#define HAVE_SPATIALITE #define HAVE_SPATIALITE
#define HAVE_MSSQL #define HAVE_MSSQL
/* #undef HAVE_ORACLE */ /* #undef HAVE_ORACLE */
/* #undef HAVE_PYTHON */ /* #undef HAVE_PYTHON */
/* #undef HAVE_TOUCH */ /* #undef HAVE_TOUCH */
/* #undef HAVE_OSGEARTHQT */ /* #undef HAVE_OSGEARTHQT */
/* #undef MAPSERVER_SKIP_ECW */ /* #undef MAPSERVER_SKIP_ECW */
/* #undef HAVE_MACAPP_BUNDLED_OSG */
#endif #endif
 End of changes. 7 change blocks. 
14 lines changed or deleted 14 lines changed or added


 qgscoordinatetransform.h   qgscoordinatetransform.h 
skipping to change at line 159 skipping to change at line 159
* @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 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;
#ifdef QT_ARCH_ARM
void transformInPlace( qreal& x, qreal& y, double &z, TransformDirectio
n direction = ForwardTransform ) const;
#endif
//! @note not available in python bindings //! @note not available in python bindings
void transformInPlace( QVector<double>& x, QVector<double>& y, QVector< double>& z, void transformInPlace( QVector<double>& x, QVector<double>& y, QVector< double>& z,
TransformDirection direction = ForwardTransform ) const; TransformDirection direction = ForwardTransform ) const;
void transformPolygon( QPolygonF& poly, TransformDirection direction = ForwardTransform ) const; void transformPolygon( QPolygonF& poly, TransformDirection direction = ForwardTransform ) const;
#ifdef ANDROID #ifdef ANDROID
void transformInPlace( float& x, float& y, float& z, TransformDirection direction = ForwardTransform ) const; void transformInPlace( float& x, float& y, float& z, TransformDirection direction = ForwardTransform ) const;
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 qgscptcityarchive.h   qgscptcityarchive.h 
skipping to change at line 67 skipping to change at line 67
QString archiveName() const { return mArchiveName; } QString archiveName() const { return mArchiveName; }
static void initArchives( bool loadAll = false ); static void initArchives( bool loadAll = false );
static void initArchive( QString archiveName, QString archiveBaseDir ); static void initArchive( QString archiveName, QString archiveBaseDir );
static void initDefaultArchive(); static void initDefaultArchive();
static void clearArchives(); static void clearArchives();
static QgsCptCityArchive* defaultArchive(); static QgsCptCityArchive* defaultArchive();
static QMap< QString, QgsCptCityArchive* > archiveRegistry(); static QMap< QString, QgsCptCityArchive* > archiveRegistry();
// items // items
QVector< QgsCptCityDataItem* > rootItems() const { return mRootItems; } QVector< QgsCptCityDataItem* > rootItems() const { return mRootItems; }
QVector<QgsCptCityDataItem*> selectionItems() const { return mSelection Items; } QVector< QgsCptCityDataItem* > selectionItems() const { return mSelecti onItems; }
protected: protected:
QString mArchiveName; QString mArchiveName;
QString mBaseDir; QString mBaseDir;
static QString mDefaultArchiveName; static QString mDefaultArchiveName;
static QMap< QString, QgsCptCityArchive* > mArchiveRegistry; static QMap< QString, QgsCptCityArchive* > mArchiveRegistry;
// root items, namely directories at root of archive // root items, namely directories at root of archive
QVector< QgsCptCityDataItem* > mRootItems; QVector< QgsCptCityDataItem* > mRootItems;
QVector<QgsCptCityDataItem*> mSelectionItems; QVector<QgsCptCityDataItem*> mSelectionItems;
skipping to change at line 131 skipping to change at line 131
// remove and delete child item, signals to browser are emitted // remove and delete child item, signals to browser are emitted
virtual void deleteChildItem( QgsCptCityDataItem * child ); virtual void deleteChildItem( QgsCptCityDataItem * child );
// remove child item but don't delete it, signals to browser are emitte d // remove child item but don't delete it, signals to browser are emitte d
// returns pointer to the removed item or null if no such item was foun d // returns pointer to the removed item or null if no such item was foun d
virtual QgsCptCityDataItem * removeChildItem( QgsCptCityDataItem * chil d ); virtual QgsCptCityDataItem * removeChildItem( QgsCptCityDataItem * chil d );
virtual bool equal( const QgsCptCityDataItem *other ); virtual bool equal( const QgsCptCityDataItem *other );
virtual QWidget * paramWidget() { return 0; } virtual QWidget *paramWidget() { return 0; }
// list of actions provided by this item - usually used for popup menu on right-click // list of actions provided by this item - usually used for popup menu on right-click
virtual QList<QAction*> actions() { return QList<QAction*>(); } virtual QList<QAction*> actions() { return QList<QAction*>(); }
// whether accepts drag&drop'd layers - e.g. for import // whether accepts drag&drop'd layers - e.g. for import
virtual bool acceptDrop() { return false; } virtual bool acceptDrop() { return false; }
// try to process the data dropped on this item // try to process the data dropped on this item
virtual bool handleDrop( const QMimeData * /*data*/, Qt::DropAction /*a ction*/ ) { return false; } virtual bool handleDrop( const QMimeData * /*data*/, Qt::DropAction /*a ction*/ ) { return false; }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgscredentialdialog.h   qgscredentialdialog.h 
skipping to change at line 33 skipping to change at line 33
#include <QString> #include <QString>
/** \ingroup gui /** \ingroup gui
* A generic dialog for requesting credentials * A generic dialog for requesting credentials
*/ */
class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredential s, private Ui_QgsCredentialDialog class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredential s, private Ui_QgsCredentialDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsCredentialDialog( QWidget *parent = 0, Qt::WFlags fl = QgisGui::Moda lDialogFlags ); QgsCredentialDialog( QWidget *parent = 0, Qt::WindowFlags fl = QgisGui: :ModalDialogFlags );
~QgsCredentialDialog(); ~QgsCredentialDialog();
signals: signals:
void credentialsRequested( QString, QString *, QString *, QString, bool * ); void credentialsRequested( QString, QString *, QString *, QString, bool * );
private slots: private slots:
void requestCredentials( QString, QString *, QString *, QString, bool * ); void requestCredentials( QString, QString *, QString *, QString, bool * );
protected: protected:
virtual bool request( QString realm, QString &username, QString &passwo rd, QString message = QString::null ); virtual bool request( QString realm, QString &username, QString &passwo rd, QString message = QString::null );
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgscredentials.h   qgscredentials.h 
skipping to change at line 23 skipping to change at line 23
* * * *
************************************************************************** */ ************************************************************************** */
#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>
#include <QMutex>
/** \ingroup core /** \ingroup core
* Interface for requesting credentials in QGIS in GUI independent way. * Interface for requesting credentials in QGIS in GUI independent way.
* This class provides abstraction of a dialog for requesting credentials t o the user. * This class provides abstraction of a dialog for requesting credentials t o the user.
* By default QgsCredentials will be used if not overridden with other * By default QgsCredentials will be used if not overridden with other
* credential creator function. * credential creator function.
* QGIS application uses QgsCredentialDialog class for displaying a dialog to the user. * QGIS application uses QgsCredentialDialog class for displaying a dialog to the user.
* Object deletes itself when it's not needed anymore. Children should use * Object deletes itself when it's not needed anymore. Children should use
skipping to change at line 47 skipping to change at line 48
public: public:
//! virtual destructor //! virtual destructor
virtual ~QgsCredentials(); virtual ~QgsCredentials();
bool get( QString realm, QString &username, QString &password, QString message = QString::null ); bool get( QString realm, QString &username, QString &password, QString message = QString::null );
void put( QString realm, QString username, QString password ); void put( QString realm, QString username, QString password );
//! retrieves instance //! retrieves instance
static QgsCredentials *instance(); static QgsCredentials *instance();
/**
* Lock the instance against access from multiple threads. This does no
t really lock access to get/put methds,
* it will just prevent other threads to lock the instance and continue
the execution. When the class is used
* from non-GUI threads, they should call lock() before the get/put cal
ls to avoid race conditions.
* @note added in 2.4
*/
void lock();
/**
* Unlock the instance after being locked.
* @note added in 2.4
*/
void unlock();
/**
* Return pointer to mutex
* @note added in 2.4
*/
QMutex *mutex() { return &mMutex; }
protected: protected:
QgsCredentials();
//! request a password //! request a password
virtual bool request( QString realm, QString &username, QString &passwo rd, QString message = QString::null ) = 0; virtual bool request( QString realm, QString &username, QString &passwo rd, QString message = QString::null ) = 0;
//! register instance //! register instance
void setInstance( QgsCredentials *theInstance ); void setInstance( QgsCredentials *theInstance );
private: private:
Q_DISABLE_COPY( QgsCredentials )
//! cache for already requested credentials in this session //! cache for already requested credentials in this session
QMap< QString, QPair<QString, QString> > mCredentialCache; QMap< QString, QPair<QString, QString> > mCredentialCache;
//! Pointer to the credential instance //! Pointer to the credential instance
static QgsCredentials *smInstance; static QgsCredentials *smInstance;
QMutex mMutex;
}; };
/** /**
\brief Default implementation of credentials interface \brief Default implementation of credentials interface
This class outputs message to the standard output and retrieves input from This class outputs message to the standard output and retrieves input from
standard input. Therefore it won't be the right choice for apps without standard input. Therefore it won't be the right choice for apps without
GUI. GUI.
*/ */
class CORE_EXPORT QgsCredentialsConsole : public QObject, public QgsCredent ials class CORE_EXPORT QgsCredentialsConsole : public QObject, public QgsCredent ials
 End of changes. 5 change blocks. 
0 lines changed or deleted 30 lines changed or added


 qgsdatadefinedbutton.h   qgsdatadefinedbutton.h 
skipping to change at line 37 skipping to change at line 37
/** \ingroup gui /** \ingroup gui
* \class QgsDataDefinedButton * \class QgsDataDefinedButton
* A button for defining data source field mappings or expressions. * A button for defining data source field mappings or expressions.
* @note added in QGIS 1.9 * @note added in QGIS 1.9
*/ */
class GUI_EXPORT QgsDataDefinedButton: public QToolButton class GUI_EXPORT QgsDataDefinedButton: public QToolButton
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY( QString usageInfo READ usageInfo WRITE setUsageInfo )
public: public:
enum DataType enum DataType
{ {
AnyType = 0, AnyType = 0,
String = 1, String = 1,
Int = 2, Int = 2,
Double = 4 Double = 4
}; };
Q_DECLARE_FLAGS( DataTypes, DataType ) Q_DECLARE_FLAGS( DataTypes, DataType )
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 qgsdatadefinedsymboldialog.h   qgsdatadefinedsymboldialog.h 
skipping to change at line 41 skipping to change at line 41
static QString colorHelpText(); static QString colorHelpText();
static QString offsetHelpText(); static QString offsetHelpText();
static QString fileNameHelpText(); static QString fileNameHelpText();
static QString horizontalAnchorHelpText(); static QString horizontalAnchorHelpText();
static QString verticalAnchorHelpText(); static QString verticalAnchorHelpText();
static QString gradientTypeHelpText(); static QString gradientTypeHelpText();
static QString gradientCoordModeHelpText(); static QString gradientCoordModeHelpText();
static QString gradientSpreadHelpText(); static QString gradientSpreadHelpText();
static QString boolHelpText(); static QString boolHelpText();
private slots:
void expressionButtonClicked();
private: private:
const QgsVectorLayer* mVectorLayer; const QgsVectorLayer* mVectorLayer;
/**Tries to fiend a combo box field for an expression string (consideri
ng whitespaces, brackets around attribute names)
@return index or -1 in case not found*/
int comboIndexForExpressionString( const QString& expr, const QComboBox
* cb );
}; };
#endif // QGSDATADEFINEDSYMBOLLAYERDIALOG_H #endif // QGSDATADEFINEDSYMBOLLAYERDIALOG_H
 End of changes. 2 change blocks. 
9 lines changed or deleted 0 lines changed or added


 qgsdatumtransformdialog.h   qgsdatumtransformdialog.h 
skipping to change at line 30 skipping to change at line 30
#include "ui_qgsdatumtransformdialogbase.h" #include "ui_qgsdatumtransformdialogbase.h"
class GUI_EXPORT QgsDatumTransformDialog: public QDialog, private Ui::QgsDa tumTransformDialogBase class GUI_EXPORT QgsDatumTransformDialog: public QDialog, private Ui::QgsDa tumTransformDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsDatumTransformDialog( const QString& layerName, const QList< QList< int > >& dt, QWidget * parent = 0, Qt::WindowFlags f = 0 ); QgsDatumTransformDialog( const QString& layerName, const QList< QList< int > >& dt, QWidget * parent = 0, Qt::WindowFlags f = 0 );
~QgsDatumTransformDialog(); ~QgsDatumTransformDialog();
//! @note added in 2.4
void setDatumTransformInfo( const QString& srcCRSauthId, const QString&
destCRSauthId );
QList< int > selectedDatumTransform(); QList< int > selectedDatumTransform();
bool rememberSelection() const; bool rememberSelection() const;
public slots: public slots:
void on_mHideDeprecatedCheckBox_stateChanged( int state ); void on_mHideDeprecatedCheckBox_stateChanged( int state );
void on_mDatumTransformTreeWidget_currentItemChanged( QTreeWidgetItem * , QTreeWidgetItem * );
private: private:
QgsDatumTransformDialog(); QgsDatumTransformDialog();
void updateTitle();
bool gridShiftTransformation( const QString& itemText ) const; bool gridShiftTransformation( const QString& itemText ) const;
/**Returns false if the location of the grid shift files is known (PROJ _LIB) and the shift file is not there*/ /**Returns false if the location of the grid shift files is known (PROJ _LIB) and the shift file is not there*/
bool testGridShiftFileAvailability( QTreeWidgetItem* item, int col ) co nst; bool testGridShiftFileAvailability( QTreeWidgetItem* item, int col ) co nst;
void load(); void load();
const QList< QList< int > > &mDt; const QList< QList< int > > &mDt;
QString mLayerName;
QString mSrcCRSauthId, mDestCRSauthId;
}; };
#endif // QGSDATUMTRANSFORMDIALOG_H #endif // QGSDATUMTRANSFORMDIALOG_H
 End of changes. 4 change blocks. 
0 lines changed or deleted 8 lines changed or added


 qgsdiagram.h   qgsdiagram.h 
skipping to change at line 36 skipping to change at line 36
class QgsRenderContext; class QgsRenderContext;
class QgsExpression; class QgsExpression;
/**Base class for all diagram types*/ /**Base class for all diagram types*/
class CORE_EXPORT QgsDiagram class CORE_EXPORT QgsDiagram
{ {
public: public:
virtual ~QgsDiagram() { clearCache(); } virtual ~QgsDiagram() { clearCache(); }
/** Returns an instance that is equivalent to this one
* @note added in 2.4 */
virtual QgsDiagram* clone() const = 0;
void clearCache(); void clearCache();
QgsExpression* getExpression( const QString& expression, const QgsField s* fields ); QgsExpression* getExpression( const QString& expression, const QgsField s* fields );
/** @deprecated `void renderDiagram( const QgsFeature& feature, QgsRend erContext& c, const QgsDiagramSettings& s, const QPointF& position )` shoul d be used instead */ /** @deprecated `void renderDiagram( const QgsFeature& feature, QgsRend erContext& c, const QgsDiagramSettings& s, const QPointF& position )` shoul d be used instead */
virtual Q_DECL_DEPRECATED void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position ); virtual Q_DECL_DEPRECATED void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position );
/**Draws the diagram at the given position (in pixel coordinates)*/ /**Draws the diagram at the given position (in pixel coordinates)*/
virtual void renderDiagram( const QgsFeature& feature, QgsRenderContext & c, const QgsDiagramSettings& s, const QPointF& position ) = 0; virtual void renderDiagram( const QgsFeature& feature, QgsRenderContext & c, const QgsDiagramSettings& s, const QPointF& position ) = 0;
virtual QString diagramName() const = 0; virtual QString diagramName() const = 0;
/**Returns the size in map units the diagram will use to render.*/ /**Returns the size in map units the diagram will use to render.*/
virtual QSizeF diagramSize( const QgsAttributes& attributes, const QgsR enderContext& c, const QgsDiagramSettings& s ) = 0; virtual QSizeF diagramSize( const QgsAttributes& attributes, const QgsR enderContext& c, const QgsDiagramSettings& s ) = 0;
/** @deprecated `QSizeF diagramSize( const QgsFeature& feature, const Q gsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolat ionSettings& is )` should be used instead */ /** @deprecated `QSizeF diagramSize( const QgsFeature& feature, const Q gsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolat ionSettings& is )` should be used instead */
virtual Q_DECL_DEPRECATED QSizeF diagramSize( const QgsAttributes& attr ibutes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDi agramInterpolationSettings& is ); virtual Q_DECL_DEPRECATED QSizeF diagramSize( const QgsAttributes& attr ibutes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDi agramInterpolationSettings& is );
/**Returns the size in map units the diagram will use to render. Interp olate size*/ /**Returns the size in map units the diagram will use to render. Interp olate size*/
virtual QSizeF diagramSize( const QgsFeature& feature, const QgsRenderC ontext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettin gs& is ) = 0; virtual QSizeF diagramSize( const QgsFeature& feature, const QgsRenderC ontext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettin gs& is ) = 0;
protected: protected:
QgsDiagram();
QgsDiagram( const QgsDiagram& other );
/** Changes the pen width to match the current settings and rendering c ontext /** Changes the pen width to match the current settings and rendering c ontext
* @param pen The pen to modify * @param pen The pen to modify
* @param s The settings that specify the pen width * @param s The settings that specify the pen width
* @param c The rendering specifying the proper scale units for pixe l conversion * @param c The rendering specifying the proper scale units for pixe l conversion
*/ */
void setPenWidth( QPen& pen, const QgsDiagramSettings& s, const QgsRend erContext& c ); void setPenWidth( QPen& pen, const QgsDiagramSettings& s, const QgsRend erContext& c );
/** Calculates a size to match the current settings and rendering conte xt /** Calculates a size to match the current settings and rendering conte xt
* @param size The size to convert * @param size The size to convert
* @param s The settings that specify the size type * @param s The settings that specify the size type
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added


 qgsdiagramrendererv2.h   qgsdiagramrendererv2.h 
skipping to change at line 61 skipping to change at line 61
}; };
enum LinePlacementFlags enum LinePlacementFlags
{ {
OnLine = 1, OnLine = 1,
AboveLine = 2, AboveLine = 2,
BelowLine = 4, BelowLine = 4,
MapOrientation = 8 MapOrientation = 8
}; };
QgsDiagramLayerSettings() QgsDiagramLayerSettings();
: placement( AroundPoint )
, placementFlags( OnLine ) ~QgsDiagramLayerSettings();
, 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; // if any renderer is assigned, it is o wned by this class
//assigned when layer gets prepared //assigned when layer gets prepared
pal::Layer* palLayer; pal::Layer* palLayer;
const QgsCoordinateTransform* ct; const QgsCoordinateTransform* ct;
const QgsMapToPixel* xform; const QgsMapToPixel* xform;
QList<QgsPalGeometry*> geometries; QList<QgsPalGeometry*> geometries;
QgsFields fields;
int xPosColumn; //attribute index for x coordinate (or -1 if position n ot data defined) int xPosColumn; //attribute index for x coordinate (or -1 if position n ot data defined)
int yPosColumn;//attribute index for y coordinate (or -1 if position no t data defined) int yPosColumn;//attribute index for y coordinate (or -1 if position no t data defined)
void readXML( const QDomElement& elem, const QgsVectorLayer* layer ); void readXML( const QDomElement& elem, const QgsVectorLayer* layer );
void writeXML( QDomElement& layerElem, QDomDocument& doc, const QgsVect orLayer* layer ) const; void writeXML( QDomElement& layerElem, QDomDocument& doc, const QgsVect orLayer* layer ) const;
}; };
//diagram settings for rendering //diagram settings for rendering
class CORE_EXPORT QgsDiagramSettings class CORE_EXPORT QgsDiagramSettings
skipping to change at line 172 skipping to change at line 162
}; };
/**Returns diagram settings for a feature*/ /**Returns diagram settings for a feature*/
class CORE_EXPORT QgsDiagramRendererV2 class CORE_EXPORT QgsDiagramRendererV2
{ {
public: public:
QgsDiagramRendererV2(); QgsDiagramRendererV2();
virtual ~QgsDiagramRendererV2(); virtual ~QgsDiagramRendererV2();
/** Returns new instance that is equivalent to this one
* @note added in 2.4 */
virtual QgsDiagramRendererV2* clone() const = 0;
/**Returns size of the diagram for a feature in map units. Returns an i nvalid QSizeF in case of error*/ /**Returns size of the diagram for a feature in map units. Returns an i nvalid QSizeF in case of error*/
virtual QSizeF sizeMapUnits( const QgsFeature& feature, const QgsRender Context& c ); virtual QSizeF sizeMapUnits( const QgsFeature& feature, const QgsRender Context& c );
virtual QString rendererName() const = 0; virtual QString rendererName() const = 0;
/**Returns attribute indices needed for diagram rendering*/ /**Returns attribute indices needed for diagram rendering*/
virtual QList<QString> diagramAttributes() const = 0; virtual QList<QString> diagramAttributes() const = 0;
void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, con st QPointF& pos ); void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, con st QPointF& pos );
void setDiagram( QgsDiagram* d ); void setDiagram( QgsDiagram* d );
QgsDiagram* diagram() const { return mDiagram; } QgsDiagram* diagram() const { return mDiagram; }
/**Returns list with all diagram settings in the renderer*/ /**Returns list with all diagram settings in the renderer*/
virtual QList<QgsDiagramSettings> diagramSettings() const = 0; virtual QList<QgsDiagramSettings> diagramSettings() const = 0;
virtual void readXML( const QDomElement& elem, const QgsVectorLayer* la yer ) = 0; virtual void readXML( const QDomElement& elem, const QgsVectorLayer* la yer ) = 0;
virtual void writeXML( QDomElement& layerElem, QDomDocument& doc, const QgsVectorLayer* layer ) const = 0; virtual void writeXML( QDomElement& layerElem, QDomDocument& doc, const QgsVectorLayer* layer ) const = 0;
protected: protected:
QgsDiagramRendererV2( const QgsDiagramRendererV2& other );
/**Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered). Used internally within renderDiagram() /**Returns diagram settings for a feature (or false if the diagram for the feature is not to be rendered). Used internally within renderDiagram()
* @param feature the feature * @param feature the feature
* @param c render context * @param c render context
* @param s out: diagram settings for the feature * @param s out: diagram settings for the feature
*/ */
virtual bool diagramSettings( const QgsFeature &feature, const QgsRende rContext& c, QgsDiagramSettings& s ) = 0; virtual bool diagramSettings( const QgsFeature &feature, const QgsRende rContext& c, QgsDiagramSettings& s ) = 0;
/**Returns size of the diagram (in painter units) or an invalid size in case of error*/ /**Returns size of the diagram (in painter units) or an invalid size in case of error*/
virtual QSizeF diagramSize( const QgsFeature& features, const QgsRender Context& c ) = 0; virtual QSizeF diagramSize( const QgsFeature& features, const QgsRender Context& c ) = 0;
skipping to change at line 224 skipping to change at line 219
QgsDiagram* mDiagram; QgsDiagram* mDiagram;
}; };
/**Renders the diagrams for all features with the same settings*/ /**Renders the diagrams for all features with the same settings*/
class CORE_EXPORT QgsSingleCategoryDiagramRenderer : public QgsDiagramRende rerV2 class CORE_EXPORT QgsSingleCategoryDiagramRenderer : public QgsDiagramRende rerV2
{ {
public: public:
QgsSingleCategoryDiagramRenderer(); QgsSingleCategoryDiagramRenderer();
~QgsSingleCategoryDiagramRenderer(); ~QgsSingleCategoryDiagramRenderer();
QgsDiagramRendererV2* clone() const;
QString rendererName() const { return "SingleCategory"; } QString rendererName() const { return "SingleCategory"; }
QList<QString> diagramAttributes() const { return mSettings.categoryAtt ributes; } QList<QString> diagramAttributes() const { return mSettings.categoryAtt ributes; }
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, const QgsVectorLayer* layer ); void readXML( const QDomElement& elem, const QgsVectorLayer* layer );
void writeXML( QDomElement& layerElem, QDomDocument& doc, const QgsVect orLayer* layer ) const; void writeXML( QDomElement& layerElem, QDomDocument& doc, const QgsVect orLayer* layer ) const;
skipping to change at line 250 skipping to change at line 247
private: private:
QgsDiagramSettings mSettings; QgsDiagramSettings mSettings;
}; };
class CORE_EXPORT QgsLinearlyInterpolatedDiagramRenderer : public QgsDiagra mRendererV2 class CORE_EXPORT QgsLinearlyInterpolatedDiagramRenderer : public QgsDiagra mRendererV2
{ {
public: public:
QgsLinearlyInterpolatedDiagramRenderer(); QgsLinearlyInterpolatedDiagramRenderer();
~QgsLinearlyInterpolatedDiagramRenderer(); ~QgsLinearlyInterpolatedDiagramRenderer();
QgsDiagramRendererV2* clone() const;
/**Returns list with all diagram settings in the renderer*/ /**Returns list with all diagram settings in the renderer*/
QList<QgsDiagramSettings> diagramSettings() const; QList<QgsDiagramSettings> diagramSettings() const;
void setDiagramSettings( const QgsDiagramSettings& s ) { mSettings = s; } void setDiagramSettings( const QgsDiagramSettings& s ) { mSettings = s; }
QList<QString> diagramAttributes() const; QList<QString> diagramAttributes() const;
QString rendererName() const { return "LinearlyInterpolated"; } QString rendererName() const { return "LinearlyInterpolated"; }
void setLowerValue( double val ) { mInterpolationSettings.lowerValue = val; } void setLowerValue( double val ) { mInterpolationSettings.lowerValue = val; }
 End of changes. 7 change blocks. 
15 lines changed or deleted 14 lines changed or added


 qgsdialog.h   qgsdialog.h 
skipping to change at line 34 skipping to change at line 34
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QLayout> #include <QLayout>
/** \ingroup gui /** \ingroup gui
* A generic dialog with layout and button box * A generic dialog with layout and button box
*/ */
class GUI_EXPORT QgsDialog : public QDialog class GUI_EXPORT QgsDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsDialog( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFla gs, QgsDialog( QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDial ogFlags,
QDialogButtonBox::StandardButtons buttons = QDialogButtonBox ::Close, QDialogButtonBox::StandardButtons buttons = QDialogButtonBox ::Close,
Qt::Orientation orientation = Qt::Horizontal ); Qt::Orientation orientation = Qt::Horizontal );
~QgsDialog(); ~QgsDialog();
//! Returns the central layout. Widgets added to it must have this dial og as parent. //! Returns the central layout. Widgets added to it must have this dial og as parent.
QVBoxLayout *layout() { return mLayout; } QVBoxLayout *layout() { return mLayout; }
//! Returns the button box. //! Returns the button box.
QDialogButtonBox *buttonBox() { return mButtonBox; } QDialogButtonBox *buttonBox() { return mButtonBox; }
protected: protected:
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsdistancearea.h   qgsdistancearea.h 
skipping to change at line 68 skipping to change at line 68
/** /**
* Sets source spatial reference system (by QGIS CRS) * Sets source spatial reference system (by QGIS CRS)
* @note: missing in Python bindings in QGIS < 2.2 * @note: missing in Python bindings in QGIS < 2.2
*/ */
void setSourceCrs( const QgsCoordinateReferenceSystem& srcCRS ); void setSourceCrs( const QgsCoordinateReferenceSystem& srcCRS );
//! sets source spatial reference system by authid //! sets source spatial reference system by authid
void setSourceAuthId( QString authid ); void setSourceAuthId( QString authid );
//! returns source spatial reference system //! returns source spatial reference system
long sourceCrs() const { return mSourceRefSys; } long sourceCrs() const { return mCoordTransform->sourceCrs().srsid(); }
//! What sort of coordinate system is being used? //! What sort of coordinate system is being used?
bool geographic() const { return mCoordTransform->sourceCrs().geographi cFlag(); } bool geographic() const { return mCoordTransform->sourceCrs().geographi cFlag(); }
//! sets ellipsoid by its acronym //! sets ellipsoid by its acronym
bool setEllipsoid( const QString& ellipsoid ); bool setEllipsoid( const QString& ellipsoid );
//! Sets ellipsoid by supplied radii //! Sets ellipsoid by supplied radii
// Inverse flattening is calculated with invf = a/(a-b) // Inverse flattening is calculated with invf = a/(a-b)
bool setEllipsoid( double semiMajor, double semiMinor ); bool setEllipsoid( double semiMajor, double semiMinor );
skipping to change at line 114 skipping to change at line 114
//! compute bearing - in radians //! compute bearing - in radians
double bearing( const QgsPoint& p1, const QgsPoint& p2 ); double bearing( const QgsPoint& p1, const QgsPoint& p2 );
static QString textUnit( double value, int decimals, QGis::UnitType u, bool isArea, bool keepBaseUnit = false ); static QString textUnit( double value, int decimals, QGis::UnitType u, bool isArea, bool keepBaseUnit = false );
//! Helper for conversion between physical units //! Helper for conversion between physical units
void convertMeasurement( double &measure, QGis::UnitType &measureUnits, QGis::UnitType displayUnits, bool isArea ); void convertMeasurement( double &measure, QGis::UnitType &measureUnits, QGis::UnitType displayUnits, bool isArea );
protected: protected:
//! measures line distance, line points are extracted from WKB //! measures line distance, line points are extracted from WKB
// @note available in python bindings
const unsigned char* measureLine( const unsigned char* feature, double* area, bool hasZptr = false ); const unsigned char* measureLine( const unsigned char* feature, double* area, bool hasZptr = false );
//! measures polygon area and perimeter, vertices are extracted from WK B //! measures polygon area and perimeter, vertices are extracted from WK B
// @note available in python bindings
const unsigned char* measurePolygon( const unsigned char* feature, doub le* area, double* perimeter, bool hasZptr = false ); const unsigned char* measurePolygon( const unsigned char* feature, doub le* area, double* perimeter, bool hasZptr = false );
/** /**
calculates distance from two points on ellipsoid calculates distance from two points on ellipsoid
based on inverse Vincenty's formulae based on inverse Vincenty's formulae
Points p1 and p2 are expected to be in degrees and in currently used ellipsoid Points p1 and p2 are expected to be in degrees and in currently used ellipsoid
@note if course1 is not NULL, bearing (in radians) from first point i s calculated @note if course1 is not NULL, bearing (in radians) from first point i s calculated
(the same for course2) (the same for course2)
@return distance in meters @return distance in meters
*/ */
double computeDistanceBearing( const QgsPoint& p1, const QgsPoint& p2, double computeDistanceBearing( const QgsPoint& p1, const QgsPoint& p2,
double* course1 = NULL, double* course2 = NULL ); double* course1 = NULL, double* course2 = NULL );
//! uses flat / planimetric / Euclidean distance
double computeDistanceFlat( const QgsPoint& p1, const QgsPoint& p2 );
//! calculate distance with given coordinates (does not do a transform
anymore)
double computeDistance( const QList<QgsPoint>& points );
/** /**
calculates area of polygon on ellipsoid calculates area of polygon on ellipsoid
algorithm has been taken from GRASS: gis/area_poly1.c algorithm has been taken from GRASS: gis/area_poly1.c
*/ */
double computePolygonArea( const QList<QgsPoint>& points ); double computePolygonArea( const QList<QgsPoint>& points );
double computePolygonFlatArea( const QList<QgsPoint>& points ); double computePolygonFlatArea( const QList<QgsPoint>& points );
/** /**
skipping to change at line 156 skipping to change at line 164
private: private:
//! Copy helper //! Copy helper
void _copy( const QgsDistanceArea & origDA ); void _copy( const QgsDistanceArea & origDA );
//! used for transforming coordinates from source CRS to ellipsoid's co ordinates //! used for transforming coordinates from source CRS to ellipsoid's co ordinates
QgsCoordinateTransform* mCoordTransform; QgsCoordinateTransform* mCoordTransform;
//! indicates whether we will transform coordinates //! indicates whether we will transform coordinates
bool mEllipsoidalMode; bool mEllipsoidalMode;
//! id of the source spatial reference system
long mSourceRefSys;
//! ellipsoid acronym (from table tbl_ellipsoids) //! ellipsoid acronym (from table tbl_ellipsoids)
QString mEllipsoid; QString mEllipsoid;
//! ellipsoid parameters //! ellipsoid parameters
double mSemiMajor, mSemiMinor, mInvFlattening; double mSemiMajor, mSemiMinor, mInvFlattening;
// utility functions for polygon area measurement // utility functions for polygon area measurement
double getQ( double x ); double getQ( double x );
double getQbar( double x ); double getQbar( double x );
 End of changes. 5 change blocks. 
4 lines changed or deleted 10 lines changed or added


 qgsdualview.h   qgsdualview.h 
skipping to change at line 28 skipping to change at line 28
#include <QStackedWidget> #include <QStackedWidget>
#include "ui_qgsdualviewbase.h" #include "ui_qgsdualviewbase.h"
#include "qgsattributeeditorcontext.h" #include "qgsattributeeditorcontext.h"
#include "qgsattributetablefiltermodel.h" #include "qgsattributetablefiltermodel.h"
#include "qgscachedfeatureiterator.h" #include "qgscachedfeatureiterator.h"
#include "qgsdistancearea.h" #include "qgsdistancearea.h"
class QgsAttributeDialog; class QgsAttributeForm;
class QgsFeatureRequest; class QgsFeatureRequest;
class QSignalMapper; class QSignalMapper;
class QgsMapLayerAction; class QgsMapLayerAction;
/** /**
* This widget is used to show the attributes of a set of features of a {@l ink QgsVectorLayer}. * This widget is used to show the attributes of a set of features of a {@l ink QgsVectorLayer}.
* The attributes can be edited. * The attributes can be edited.
* It supports two different layouts: the table layout, in which the attrib utes for the features * It supports two different layouts: the table layout, in which the attrib utes for the features
* are shown in a table and the editor layout, where the features are shown as a selectable list * are shown in a table and the editor layout, where the features are shown as a selectable list
* and the attributes for the currently selected feature are shown in a for m. * and the attributes for the currently selected feature are shown in a for m.
skipping to change at line 72 skipping to change at line 72
* in the neighbouring frame. * in the neighbouring frame.
*/ */
AttributeEditor = 1 AttributeEditor = 1
}; };
/** /**
* @brief Constructor * @brief Constructor
* @param parent The parent widget * @param parent The parent widget
*/ */
explicit QgsDualView( QWidget* parent = 0 ); explicit QgsDualView( QWidget* parent = 0 );
virtual ~QgsDualView();
/** /**
* Has to be called to initialize the dual view. * Has to be called to initialize the dual view.
* *
* @param layer The layer which should be used to fetch features * @param layer The layer which should be used to fetch features
* @param mapCanvas The mapCanvas (used for the FilterMode * @param mapCanvas The mapCanvas (used for the FilterMode
* {@link QgsAttributeTableFilterModel::ShowVisible} * {@link QgsAttributeTableFilterModel::ShowVisible}
* @param request Use a modified request to limit the shown features * @param request Use a modified request to limit the shown features
* @param context The context in which this view is shown * @param context The context in which this view is shown
*/ */
skipping to change at line 99 skipping to change at line 98
*/ */
void setView( ViewMode view ); void setView( ViewMode view );
/** /**
* Set the filter mode * Set the filter mode
* *
* @param filterMode * @param filterMode
*/ */
void setFilterMode( QgsAttributeTableFilterModel::FilterMode filterMode ); void setFilterMode( QgsAttributeTableFilterModel::FilterMode filterMode );
QgsAttributeTableFilterModel::FilterMode filterMode() { return mFilterM
odel->filterMode(); }
/** /**
* Toggle the selectedOnTop flag. If enabled, selected features will be moved to top. * Toggle the selectedOnTop flag. If enabled, selected features will be moved to top.
* *
* @param selectedOnTop True: Show selected features on top. * @param selectedOnTop True: Show selected features on top.
* False: Use defined sorting column. * False: Use defined sorting column.
*/ */
void setSelectedOnTop( bool selectedOnTop ); void setSelectedOnTop( bool selectedOnTop );
/** /**
* Returns the number of features on the layer. * Returns the number of features on the layer.
skipping to change at line 130 skipping to change at line 131
int filteredFeatureCount(); int filteredFeatureCount();
/** /**
* Set a list of currently visible features * Set a list of currently visible features
* *
* @param filteredFeatures A list of feature ids * @param filteredFeatures A list of feature ids
* *
*/ */
void setFilteredFeatures( QgsFeatureIds filteredFeatures ); void setFilteredFeatures( QgsFeatureIds filteredFeatures );
QgsFeatureIds filteredFeatures() { return mFilterModel->filteredFeature
s(); }
/** /**
* Returns the model which has the information about all features (not only filtered) * Returns the model which has the information about all features (not only filtered)
* *
* @return The master model * @return The master model
*/ */
QgsAttributeTableModel* masterModel() const { return mMasterModel; } QgsAttributeTableModel* masterModel() const { return mMasterModel; }
void setRequest( const QgsFeatureRequest& request ); void setRequest( const QgsFeatureRequest& request );
void setFeatureSelectionManager( QgsIFeatureSelectionManager* featureSe lectionManager ); void setFeatureSelectionManager( QgsIFeatureSelectionManager* featureSe lectionManager );
protected: protected:
/** /**
* Initializes widgets which depend on the attributes of this layer * Initializes widgets which depend on the attributes of this layer
*/ */
void columnBoxInit(); void columnBoxInit();
virtual void hideEvent( QHideEvent * );
virtual void focusOutEvent( QFocusEvent * );
public slots: public slots:
/** /**
* @brief Set the current edit selection in the {@link AttributeEditor} mode. * @brief Set the current edit selection in the {@link AttributeEditor} mode.
* *
* @param fids A list of edited features (Currently only one at a tim e is supported) * @param fids A list of edited features (Currently only one at a tim e is supported)
*/ */
void setCurrentEditSelection( const QgsFeatureIds& fids ); void setCurrentEditSelection( const QgsFeatureIds& fids );
/** /**
* @brief saveEditChanges * @brief saveEditChanges
* *
* @return true if the saving was ok. false is possible due to connecte d * @return true if the saving was ok. false is possible due to connecte d
* validation logic. * validation logic.
*/ */
bool saveEditChanges(); bool saveEditChanges();
/**
* Update the shown feature if an attribute changed
*/
void reloadAttribute( const int& attribute );
signals: signals:
/** /**
* Is emitted, whenever the display expression is successfully changed * Is emitted, whenever the display expression is successfully changed
* @param expression The expression that was applied * @param expression The expression that was applied
*/ */
void displayExpressionChanged( const QString expression ); void displayExpressionChanged( const QString expression );
/** /**
* Is emitted, whenever the filter changes * Is emitted, whenever the filter changes
*/ */
void filterChanged(); void filterChanged();
private slots: private slots:
void on_mFeatureList_aboutToChangeEditSelection( bool& ok );
/** /**
* Changes the currently visible feature within the attribute editor * Changes the currently visible feature within the attribute editor
* *
* @param feat The newly visible feature * @param feat The newly visible feature
*/ */
void on_mFeatureList_currentEditSelectionChanged( const QgsFeature& fea t ); void on_mFeatureList_currentEditSelectionChanged( const QgsFeature& fea t );
void previewExpressionBuilder(); void previewExpressionBuilder();
void previewColumnChanged( QObject* previewAction ); void previewColumnChanged( QObject* previewAction );
void editingToggled();
void viewWillShowContextMenu( QMenu* menu, QModelIndex atIndex ); void viewWillShowContextMenu( QMenu* menu, QModelIndex atIndex );
void previewExpressionChanged( const QString expression ); void previewExpressionChanged( const QString expression );
/** /**
* If an attribute on this layer is deleted, remove the field also for * Will be called whenever the currently shown feature form changes.
open * Will forward this signal to the feature list to visually represent
* attribute dialogs. * that there has been an edit event.
* (as long as the attribute dialog is not able to handle this problem)
*
* @param attribute The attribute being deleted
*/
void attributeDeleted( int attribute );
/**
* If an attribute on this layer is added, add the field also for open
* attribute dialogs.
* (as long as the attribute dialog is not able to handle this problem)
*
* @param attribute The attribute being added
*/
void attributeAdded( int attribute );
/**
* Gets called when a feature is deleted.
* So it can be removed from the feature form if required.
*
* @param fid The feature being deleted
*/ */
void featureDeleted( QgsFeatureId fid ); void featureFormAttributeChanged();
/** /**
* Will be called periodically, when loading layers from slow data prov iders. * Will be called periodically, when loading layers from slow data prov iders.
* *
* @param i The number of features already loaded * @param i The number of features already loaded
* @param cancel Set to true to cancel * @param cancel Set to true to cancel
*/ */
virtual void progress( int i, bool& cancel ); virtual void progress( int i, bool& cancel );
/** /**
skipping to change at line 249 skipping to change at line 226
virtual void finished(); virtual void finished();
private: private:
void initLayerCache( QgsVectorLayer *layer ); void initLayerCache( QgsVectorLayer *layer );
void initModels( QgsMapCanvas* mapCanvas, const QgsFeatureRequest& requ est ); void initModels( QgsMapCanvas* mapCanvas, const QgsFeatureRequest& requ est );
QgsAttributeEditorContext mEditorContext; QgsAttributeEditorContext mEditorContext;
QgsAttributeTableModel* mMasterModel; QgsAttributeTableModel* mMasterModel;
QgsAttributeTableFilterModel* mFilterModel; QgsAttributeTableFilterModel* mFilterModel;
QgsFeatureListModel* mFeatureListModel; QgsFeatureListModel* mFeatureListModel;
QgsAttributeDialog* mAttributeDialog; QgsAttributeForm* mAttributeForm;
QgsCachedFeatureIterator* mFeatureCache; QgsCachedFeatureIterator* mFeatureCache;
QSignalMapper* mPreviewActionMapper; QSignalMapper* mPreviewActionMapper;
QMenu* mPreviewColumnsMenu; QMenu* mPreviewColumnsMenu;
QgsVectorLayerCache* mLayerCache; QgsVectorLayerCache* mLayerCache;
QProgressDialog* mProgressDlg; QProgressDialog* mProgressDlg;
QgsIFeatureSelectionManager* mFeatureSelectionManager; QgsIFeatureSelectionManager* mFeatureSelectionManager;
QgsDistanceArea mDistanceArea; QgsDistanceArea mDistanceArea;
friend class TestQgsDualView; friend class TestQgsDualView;
}; };
 End of changes. 11 change blocks. 
37 lines changed or deleted 15 lines changed or added


 qgseditorwidgetfactory.h   qgseditorwidgetfactory.h 
skipping to change at line 64 skipping to change at line 64
* @param vl The vector layer on which this widget will act * @param vl The vector layer on which this widget will act
* @param fieldIdx The field index on which this widget will act * @param fieldIdx The field index on which this widget will act
* @param editor An editor widget if already existent. If NULL is pro vided, a new widget will be created. * @param editor An editor widget if already existent. If NULL is pro vided, a new widget will be created.
* @param parent The parent for the wrapper class and any created wid get. * @param parent The parent for the wrapper class and any created wid get.
* *
* @return A new widget wrapper * @return A new widget wrapper
*/ */
virtual QgsEditorWidgetWrapper* create( QgsVectorLayer* vl, int fieldId x, QWidget* editor, QWidget* parent ) const = 0; virtual QgsEditorWidgetWrapper* create( QgsVectorLayer* vl, int fieldId x, QWidget* editor, QWidget* parent ) const = 0;
/** /**
* Return The human readable name of this widget type * Return The human readable identifier name of this widget type
*
* By default returns the name specified when constructing and does not
need to be overwritten
* *
* @return a name * @return a name
*/ */
virtual QString name(); QString name();
/** /**
* Override this in your implementation. * Override this in your implementation.
* Create a new configuration widget for this widget type. * Create a new configuration widget for this widget type.
* *
* @param vl The layer for which the widget will be created * @param vl The layer for which the widget will be created
* @param fieldIdx The field index for which the widget will be created * @param fieldIdx The field index for which the widget will be created
* @param parent The parent widget of the created config widget * @param parent The parent widget of the created config widget
* *
* @return A configuration widget * @return A configuration widget
skipping to change at line 93 skipping to change at line 91
/** /**
* Read the config from an XML file and map it to a proper {@link QgsEd itorWidgetConfig}. * Read the config from an XML file and map it to a proper {@link QgsEd itorWidgetConfig}.
* *
* @param configElement The configuration element from the project file * @param configElement The configuration element from the project file
* @param layer The layer for which this configuration applies * @param layer The layer for which this configuration applies
* @param fieldIdx The field on the layer for which this configura tion applies * @param fieldIdx The field on the layer for which this configura tion applies
* *
* @return A configuration object. This will be passed to your widget w rapper later on * @return A configuration object. This will be passed to your widget w rapper later on
*/ */
virtual QgsEditorWidgetConfig readConfig( const QDomElement& configElem ent, QgsVectorLayer* layer, int fieldIdx ); QgsEditorWidgetConfig readEditorConfig( const QDomElement& configElemen t, QgsVectorLayer* layer, int fieldIdx );
/** /**
* Serialize your configuration and save it in a xml doc. * Serialize your configuration and save it in a xml doc.
* *
* @param config The configuration to serialize * @param config The configuration to serialize
* @param configElement The element, where you can write your configura tion into * @param configElement The element, where you can write your configura tion into
* @param doc The document. You can use this to create new no des * @param doc The document. You can use this to create new no des
* @param layer The layer for which this configuration applies * @param layer The layer for which this configuration applies
* @param fieldIdx The field on the layer for which this configura tion applies * @param fieldIdx The field on the layer for which this configura tion applies
*/ */
virtual void writeConfig( const QgsEditorWidgetConfig& config, QDomElem ent& configElement, const QDomDocument& doc, const QgsVectorLayer* layer, i nt fieldIdx ); virtual void writeConfig( const QgsEditorWidgetConfig& config, QDomElem ent& configElement, QDomDocument& doc, const QgsVectorLayer* layer, int fie ldIdx );
private: /**
QString mName; * Check if this editor widget type supports a certain field.
}; *
* @param vl The layer
* @param fieldIdx The field index
* @return True if the type is supported for this field
*/
inline bool supportsField( QgsVectorLayer* vl, int fieldIdx ) { return
isFieldSupported( vl, fieldIdx ); }
/** /**
* This is a templated wrapper class, which inherits QgsEditWidgetFactory a * Create a pretty String representation of the value.
nd does the boring work for you. *
* C++ only * @param vl The vector layer.
*/ * @param fieldIdx The index of the field.
template<typename F, typename G> * @param config The editor widget config.
class GUI_EXPORT QgsEditWidgetFactoryHelper : public QgsEditorWidgetFactory * @param value The value to represent.
{ *
public: * @return By default the string representation of the provided value a
QgsEditWidgetFactoryHelper( QString name ) s implied by the field definition is returned.
: QgsEditorWidgetFactory( name ) {} */
virtual QString representValue( QgsVectorLayer* vl, int fieldIdx, const
QgsEditorWidgetWrapper* create( QgsVectorLayer* vl, int fieldIdx, QWidg QgsEditorWidgetConfig& config, const QVariant& cache, const QVariant& valu
et* editor, QWidget* parent ) const e ) const;
{
return new F( vl, fieldIdx, editor, parent );
}
QgsEditorConfigWidget* configWidget( QgsVectorLayer* vl, int fieldIdx,
QWidget* parent )
{
return new G( vl, fieldIdx, parent );
}
/** /**
* Read the config from an XML file and map it to a proper {@link QgsEd itorWidgetConfig}. * Create a cache for a given field.
* *
* Implement this method yourself somewhere with the class template par * @param vl The vector layer.
ameters * @param fieldIdx The index of the field.
* specified. To keep things clean, every implementation of this class * @param config The editor widget config.
should be placed *
* next to the associated widget factory implementation. * @return The default implementation returns an invalid QVariant
*/
virtual QVariant createCache( QgsVectorLayer* vl, int fieldIdx, const Q
gsEditorWidgetConfig& config );
private:
/**
* Read the config from an XML file and map it to a proper {@link QgsEd
itorWidgetConfig}.
* *
* @param configElement The configuration element from the project file * @param configElement The configuration element from the project file
* @param layer The layer for which this configuration applies * @param layer The layer for which this configuration applies
* @param fieldIdx The field on the layer for which this configura tion applies * @param fieldIdx The field on the layer for which this configura tion applies
* *
* @return A configuration object. This will be passed to your widget w rapper later on * @return A configuration object. This will be passed to your widget w rapper later on
*/ */
virtual QgsEditorWidgetConfig readConfig( const QDomElement& configElem ent, QgsVectorLayer* layer, int fieldIdx ); virtual QgsEditorWidgetConfig readConfig( const QDomElement& configElem ent, QgsVectorLayer* layer, int fieldIdx );
/** /**
* Serialize your configuration and save it in a xml doc. * This method allows to disable this editor widget type for a certain
* field.
* Implement this method yourself somewhere with the class template par * By default, it returns true for all fields.
ameters * Reimplement this if you only support certain fields.
* specified. To keep things clean, every implementation of this class *
should be placed * @param vl
* next to the associated widget factory implementation. * @param fieldIdx
* * @return True if the field is supported.
* @param config The configuration to serialize
* @param configElement The element, where you can write your configura
tion into
* @param doc The document. You can use this to create new no
des
* @param layer The layer for which this configuration applies
* @param fieldIdx The field on the layer for which this configura
tion applies
*/ */
virtual void writeConfig( const QgsEditorWidgetConfig& config, QDomElem virtual bool isFieldSupported( QgsVectorLayer* vl, int fieldIdx );
ent& configElement, const QDomDocument& doc, const QgsVectorLayer* layer, i
nt fieldIdx ); private:
QString mName;
}; };
#endif // QGSEDITORWIDGETFACTORY_H #endif // QGSEDITORWIDGETFACTORY_H
 End of changes. 11 change blocks. 
59 lines changed or deleted 53 lines changed or added


 qgseditorwidgetregistry.h   qgseditorwidgetregistry.h 
skipping to change at line 57 skipping to change at line 57
* *
* @param widgetId The id of the widget type to create an attribute ed itor for * @param widgetId The id of the widget type to create an attribute ed itor for
* @param vl The vector layer for which this widget will be crea ted * @param vl The vector layer for which this widget will be crea ted
* @param fieldIdx The field index on the specified layer for which th is widget will be created * @param fieldIdx The field index on the specified layer for which th is widget will be created
* @param config A configuration which should be used for the widget creation * @param config A configuration which should be used for the widget creation
* @param editor An editor widget which will be used instead of an a utocreated widget * @param editor An editor widget which will be used instead of an a utocreated widget
* @param parent The parent which will be used for the created wrapp er and the created widget * @param parent The parent which will be used for the created wrapp er and the created widget
* *
* @return A new widget wrapper * @return A new widget wrapper
*/ */
QgsEditorWidgetWrapper* create( const QString& widgetId, QgsVectorLayer * vl, int fieldIdx, const QgsEditorWidgetConfig& config, QWidget* editor, Q Widget* parent ); QgsEditorWidgetWrapper* create( const QString& widgetId, QgsVectorLayer * vl, int fieldIdx, const QgsEditorWidgetConfig& config, QWidget* editor, Q Widget* parent, const QgsAttributeEditorContext context = QgsAttributeEdito rContext() );
/** /**
* Creates a configuration widget * Creates a configuration widget
* *
* @param widgetId The id of the widget type to create a configuration widget for * @param widgetId The id of the widget type to create a configuration widget for
* @param vl The vector layer for which this widget will be crea ted * @param vl The vector layer for which this widget will be crea ted
* @param fieldIdx The field index on the specified layer for which th is widget will be created * @param fieldIdx The field index on the specified layer for which th is widget will be created
* @param parent The parent widget for the created widget * @param parent The parent widget for the created widget
* *
* @return A new configuration widget * @return A new configuration widget
skipping to change at line 85 skipping to change at line 85
* *
* @return A human readable name * @return A human readable name
*/ */
QString name( const QString& widgetId ); QString name( const QString& widgetId );
/** /**
* Get access to all registered factories * Get access to all registered factories
* *
* @return All ids and factories * @return All ids and factories
*/ */
const QMap<QString, QgsEditorWidgetFactory*> factories(); const QMap<QString, QgsEditorWidgetFactory*>& factories();
/** /**
* The other part which does the boring work for you * Get a factory for the given widget type id.
*
* @return A factory or Null if not existent
*/ */
template <class W, class C> QgsEditorWidgetFactory* factory( const QString& widgetId );
void registerWidget( const QString& widgetType, const QString& name )
{
mWidgetFactories.insert( widgetType, new QgsEditWidgetFactoryHelper<W
, C>( name ) );
}
/** /**
* Register a new widget factory with the given id * Register a new widget factory with the given id
* *
* @param widgetId The id which will be used later to refer to thi s widget type * @param widgetId The id which will be used later to refer to thi s widget type
* @param widgetFactory The factory which will create this widget type * @param widgetFactory The factory which will create this widget type
* *
* @return true, if successful, false, if the widgetId is already in us e or widgetFactory is NULL * @return true, if successful, false, if the widgetId is already in us e or widgetFactory is NULL
*/ */
bool registerWidget( const QString& widgetId, QgsEditorWidgetFactory* w idgetFactory ); bool registerWidget( const QString& widgetId, QgsEditorWidgetFactory* w idgetFactory );
protected: protected:
QgsEditorWidgetRegistry(); QgsEditorWidgetRegistry();
private slots: private slots:
/**
* Read all the editor widget information from a map layer XML node
* @param mapLayer
* @param layerElem
*/
void readMapLayer( QgsMapLayer* mapLayer , const QDomElement& layerElem ); void readMapLayer( QgsMapLayer* mapLayer , const QDomElement& layerElem );
/**
* Read all old-style editor widget configuration from a map node. Will
update
* a project file to the new version on next save
* @param mapLayer The layer in question
* @param layerElem The layer element from the project file
* @param cfg Writable config element
*
* @deprecated
*/
Q_DECL_DEPRECATED const QString readLegacyConfig( QgsVectorLayer* vl, c
onst QDomElement& editTypeElement , QgsEditorWidgetConfig& cfg );
/**
* Write all the widget config to a layer XML node
*
* @param mapLayer The layer for which the config is being written
* @param layerElem The XML element to which the config will be writte
n
* @param doc The document from which to create elements
*/
void writeMapLayer( QgsMapLayer* mapLayer , QDomElement& layerElem, QDo mDocument& doc ); void writeMapLayer( QgsMapLayer* mapLayer , QDomElement& layerElem, QDo mDocument& doc );
private: private:
QMap<QString, QgsEditorWidgetFactory*> mWidgetFactories; QMap<QString, QgsEditorWidgetFactory*> mWidgetFactories;
}; };
#endif // QGSEDITORWIDGETREGISTRY_H #endif // QGSEDITORWIDGETREGISTRY_H
 End of changes. 6 change blocks. 
9 lines changed or deleted 33 lines changed or added


 qgseditorwidgetwrapper.h   qgseditorwidgetwrapper.h 
skipping to change at line 24 skipping to change at line 24
************************************************************************** */ ************************************************************************** */
#ifndef QGSEDITORWIDGETWRAPPER_H #ifndef QGSEDITORWIDGETWRAPPER_H
#define QGSEDITORWIDGETWRAPPER_H #define QGSEDITORWIDGETWRAPPER_H
#include <QObject> #include <QObject>
#include <QMap> #include <QMap>
#include <QVariant> #include <QVariant>
class QgsVectorLayer; class QgsVectorLayer;
class QgsField;
#include "qgseditorwidgetconfig.h" #include "qgseditorwidgetconfig.h"
#include "qgsattributeeditorcontext.h"
#include "qgswidgetwrapper.h"
/** /**
* Manages an editor widget * Manages an editor widget
* Widget and wrapper share the same parent * Widget and wrapper share the same parent
* *
* A wrapper controls one attribute editor widget and is able to create a d efault * A wrapper controls one attribute editor widget and is able to create a d efault
* widget or use a pre-existent widget. It is able to set the widget to the value implied * widget or use a pre-existent widget. It is able to set the widget to the value implied
* by a field of a vector layer, or return the value it currently holds. Ev ery time it is changed * by a field of a vector layer, or return the value it currently holds. Ev ery time it is changed
* it has to emit a valueChanged signal (this does not yet mean, that the v * it has to emit a valueChanged signal. If it fails to do so, there is no
alue is accepted). guarantee that the
* changed status of the widget will be saved.
* *
*/ */
class GUI_EXPORT QgsEditorWidgetWrapper : public QObject class GUI_EXPORT QgsEditorWidgetWrapper : public QgsWidgetWrapper
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Create a new widget wrapper * Create a new widget wrapper
* *
* @param vl The layer on which the field is * @param vl The layer on which the field is
* @param fieldIdx The field which will be controlled * @param fieldIdx The field which will be controlled
* @param editor An editor widget. Can be NULL if one should be auto generated. * @param editor An editor widget. Can be NULL if one should be auto generated.
* @param parent A parent widget for this widget wrapper and the cre ated widget. * @param parent A parent widget for this widget wrapper and the cre ated widget.
*/ */
explicit QgsEditorWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWid get* editor = 0, QWidget* parent = 0 ); explicit QgsEditorWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWid get* editor = 0, QWidget* parent = 0 );
/** /**
* Will be used to access the widget's value. Read the value from the w idget and * Will be used to access the widget's value. Read the value from the w idget and
* return it properly formatted to be saved in the attribute. * return it properly formatted to be saved in the attribute.
* *
* If an invalid variant is returned this will be interpreted as no cha
nge.
* Be sure to return a NULL QVariant if it should be set to NULL.
*
* @return The current value the widget represents * @return The current value the widget represents
*/ */
virtual QVariant value() = 0; virtual QVariant value() = 0;
/** /**
* @brief Access the widget managed by this wrapper * Access the field index.
*
* @return The index of the field you are working on
* *
* @return The widget * @see layer()
*/ */
QWidget* widget(); int fieldIdx();
/** /**
* @brief Access the widget managed by this wrapper and cast it to a gi * Access the field.
ven type *
* Example: QPushButton* pb = wrapper->widget<QPushButton*>(); * @return The field you are working on
* *
* @return The widget as template type or NULL, if it cannot be cast to this type. * @see layer()
*/ */
template <class T> QgsField field();
T* widget() { return dynamic_cast<T>( mWidget ); }
/** /**
* Will set the config of this wrapper to the specified config. * Will return a wrapper for a given widget
* * @param widget The widget which was created by a wrapper
* @param config The config for this wrapper * @return The wrapper for the widget or NULL
*/ */
void setConfig( const QgsEditorWidgetConfig& config ); static QgsEditorWidgetWrapper* fromWidget( QWidget* widget );
/** /**
* Use this inside your overriden classes to access the configuration. * Is used to enable or disable the edit functionality of the managed w
* idget.
* @param key The configuration option you want to load * By default this will enable or disable the whole widget
* @param defaultVal Default value
* *
* @return the value assigned to this configuration option * @param enabled Enable or Disable?
*/ */
QVariant config( QString key, QVariant defaultVal = QVariant() ); void setEnabled( bool enabled );
signals:
/** /**
* Returns the whole config * Emit this signal, whenever the value changed.
* *
* @return The configuration * @param value The new value
*/ */
const QgsEditorWidgetConfig config(); void valueChanged( const QVariant& value );
public slots:
/** /**
* Access the QgsVectorLayer, you are working on * Will be called when the feature changes
* *
* @return The layer * Is forwarded to the slot @link{setValue()}
* *
* @see field() * @param feature The new feature
*/ */
QgsVectorLayer* layer(); void setFeature( const QgsFeature& feature );
/** /**
* Access the field index. * Is called, when the value of the widget needs to be changed. Update
* the widget representation
* @return The index of the field you are working on * to reflect the new value.
* *
* @see layer() * @param value The new value of the attribute
*/ */
int field(); virtual void setValue( const QVariant& value ) = 0;
protected slots:
/** /**
* Will return a wrapper for a given widget * If you emit to this slot in your implementation, an appropriate chan
* @param widget The widget which was created by a wrapper ge notification
* @return The wrapper for the widget or NULL * will be broadcasted. Helper for string type widgets.
*
* @param value The value
*/ */
static QgsEditorWidgetWrapper* fromWidget( QWidget* widget ); void valueChanged( const QString& value );
protected:
/** /**
* This method should create a new widget with the provided parent. Thi * If you emit to this slot in your implementation, an appropriate chan
s will only be called ge notification
* if the form did not already provide a widget, so it is not guarantee * will be broadcasted. Helper for int type widgets.
d to be called!
* You should not do initialisation stuff, which also has to be done fo
r custom editor
* widgets inside this method. Things like filling comboboxes and assig
ning other data which
* will also be used to make widgets on forms created in the QtDesigner
usable should be assigned
* in {@link initWidget(QWidget*)}.
* *
* @param parent You should set this parent on the created widget. * @param value The value
* @return A new widget * @note python name valueChangedInt
*/ */
virtual QWidget* createWidget( QWidget* parent ) = 0; void valueChanged( int value );
/** /**
* This method should initialize the editor widget with runtime data. F * If you emit to this slot in your implementation, an appropriate chan
ill your comboboxes here. ge notification
* will be broadcasted. Helper for double type widgets.
* *
* @param editor The widget which will represent this attribute editor * @param value The value
in a form. * @note python name valueChangedDouble
*/ */
virtual void initWidget( QWidget* editor ); void valueChanged( double value );
signals:
/** /**
* Emit this signal, whenever the value changed. * If you emit to this slot in your implementation, an appropriate chan
ge notification
* will be broadcasted. Helper for bool type widgets.
* *
* @param value The new value * @param value The value
* @note python name valueChangedBool
*/ */
void valueChanged( const QVariant& value ); void valueChanged( bool value );
public slots:
/** /**
* Is called, when the value of the widget needs to be changed. Update * If you emit to this slot in your implementation, an appropriate chan
the widget representation ge notification
* to reflect the new value. * will be broadcasted. Helper for longlong type widgets.
* *
* @param value The new value of the attribute * @param value The value
*/ */
virtual void setValue( const QVariant& value ) = 0; void valueChanged( qlonglong value );
/** /**
* Is used to enable or disable the edit functionality of the managed w * Will call the value() method to determine the emitted value
idget.
* By default this will enable or disable the whole widget
*
* @param enabled Enable or Disable?
*/ */
virtual void setEnabled( bool enabled ); void valueChanged();
private: private:
QgsEditorWidgetConfig mConfig; int mFieldIdx;
QWidget* mWidget;
QWidget* mParent;
QgsVectorLayer* mLayer;
int mField;
}; };
// We'll use this class inside a QVariant in the widgets properties // We'll use this class inside a QVariant in the widgets properties
Q_DECLARE_METATYPE( QgsEditorWidgetWrapper* ) Q_DECLARE_METATYPE( QgsEditorWidgetWrapper* )
#endif // QGSEDITORWIDGETWRAPPER_H #endif // QGSEDITORWIDGETWRAPPER_H
 End of changes. 49 change blocks. 
79 lines changed or deleted 77 lines changed or added


 qgsellipsesymbollayerv2.h   qgsellipsesymbollayerv2.h 
/************************************************************************** * /************************************************************************** *
qgsellipsesymbollayerv2.h qgsellipsesymbollayerv2.h
--------------------- ---------------------
begin : June 2011 begin : June 2011
copyright : (C) 2011 by Marco Hugentobler copyright : (C) 2011 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch email : marco dot hugentobler at sourcepole dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSELLIPSESYMBOLLAYERV2_H #ifndef QGSELLIPSESYMBOLLAYERV2_H
#define QGSELLIPSESYMBOLLAYERV2_H #define QGSELLIPSESYMBOLLAYERV2_H
skipping to change at line 69 skipping to change at line 69
void setFillColor( const QColor& c ) { mFillColor = c;} void setFillColor( const QColor& c ) { mFillColor = c;}
QColor fillColor() const { return mFillColor; } QColor fillColor() const { return mFillColor; }
void setOutlineColor( const QColor& c ) { mOutlineColor = c; } void setOutlineColor( const QColor& c ) { mOutlineColor = c; }
QColor outlineColor() const { return mOutlineColor; } QColor outlineColor() const { return mOutlineColor; }
void setSymbolWidthUnit( QgsSymbolV2::OutputUnit unit ) { mSymbolWidthU nit = unit; } void setSymbolWidthUnit( QgsSymbolV2::OutputUnit unit ) { mSymbolWidthU nit = unit; }
QgsSymbolV2::OutputUnit symbolWidthUnit() const { return mSymbolWidthUn it; } QgsSymbolV2::OutputUnit symbolWidthUnit() const { return mSymbolWidthUn it; }
void setSymbolWidthMapUnitScale( const QgsMapUnitScale& scale ) { mSymb
olWidthMapUnitScale = scale; }
const QgsMapUnitScale& symbolWidthMapUnitScale() const { return mSymbol
WidthMapUnitScale; }
void setSymbolHeightUnit( QgsSymbolV2::OutputUnit unit ) { mSymbolHeigh tUnit = unit; } void setSymbolHeightUnit( QgsSymbolV2::OutputUnit unit ) { mSymbolHeigh tUnit = unit; }
QgsSymbolV2::OutputUnit symbolHeightUnit() const { return mSymbolHeight Unit; } QgsSymbolV2::OutputUnit symbolHeightUnit() const { return mSymbolHeight Unit; }
void setSymbolHeightMapUnitScale( const QgsMapUnitScale& scale ) { mSym
bolHeightMapUnitScale = scale; }
const QgsMapUnitScale& symbolHeightMapUnitScale() const { return mSymbo
lHeightMapUnitScale; }
void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mOutlineWidt hUnit = unit; } void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mOutlineWidt hUnit = unit; }
QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidth Unit; } QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidth Unit; }
void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mOut
lineWidthMapUnitScale = scale; }
const QgsMapUnitScale& outlineWidthMapUnitScale() const { return mOutli
neWidthMapUnitScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
private: private:
QString mSymbolName; QString mSymbolName;
double mSymbolWidth; double mSymbolWidth;
QgsSymbolV2::OutputUnit mSymbolWidthUnit; QgsSymbolV2::OutputUnit mSymbolWidthUnit;
QgsMapUnitScale mSymbolWidthMapUnitScale;
double mSymbolHeight; double mSymbolHeight;
QgsSymbolV2::OutputUnit mSymbolHeightUnit; QgsSymbolV2::OutputUnit mSymbolHeightUnit;
QgsMapUnitScale mSymbolHeightMapUnitScale;
QColor mFillColor; QColor mFillColor;
QColor mOutlineColor; QColor mOutlineColor;
Qt::PenStyle mOutlineStyle; Qt::PenStyle mOutlineStyle;
double mOutlineWidth; double mOutlineWidth;
QgsSymbolV2::OutputUnit mOutlineWidthUnit; QgsSymbolV2::OutputUnit mOutlineWidthUnit;
QgsMapUnitScale mOutlineWidthMapUnitScale;
QPainterPath mPainterPath; QPainterPath mPainterPath;
QPen mPen; QPen mPen;
QBrush mBrush; QBrush mBrush;
/**Setup mPainterPath /**Setup mPainterPath
@param symbolName name of symbol @param symbolName name of symbol
@param context render context @param context render context
@param f feature f to render (0 if no data defined rendering)*/ @param scaledWidth optional width
void preparePath( const QString& symbolName, QgsSymbolV2RenderContext& @param scaledHeight optional height
context, const QgsFeature* f = 0 ); @param f optional feature to render (0 if no data defined rendering)
*/
void preparePath( const QString& symbolName, QgsSymbolV2RenderContext&
context, double* scaledWidth = 0, double* scaledHeight = 0, const QgsFeatur
e* f = 0 );
/**True if this symbol layer uses a data defined property*/ /**True if this symbol layer uses a data defined property*/
bool hasDataDefinedProperty() const; bool hasDataDefinedProperty() const;
}; };
#endif // QGSELLIPSESYMBOLLAYERV2_H #endif // QGSELLIPSESYMBOLLAYERV2_H
 End of changes. 9 change blocks. 
8 lines changed or deleted 33 lines changed or added


 qgserrordialog.h   qgserrordialog.h 
skipping to change at line 30 skipping to change at line 30
#include <QDialog> #include <QDialog>
#include "ui_qgserrordialogbase.h" #include "ui_qgserrordialogbase.h"
#include "qgisgui.h" #include "qgisgui.h"
#include "qgserror.h" #include "qgserror.h"
class GUI_EXPORT QgsErrorDialog: public QDialog, private Ui::QgsErrorDialog Base class GUI_EXPORT QgsErrorDialog: public QDialog, private Ui::QgsErrorDialog Base
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsErrorDialog( const QgsError & theError, const QString & theTitle, QW idget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags ); QgsErrorDialog( const QgsError & theError, const QString & theTitle, QW idget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
~QgsErrorDialog(); ~QgsErrorDialog();
/** Show dialog with error /** Show dialog with error
* @param theError error * @param theError error
* @param theTitle title * @param theTitle title
* @param parent parent object * @param parent parent object
* @param fl widget flags * @param fl widget flags
*/ */
static void show( const QgsError & theError, const QString & theTitle, QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags ); static void show( const QgsError & theError, const QString & theTitle, QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
public slots: public slots:
void on_mDetailPushButton_clicked(); void on_mDetailPushButton_clicked();
void on_mDetailCheckBox_stateChanged( int state ); void on_mDetailCheckBox_stateChanged( int state );
private: private:
QgsError mError; QgsError mError;
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgsexpression.h   qgsexpression.h 
skipping to change at line 130 skipping to change at line 130
//! @note prepare() should be called before calling this method //! @note prepare() should be called before calling this method
//! @note available in python bindings as evaluatePrepared //! @note available in python bindings as evaluatePrepared
inline QVariant evaluate( const QgsFeature& f ) { return evaluate( &f ) ; } inline QVariant evaluate( const QgsFeature& f ) { return evaluate( &f ) ; }
//! Evaluate the feature and return the result //! Evaluate the feature and return the result
//! @note this method does not expect that prepare() has been called on this instance //! @note this method does not expect that prepare() has been called on this instance
QVariant evaluate( const QgsFeature* f, const QgsFields& fields ); QVariant evaluate( const QgsFeature* f, const QgsFields& fields );
//! Evaluate the feature and return the result //! Evaluate the feature and return the result
//! @note this method does not expect that prepare() has been called on this instance //! @note this method does not expect that prepare() has been called on this instance
//! @note not available in python bindings
inline QVariant evaluate( const QgsFeature& f, const QgsFields& fields ) { return evaluate( &f, fields ); } inline QVariant evaluate( const QgsFeature& f, const QgsFields& fields ) { return evaluate( &f, fields ); }
//! Returns true if an error occurred when evaluating last input //! Returns true if an error occurred when evaluating last input
bool hasEvalError() const { return !mEvalErrorString.isNull(); } bool hasEvalError() const { return !mEvalErrorString.isNull(); }
//! Returns evaluation error //! Returns evaluation error
QString evalErrorString() const { return mEvalErrorString; } QString evalErrorString() const { return mEvalErrorString; }
//! Set evaluation error (used internally by evaluation functions) //! Set evaluation error (used internally by evaluation functions)
void setEvalErrorString( QString str ) { mEvalErrorString = str; } void setEvalErrorString( QString str ) { mEvalErrorString = str; }
//! Set the number for $rownum special column //! Set the number for $rownum special column
skipping to change at line 154 skipping to change at line 155
//! Assign a special column //! Assign a special column
static void setSpecialColumn( const QString& name, QVariant value ); static void setSpecialColumn( const QString& name, QVariant value );
//! Unset a special column //! Unset a special column
static void unsetSpecialColumn( const QString& name ); static void unsetSpecialColumn( const QString& name );
//! Return the value of the given special column or a null QVariant if undefined //! Return the value of the given special column or a null QVariant if undefined
static QVariant specialColumn( const QString& name ); static QVariant specialColumn( const QString& name );
//! Check whether a special column exists //! Check whether a special column exists
//! @note added in 2.2 //! @note added in 2.2
static bool hasSpecialColumn( const QString& name ); static bool hasSpecialColumn( const QString& name );
static bool isValid( const QString& text, const QgsFields& fields, QStr
ing &errorMessage );
void setScale( double scale ) { mScale = scale; } void setScale( double scale ) { mScale = scale; }
int scale() {return mScale; } double scale() { return mScale; }
//! Return the expression string that was given when created. //! Alias for dump()
const QString expression() const { return dump(); } const QString expression() const { return dump(); }
//! Return the expression string that represents this QgsExpression. //! Return the expression string that represents this QgsExpression.
QString dump() const; QString dump() const;
//! Return calculator used for distance and area calculations //! Return calculator used for distance and area calculations
//! (used by internal functions) //! (used by internal functions)
QgsDistanceArea *geomCalculator() { initGeomCalculator(); return mCalc; } QgsDistanceArea *geomCalculator() { initGeomCalculator(); return mCalc; }
//! Sets the geometry calculator used in evaluation of expressions, //! Sets the geometry calculator used in evaluation of expressions,
skipping to change at line 315 skipping to change at line 318
* @return The number of function defined in the parser. * @return The number of function defined in the parser.
*/ */
static int functionCount(); static int functionCount();
/** /**
* Returns a list of special Column definitions * Returns a list of special Column definitions
*/ */
static QList<Function*> specialColumns(); static QList<Function*> specialColumns();
//! return quoted column reference (in double quotes) //! return quoted column reference (in double quotes)
static QString quotedColumnRef( QString name ) { return QString( "\"%1\ "" ).arg( name.replace( "\"", "\"\"" ) ); } static QString quotedColumnRef( QString name );
//! return quoted string (in single quotes) //! return quoted string (in single quotes)
static QString quotedString( QString text ) { return QString( "'%1'" ). arg( text.replace( "'", "''" ) ); } static QString quotedString( QString text );
////// //////
class Visitor; // visitor interface is defined below class Visitor; // visitor interface is defined below
enum NodeType enum NodeType
{ {
ntUnaryOperator, ntUnaryOperator,
ntBinaryOperator, ntBinaryOperator,
ntInOperator, ntInOperator,
skipping to change at line 443 skipping to change at line 446
virtual NodeType nodeType() const { return ntBinaryOperator; } virtual NodeType nodeType() const { return ntBinaryOperator; }
virtual bool prepare( QgsExpression* parent, const QgsFields &field s ); virtual bool prepare( QgsExpression* parent, const QgsFields &field s );
virtual QVariant eval( QgsExpression* parent, const QgsFeature* f ) ; virtual QVariant eval( QgsExpression* parent, const QgsFeature* f ) ;
virtual QString dump() const; virtual QString dump() const;
virtual QStringList referencedColumns() const { return mOpLeft->ref erencedColumns() + mOpRight->referencedColumns(); } virtual QStringList referencedColumns() const { return mOpLeft->ref erencedColumns() + mOpRight->referencedColumns(); }
virtual bool needsGeometry() const { return mOpLeft->needsGeometry( ) || mOpRight->needsGeometry(); } virtual bool needsGeometry() const { return mOpLeft->needsGeometry( ) || mOpRight->needsGeometry(); }
virtual void accept( Visitor& v ) const { v.visit( *this ); } virtual void accept( Visitor& v ) const { v.visit( *this ); }
int precedence() const;
protected: protected:
bool compare( double diff ); bool compare( double diff );
int computeInt( int x, int y ); int computeInt( int x, int y );
double computeDouble( double x, double y ); double computeDouble( double x, double y );
QDateTime computeDateTimeFromInterval( QDateTime d, QgsExpression:: Interval *i ); QDateTime computeDateTimeFromInterval( QDateTime d, QgsExpression:: Interval *i );
BinaryOperator mOp; BinaryOperator mOp;
Node* mOpLeft; Node* mOpLeft;
Node* mOpRight; Node* mOpRight;
}; };
 End of changes. 7 change blocks. 
4 lines changed or deleted 10 lines changed or added


 qgsexpressionbuilderwidget.h   qgsexpressionbuilderwidget.h 
skipping to change at line 79 skipping to change at line 79
QgsExpressionItem( QString label, QgsExpressionItem( QString label,
QString expressionText, QString expressionText,
QgsExpressionItem::ItemType itemType = ExpressionNod e ) QgsExpressionItem::ItemType itemType = ExpressionNod e )
: QStandardItem( label ) : QStandardItem( label )
{ {
mExpressionText = expressionText; mExpressionText = expressionText;
mType = itemType; mType = itemType;
} }
QString getExpressionText() { return mExpressionText; } QString getExpressionText() { return mExpressionText; }
/** Get the help text that is associated with this expression item. /** Get the help text that is associated with this expression item.
* *
* @return The help text. * @return The help text.
*/ */
QString getHelpText() { return mHelpText; } QString getHelpText() { return mHelpText; }
/** Set the help text for the current item /** Set the help text for the current item
* *
* @note The help text can be set as a html string. * @note The help text can be set as a html string.
*/ */
void setHelpText( QString helpText ) { mHelpText = helpText; } void setHelpText( QString helpText ) { mHelpText = helpText; }
/** Get the type of expression item eg header, field, ExpressionNode. /** Get the type of expression item eg header, field, ExpressionNode.
* *
* @return The QgsExpressionItem::ItemType * @return The QgsExpressionItem::ItemType
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgsfeature.h   qgsfeature.h 
skipping to change at line 102 skipping to change at line 102
#define FID_TO_STRING(fid) QString::number( fid ) #define FID_TO_STRING(fid) QString::number( fid )
#define STRING_TO_FID(str) (str).toLong() #define STRING_TO_FID(str) (str).toLong()
#endif #endif
// key = field index, value = field value // key = field index, value = field value
typedef QMap<int, QVariant> QgsAttributeMap; typedef QMap<int, QVariant> QgsAttributeMap;
typedef QVector<QVariant> QgsAttributes; typedef QVector<QVariant> QgsAttributes;
class QgsField; class QgsField;
typedef QMap<int, QgsField> QgsFieldMap;
#include "qgsfield.h"
/** \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:
skipping to change at line 220 skipping to change at line 221
* *
* @param fields The attribute fields which this feature holds . When used from python, make sure * @param fields The attribute fields which this feature holds . When used from python, make sure
* a copy of the fields is held by python, as ow nership stays there. * a copy of the fields is held by python, as ow nership stays there.
* I.e. Do not call feature.setFields( myDataPro vider.fields() ) but instead call * I.e. Do not call feature.setFields( myDataPro vider.fields() ) but instead call
* myFields = myDataProvider.fields() * myFields = myDataProvider.fields()
* feature.setFields( myFields ) * feature.setFields( myFields )
* @param initAttributes If true, attributes are initialized. Clears a ny data previously assigned. * @param initAttributes If true, attributes are initialized. Clears a ny data previously assigned.
* C++: Defaults to false * C++: Defaults to false
* Python: Defaults to true * Python: Defaults to true
* @note added in 2.0 * @note added in 2.0
*
* TODO: QGIS3 - take reference, not pointer
*/ */
void setFields( const QgsFields* fields, bool initAttributes = false ); void setFields( const QgsFields* fields, bool initAttributes = false );
/** Get associated field map. may be NULL /** Get associated field map.
* @note added in 2.0 * @note added in 2.0
*
* TODO: QGIS 3 - return reference or value, not pointer
*/ */
const QgsFields* fields() const { return mFields; } const QgsFields* fields() const { return &mFields; }
/** Insert a value into attribute. Returns false if attribute name coul d not be converted to index. /** Insert a value into attribute. Returns false if attribute name coul d not be converted to index.
* Field map must be associated to make this work. * Field map must be associated to make this work.
* *
* @param name The name of the field to set * @param name The name of the field to set
* @param value The value to set * @param value The value to set
* *
* @return false if attribute name could not be converted to index (C+ + only) * @return false if attribute name could not be converted to index (C+ + only)
* *
* @note For Python: raises a KeyError exception instead of returning false * @note For Python: raises a KeyError exception instead of returning false
skipping to change at line 308 skipping to change at line 313
/** Indicator if the mGeometry is owned by this QgsFeature. /** Indicator if the mGeometry is owned by this QgsFeature.
If so, this QgsFeature takes responsibility for the mGeometry's des truction. If so, this QgsFeature takes responsibility for the mGeometry's des truction.
*/ */
bool mOwnsGeometry; bool mOwnsGeometry;
//! Flag to indicate if this feature is valid //! Flag to indicate if this feature is valid
bool mValid; bool mValid;
//! Optional field map for name-based attribute lookups //! Optional field map for name-based attribute lookups
const QgsFields* mFields; QgsFields mFields;
}; // class QgsFeature }; // class QgsFeature
// key = feature id, value = changed attributes // key = feature id, value = changed attributes
typedef QMap<QgsFeatureId, QgsAttributeMap> QgsChangedAttributesMap; typedef QMap<QgsFeatureId, QgsAttributeMap> QgsChangedAttributesMap;
// key = feature id, value = changed geometry // key = feature id, value = changed geometry
typedef QMap<QgsFeatureId, QgsGeometry> QgsGeometryMap; typedef QMap<QgsFeatureId, QgsGeometry> QgsGeometryMap;
typedef QSet<QgsFeatureId> QgsFeatureIds; typedef QSet<QgsFeatureId> QgsFeatureIds;
 End of changes. 6 change blocks. 
4 lines changed or deleted 9 lines changed or added


 qgsfeatureiterator.h   qgsfeatureiterator.h 
skipping to change at line 106 skipping to change at line 106
//! this iterator runs local simplification //! this iterator runs local simplification
bool mLocalSimplification; bool mLocalSimplification;
//! returns whether the iterator supports simplify geometries on provid er side //! returns whether the iterator supports simplify geometries on provid er side
virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodT ype ) const; virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodT ype ) const;
//! simplify the specified geometry if it was configured //! simplify the specified geometry if it was configured
virtual bool simplify( QgsFeature& feature ); virtual bool simplify( QgsFeature& feature );
}; };
/** helper template that cares of two things: 1. automatic deletion of sour
ce if owned by iterator, 2. notification of open/closed iterator */
template<typename T>
class QgsAbstractFeatureIteratorFromSource : public QgsAbstractFeatureItera
tor
{
public:
QgsAbstractFeatureIteratorFromSource( T* source, bool ownSource, const
QgsFeatureRequest& request )
: QgsAbstractFeatureIterator( request ), mSource( source ), mOwnSou
rce( ownSource )
{
mSource->iteratorOpened( this );
}
~QgsAbstractFeatureIteratorFromSource()
{
if ( mOwnSource )
delete mSource;
}
protected:
//! to be called by from subclass in close()
void iteratorClosed() { mSource->iteratorClosed( this ); }
T* mSource;
bool mOwnSource;
};
/** /**
* \ingroup core * \ingroup core
* Wrapper for iterator of features from vector data provider or vector lay er * Wrapper for iterator of features from vector data provider or vector lay er
*/ */
class CORE_EXPORT QgsFeatureIterator class CORE_EXPORT QgsFeatureIterator
{ {
public: public:
//! construct invalid iterator //! construct invalid iterator
QgsFeatureIterator(); QgsFeatureIterator();
//! construct a valid iterator //! construct a valid iterator
 End of changes. 1 change blocks. 
0 lines changed or deleted 29 lines changed or added


 qgsfeaturelistview.h   qgsfeaturelistview.h 
skipping to change at line 110 skipping to change at line 110
*/ */
QString parserErrorString(); QString parserErrorString();
/** /**
* Get the currentEditSelection * Get the currentEditSelection
* *
* @return A list of edited feature ids * @return A list of edited feature ids
*/ */
QgsFeatureIds currentEditSelection(); QgsFeatureIds currentEditSelection();
/**
* Sets if the currently shown form has received any edit events so far
.
*
* @param state The state
*/
void setCurrentFeatureEdited( bool state );
protected: protected:
virtual void mouseMoveEvent( QMouseEvent *event ); virtual void mouseMoveEvent( QMouseEvent *event );
virtual void mousePressEvent( QMouseEvent *event ); virtual void mousePressEvent( QMouseEvent *event );
virtual void mouseReleaseEvent( QMouseEvent *event ); virtual void mouseReleaseEvent( QMouseEvent *event );
virtual void keyPressEvent( QKeyEvent *event ); virtual void keyPressEvent( QKeyEvent *event );
signals: signals:
/** /**
* Is emitted, whenever the current edit selection has been changed. * Is emitted, whenever the current edit selection has been changed.
* *
* @param feat the feature, which will be edited. * @param feat the feature, which will be edited.
*/ */
void currentEditSelectionChanged( QgsFeature &feat ); void currentEditSelectionChanged( QgsFeature &feat );
/** /**
* Is emitted, whenever the display expression is successfully changed * Is emitted, whenever the display expression is successfully changed
* @param expression The expression that was applied * @param expression The expression that was applied
*/ */
void displayExpressionChanged( const QString expression ); void displayExpressionChanged( const QString expression );
void aboutToChangeEditSelection( bool& ok );
public slots: public slots:
/** /**
* Set the feature(s) to be edited * Set the feature(s) to be edited
* *
* @param fids A list of features to be edited * @param fids A list of features to be edited
*/ */
void setEditSelection( const QgsFeatureIds &fids ); void setEditSelection( const QgsFeatureIds &fids );
/** /**
* Set the feature(s) to be edited
*
* @param index The selection to set
* @param command selection update mode
*/
void setEditSelection( const QModelIndex& index, QItemSelectionModel::S
electionFlags command );
/**
* Select all currently visible features * Select all currently visible features
*/ */
virtual void selectAll(); virtual void selectAll();
void repaintRequested( QModelIndexList indexes ); void repaintRequested( QModelIndexList indexes );
void repaintRequested(); void repaintRequested();
private slots: private slots:
void editSelectionChanged( QItemSelection deselected, QItemSelection se lected ); void editSelectionChanged( QItemSelection deselected, QItemSelection se lected );
 End of changes. 3 change blocks. 
0 lines changed or deleted 19 lines changed or added


 qgsfeaturelistviewdelegate.h   qgsfeaturelistviewdelegate.h 
skipping to change at line 35 skipping to change at line 35
}; };
explicit QgsFeatureListViewDelegate( QgsFeatureListModel* listModel, QO bject *parent = 0 ); explicit QgsFeatureListViewDelegate( QgsFeatureListModel* listModel, QO bject *parent = 0 );
void setEditSelectionModel( QItemSelectionModel* editSelectionModel ); void setEditSelectionModel( QItemSelectionModel* editSelectionModel );
Element positionToElement( const QPoint& pos ); Element positionToElement( const QPoint& pos );
void setFeatureSelectionModel( QgsFeatureSelectionModel* featureSelecti onModel ); void setFeatureSelectionModel( QgsFeatureSelectionModel* featureSelecti onModel );
void setCurrentFeatureEdited( bool state );
signals: signals:
void editButtonClicked( QModelIndex& index ); void editButtonClicked( QModelIndex& index );
protected: protected:
virtual QSize sizeHint( const QStyleOptionViewItem& option, const QMode lIndex& index ) const; virtual QSize sizeHint( const QStyleOptionViewItem& option, const QMode lIndex& index ) const;
virtual void paint( QPainter* painter, const QStyleOptionViewItem& opti on, const QModelIndex& index ) const; virtual void paint( QPainter* painter, const QStyleOptionViewItem& opti on, const QModelIndex& index ) const;
private: private:
QgsFeatureSelectionModel* mFeatureSelectionModel; QgsFeatureSelectionModel* mFeatureSelectionModel;
QItemSelectionModel* mEditSelectionModel; QItemSelectionModel* mEditSelectionModel;
QgsFeatureListModel* mListModel; QgsFeatureListModel* mListModel;
//! Set to true if the current edit selection has been edited
bool mCurrentFeatureEdited;
}; };
#endif // QGSATTRIBUTELISTVIEWDELEGATE_H #endif // QGSATTRIBUTELISTVIEWDELEGATE_H
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added


 qgsfeaturerequest.h   qgsfeaturerequest.h 
skipping to change at line 160 skipping to change at line 160
QgsFeatureId mFilterFid; QgsFeatureId mFilterFid;
QgsFeatureIds mFilterFids; QgsFeatureIds mFilterFids;
QgsExpression* mFilterExpression; QgsExpression* mFilterExpression;
Flags mFlags; Flags mFlags;
QgsAttributeList mAttrs; QgsAttributeList mAttrs;
QgsSimplifyMethod mSimplifyMethod; QgsSimplifyMethod mSimplifyMethod;
}; };
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsFeatureRequest::Flags ) Q_DECLARE_OPERATORS_FOR_FLAGS( QgsFeatureRequest::Flags )
class QgsFeatureIterator;
class QgsAbstractFeatureIterator;
/** base class that can be used for any class that is capable of returning
features
* @note added in 2.4
*/
class CORE_EXPORT QgsAbstractFeatureSource
{
public:
virtual ~QgsAbstractFeatureSource();
virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& reques
t ) = 0;
protected:
void iteratorOpened( QgsAbstractFeatureIterator* it );
void iteratorClosed( QgsAbstractFeatureIterator* it );
QSet< QgsAbstractFeatureIterator* > mActiveIterators;
template<typename> friend class QgsAbstractFeatureIteratorFromSource;
};
#endif // QGSFEATUREREQUEST_H #endif // QGSFEATUREREQUEST_H
 End of changes. 1 change blocks. 
0 lines changed or deleted 24 lines changed or added


 qgsfeatureselectiondlg.h   qgsfeatureselectiondlg.h 
skipping to change at line 23 skipping to change at line 23
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSFEATURESELECTIONDLG_H #ifndef QGSFEATURESELECTIONDLG_H
#define QGSFEATURESELECTIONDLG_H #define QGSFEATURESELECTIONDLG_H
class QgsGenericFeatureSelectionManager; class QgsGenericFeatureSelectionManager;
#include "ui_qgsfeatureselectiondlg.h" #include "ui_qgsfeatureselectiondlg.h"
class QgsFeatureSelectionDlg : public QDialog, private Ui::QgsFeatureSelect ionDlg class GUI_EXPORT QgsFeatureSelectionDlg : public QDialog, private Ui::QgsFe atureSelectionDlg
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit QgsFeatureSelectionDlg( QgsVectorLayer* vl, QWidget *parent = 0 ); explicit QgsFeatureSelectionDlg( QgsVectorLayer* vl, QWidget *parent = 0 );
const QgsFeatureIds& selectedFeatures(); const QgsFeatureIds& selectedFeatures();
private: private:
QgsGenericFeatureSelectionManager* mFeatureSelection; QgsGenericFeatureSelectionManager* mFeatureSelection;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsfield.h   qgsfield.h 
skipping to change at line 23 skipping to change at line 23
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSFIELD_H #ifndef QGSFIELD_H
#define QGSFIELD_H #define QGSFIELD_H
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
#include <QVector> #include <QVector>
typedef QList<int> QgsAttributeList;
/** \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
* length, and if applicable, precision. * length, and if applicable, precision.
*/ */
class CORE_EXPORT QgsField class CORE_EXPORT QgsField
{ {
public: public:
/** Constructor. Constructs a new QgsField object. /** Constructor. Constructs a new QgsField object.
skipping to change at line 147 skipping to change at line 149
int mLength; int mLength;
//! Precision //! Precision
int mPrecision; int mPrecision;
//! Comment //! Comment
QString mComment; QString mComment;
}; // class QgsField }; // class QgsField
// key = field index, value=field data
typedef QMap<int, QgsField> QgsFieldMap;
/** /**
\ingroup core \ingroup core
Container of fields for a vector layer. Container of fields for a vector layer.
In addition to storing a list of QgsField instances, it also: In addition to storing a list of QgsField instances, it also:
- allows quick lookups of field names to index in the list - allows quick lookups of field names to index in the list
- keeps track of where the field definition comes from (vector data provid er, joined layer or newly added from an editing operation) - keeps track of where the field definition comes from (vector data provid er, joined layer or newly added from an editing operation)
*/ */
class CORE_EXPORT QgsFields class CORE_EXPORT QgsFields
{ {
skipping to change at line 219 skipping to change at line 218
const QgsField& field( const QString& name ) const { return mFields[ in dexFromName( name )].field; } const QgsField& field( const QString& name ) const { return mFields[ in dexFromName( name )].field; }
//! Get field's origin (value from an enumeration) //! Get field's origin (value from an enumeration)
FieldOrigin fieldOrigin( int fieldIdx ) const { return mFields[fieldIdx ].origin; } FieldOrigin fieldOrigin( int fieldIdx ) const { return mFields[fieldIdx ].origin; }
//! Get field's origin index (its meaning is specific to each type of o rigin) //! Get field's origin index (its meaning is specific to each type of o rigin)
int fieldOriginIndex( int fieldIdx ) const { return mFields[fieldIdx].o riginIndex; } int fieldOriginIndex( int fieldIdx ) const { return mFields[fieldIdx].o riginIndex; }
//! Look up field's index from name. Returns -1 on error //! Look up field's index from name. Returns -1 on error
int indexFromName( const QString& name ) const { return mNameToIndex.va lue( name, -1 ); } int indexFromName( const QString& name ) const { return mNameToIndex.va lue( name, -1 ); }
//! Look up field's index from name - case insensitive
//! TODO: sort out case sensitive (indexFromName()) vs insensitive (fie
ldNameIndex()) calls
//! @note added in 2.4
int fieldNameIndex( const QString& fieldName ) const;
//! Utility function to get list of attribute indexes
//! @note added in 2.4
QgsAttributeList allAttributesList() const;
//! Utility function to return a list of QgsField instances //! Utility function to return a list of QgsField instances
QList<QgsField> toList() const; QList<QgsField> toList() const;
protected: protected:
//! internal storage of the container //! internal storage of the container
QVector<Field> mFields; QVector<Field> mFields;
//! map for quick resolution of name to index //! map for quick resolution of name to index
QHash<QString, int> mNameToIndex; QHash<QString, int> mNameToIndex;
}; };
 End of changes. 3 change blocks. 
3 lines changed or deleted 12 lines changed or added


 qgsfieldvalidator.h   qgsfieldvalidator.h 
skipping to change at line 33 skipping to change at line 33
#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
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsFieldValidator( QObject *parent, const QgsField &field, QString date Format ); QgsFieldValidator( QObject *parent, const QgsField &field, QString date Format = "yyyy-MM-dd" );
~QgsFieldValidator(); ~QgsFieldValidator();
virtual State validate( QString &, int & ) const; virtual State validate( QString &, int & ) const;
virtual void fixup( QString & ) const; virtual void fixup( QString & ) const;
QString dateFormat() const { return mDateFormat; } QString dateFormat() const { return mDateFormat; }
private: private:
// Disables copy constructing // Disables copy constructing
Q_DISABLE_COPY( QgsFieldValidator ) Q_DISABLE_COPY( QgsFieldValidator )
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsfillsymbollayerv2.h   qgsfillsymbollayerv2.h 
/************************************************************************** * /************************************************************************** *
qgsfillsymbollayerv2.h qgsfillsymbollayerv2.h
--------------------- ---------------------
begin : November 2009 begin : November 2009
copyright : (C) 2009 by Martin Dobias copyright : (C) 2009 by Martin Dobias
email : wonder dot sk at gmail dot com email : wonder dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
#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
#define DEFAULT_SIMPLEFILL_BORDERWIDTH DEFAULT_LINE_WIDTH #define DEFAULT_SIMPLEFILL_BORDERWIDTH DEFAULT_LINE_WIDTH
#define DEFAULT_SIMPLEFILL_JOINSTYLE Qt::BevelJoin
#define INF 1E20
#include <QPen> #include <QPen>
#include <QBrush> #include <QBrush>
class CORE_EXPORT QgsSimpleFillSymbolLayerV2 : public QgsFillSymbolLayerV2 class CORE_EXPORT QgsSimpleFillSymbolLayerV2 : public QgsFillSymbolLayerV2
{ {
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 double borderWidth = DEFAULT_SIMPLEFILL_BOR
DERWIDTH ); DERWIDTH,
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIM
PLEFILL_JOINSTYLE
);
// 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 ); static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
skipping to change at line 88 skipping to change at line 93
/** Set fill color. /** Set fill color.
* @note added in 2.1 */ * @note added in 2.1 */
void setFillColor( const QColor& color ) { setColor( color ); } void setFillColor( const QColor& color ) { setColor( color ); }
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; }
void setBorderWidth( double borderWidth ) { mBorderWidth = borderWidth; } void setBorderWidth( double borderWidth ) { mBorderWidth = borderWidth; }
Qt::PenJoinStyle penJoinStyle() const { return mPenJoinStyle; }
void setPenJoinStyle( Qt::PenJoinStyle style ) { mPenJoinStyle = style;
}
void setOffset( QPointF offset ) { mOffset = offset; } void setOffset( QPointF offset ) { mOffset = offset; }
QPointF offset() { return mOffset; } QPointF offset() { return mOffset; }
void setBorderWidthUnit( QgsSymbolV2::OutputUnit unit ) { mBorderWidthU nit = unit; } void setBorderWidthUnit( QgsSymbolV2::OutputUnit unit ) { mBorderWidthU nit = unit; }
QgsSymbolV2::OutputUnit borderWidthUnit() const { return mBorderWidthUn it; } QgsSymbolV2::OutputUnit borderWidthUnit() const { return mBorderWidthUn it; }
void setBorderWidthMapUnitScale( const QgsMapUnitScale& scale ) { mBord
erWidthMapUnitScale = scale; }
const QgsMapUnitScale& borderWidthMapUnitScale() const { return mBorder
WidthMapUnitScale; }
void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; } void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; }
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; } QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMap
UnitScale = scale; }
const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUn
itScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;
double estimateMaxBleed() const; double estimateMaxBleed() const;
double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2RenderContext& context ) const; double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2RenderContext& context ) const;
QColor dxfColor( const QgsSymbolV2RenderContext& context ) const; QColor dxfColor( const QgsSymbolV2RenderContext& context ) const;
Qt::PenStyle dxfPenStyle() const; Qt::PenStyle dxfPenStyle() const;
protected: protected:
QBrush mBrush; QBrush mBrush;
QBrush mSelBrush; QBrush mSelBrush;
Qt::BrushStyle mBrushStyle; Qt::BrushStyle mBrushStyle;
QColor mBorderColor; QColor mBorderColor;
Qt::PenStyle mBorderStyle; Qt::PenStyle mBorderStyle;
double mBorderWidth; double mBorderWidth;
QgsSymbolV2::OutputUnit mBorderWidthUnit; QgsSymbolV2::OutputUnit mBorderWidthUnit;
QgsMapUnitScale mBorderWidthMapUnitScale;
Qt::PenJoinStyle mPenJoinStyle;
QPen mPen; QPen mPen;
QPen mSelPen; QPen mSelPen;
QPointF mOffset; QPointF mOffset;
QgsSymbolV2::OutputUnit mOffsetUnit; QgsSymbolV2::OutputUnit mOffsetUnit;
QgsMapUnitScale mOffsetMapUnitScale;
private: private:
//helper functions for data defined symbology //helper functions for data defined symbology
void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QBru sh& brush, QPen& pen, QPen& selPen ); void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QBru sh& brush, QPen& pen, QPen& selPen );
}; };
class QgsVectorColorRampV2; class QgsVectorColorRampV2;
class CORE_EXPORT QgsGradientFillSymbolLayerV2 : public QgsFillSymbolLayerV 2 class CORE_EXPORT QgsGradientFillSymbolLayerV2 : public QgsFillSymbolLayerV 2
{ {
skipping to change at line 188 skipping to change at line 208
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;
double estimateMaxBleed() const; double estimateMaxBleed() const;
/**Type of gradient, eg linear or radial*/ /**Type of gradient, eg linear or radial*/
GradientType gradientType() const { return mGradientType; }; GradientType gradientType() const { return mGradientType; }
void setGradientType( GradientType gradientType ) { mGradientType = gra void setGradientType( GradientType gradientType ) { mGradientType = gra
dientType; }; dientType; }
/**Gradient color mode, controls how gradient color stops are created*/ /**Gradient color mode, controls how gradient color stops are created*/
GradientColorType gradientColorType() const { return mGradientColorType GradientColorType gradientColorType() const { return mGradientColorType
; }; ; }
void setGradientColorType( GradientColorType gradientColorType ) { mGra void setGradientColorType( GradientColorType gradientColorType ) { mGra
dientColorType = gradientColorType; }; dientColorType = gradientColorType; }
/**Color ramp used for the gradient fill, only used if the gradient col or type is set to ColorRamp*/ /**Color ramp used for the gradient fill, only used if the gradient col or type is set to ColorRamp*/
QgsVectorColorRampV2* colorRamp() { return mGradientRamp; }; QgsVectorColorRampV2* colorRamp() { return mGradientRamp; }
void setColorRamp( QgsVectorColorRampV2* ramp ); void setColorRamp( QgsVectorColorRampV2* ramp );
/**Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor*/ /**Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor*/
QColor color2() const { return mColor2; }; QColor color2() const { return mColor2; }
void setColor2( QColor color2 ) { mColor2 = color2; }; void setColor2( QColor color2 ) { mColor2 = color2; }
/**Coordinate mode for gradient. Controls how the gradient stops are po sitioned.*/ /**Coordinate mode for gradient. Controls how the gradient stops are po sitioned.*/
GradientCoordinateMode coordinateMode() const { return mCoordinateMode; GradientCoordinateMode coordinateMode() const { return mCoordinateMode;
}; }
void setCoordinateMode( GradientCoordinateMode coordinateMode ) { mCoor void setCoordinateMode( GradientCoordinateMode coordinateMode ) { mCoor
dinateMode = coordinateMode; }; dinateMode = coordinateMode; }
/**Gradient spread mode. Controls how the gradient behaves outside of t he predefined stops*/ /**Gradient spread mode. Controls how the gradient behaves outside of t he predefined stops*/
GradientSpread gradientSpread() const { return mGradientSpread; }; GradientSpread gradientSpread() const { return mGradientSpread; }
void setGradientSpread( GradientSpread gradientSpread ) { mGradientSpre void setGradientSpread( GradientSpread gradientSpread ) { mGradientSpre
ad = gradientSpread; }; ad = gradientSpread; }
/**Starting point of gradient fill, in the range [0,0] - [1,1]*/ /**Starting point of gradient fill, in the range [0,0] - [1,1]*/
void setReferencePoint1( QPointF referencePoint ) { mReferencePoint1 = void setReferencePoint1( QPointF referencePoint ) { mReferencePoint1 =
referencePoint; }; referencePoint; }
QPointF referencePoint1() const { return mReferencePoint1; }; QPointF referencePoint1() const { return mReferencePoint1; }
/**Sets the starting point of the gradient to be the feature centroid*/ /**Sets the starting point of the gradient to be the feature centroid*/
void setReferencePoint1IsCentroid( bool isCentroid ) { mReferencePoint1 void setReferencePoint1IsCentroid( bool isCentroid ) { mReferencePoint1
IsCentroid = isCentroid; }; IsCentroid = isCentroid; }
bool referencePoint1IsCentroid() const { return mReferencePoint1IsCentr bool referencePoint1IsCentroid() const { return mReferencePoint1IsCentr
oid; }; oid; }
/**End point of gradient fill, in the range [0,0] - [1,1]*/ /**End point of gradient fill, in the range [0,0] - [1,1]*/
void setReferencePoint2( QPointF referencePoint ) { mReferencePoint2 = void setReferencePoint2( QPointF referencePoint ) { mReferencePoint2 =
referencePoint; }; referencePoint; }
QPointF referencePoint2() const { return mReferencePoint2; }; QPointF referencePoint2() const { return mReferencePoint2; }
/**Sets the end point of the gradient to be the feature centroid*/ /**Sets the end point of the gradient to be the feature centroid*/
void setReferencePoint2IsCentroid( bool isCentroid ) { mReferencePoint2 void setReferencePoint2IsCentroid( bool isCentroid ) { mReferencePoint2
IsCentroid = isCentroid; }; IsCentroid = isCentroid; }
bool referencePoint2IsCentroid() const { return mReferencePoint2IsCentr bool referencePoint2IsCentroid() const { return mReferencePoint2IsCentr
oid; }; oid; }
/**Rotation angle for gradient fill. Can be used to rotate a gradient a round its centre point*/ /**Rotation angle for gradient fill. Can be used to rotate a gradient a round its centre point*/
void setAngle( double angle ) { mAngle = angle; }; void setAngle( double angle ) { mAngle = angle; }
double angle() const { return mAngle; }; double angle() const { return mAngle; }
/**Offset for gradient fill*/ /**Offset for gradient fill*/
void setOffset( QPointF offset ) { mOffset = offset; }; void setOffset( QPointF offset ) { mOffset = offset; }
QPointF offset() const { return mOffset; }; QPointF offset() const { return mOffset; }
/**Units for gradient fill offset*/ /**Units for gradient fill offset*/
void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit
; }; ; }
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }; QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMap
UnitScale = scale; }
const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUn
itScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;
protected: protected:
QBrush mBrush; QBrush mBrush;
QBrush mSelBrush; QBrush mSelBrush;
GradientColorType mGradientColorType; GradientColorType mGradientColorType;
QColor mColor2; QColor mColor2;
QgsVectorColorRampV2* mGradientRamp; QgsVectorColorRampV2* mGradientRamp;
GradientType mGradientType; GradientType mGradientType;
GradientCoordinateMode mCoordinateMode; GradientCoordinateMode mCoordinateMode;
GradientSpread mGradientSpread; GradientSpread mGradientSpread;
QPointF mReferencePoint1; QPointF mReferencePoint1;
bool mReferencePoint1IsCentroid; bool mReferencePoint1IsCentroid;
QPointF mReferencePoint2; QPointF mReferencePoint2;
bool mReferencePoint2IsCentroid; bool mReferencePoint2IsCentroid;
double mAngle; double mAngle;
QPointF mOffset; QPointF mOffset;
QgsSymbolV2::OutputUnit mOffsetUnit; QgsSymbolV2::OutputUnit mOffsetUnit;
QgsMapUnitScale mOffsetMapUnitScale;
private: private:
//helper functions for data defined symbology //helper functions for data defined symbology
void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, cons t QPolygonF& points ); void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, cons t QPolygonF& points );
/**Applies the gradient to a brush*/ /**Applies the gradient to a brush*/
void applyGradient( const QgsSymbolV2RenderContext& context, QBrush& br ush, const QColor& color, const QColor& color2, void applyGradient( const QgsSymbolV2RenderContext& context, QBrush& br ush, const QColor& color, const QColor& color2,
const GradientColorType &gradientColorType, QgsVect orColorRampV2 *gradientRamp, const GradientType &gradientType, const GradientColorType &gradientColorType, QgsVect orColorRampV2 *gradientRamp, const GradientType &gradientType,
const GradientCoordinateMode &coordinateMode, const GradientSpread &gradientSpread, const GradientCoordinateMode &coordinateMode, const GradientSpread &gradientSpread,
const QPointF &referencePoint1, const QPointF &refe rencePoint2, const double angle ); const QPointF &referencePoint1, const QPointF &refe rencePoint2, const double angle );
/**rotates a reference point by a specified angle around the point (0.5 , 0.5)*/ /**rotates a reference point by a specified angle around the point (0.5 , 0.5)*/
QPointF rotateReferencePoint( const QPointF & refPoint, double angle ); QPointF rotateReferencePoint( const QPointF & refPoint, double angle );
}; };
class CORE_EXPORT QgsShapeburstFillSymbolLayerV2 : public QgsFillSymbolLaye
rV2
{
public:
enum ShapeburstColorType
{
SimpleTwoColor,
ColorRamp
};
QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR
, QColor color2 = Qt::white,
ShapeburstColorType colorType = SimpleT
woColor,
int blurRadius = 0, bool useWholeShape
= true, double maxDistance = 5 );
virtual ~QgsShapeburstFillSymbolLayerV2();
// static stuff
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt
ringMap() );
// implemented from base classes
QString layerType() const;
void startRender( QgsSymbolV2RenderContext& context );
void stopRender( QgsSymbolV2RenderContext& context );
void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q
gsSymbolV2RenderContext& context );
QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const;
double estimateMaxBleed() const;
/**Sets the blur radius, which controls the amount of blurring applied
to the fill.
* @param blurRadius Radius for fill blur. Values between 0 - 17 are va
lid, where higher values results in a stronger blur. Set to 0 to disable bl
ur.
* @note added in 2.3
* @see blurRadius
*/
void setBlurRadius( int blurRadius ) { mBlurRadius = blurRadius; }
/**Returns the blur radius, which controls the amount of blurring appli
ed to the fill.
* @returns Integer representing the radius for fill blur. Higher value
s indicate a stronger blur. A 0 value indicates that blurring is disabled.
* @note added in 2.3
* @see setBlurRadius
*/
int blurRadius() const { return mBlurRadius; }
/**Sets whether the shapeburst fill should be drawn using the entire sh
ape.
* @param useWholeShape Set to true if shapeburst should cover entire s
hape. If false, setMaxDistance is used to calculate how far from the bounda
ry of the shape should
* be shaded
* @note added in 2.3
* @see useWholeShape
* @see setMaxDistance
*/
void setUseWholeShape( double useWholeShape ) { mUseWholeShape = useWho
leShape; }
/**Returns whether the shapeburst fill is set to cover the entire shape
.
* @returns True if shapeburst fill will cover the entire shape. If fal
se, shapeburst is drawn to a distance of maxDistance from the polygon's bou
ndary.
* @note added in 2.3
* @see setUseWholeShape
* @see maxDistance
*/
double useWholeShape() const { return mUseWholeShape; }
/**Sets the maximum distance to shape inside of the shape from the poly
gon's boundary.
* @param maxDistance distance from boundary to shade. setUseWholeShape
must be set to false for this parameter to take effect. Distance unit is c
ontrolled by setDistanceUnit.
* @note added in 2.3
* @see maxDistance
* @see setUseWholeShape
* @see setDistanceUnit
*/
void setMaxDistance( double maxDistance ) { mMaxDistance = maxDistance;
}
/**Returns the maximum distance from the shape's boundary which is shad
ed. This parameter is only effective if useWholeShape is false.
* @returns the maximum distance from the polygon's boundary which is s
haded. Distance units are indicated by distanceUnit.
* @note added in 2.3
* @see useWholeShape
* @see setMaxDistance
* @see distanceUnit
*/
double maxDistance() const { return mMaxDistance; }
/**Sets the unit for the maximum distance to shade inside of the shape
from the polygon's boundary.
* @param unit distance unit for the maximum distance
* @note added in 2.3
* @see setMaxDistance
* @see distanceUnit
*/
void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit =
unit; }
/**Returns the unit for the maximum distance to shade inside of the sha
pe from the polygon's boundary.
* @returns distance unit for the maximum distance
* @note added in 2.3
* @see maxDistance
* @see setDistanceUnit
*/
QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; }
void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanc
eMapUnitScale = scale; }
const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceM
apUnitScale; }
/**Sets the color mode to use for the shapeburst fill. Shapeburst can e
ither be drawn using a QgsVectorColorRampV2 color ramp
* or by simply specificing a start and end color. setColorType is used
to specify which mode to use for the fill.
* @param colorType color type to use for shapeburst fill
* @note added in 2.3
* @see colorType
* @see setColor
* @see setColor2
* @see setColorRamp
*/
void setColorType( ShapeburstColorType colorType ) { mColorType = color
Type; }
/**Returns the color mode used for the shapeburst fill. Shapeburst can
either be drawn using a QgsVectorColorRampV2 color ramp
* or by simply specificing a start and end color.
* @returns current color mode used for the shapeburst fill
* @note added in 2.3
* @see setColorType
* @see color
* @see color2
* @see colorRamp
*/
ShapeburstColorType colorType() const { return mColorType; }
/**Sets the color ramp used to draw the shapeburst fill. Color ramps ar
e only used if setColorType is set ShapeburstColorType::ColorRamp.
* @param ramp color ramp to use for shapeburst fill
* @note added in 2.3
* @see setColorType
* @see colorRamp
*/
void setColorRamp( QgsVectorColorRampV2* ramp );
/**Returns the color ramp used for the shapeburst fill. The color ramp
is only used if the colorType is set to ShapeburstColorType::ColorRamp
* @returns a QgsVectorColorRampV2 color ramp
* @note added in 2.3
* @see setColorRamp
* @see colorType
*/
QgsVectorColorRampV2* colorRamp() { return mGradientRamp; }
/**Sets the color for the endpoint of the shapeburst fill. This color i
s only used if setColorType is set ShapeburstColorType::SimpleTwoColor.
* @param color2 QColor to use for endpoint of gradient
* @note added in 2.3
* @see setColorType
* @see color2
*/
void setColor2( QColor color2 ) { mColor2 = color2; }
/**Returns the color used for the endpoint of the shapeburst fill. This
color is only used if the colorType is set to ShapeburstColorType::SimpleT
woColor
* @returns a QColor indicating the color of the endpoint of the gradie
nt
* @note added in 2.3
* @see setColor2
* @see colorType
*/
QColor color2() const { return mColor2; }
/**Sets whether the shapeburst fill should ignore polygon rings when ca
lculating
* the buffered shading.
* @param ignoreRings Set to true if buffers should ignore interior rin
gs for polygons.
* @note added in 2.3
* @see ignoreRings
*/
void setIgnoreRings( double ignoreRings ) { mIgnoreRings = ignoreRings;
}
/**Returns whether the shapeburst fill is set to ignore polygon interio
r rings.
* @returns True if the shapeburst fill will ignore interior rings when
calculating buffered shading.
* @note added in 2.3
* @see setIgnoreRings
*/
double ignoreRings() const { return mIgnoreRings; }
/**Sets the offset for the shapeburst fill.
* @param offset QPointF indicating the horizontal/vertical offset amou
nt
* @note added in 2.3
* @see offset
* @see setOffsetUnit
*/
void setOffset( QPointF offset ) { mOffset = offset; }
/**Returns the offset for the shapeburst fill.
* @returns a QPointF indicating the horizontal/vertical offset amount
* @note added in 2.3
* @see setOffset
* @see offsetUnit
*/
QPointF offset() const { return mOffset; }
/**Sets the units used for the offset for the shapeburst fill.
* @param unit units for fill offset
* @note added in 2.3
* @see setOffset
* @see offsetUnit
*/
void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit
; }
/**Returns the units used for the offset of the shapeburst fill.
* @returns units used for the fill offset
* @note added in 2.3
* @see offset
* @see setOffsetUnit
*/
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMap
UnitScale = scale; }
const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUn
itScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;
protected:
QBrush mBrush;
QBrush mSelBrush;
int mBlurRadius;
bool mUseWholeShape;
double mMaxDistance;
QgsSymbolV2::OutputUnit mDistanceUnit;
QgsMapUnitScale mDistanceMapUnitScale;
ShapeburstColorType mColorType;
QColor mColor2;
QgsVectorColorRampV2* mGradientRamp;
QgsVectorColorRampV2* mTwoColorGradientRamp;
bool mIgnoreRings;
QPointF mOffset;
QgsSymbolV2::OutputUnit mOffsetUnit;
QgsMapUnitScale mOffsetMapUnitScale;
private:
//helper functions for data defined symbology
void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QCol
or& color, QColor& color2, int& blurRadius, bool& useWholeShape,
double& maxDistance , bool &ignoreRings
);
/* distance transform of a 1d function using squared distance */
void distanceTransform1d( double *f, int n, int *v, double *z, double *
d );
/* distance transform of 2d function using squared distance */
void distanceTransform2d( double * im, int width, int height );
/* distance transform of a binary QImage */
double * distanceTransform( QImage * im );
/* fills a QImage with values from an array of doubles containing squar
ed distance transform values */
void dtArrayToQImage( double * array, QImage *im, QgsVectorColorRampV2*
ramp, double layerAlpha = 1, bool useWholeShape = true, int maxPixelDistan
ce = 0 );
};
/**Base class for polygon renderers generating texture images*/ /**Base class for polygon renderers generating texture images*/
class CORE_EXPORT QgsImageFillSymbolLayer: public QgsFillSymbolLayerV2 class CORE_EXPORT QgsImageFillSymbolLayer: public QgsFillSymbolLayerV2
{ {
public: public:
QgsImageFillSymbolLayer(); QgsImageFillSymbolLayer();
virtual ~QgsImageFillSymbolLayer(); virtual ~QgsImageFillSymbolLayer();
void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q gsSymbolV2RenderContext& context ); void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, Q gsSymbolV2RenderContext& context );
virtual QgsSymbolV2* subSymbol() { return mOutline; } virtual QgsSymbolV2* subSymbol() { return mOutline; }
virtual bool setSubSymbol( QgsSymbolV2* symbol ); virtual bool setSubSymbol( QgsSymbolV2* symbol );
void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mOutlineWidt hUnit = unit; } void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mOutlineWidt hUnit = unit; }
QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidth Unit; } QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidth Unit; }
void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mOut
lineWidthMapUnitScale = scale; }
const QgsMapUnitScale& outlineWidthMapUnitScale() const { return mOutli
neWidthMapUnitScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
virtual double estimateMaxBleed() const; virtual double estimateMaxBleed() const;
virtual double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2Render Context& context ) const; virtual double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2Render Context& context ) const;
virtual QColor dxfColor( const QgsSymbolV2RenderContext& context ) cons t; virtual QColor dxfColor( const QgsSymbolV2RenderContext& context ) cons t;
virtual Qt::PenStyle dxfPenStyle() const; virtual Qt::PenStyle dxfPenStyle() const;
protected: protected:
QBrush mBrush; QBrush mBrush;
double mNextAngle; // mAngle / data defined angle double mNextAngle; // mAngle / data defined angle
/**Outline width*/ /**Outline width*/
double mOutlineWidth; double mOutlineWidth;
QgsSymbolV2::OutputUnit mOutlineWidthUnit; QgsSymbolV2::OutputUnit mOutlineWidthUnit;
QgsMapUnitScale mOutlineWidthMapUnitScale;
/**Custom outline*/ /**Custom outline*/
QgsLineSymbolV2* mOutline; QgsLineSymbolV2* mOutline;
virtual void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context ) { Q_UNUSED( context ); } virtual void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context ) { Q_UNUSED( context ); }
}; };
/**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 QgsImageFillSymbolLayer class CORE_EXPORT QgsSVGFillSymbolLayer: public QgsImageFillSymbolLayer
skipping to change at line 349 skipping to change at line 632
void setSvgFillColor( const QColor& c ) { mSvgFillColor = c; } void setSvgFillColor( const QColor& c ) { mSvgFillColor = c; }
QColor svgFillColor() const { return mSvgFillColor; } QColor svgFillColor() const { return mSvgFillColor; }
void setSvgOutlineColor( const QColor& c ) { mSvgOutlineColor = c; } void setSvgOutlineColor( const QColor& c ) { mSvgOutlineColor = c; }
QColor svgOutlineColor() const { return mSvgOutlineColor; } QColor svgOutlineColor() const { return mSvgOutlineColor; }
void setSvgOutlineWidth( double w ) { mSvgOutlineWidth = w; } void setSvgOutlineWidth( double w ) { mSvgOutlineWidth = w; }
double svgOutlineWidth() const { return mSvgOutlineWidth; } double svgOutlineWidth() const { return mSvgOutlineWidth; }
void setPatternWidthUnit( QgsSymbolV2::OutputUnit unit ) { mPatternWidt hUnit = unit; } void setPatternWidthUnit( QgsSymbolV2::OutputUnit unit ) { mPatternWidt hUnit = unit; }
QgsSymbolV2::OutputUnit patternWidthUnit() const { return mPatternWidth Unit; } QgsSymbolV2::OutputUnit patternWidthUnit() const { return mPatternWidth Unit; }
void setPatternWidthMapUnitScale( const QgsMapUnitScale& scale ) { mPat
ternWidthMapUnitScale = scale; }
const QgsMapUnitScale& patternWidthMapUnitScale() const { return mPatte
rnWidthMapUnitScale; }
void setSvgOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mSvgOutli neWidthUnit = unit; } void setSvgOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mSvgOutli neWidthUnit = unit; }
QgsSymbolV2::OutputUnit svgOutlineWidthUnit() const { return mSvgOutlin eWidthUnit; } QgsSymbolV2::OutputUnit svgOutlineWidthUnit() const { return mSvgOutlin eWidthUnit; }
void setSvgOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { m
SvgOutlineWidthMapUnitScale = scale; }
const QgsMapUnitScale& svgOutlineWidthMapUnitScale() const { return mSv
gOutlineWidthMapUnitScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;
protected: protected:
/**Width of the pattern (in output units)*/ /**Width of the pattern (in output units)*/
double mPatternWidth; double mPatternWidth;
QgsSymbolV2::OutputUnit mPatternWidthUnit; QgsSymbolV2::OutputUnit mPatternWidthUnit;
QgsMapUnitScale mPatternWidthMapUnitScale;
/**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;
/** SVG pattern image /** SVG pattern image
* @note added in 1.9 */ * @note added in 1.9 */
QImage* mSvgPattern; QImage* mSvgPattern;
//param(fill), param(outline), param(outline-width) are going //param(fill), param(outline), param(outline-width) are going
//to be replaced in memory //to be replaced in memory
QColor mSvgFillColor; QColor mSvgFillColor;
QColor mSvgOutlineColor; QColor mSvgOutlineColor;
double mSvgOutlineWidth; double mSvgOutlineWidth;
QgsSymbolV2::OutputUnit mSvgOutlineWidthUnit; QgsSymbolV2::OutputUnit mSvgOutlineWidthUnit;
QgsMapUnitScale mSvgOutlineWidthMapUnitScale;
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context ); void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
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 void setDefaultSvgParams(); //fills mSvgFillColor, mSvgOutlineColor, mS vgOutlineWidth with default values for mSvgFilePath
/**Applies the svg pattern to the brush*/ /**Applies the svg pattern to the brush*/
void applyPattern( QBrush& brush, const QString& svgFilePath, double pa tternWidth, QgsSymbolV2::OutputUnit patternWidthUnit, const QColor& svgFill Color, const QColor& svgOutlineColor, void applyPattern( QBrush& brush, const QString& svgFilePath, double pa tternWidth, QgsSymbolV2::OutputUnit patternWidthUnit, const QColor& svgFill Color, const QColor& svgOutlineColor,
double svgOutlineWidth, QgsSymbolV2::OutputUnit svgO utlineWidthUnit, const QgsSymbolV2RenderContext& context ); double svgOutlineWidth, QgsSymbolV2::OutputUnit svgO utlineWidthUnit, const QgsSymbolV2RenderContext& context, const QgsMapUnitS cale& patternWidthMapUnitScale , const QgsMapUnitScale &svgOutlineWidthMapU nitScale );
}; };
class CORE_EXPORT QgsLinePatternFillSymbolLayer: public QgsImageFillSymbolL ayer class CORE_EXPORT QgsLinePatternFillSymbolLayer: public QgsImageFillSymbolL ayer
{ {
public: public:
QgsLinePatternFillSymbolLayer(); QgsLinePatternFillSymbolLayer();
~QgsLinePatternFillSymbolLayer(); ~QgsLinePatternFillSymbolLayer();
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() ); static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsSt ringMap() );
static QgsSymbolLayerV2* createFromSld( QDomElement &element ); static QgsSymbolLayerV2* createFromSld( QDomElement &element );
skipping to change at line 429 skipping to change at line 723
void setLineWidth( double w ); void setLineWidth( double w );
double lineWidth() const { return mLineWidth; } double lineWidth() const { return mLineWidth; }
void setColor( const QColor& c ); void setColor( const QColor& c );
QColor color() const { return mColor; } QColor color() const { return mColor; }
void setOffset( double offset ) { mOffset = offset; } void setOffset( double offset ) { mOffset = offset; }
double offset() const { return mOffset; } double offset() const { return mOffset; }
void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; } void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; }
QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; } QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; }
void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanc
eMapUnitScale = scale; }
const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceM
apUnitScale; }
void setLineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mLineWidthUnit = unit; } void setLineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mLineWidthUnit = unit; }
QgsSymbolV2::OutputUnit lineWidthUnit() const { return mLineWidthUnit; } QgsSymbolV2::OutputUnit lineWidthUnit() const { return mLineWidthUnit; }
void setLineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mLineWi
dthMapUnitScale = scale; }
const QgsMapUnitScale& lineWidthMapUnitScale() const { return mLineWidt
hMapUnitScale; }
void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; } void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; }
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; } QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMap
UnitScale = scale; }
const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUn
itScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
bool setSubSymbol( QgsSymbolV2* symbol ); bool setSubSymbol( QgsSymbolV2* symbol );
QgsSymbolV2* subSymbol(); QgsSymbolV2* subSymbol();
protected: protected:
/**Distance (in mm or map units) between lines*/ /**Distance (in mm or map units) between lines*/
double mDistance; double mDistance;
QgsSymbolV2::OutputUnit mDistanceUnit; QgsSymbolV2::OutputUnit mDistanceUnit;
QgsMapUnitScale mDistanceMapUnitScale;
/**Line width (in mm or map units)*/ /**Line width (in mm or map units)*/
double mLineWidth; double mLineWidth;
QgsSymbolV2::OutputUnit mLineWidthUnit; QgsSymbolV2::OutputUnit mLineWidthUnit;
QgsMapUnitScale mLineWidthMapUnitScale;
QColor mColor; QColor mColor;
/**Vector line angle in degrees (0 = horizontal, counterclockwise)*/ /**Vector line angle in degrees (0 = horizontal, counterclockwise)*/
double mLineAngle; double mLineAngle;
/**Offset perpendicular to line direction*/ /**Offset perpendicular to line direction*/
double mOffset; double mOffset;
QgsSymbolV2::OutputUnit mOffsetUnit; QgsSymbolV2::OutputUnit mOffsetUnit;
QgsMapUnitScale mOffsetMapUnitScale;
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context ); void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
private: private:
/**Applies the svg pattern to the brush*/ /**Applies the svg pattern to the brush*/
void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& bru sh, double lineAngle, double distance, double lineWidth, const QColor& colo r ); void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& bru sh, double lineAngle, double distance, double lineWidth, const QColor& colo r );
/**Fill line*/ /**Fill line*/
QgsLineSymbolV2* mFillLineSymbol; QgsLineSymbolV2* mFillLineSymbol;
}; };
skipping to change at line 507 skipping to change at line 816
double displacementY() const { return mDisplacementY; } double displacementY() const { return mDisplacementY; }
void setDisplacementY( double d ) { mDisplacementY = d; } void setDisplacementY( double d ) { mDisplacementY = d; }
bool setSubSymbol( QgsSymbolV2* symbol ); bool setSubSymbol( QgsSymbolV2* symbol );
virtual QgsSymbolV2* subSymbol() { return mMarkerSymbol; } virtual QgsSymbolV2* subSymbol() { return mMarkerSymbol; }
void setDistanceXUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceXUnit = unit; } void setDistanceXUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceXUnit = unit; }
QgsSymbolV2::OutputUnit distanceXUnit() const { return mDistanceXUnit; } QgsSymbolV2::OutputUnit distanceXUnit() const { return mDistanceXUnit; }
void setDistanceXMapUnitScale( const QgsMapUnitScale& scale ) { mDistan
ceXMapUnitScale = scale; }
const QgsMapUnitScale& distanceXMapUnitScale() const { return mDistance
XMapUnitScale; }
void setDistanceYUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceYUnit = unit; } void setDistanceYUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceYUnit = unit; }
QgsSymbolV2::OutputUnit distanceYUnit() const { return mDistanceYUnit; } QgsSymbolV2::OutputUnit distanceYUnit() const { return mDistanceYUnit; }
void setDistanceYMapUnitScale( const QgsMapUnitScale& scale ) { mDistan
ceYMapUnitScale = scale; }
const QgsMapUnitScale& distanceYMapUnitScale() const { return mDistance
YMapUnitScale; }
void setDisplacementXUnit( QgsSymbolV2::OutputUnit unit ) { mDisplaceme ntXUnit = unit; } void setDisplacementXUnit( QgsSymbolV2::OutputUnit unit ) { mDisplaceme ntXUnit = unit; }
QgsSymbolV2::OutputUnit displacementXUnit() const { return mDisplacemen tXUnit; } QgsSymbolV2::OutputUnit displacementXUnit() const { return mDisplacemen tXUnit; }
void setDisplacementXMapUnitScale( const QgsMapUnitScale& scale ) { mDi
splacementXMapUnitScale = scale; }
const QgsMapUnitScale& displacementXMapUnitScale() const { return mDisp
lacementXMapUnitScale; }
void setDisplacementYUnit( QgsSymbolV2::OutputUnit unit ) { mDisplaceme ntYUnit = unit; } void setDisplacementYUnit( QgsSymbolV2::OutputUnit unit ) { mDisplaceme ntYUnit = unit; }
QgsSymbolV2::OutputUnit displacementYUnit() const { return mDisplacemen tYUnit; } QgsSymbolV2::OutputUnit displacementYUnit() const { return mDisplacemen tYUnit; }
void setDisplacementYMapUnitScale( const QgsMapUnitScale& scale ) { mDi
splacementYMapUnitScale = scale; }
const QgsMapUnitScale& displacementYMapUnitScale() const { return mDisp
lacementYMapUnitScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;
virtual QSet<QString> usedAttributes() const; virtual QSet<QString> usedAttributes() const;
protected: protected:
QgsMarkerSymbolV2* mMarkerSymbol; QgsMarkerSymbolV2* mMarkerSymbol;
double mDistanceX; double mDistanceX;
QgsSymbolV2::OutputUnit mDistanceXUnit; QgsSymbolV2::OutputUnit mDistanceXUnit;
QgsMapUnitScale mDistanceXMapUnitScale;
double mDistanceY; double mDistanceY;
QgsSymbolV2::OutputUnit mDistanceYUnit; QgsSymbolV2::OutputUnit mDistanceYUnit;
QgsMapUnitScale mDistanceYMapUnitScale;
double mDisplacementX; double mDisplacementX;
QgsSymbolV2::OutputUnit mDisplacementXUnit; QgsSymbolV2::OutputUnit mDisplacementXUnit;
QgsMapUnitScale mDisplacementXMapUnitScale;
double mDisplacementY; double mDisplacementY;
QgsSymbolV2::OutputUnit mDisplacementYUnit; QgsSymbolV2::OutputUnit mDisplacementYUnit;
QgsMapUnitScale mDisplacementYMapUnitScale;
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context ); void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
private: private:
void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& bru sh, double distanceX, double distanceY, void applyPattern( const QgsSymbolV2RenderContext& context, QBrush& bru sh, double distanceX, double distanceY,
double displacementX, double displacementY ); double displacementX, double displacementY );
}; };
class CORE_EXPORT QgsCentroidFillSymbolLayerV2 : public QgsFillSymbolLayerV 2 class CORE_EXPORT QgsCentroidFillSymbolLayerV2 : public QgsFillSymbolLayerV 2
{ {
skipping to change at line 571 skipping to change at line 899
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) 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 );
void setOutputUnit( QgsSymbolV2::OutputUnit unit ) { Q_UNUSED( unit ); } void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;
virtual QSet<QString> usedAttributes() const; virtual QSet<QString> usedAttributes() const;
void setPointOnSurface( bool pointOnSurface ) { mPointOnSurface = point
OnSurface; }
bool pointOnSurface() const { return mPointOnSurface; }
protected: protected:
QgsMarkerSymbolV2* mMarker; QgsMarkerSymbolV2* mMarker;
bool mPointOnSurface;
}; };
#endif #endif
 End of changes. 52 change blocks. 
47 lines changed or deleted 465 lines changed or added


 qgsgenericprojectionselector.h   qgsgenericprojectionselector.h 
skipping to change at line 53 skipping to change at line 53
*/ */
class GUI_EXPORT QgsGenericProjectionSelector : public QDialog, private Ui: :QgsGenericProjectionSelectorBase class GUI_EXPORT QgsGenericProjectionSelector : public QDialog, private Ui: :QgsGenericProjectionSelectorBase
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Constructor * Constructor
*/ */
QgsGenericProjectionSelector( QWidget *parent = 0, QgsGenericProjectionSelector( QWidget *parent = 0,
Qt::WFlags fl = QgisGui::ModalDialogFlags ); Qt::WindowFlags fl = QgisGui::ModalDialog Flags );
//! Destructor //! Destructor
~QgsGenericProjectionSelector(); ~QgsGenericProjectionSelector();
public slots: public slots:
/** If no parameter is passed, the message will be a generic /** If no parameter is passed, the message will be a generic
* 'define the CRS for this layer'. * 'define the CRS for this layer'.
*/ */
void setMessage( QString theMessage = "" ); void setMessage( QString theMessage = "" );
long selectedCrsId(); long selectedCrsId();
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsgeometry.h   qgsgeometry.h 
skipping to change at line 358 skipping to change at line 358
bool within( const QgsGeometry* geometry ) const; bool within( const QgsGeometry* geometry ) const;
/** Test for if geometry crosses another (uses GEOS) /** Test for if geometry crosses another (uses GEOS)
* @note added in 1.5 */ * @note added in 1.5 */
bool crosses( const QgsGeometry* geometry ) const; bool crosses( const QgsGeometry* geometry ) const;
/** Returns a buffer region around this geometry having the given width and with a specified number /** Returns a buffer region around this geometry having the given width and with a specified number
of segments used to approximate curves */ of segments used to approximate curves */
QgsGeometry* buffer( double distance, int segments ); QgsGeometry* buffer( double distance, int segments );
/** Returns a buffer region around the geometry, with additional style
options.
* @param distance buffer distance
* @param segments For round joins, number of segments to approximat
e quarter-circle
* @param endCapStyle Round (1) / Flat (2) / Square (3) end cap style
* @param joinStyle Round (1) / Mitre (2) / Bevel (3) join style
* @param mitreLimit Limit on the mitre ratio used for very sharp corn
ers
* @note added in 2.4
* @note needs GEOS >= 3.3 - otherwise always returns 0
*/
QgsGeometry* buffer( double distance, int segments, int endCapStyle, in
t joinStyle, double mitreLimit );
/** Returns an offset line at a given distance and side from an input l
ine.
* See buffer() method for details on parameters.
* @note added in 2.4
* @note needs GEOS >= 3.3 - otherwise always returns 0
*/
QgsGeometry* offsetCurve( double distance, int segments, int joinStyle,
double mitreLimit );
/** Returns a simplified version of this geometry using a specified tol erance value */ /** Returns a simplified version of this geometry using a specified tol erance value */
QgsGeometry* simplify( double tolerance ); QgsGeometry* simplify( double tolerance );
/** Returns the center of mass of a geometry /** Returns the center of mass of a geometry
* @note for line based geometries, the center point of the line is retu rned, * @note for line based geometries, the center point of the line is retu rned,
* and for point based geometries, the point itself is returned */ * and for point based geometries, the point itself is returned */
QgsGeometry* centroid(); QgsGeometry* centroid();
/** Returns a point within a geometry */
QgsGeometry* pointOnSurface();
/** Returns the smallest convex polygon that contains all the points in the geometry. */ /** Returns the smallest convex polygon that contains all the points in the geometry. */
QgsGeometry* convexHull(); QgsGeometry* convexHull();
/* Return interpolated point on line at distance /* Return interpolated point on line at distance
* @note added in 1.9 * @note added in 1.9
*/ */
QgsGeometry* interpolate( double distance ); QgsGeometry* interpolate( double distance );
/** Returns a geometry representing the points shared by this geometry and other. */ /** Returns a geometry representing the points shared by this geometry and other. */
QgsGeometry* intersection( QgsGeometry* geometry ); QgsGeometry* intersection( QgsGeometry* geometry );
skipping to change at line 400 skipping to change at line 421
*/ */
QString exportToWkt() const; QString exportToWkt() const;
/** Exports the geometry to mGeoJSON /** Exports the geometry to mGeoJSON
* @return true in case of success and false else * @return true in case of success and false else
* @note added in 1.8 * @note added in 1.8
* @note python binding added in 1.9 * @note python binding added in 1.9
*/ */
QString exportToGeoJSON() const; QString exportToGeoJSON() const;
/** try to convert the geometry to the requested type
* @param destType the geometry type to be converted to
* @param destMultipart determines if the output geometry will be multi
part or not
* @return the converted geometry or NULL pointer if the conversion fai
ls.
* @note added in 2.2
*/
QgsGeometry* convertToType( QGis::GeometryType destType, bool destMulti
part = false );
/* 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() const; QgsPoint asPoint() const;
/** 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() const; QgsPolyline asPolyline() const;
skipping to change at line 477 skipping to change at line 506
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
* @note python binding added in 1.6 * @note python binding added in 1.6
**/ **/
void validateGeometry( QList<Error> &errors ); void validateGeometry( QList<Error> &errors );
/** compute the unary union on a list of geometries. May be faster than
an iterative union on a set of geometries.
@param geometryList a list of QgsGeometry* as input
@returns the new computed QgsGeometry, or null
*/
static QgsGeometry *unaryUnion( const QList<QgsGeometry*>& geometryList
);
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 555 skipping to change at line 590
//helper functions for geometry splitting //helper functions for geometry splitting
/**Splits line/multiline geometries /**Splits line/multiline geometries
@param splitLine the line that splits the feature @param splitLine the line that splits the feature
@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 );
/**Splits line/multiline geometries following a single point*/
GEOSGeometry* linePointDifference( GEOSGeometry* GEOSsplitPoint );
/**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 );
skipping to change at line 587 skipping to change at line 625
/**Tests if line1 is completely contained in line2. This method works w ith a very small buffer around line2 and therefore is less prone /**Tests if line1 is completely contained in line2. This method works w ith a very small buffer around line2 and therefore is less prone
to numerical errors as the corresponding geos method*/ to numerical errors as the corresponding geos method*/
static int lineContainedInLine( const GEOSGeometry* line1, const GEOSGe ometry* line2 ); static int lineContainedInLine( const GEOSGeometry* line1, const GEOSGe ometry* line2 );
/**Tests if a point is on a line. This method works with a very small b uffer and is thus less prone to numerical problems as the direct geos funct ions. /**Tests if a point is on a line. This method works with a very small b uffer and is thus less prone to numerical problems as the direct geos funct ions.
@param point the point to test @param point the point to test
@param line line to test @param line line to test
@return 0 not contained, 1 if contained, <0 in case of error*/ @return 0 not contained, 1 if contained, <0 in case of error*/
static int pointContainedInLine( const GEOSGeometry* point, const GEOSG eometry* line ); static int pointContainedInLine( const GEOSGeometry* point, const GEOSG eometry* line );
/**Tests if geom bounding rect is within -180 <= x <= 180, -90 <= y <= /** Determines the maximum number of digits before the dot */
90. Other methods may use more accurate tolerances if this is true*/ static int geomDigits( const GEOSGeometry* geom );
static bool geomInDegrees( const GEOSGeometry* geom );
/**Returns number of single geometry in a geos geometry. Is save for ge os 2 and 3*/ /**Returns number of single geometry in a geos geometry. Is save for ge os 2 and 3*/
int numberOfGeometries( GEOSGeometry* g ) const; int numberOfGeometries( GEOSGeometry* g ) const;
int mergeGeometriesMultiTypeSplit( QVector<GEOSGeometry*>& splitResult ); int mergeGeometriesMultiTypeSplit( QVector<GEOSGeometry*>& splitResult );
/** return point from wkb */ /** return point from wkb */
QgsPoint asPoint( QgsConstWkbPtr &wkbPtr, bool hasZValue ) const; QgsPoint asPoint( QgsConstWkbPtr &wkbPtr, bool hasZValue ) const;
/** return polyline from wkb */ /** return polyline from wkb */
skipping to change at line 611 skipping to change at line 649
/** return polygon from wkb */ /** return polygon from wkb */
QgsPolygon asPolygon( QgsConstWkbPtr &wkbPtr, bool hasZValue ) const; QgsPolygon asPolygon( QgsConstWkbPtr &wkbPtr, bool hasZValue ) const;
static bool geosRelOp( char( *op )( const GEOSGeometry*, const GEOSGeom etry * ), static bool geosRelOp( char( *op )( const GEOSGeometry*, const GEOSGeom etry * ),
const QgsGeometry* a, const QgsGeometry* b ); const QgsGeometry* a, const QgsGeometry* b );
/**Returns < 0 if point(x/y) is left of the line x1,y1 -> x1,y2*/ /**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 ); double leftOf( double x, double y, double& x1, double& y1, double& x2, double& y2 );
static inline bool moveVertex( QgsWkbPtr &wkbPtr, const double &x, cons t double &y, int atVertex, bool hasZValue, int &pointIndex, bool isRing ); static inline bool moveVertex( QgsWkbPtr &wkbPtr, const double &x, cons t double &y, int atVertex, bool hasZValue, int &pointIndex, bool isRing );
static inline bool deleteVertex( QgsConstWkbPtr &srcPtr, QgsWkbPtr &dst Ptr, int atVertex, bool hasZValue, int &pointIndex, bool isRing, bool lastI tem ); static inline int deleteVertex( QgsConstWkbPtr &srcPtr, QgsWkbPtr &dstP tr, int atVertex, bool hasZValue, int &pointIndex, bool isRing, bool lastIt em );
static inline bool insertVertex( QgsConstWkbPtr &srcPtr, QgsWkbPtr &dst Ptr, int beforeVertex, const double &x, const double &y, bool hasZValue, in t &pointIndex, bool isRing ); static inline bool insertVertex( QgsConstWkbPtr &srcPtr, QgsWkbPtr &dst Ptr, int beforeVertex, const double &x, const double &y, bool hasZValue, in t &pointIndex, bool isRing );
/** try to convert the geometry to a point */
QgsGeometry* convertToPoint( bool destMultipart );
/** try to convert the geometry to a line */
QgsGeometry* convertToLine( bool destMultipart );
/** try to convert the geometry to a polygon */
QgsGeometry* convertToPolygon( bool destMultipart );
}; // class QgsGeometry }; // class QgsGeometry
Q_DECLARE_METATYPE( QgsGeometry ); Q_DECLARE_METATYPE( QgsGeometry );
class CORE_EXPORT QgsWkbPtr class CORE_EXPORT QgsWkbPtr
{ {
mutable unsigned char *mP; mutable unsigned char *mP;
public: public:
QgsWkbPtr( unsigned char *p ) { mP = p; } QgsWkbPtr( unsigned char *p ) { mP = p; }
 End of changes. 8 change blocks. 
4 lines changed or deleted 59 lines changed or added


 qgsgeometryanalyzer.h   qgsgeometryanalyzer.h 
skipping to change at line 119 skipping to change at line 119
@param outputFormat name of output format (can be empty if a memory p rovider is used to store the results) @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 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 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 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 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 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 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 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 @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, bool eventLayer( QgsVectorLayer* lineLayer, QgsVectorLayer* eventLayer, int lineField, int eventField, QgsFeatureIds &unlocatedFeatureIds, const Q String& outputLayer,
const QString& outputFormat, int locationField1, int l ocationField2 = -1, int offsetField = -1, double offsetScale = 1.0, 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 ); 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)*/ /**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 ); 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 ). /**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)*/ Currently, the z-coordinates are considered to be the measures (no su pport for m-values in QGIS)*/
QgsGeometry* locateAlongMeasure( double measure, QgsGeometry* lineGeom ); QgsGeometry* locateAlongMeasure( double measure, QgsGeometry* lineGeom );
private: private:
skipping to change at line 152 skipping to change at line 152
/**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 //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, void addEventLayerFeature( QgsFeature& feature, QgsGeometry* geom, QgsG eometry* lineGeom, QgsVectorFileWriter* fileWriter, QgsFeatureList& memoryF eatures, int offsetField = -1, double offsetScale = 1.0,
bool forceSingleType = false ); bool forceSingleType = false );
/**Create geometry offset relative to line geometry. /**Create geometry offset relative to line geometry.
@param geom the geometry to modify @param geom the geometry to modify
@param lineGeom the line geometry to which the feature is reference d @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*/ @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 ); bool createOffsetGeometry( QgsGeometry* geom, QgsGeometry* lineGeom, do uble offset );
QgsPoint createPointOffset( double x, double y, double dist, QgsGeometr y* lineGeom ) const; QgsPoint createPointOffset( double x, double y, double dist, QgsGeometr y* lineGeom ) const;
const unsigned char* locateBetweenWkbString( const unsigned char* ptr, QgsMultiPolyline& result, double fromMeasure, double toMeasure ); const unsigned char* locateBetweenWkbString( const unsigned char* ptr, QgsMultiPolyline& result, double fromMeasure, double toMeasure );
const unsigned char* locateAlongWkbString( const unsigned char* ptr, Qg sMultiPoint& result, double measure ); const unsigned char* locateAlongWkbString( const unsigned char* ptr, Qg sMultiPoint& 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 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 ); 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. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgsgeometrycache.h   qgsgeometrycache.h 
#ifndef QGSGEOMETRYCACHE_H #ifndef QGSGEOMETRYCACHE_H
#define QGSGEOMETRYCACHE_H #define QGSGEOMETRYCACHE_H
#include "qgsgeometry.h"
#include "qgsfeature.h" #include "qgsfeature.h"
#include "qgsrectangle.h"
#include "qgsvectorlayer.h" #include <QMap>
class CORE_EXPORT QgsGeometryCache class CORE_EXPORT QgsGeometryCache
{ {
public: public:
QgsGeometryCache( QgsVectorLayer* layer ); QgsGeometryCache();
~QgsGeometryCache(); ~QgsGeometryCache();
inline QgsGeometryMap& cachedGeometries() { return mCachedGeometries; } inline QgsGeometryMap& cachedGeometries() { return mCachedGeometries; }
//! fetch geometry from cache, return true if successful //! fetch geometry from cache, return true if successful
bool geometry( QgsFeatureId fid, QgsGeometry& geometry ); bool geometry( QgsFeatureId fid, QgsGeometry& geometry );
//! store a geometry in the cache //! store a geometry in the cache
void cacheGeometry( QgsFeatureId fid, const QgsGeometry& geom ); void cacheGeometry( QgsFeatureId fid, const QgsGeometry& geom );
skipping to change at line 33 skipping to change at line 35
void removeGeometry( QgsFeatureId fid ) { mCachedGeometries.remove( fid ); } void removeGeometry( QgsFeatureId fid ) { mCachedGeometries.remove( fid ); }
/** Deletes the geometries in mCachedGeometries */ /** Deletes the geometries in mCachedGeometries */
void deleteCachedGeometries(); void deleteCachedGeometries();
void setCachedGeometriesRect( const QgsRectangle& extent ) { mCachedGeo metriesRect = extent; } void setCachedGeometriesRect( const QgsRectangle& extent ) { mCachedGeo metriesRect = extent; }
const QgsRectangle& cachedGeometriesRect() { return mCachedGeometriesRe ct; } const QgsRectangle& cachedGeometriesRect() { return mCachedGeometriesRe ct; }
protected: protected:
inline QgsVectorLayerEditBuffer* editBuffer() { return L->editBuffer();
}
QgsVectorLayer* L;
/** cache of the committed geometries retrieved *for the current displa y* */ /** cache of the committed geometries retrieved *for the current displa y* */
QgsGeometryMap mCachedGeometries; QgsGeometryMap mCachedGeometries;
/** extent for which there are cached geometries */ /** extent for which there are cached geometries */
QgsRectangle mCachedGeometriesRect; QgsRectangle mCachedGeometriesRect;
}; };
#endif // QGSGEOMETRYCACHE_H #endif // QGSGEOMETRYCACHE_H
 End of changes. 5 change blocks. 
7 lines changed or deleted 4 lines changed or added


 qgsgeometryvalidator.h   qgsgeometryvalidator.h 
skipping to change at line 24 skipping to change at line 24
************************************************************************** */ ************************************************************************** */
#ifndef QGSGEOMETRYVALIDATOR_H #ifndef QGSGEOMETRYVALIDATOR_H
#define QGSGEOMETRYVALIDATOR_H #define QGSGEOMETRYVALIDATOR_H
#include <QThread> #include <QThread>
#include "qgsgeometry.h" #include "qgsgeometry.h"
class CORE_EXPORT QgsGeometryValidator : public QThread class CORE_EXPORT QgsGeometryValidator : public QThread
{ {
Q_OBJECT; Q_OBJECT
public: public:
//! Constructor //! Constructor
QgsGeometryValidator( QgsGeometry *g, QList<QgsGeometry::Error> *errors = 0 ); QgsGeometryValidator( QgsGeometry *g, QList<QgsGeometry::Error> *errors = 0 );
~QgsGeometryValidator(); ~QgsGeometryValidator();
void run(); void run();
void stop(); void stop();
/** Validate geometry and produce a list of geometry errors /** Validate geometry and produce a list of geometry errors
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsgml.h   qgsgml.h 
skipping to change at line 57 skipping to change at line 57
const QString& geometryAttribute, const QString& geometryAttribute,
const QgsFields & fields ); const QgsFields & fields );
~QgsGml(); ~QgsGml();
/** Does the Http GET request to the wfs server /** Does the Http GET request to the wfs server
* Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings. * Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
* @param uri GML URL * @param uri GML URL
* @param wkbType wkbType to retrieve * @param wkbType wkbType to retrieve
* @param extent retrieved extents * @param extent retrieved extents
* @param userName username for authentication
* @param password password for authentication
* @return 0 in case of success * @return 0 in case of success
*/ */
int getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectang le* extent = 0 ); int getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectang le* extent = 0, const QString& userName = QString(), const QString& passwor d = QString() );
/** Read from GML data. Constructor uri param is ignored /** Read from GML data. Constructor uri param is ignored
* Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings. * Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
*/ */
int getFeatures( const QByteArray &data, QGis::WkbType* wkbType, QgsRec tangle* extent = 0 ); int getFeatures( const QByteArray &data, QGis::WkbType* wkbType, QgsRec tangle* extent = 0 );
/** Get parsed features for given type name */ /** Get parsed features for given type name */
QMap<QgsFeatureId, QgsFeature* > featuresMap() const { return mFeatures ; } QMap<QgsFeatureId, QgsFeature* > featuresMap() const { return mFeatures ; }
/** Get feature ids map */ /** Get feature ids map */
skipping to change at line 122 skipping to change at line 124
} }
static void end( void* data, const XML_Char* el ) static void end( void* data, const XML_Char* el )
{ {
static_cast<QgsGml*>( data )->endElement( el ); static_cast<QgsGml*>( data )->endElement( el );
} }
static void chars( void* data, const XML_Char* chars, int len ) static void chars( void* data, const XML_Char* chars, int len )
{ {
static_cast<QgsGml*>( data )->characters( chars, len ); static_cast<QgsGml*>( data )->characters( chars, len );
} }
// Set current feature attribute
void setAttribute( const QString& name, const QString& value );
//helper routines //helper routines
/**Reads attribute srsName="EpsgCrsId:..." /**Reads attribute srsName="EpsgCrsId:..."
@param epsgNr result @param epsgNr result
@param attr attribute strings @param attr attribute strings
@return 0 in case of success @return 0 in case of success
*/ */
int readEpsgFromAttribute( int& epsgNr, const XML_Char** attr ) const; int readEpsgFromAttribute( int& epsgNr, const XML_Char** attr ) const;
/**Reads attribute as string /**Reads attribute as string
@param attributeName @param attributeName
 End of changes. 3 change blocks. 
1 lines changed or deleted 6 lines changed or added


 qgsgmlschema.h   qgsgmlschema.h 
skipping to change at line 134 skipping to change at line 134
static_cast<QgsGmlSchema*>( data )->startElement( el, attr ); static_cast<QgsGmlSchema*>( data )->startElement( el, attr );
} }
static void end( void* data, const XML_Char* el ) static void end( void* data, const XML_Char* el )
{ {
static_cast<QgsGmlSchema*>( data )->endElement( el ); static_cast<QgsGmlSchema*>( data )->endElement( el );
} }
static void chars( void* data, const XML_Char* chars, int len ) static void chars( void* data, const XML_Char* chars, int len )
{ {
static_cast<QgsGmlSchema*>( data )->characters( chars, len ); static_cast<QgsGmlSchema*>( data )->characters( chars, len );
} }
// Add attribute or reset its type according to value of current featur
e
void addAttribute( const QString& name, const QString& value );
//helper routines //helper routines
/**Reads attribute as string /**Reads attribute as string
@return attribute value or an empty string if no such attribute*/ @return attribute value or an empty string if no such attribute*/
QString readAttribute( const QString& attributeName, const XML_Char** a ttr ) const; QString readAttribute( const QString& attributeName, const XML_Char** a ttr ) const;
/**Returns pointer to main window or 0 if it does not exist*/ /**Returns pointer to main window or 0 if it does not exist*/
QWidget* findMainWindow() const; QWidget* findMainWindow() const;
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 qgsgraduatedsymbolrendererv2.h   qgsgraduatedsymbolrendererv2.h 
skipping to change at line 31 skipping to change at line 31
#include <QScopedPointer> #include <QScopedPointer>
class CORE_EXPORT QgsRendererRangeV2 class CORE_EXPORT QgsRendererRangeV2
{ {
public: public:
QgsRendererRangeV2(); QgsRendererRangeV2();
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 );
// default dtor is ok // default dtor is ok
QgsRendererRangeV2& operator=( QgsRendererRangeV2 range ); QgsRendererRangeV2& operator=( QgsRendererRangeV2 range );
double lowerValue() const; double lowerValue() const;
double upperValue() const; double upperValue() const;
QgsSymbolV2* symbol() const; QgsSymbolV2* symbol() const;
QString label() const; QString label() const;
void setSymbol( QgsSymbolV2* s ); void setSymbol( QgsSymbolV2* s );
void setLabel( QString label ); void setLabel( QString label );
skipping to change at line 74 skipping to change at line 73
class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV 2 class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV 2
{ {
public: public:
QgsGraduatedSymbolRendererV2( QString attrName = QString(), QgsRangeLis t ranges = QgsRangeList() ); QgsGraduatedSymbolRendererV2( QString attrName = QString(), QgsRangeLis t ranges = QgsRangeList() );
QgsGraduatedSymbolRendererV2( const QgsGraduatedSymbolRendererV2 & othe r ); QgsGraduatedSymbolRendererV2( const QgsGraduatedSymbolRendererV2 & othe r );
virtual ~QgsGraduatedSymbolRendererV2(); virtual ~QgsGraduatedSymbolRendererV2();
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature ); virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer ); virtual void startRender( QgsRenderContext& context, const QgsFields& f ields );
virtual void stopRender( QgsRenderContext& context ); virtual void stopRender( QgsRenderContext& context );
virtual QList<QString> usedAttributes(); virtual QList<QString> usedAttributes();
virtual QString dump() const; virtual QString dump() const;
virtual QgsFeatureRendererV2* clone(); virtual QgsFeatureRendererV2* clone();
virtual void toSld( QDomDocument& doc, QDomElement &element ) const; virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 qgsgraduatedsymbolrendererv2widget.h   qgsgraduatedsymbolrendererv2widget.h 
skipping to change at line 84 skipping to change at line 84
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( QString field );
void setExpression();
void classifyGraduated(); void classifyGraduated();
void reapplyColorRamp(); 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 currently selected classes */ /**Removes currently selected classes */
void deleteClasses(); void deleteClasses();
skipping to change at line 116 skipping to change at line 115
protected: protected:
void updateUiFromRenderer(); void updateUiFromRenderer();
void updateGraduatedSymbolIcon(); void updateGraduatedSymbolIcon();
//! return a list of indexes for the classes under selection //! return a list of indexes for the classes under selection
QList<int> selectedClasses(); QList<int> selectedClasses();
QgsRangeList selectedRanges(); QgsRangeList selectedRanges();
//! populate column combos in categorized and graduated page
void populateColumns();
void changeRangeSymbol( int rangeIdx ); void changeRangeSymbol( int rangeIdx );
void changeRange( int rangeIdx ); void changeRange( int rangeIdx );
void changeSelectedSymbols(); void changeSelectedSymbols();
QList<QgsSymbolV2*> selectedSymbols(); QList<QgsSymbolV2*> selectedSymbols();
QgsSymbolV2* findSymbolForRange( double lowerBound, double upperBound, const QgsRangeList& ranges ) const; QgsSymbolV2* findSymbolForRange( double lowerBound, double upperBound, const QgsRangeList& ranges ) const;
void refreshSymbolView(); void refreshSymbolView();
void keyPressEvent( QKeyEvent* event ); void keyPressEvent( QKeyEvent* event );
 End of changes. 2 change blocks. 
5 lines changed or deleted 1 lines changed or added


 qgshighlight.h   qgshighlight.h 
skipping to change at line 22 skipping to change at line 22
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSHIGHLIGHT_H #ifndef QGSHIGHLIGHT_H
#define QGSHIGHLIGHT_H #define QGSHIGHLIGHT_H
#include "qgsmapcanvasitem.h" #include "qgsmapcanvasitem.h"
#include "qgsfeaturestore.h" #include "qgsfeaturestore.h"
#include "qgsgeometry.h" #include "qgsgeometry.h"
#include "qgsrendererv2.h" #include "qgsrendererv2.h"
#include "qgssymbolv2.h"
#include <QBrush> #include <QBrush>
#include <QColor> #include <QColor>
#include <QList> #include <QList>
#include <QPen> #include <QPen>
#include <QPainter> #include <QPainter>
#include <QPainterPath> #include <QPainterPath>
class QgsMapLayer; class QgsMapLayer;
class QgsVectorLayer; class QgsVectorLayer;
class QgsSymbolV2; class QgsSymbolV2;
skipping to change at line 49 skipping to change at line 50
QgsHighlight( QgsMapCanvas *mapCanvas, QgsGeometry *geom, QgsVectorLaye r *layer ); QgsHighlight( QgsMapCanvas *mapCanvas, QgsGeometry *geom, QgsVectorLaye r *layer );
/** Constructor for highlighting true feature shape using feature attri butes /** Constructor for highlighting true feature shape using feature attri butes
* and renderer. * and renderer.
* @param mapCanvas map canvas * @param mapCanvas map canvas
* @param feature * @param feature
* @param layer vector layer * @param layer vector layer
*/ */
QgsHighlight( QgsMapCanvas *mapCanvas, const QgsFeature& feature, QgsVe ctorLayer *layer ); QgsHighlight( QgsMapCanvas *mapCanvas, const QgsFeature& feature, QgsVe ctorLayer *layer );
~QgsHighlight(); ~QgsHighlight();
/** Set line/outline to color, polygon fill to color with alpha = 63.
* This is legacy function, use setFillColor() after setColor() if dif
ferent fill color is required. */
void setColor( const QColor & color ); void setColor( const QColor & color );
/** Set polygons fill color.
* @note: added in version 2.3 */
void setFillColor( const QColor & fillColor );
/** Set width. Ignored in feature mode. */ /** Set width. Ignored in feature mode. */
void setWidth( int width ); void setWidth( int width );
/** Set line / outline buffer in millimeters.
* @note: added in version 2.3 */
void setBuffer( double buffer ) { mBuffer = buffer; }
/** Set minimum line / outline width in millimeters.
* @note: added in version 2.3 */
void setMinWidth( double width ) { mMinWidth = width; }
const QgsMapLayer *layer() const { return mLayer; }
protected: protected:
virtual void paint( QPainter* p ); virtual void paint( QPainter* p );
//! recalculates needed rectangle //! recalculates needed rectangle
void updateRect(); void updateRect();
private: private:
void init(); void init();
void setSymbolColor( QgsSymbolV2* symbol, const QColor & color ); void setSymbol( QgsSymbolV2* symbol, const QgsRenderContext & context,
const QColor & color, const QColor & fillColor );
double getSymbolWidth( const QgsRenderContext & context, double width,
QgsSymbolV2::OutputUnit unit );
/** Get renderer for current color mode and colors. The renderer should
be freed by caller. */
QgsFeatureRendererV2 * getRenderer( const QgsRenderContext & context, c
onst QColor & color, const QColor & fillColor );
void paintPoint( QPainter *p, QgsPoint point ); void paintPoint( QPainter *p, QgsPoint point );
void paintLine( QPainter *p, QgsPolyline line ); void paintLine( QPainter *p, QgsPolyline line );
void paintPolygon( QPainter *p, QgsPolygon polygon ); void paintPolygon( QPainter *p, QgsPolygon polygon );
QgsVectorLayer *vectorLayer();
QgsHighlight();
QBrush mBrush; QBrush mBrush;
QPen mPen; QPen mPen;
QgsGeometry *mGeometry; QgsGeometry *mGeometry;
QgsMapLayer *mLayer; QgsMapLayer *mLayer;
QgsFeature mFeature; QgsFeature mFeature;
QgsFeatureRendererV2 *mRenderer; double mBuffer; // line / outline buffer in pixels
QColor mTemporaryFillColor; double mMinWidth; // line / outline minimum width in pixels
}; };
#endif #endif
 End of changes. 7 change blocks. 
7 lines changed or deleted 28 lines changed or added


 qgshistogramdiagram.h   qgshistogramdiagram.h 
skipping to change at line 39 skipping to change at line 39
class QgsDiagramInterpolationSettings; class QgsDiagramInterpolationSettings;
class QgsRenderContext; class QgsRenderContext;
class CORE_EXPORT QgsHistogramDiagram: public QgsDiagram class CORE_EXPORT QgsHistogramDiagram: public QgsDiagram
{ {
public: public:
QgsHistogramDiagram(); QgsHistogramDiagram();
~QgsHistogramDiagram(); ~QgsHistogramDiagram();
virtual QgsDiagram* clone() const;
void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, con st QgsDiagramSettings& s, const QPointF& position ); void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, con st QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderCon text& c, const QgsDiagramSettings& s ); QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderCon text& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) ; QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) ;
QString diagramName() const { return DIAGRAM_NAME_HISTOGRAM; } QString diagramName() const { return DIAGRAM_NAME_HISTOGRAM; }
private: private:
QBrush mCategoryBrush; QBrush mCategoryBrush;
QPen mPen; QPen mPen;
double mScaleFactor; double mScaleFactor;
}; };
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added


 qgsinterpolator.h   qgsinterpolator.h 
skipping to change at line 67 skipping to change at line 67
virtual ~QgsInterpolator(); virtual ~QgsInterpolator();
/**Calculates interpolation value for map coordinates x, y /**Calculates interpolation value for map coordinates x, y
@param x x-coordinate (in map units) @param x x-coordinate (in map units)
@param y y-coordinate (in map units) @param y y-coordinate (in map units)
@param result out: interpolation result @param result out: interpolation result
@return 0 in case of success*/ @return 0 in case of success*/
virtual int interpolatePoint( double x, double y, double& result ) = 0; virtual int interpolatePoint( double x, double y, double& result ) = 0;
// @note not available in python bindings
const QList<LayerData>& layerData() const { return mLayerData; }
protected: protected:
/**Caches the vertex and value data from the provider. All the vertex d ata /**Caches the vertex and value data from the provider. All the vertex d ata
will be held in virtual memory will be held in virtual memory
@return 0 in case of success*/ @return 0 in case of success*/
int cacheBaseData(); int cacheBaseData();
QVector<vertexData> mCachedBaseData; QVector<vertexData> mCachedBaseData;
/**Flag that tells if the cache already has been filled*/ /**Flag that tells if the cache already has been filled*/
bool mDataIsCached; bool mDataIsCached;
skipping to change at line 89 skipping to change at line 92
QList<LayerData> mLayerData; QList<LayerData> mLayerData;
private: private:
QgsInterpolator(); //forbidden QgsInterpolator(); //forbidden
/**Helper method that adds the vertices of a geometry to the mCachedBas eData /**Helper method that adds the vertices of a geometry to the mCachedBas eData
@param geom the geometry @param geom the geometry
@param zCoord true if the z-coordinate of the geometry is to be inte rpolated @param zCoord true if the z-coordinate of the geometry is to be inte rpolated
@param attributeValue the attribute value for interpolation (if not interpolated from z-coordinate) @param attributeValue the attribute value for interpolation (if not interpolated from z-coordinate)
@return 0 in case of success*/ @return 0 in case of success*/
int addVerticesToCache( QgsGeometry* geom, bool zCoord, double attribut eValue ); int addVerticesToCache( QgsGeometry* geom, bool zCoord, double attribut eValue );
}; };
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 qgslabel.h   qgslabel.h 
skipping to change at line 44 skipping to change at line 44
class QgsFeature; class QgsFeature;
class QgsField; class QgsField;
class QgsLabelAttributes; class QgsLabelAttributes;
#include "qgsfield.h" #include "qgsfield.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include "qgsrendercontext.h" #include "qgsrendercontext.h"
typedef QList<int> QgsAttributeList; typedef QList<int> QgsAttributeList;
typedef QMap<int, QgsField> QgsFieldMap;
class QgsFields; class QgsFields;
/** \ingroup core /** \ingroup core
* A class to render labels. * A class to render labels.
* Label rendering properties can be either specified directly or * Label rendering properties can be either specified directly or
* in most cases determined dynamically based on the value of an attribute . * in most cases determined dynamically based on the value of an attribute .
**/ **/
class CORE_EXPORT QgsLabel class CORE_EXPORT QgsLabel
{ {
public: public:
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgslabelsearchtree.h   qgslabelsearchtree.h 
skipping to change at line 46 skipping to change at line 46
QgsLabelSearchTree(); QgsLabelSearchTree();
~QgsLabelSearchTree(); ~QgsLabelSearchTree();
/**Removes and deletes all the entries*/ /**Removes and deletes all the entries*/
void clear(); void clear();
/**Returns label position(s) at a given point. QgsLabelSearchTree keeps ownership, don't delete the LabelPositions /**Returns label position(s) at a given point. QgsLabelSearchTree keeps ownership, don't delete the LabelPositions
* @note not available in python bindings * @note not available in python bindings
* TODO: why does this break bindings with QList<QgsLabelPosition>? * TODO: why does this break bindings with QList<QgsLabelPosition>?
*/ */
void label( const QgsPoint& p, QList<QgsLabelPosition*>& posList ); void label( const QgsPoint& p, QList<QgsLabelPosition*>& posList ) cons t;
/**Returns label position(s) in given rectangle. QgsLabelSearchTree kee ps ownership, don't delete the LabelPositions /**Returns label position(s) in given rectangle. QgsLabelSearchTree kee ps ownership, don't delete the LabelPositions
* @note not available in python bindings * @note not available in python bindings
* TODO: why does this break bindings with QList<QgsLabelPosition>? * TODO: why does this break bindings with QList<QgsLabelPosition>?
*/ */
void labelsInRect( const QgsRectangle& r, QList<QgsLabelPosition*>& pos List ); void labelsInRect( const QgsRectangle& r, QList<QgsLabelPosition*>& pos List ) const;
/**Inserts label position. Does not take ownership of labelPos /**Inserts label position. Does not take ownership of labelPos
* @return true in case of success * @return true in case of success
* @note not available in python bindings * @note not available in python bindings
*/ */
bool insertLabel( LabelPosition* labelPos, int featureId, const QString & layerName, const QString& labeltext, const QFont& labelfont, bool diagram = false, bool pinned = false ); bool insertLabel( LabelPosition* labelPos, int featureId, const QString & layerName, const QString& labeltext, const QFont& labelfont, bool diagram = false, bool pinned = false );
private: private:
RTree<QgsLabelPosition*, double, 2, double> mSpatialIndex; // set as mutable because RTree template is not const-correct
mutable RTree<QgsLabelPosition*, double, 2, double> mSpatialIndex;
}; };
#endif // QGSLABELTREE_H #endif // QGSLABELTREE_H
 End of changes. 3 change blocks. 
3 lines changed or deleted 4 lines changed or added


 qgslegendmodel.h   qgslegendmodel.h 
skipping to change at line 101 skipping to change at line 101
/**Implements the drop operation*/ /**Implements the drop operation*/
bool dropMimeData( const QMimeData *data, Qt::DropAction action, int ro w, int column, const QModelIndex &parent ); bool dropMimeData( const QMimeData *data, Qt::DropAction action, int ro w, int column, const QModelIndex &parent );
void setAutoUpdate( bool autoUpdate ); void setAutoUpdate( bool autoUpdate );
bool autoUpdate() { return mAutoUpdate; } bool autoUpdate() { return mAutoUpdate; }
public slots: public slots:
void removeLayer( const QString& layerId ); void removeLayer( const QString& layerId );
void addLayer( QgsMapLayer* theMapLayer, double scaleDenominator = -1, QString rule = "" ); void addLayer( QgsMapLayer* theMapLayer, double scaleDenominator = -1, QString rule = "" );
private slots:
void updateLayer();
signals: signals:
void layersChanged(); void layersChanged();
private: private:
/**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, double scaleDenominator = -1, QString rule = "" ); int addVectorLayerItemsV2( QStandardItem* layerItem, QgsVectorLayer* vl ayer, double scaleDenominator = -1, QString rule = "" );
/**Adds item of raster layer /**Adds item of raster layer
@return 0 in case of success*/ @return 0 in case of success*/
int addRasterLayerItems( QStandardItem* layerItem, QgsMapLayer* rlayer ); int addRasterLayerItems( QStandardItem* layerItem, QgsMapLayer* rlayer );
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 qgslinesymbollayerv2.h   qgslinesymbollayerv2.h 
/************************************************************************** * /************************************************************************** *
qgslinesymbollayerv2.h qgslinesymbollayerv2.h
--------------------- ---------------------
begin : November 2009 begin : November 2009
copyright : (C) 2009 by Martin Dobias copyright : (C) 2009 by Martin Dobias
email : wonder dot sk at gmail dot com email : wonder dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSLINESYMBOLLAYERV2_H #ifndef QGSLINESYMBOLLAYERV2_H
skipping to change at line 54 skipping to change at line 54
// 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 );
//overriden so that clip path can be set when using draw inside polygon
option
void renderPolygonOutline( const QPolygonF& points, QList<QPolygonF>* r
ings, QgsSymbolV2RenderContext& context );
QgsStringMap properties() const; QgsStringMap properties() const;
QgsSymbolLayerV2* clone() const; QgsSymbolLayerV2* clone() const;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFacto r ) const; QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFacto r ) const;
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;
double estimateMaxBleed() const; double estimateMaxBleed() 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; }
double offset() const { return mOffset; } double offset() const { return mOffset; }
void setOffset( double offset ) { mOffset = offset; } void setOffset( double offset ) { mOffset = offset; }
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; } void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; }
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMap
UnitScale = scale; }
const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUn
itScale; }
bool useCustomDashPattern() const { return mUseCustomDashPattern; } bool useCustomDashPattern() const { return mUseCustomDashPattern; }
void setUseCustomDashPattern( bool b ) { mUseCustomDashPattern = b; } void setUseCustomDashPattern( bool b ) { mUseCustomDashPattern = b; }
QgsSymbolV2::OutputUnit customDashPatternUnit() const { return mCustomD ashPatternUnit; }
void setCustomDashPatternUnit( QgsSymbolV2::OutputUnit unit ) { mCustom DashPatternUnit = unit; } void setCustomDashPatternUnit( QgsSymbolV2::OutputUnit unit ) { mCustom DashPatternUnit = unit; }
QgsSymbolV2::OutputUnit customDashPatternUnit() const { return mCustomD
ashPatternUnit; }
const QgsMapUnitScale& customDashPatternMapUnitScale() const { return m
CustomDashPatternMapUnitScale; }
void setCustomDashPatternMapUnitScale( const QgsMapUnitScale& scale ) {
mCustomDashPatternMapUnitScale = scale; }
QVector<qreal> customDashVector() const { return mCustomDashVector; } QVector<qreal> customDashVector() const { return mCustomDashVector; }
void setCustomDashVector( const QVector<qreal>& vector ) { mCustomDashV ector = vector; } void setCustomDashVector( const QVector<qreal>& vector ) { mCustomDashV ector = vector; }
//Returns true if the line should only be drawn inside the polygon //Returns true if the line should only be drawn inside the polygon
bool drawInsidePolygon() const { return mDrawInsidePolygon; } bool drawInsidePolygon() const { return mDrawInsidePolygon; }
//Set to true if the line should only be drawn inside the polygon //Set to true if the line should only be drawn inside the polygon
void setDrawInsidePolygon( bool drawInsidePolygon ) { mDrawInsidePolygo n = drawInsidePolygon; } void setDrawInsidePolygon( bool drawInsidePolygon ) { mDrawInsidePolygo n = drawInsidePolygon; }
QVector<qreal> dxfCustomDashPattern( QgsSymbolV2::OutputUnit& unit ) co nst; QVector<qreal> dxfCustomDashPattern( QgsSymbolV2::OutputUnit& unit ) co nst;
skipping to change at line 112 skipping to change at line 124
QColor dxfColor( const QgsSymbolV2RenderContext& context ) const; QColor dxfColor( const QgsSymbolV2RenderContext& context ) const;
protected: protected:
Qt::PenStyle mPenStyle; Qt::PenStyle mPenStyle;
Qt::PenJoinStyle mPenJoinStyle; Qt::PenJoinStyle mPenJoinStyle;
Qt::PenCapStyle mPenCapStyle; Qt::PenCapStyle mPenCapStyle;
QPen mPen; QPen mPen;
QPen mSelPen; QPen mSelPen;
double mOffset; double mOffset;
QgsSymbolV2::OutputUnit mOffsetUnit; QgsSymbolV2::OutputUnit mOffsetUnit;
QgsMapUnitScale mOffsetMapUnitScale;
//use a custom dash dot pattern instead of the predefined ones //use a custom dash dot pattern instead of the predefined ones
bool mUseCustomDashPattern; bool mUseCustomDashPattern;
QgsSymbolV2::OutputUnit mCustomDashPatternUnit; QgsSymbolV2::OutputUnit mCustomDashPatternUnit;
QgsMapUnitScale mCustomDashPatternMapUnitScale;
/**Vector with an even number of entries for the */ /**Vector with an even number of entries for the */
QVector<qreal> mCustomDashVector; QVector<qreal> mCustomDashVector;
bool mDrawInsidePolygon; bool mDrawInsidePolygon;
private: private:
//helper functions for data defined symbology //helper functions for data defined symbology
void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QPen & pen, QPen& selPen, double& offset ); void applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QPen & pen, QPen& selPen, double& offset );
}; };
skipping to change at line 194 skipping to change at line 208
double interval() const { return mInterval; } double interval() const { return mInterval; }
void setInterval( double interval ) { mInterval = interval; } void setInterval( double interval ) { mInterval = interval; }
double offset() const { return mOffset; } double offset() const { return mOffset; }
void setOffset( double offset ) { mOffset = offset; } void setOffset( double offset ) { mOffset = offset; }
Placement placement() const { return mPlacement; } Placement placement() const { return mPlacement; }
void setPlacement( Placement p ) { mPlacement = p; } void setPlacement( Placement p ) { mPlacement = p; }
QgsSymbolV2::OutputUnit intervalUnit() const { return mIntervalUnit; } /**Returns the offset along the line for the marker placement. For Inte
rval placements, this is the distance
* between the start of the line and the first marker. For FirstVertex
and LastVertex placements, this is the
* distance between the marker and the start of the line or the end of
the line respectively.
* This setting has no effect for Vertex or CentralPoint placements.
* @returns The offset along the line. The unit for the offset is retri
evable via offsetAlongLineUnit.
* @note added in 2.3
* @see setOffsetAlongLine
* @see offsetAlongLineUnit
* @see placement
*/
double offsetAlongLine() const { return mOffsetAlongLine; }
/**Sets the the offset along the line for the marker placement. For Int
erval placements, this is the distance
* between the start of the line and the first marker. For FirstVertex
and LastVertex placements, this is the
* distance between the marker and the start of the line or the end of
the line respectively.
* This setting has no effect for Vertex or CentralPoint placements.
* @param offsetAlongLine Distance to offset markers along the line. Th
e offset
* unit is set via setOffsetAlongLineUnit.
* @note added in 2.3
* @see offsetAlongLine
* @see setOffsetAlongLineUnit
* @see setPlacement
*/
void setOffsetAlongLine( double offsetAlongLine ) { mOffsetAlongLine =
offsetAlongLine; }
/**Returns the unit used for calculating the offset along line for mark
ers.
* @returns Offset along line unit type.
* @see setOffsetAlongLineUnit
* @see offsetAlongLine
*/
QgsSymbolV2::OutputUnit offsetAlongLineUnit() const { return mOffsetAlo
ngLineUnit; }
/**Sets the unit used for calculating the offset along line for markers
.
* @param unit Offset along line unit type.
* @see offsetAlongLineUnit
* @see setOffsetAlongLine
*/
void setOffsetAlongLineUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetAl
ongLineUnit = unit; }
/**Returns the map unit scale used for calculating the offset in map un
its along line for markers.
* @returns Offset along line map unit scale.
*/
const QgsMapUnitScale& offsetAlongLineMapUnitScale() const { return mOf
fsetAlongLineMapUnitScale; }
/**Sets the map unit scale used for calculating the offset in map units
along line for markers.
* @param scale Offset along line map unit scale.
*/
void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale& scale ) { m
OffsetAlongLineMapUnitScale = scale; }
void setIntervalUnit( QgsSymbolV2::OutputUnit unit ) { mIntervalUnit = unit; } void setIntervalUnit( QgsSymbolV2::OutputUnit unit ) { mIntervalUnit = unit; }
QgsSymbolV2::OutputUnit intervalUnit() const { return mIntervalUnit; }
void setIntervalMapUnitScale( const QgsMapUnitScale& scale ) { mInterva
lMapUnitScale = scale; }
const QgsMapUnitScale& intervalMapUnitScale() const { return mIntervalM
apUnitScale; }
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; } void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; }
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMap
UnitScale = scale; }
const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUn
itScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
protected: protected:
void renderPolylineInterval( const QPolygonF& points, QgsSymbolV2Render Context& context ); void renderPolylineInterval( const QPolygonF& points, QgsSymbolV2Render Context& context );
void renderPolylineVertex( const QPolygonF& points, QgsSymbolV2RenderCo ntext& context, Placement placement = Vertex ); void renderPolylineVertex( const QPolygonF& points, QgsSymbolV2RenderCo ntext& context, Placement placement = Vertex );
void renderPolylineCentral( const QPolygonF& points, QgsSymbolV2RenderC ontext& context ); void renderPolylineCentral( const QPolygonF& points, QgsSymbolV2RenderC ontext& context );
double markerAngle( const QPolygonF& points, bool isRing, int vertex ); double markerAngle( const QPolygonF& points, bool isRing, int vertex );
bool mRotateMarker; bool mRotateMarker;
double mInterval; double mInterval;
QgsSymbolV2::OutputUnit mIntervalUnit; QgsSymbolV2::OutputUnit mIntervalUnit;
QgsMapUnitScale mIntervalMapUnitScale;
QgsMarkerSymbolV2* mMarker; QgsMarkerSymbolV2* mMarker;
double mOffset; double mOffset;
QgsSymbolV2::OutputUnit mOffsetUnit; QgsSymbolV2::OutputUnit mOffsetUnit;
QgsMapUnitScale mOffsetMapUnitScale;
Placement mPlacement; Placement mPlacement;
double mOffsetAlongLine; //distance to offset along line before marker
is drawn
QgsSymbolV2::OutputUnit mOffsetAlongLineUnit; //unit for offset along l
ine
QgsMapUnitScale mOffsetAlongLineMapUnitScale;
private:
/**Renders a marker by offseting a vertex along the line by a specified
distance.
* @param points vertices making up the line
* @param vertex vertex number to begin offset at
* @param distance distance to offset from vertex. If distance is posit
ive, offset is calculated
* moving forward along the line. If distance is negative, offset is ca
lculated moving backward
* along the line's vertices.
* @param context render context
* @see setoffsetAlongLine
* @see setOffsetAlongLineUnit
*/
void renderOffsetVertexAlongLine( const QPolygonF& points, int vertex,
double distance , QgsSymbolV2RenderContext &context );
}; };
#endif #endif
 End of changes. 17 change blocks. 
9 lines changed or deleted 134 lines changed or added


 qgslinevectorlayerdirector.h   qgslinevectorlayerdirector.h 
skipping to change at line 66 skipping to change at line 66
/* /*
* MANDATORY DIRECTOR PROPERTY DECLARATION * MANDATORY DIRECTOR PROPERTY DECLARATION
*/ */
void makeGraph( QgsGraphBuilderInterface *builder, void makeGraph( QgsGraphBuilderInterface *builder,
const QVector< QgsPoint >& additionalPoints, const QVector< QgsPoint >& additionalPoints,
QVector< QgsPoint>& tiedPoints ) const; QVector< QgsPoint>& tiedPoints ) const;
QString name() const; QString name() const;
private: private:
QgsVectorLayer *mVectorLayer; QgsVectorLayer *mVectorLayer;
int mDirectionFieldId; int mDirectionFieldId;
QString mDirectDirectionValue; QString mDirectDirectionValue;
QString mReverseDirectionValue; QString mReverseDirectionValue;
QString mBothDirectionValue; QString mBothDirectionValue;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 qgslogger.h   qgslogger.h 
skipping to change at line 121 skipping to change at line 121
/**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. **/ /** Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. **/
static void logMessageToFile( QString theMessage ); static void logMessageToFile( QString theMessage );
private:
/**Reads the environment variable QGIS_LOG_FILE. Returns NULL if the va riable is not set, /**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.*/ * otherwise returns a file name for writing log messages to.*/
static const QString logFile(); static const QString logFile();
private:
/**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the variable is not set. /**Reads the environment variable QGIS_DEBUG_FILE. Returns NULL if the variable is not set.
* If set, only messages from this source file will be sent to logs. */ * 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 sDebugLevel; static int sDebugLevel;
static int sPrefixLength; static int sPrefixLength;
}; };
class QgsScopeLogger class QgsScopeLogger
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 qgsludialog.h   qgsludialog.h 
skipping to change at line 28 skipping to change at line 28
#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
public: public:
QgsLUDialog( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogF lags ); QgsLUDialog( QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDi alogFlags );
~QgsLUDialog(); ~QgsLUDialog();
QString lowerValue() const; QString lowerValue() const;
void setLowerValue( QString val ); void setLowerValue( QString val );
QString upperValue() const; QString upperValue() const;
void setUpperValue( QString val ); void setUpperValue( QString val );
}; };
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsmapcanvas.h   qgsmapcanvas.h 
skipping to change at line 35 skipping to change at line 35
#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>
#include "qgsmapsettings.h" // TEMPORARY
#include "qgsprevieweffect.h" //for QgsPreviewEffect::PreviewMode
#ifdef HAVE_TOUCH #ifdef HAVE_TOUCH
#include <QGestureEvent> #include <QGestureEvent>
#endif #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;
class QRubberBand; class QRubberBand;
class QGraphicsScene; class QGraphicsScene;
class QgsMapToPixel; class QgsMapToPixel;
class QgsMapLayer; class QgsMapLayer;
class QgsLegend;
class QgsLegendView;
class QgsHighlight; class QgsHighlight;
class QgsVectorLayer; class QgsVectorLayer;
class QgsLabelingResults;
class QgsMapRenderer; class QgsMapRenderer;
class QgsMapRendererCache;
class QgsMapRendererQImageJob;
class QgsMapSettings;
class QgsMapCanvasMap; class QgsMapCanvasMap;
class QgsMapOverviewCanvas; class QgsMapOverviewCanvas;
class QgsMapTool; class QgsMapTool;
/** \ingroup gui /** \ingroup gui
* A class that stores visibility and presence in overview flags together * A class that stores visibility and presence in overview flags together
* with pointer to the layer. * with pointer to the layer.
* *
*/ */
class GUI_EXPORT QgsMapCanvasLayer class GUI_EXPORT QgsMapCanvasLayer
skipping to change at line 116 skipping to change at line 121
//! Constructor //! Constructor
QgsMapCanvas( QWidget * parent = 0, const char *name = 0 ); QgsMapCanvas( QWidget * parent = 0, const char *name = 0 );
//! Destructor //! Destructor
~QgsMapCanvas(); ~QgsMapCanvas();
void setLayerSet( QList<QgsMapCanvasLayer>& layers ); void setLayerSet( QList<QgsMapCanvasLayer>& layers );
void setCurrentLayer( QgsMapLayer* layer ); void setCurrentLayer( QgsMapLayer* layer );
// ### QGIS 3: make QgsMapCanvas independent from overview
void updateOverview(); void updateOverview();
// ### QGIS 3: make QgsMapCanvas independent from overview
void enableOverviewMode( QgsMapOverviewCanvas* overview ); void enableOverviewMode( QgsMapOverviewCanvas* overview );
//! Get access to properties used for map rendering
//! @note added in 2.4
const QgsMapSettings& mapSettings() const;
//! sets whether to use projections for this layer set
//! @note added in 2.4
void setCrsTransformEnabled( bool enabled );
//! sets destination coordinate reference system
//! @note added in 2.4
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );
//! Get access to the labeling results (may be null)
//! @note added in 2.4
const QgsLabelingResults* labelingResults() const;
//! Set whether to cache images of rendered layers
//! @note added in 2.4
void setCachingEnabled( bool enabled );
//! Check whether images of rendered layers are curerently being cached
//! @note added in 2.4
bool isCachingEnabled() const;
//! Make sure to remove any rendered images from cache (does nothing if
cache is not enabled)
//! @note added in 2.4
void clearCache();
//! Set whether the layers are rendered in parallel or sequentially
//! @note added in 2.4
void setParallelRenderingEnabled( bool enabled );
//! Check whether the layers are rendered in parallel or sequentially
//! @note added in 2.4
bool isParallelRenderingEnabled() const;
//! Set how often map preview should be updated while it is being rende
red (in milliseconds)
//! @note added in 2.4
void setMapUpdateInterval( int timeMiliseconds );
//! Find out how often map preview should be updated while it is being
rendered (in milliseconds)
//! @note added in 2.4
int mapUpdateInterval() const;
//! @deprecated since 2.4 - there could be more than just one "map" ite
ms
QgsMapCanvasMap* map(); QgsMapCanvasMap* map();
QgsMapRenderer* mapRenderer(); //! @deprecated since 2.4 - use mapSettings() for anything related to c
urrent renderer settings
//// SIP: removed /Transfer/ because it crashes after few calls to ifac
e.mapCanvas().mapRenderer().hasCrsTransformEnabled()
//// and in fact there is no transfer of ownership from c++ to python!
//// Actually the problem comes from the fact that "hasCrsTransformEnab
led" is both a signal and a normal method
//// /KeepReference/ is necessary because otherwise mapRenderer().hasCr
sTransformEnabled() was crashing
Q_DECL_DEPRECATED QgsMapRenderer* mapRenderer();
//! Accessor for the canvas paint device //! Accessor for the canvas paint device
QPaintDevice &canvasPaintDevice(); //! @deprecated since 2.4
Q_DECL_DEPRECATED QPaintDevice &canvasPaintDevice();
//! Get the last reported scale of the canvas //! Get the last reported scale of the canvas
double scale(); double scale();
//! Clear the map canvas //! Clear the map canvas
void clear(); //! @deprecated since 2.4 - use refresh() - clear does the same thing
Q_DECL_DEPRECATED void clear();
//! Returns the mapUnitsPerPixel (map units per pixel) for the canvas //! Returns the mapUnitsPerPixel (map units per pixel) for the canvas
double mapUnitsPerPixel() const; double mapUnitsPerPixel() const;
//! Returns the current zoom exent of the map canvas //! Returns the current zoom exent of the map canvas
QgsRectangle extent() const; QgsRectangle extent() const;
//! Returns the combined exent for all layers on the map canvas //! Returns the combined exent for all layers on the map canvas
QgsRectangle fullExtent() const; QgsRectangle fullExtent() const;
//! Set the extent of the map canvas //! Set the extent of the map canvas
skipping to change at line 183 skipping to change at line 242
void unsetMapTool( QgsMapTool* mapTool ); void unsetMapTool( QgsMapTool* mapTool );
/**Returns the currently active tool*/ /**Returns the currently active tool*/
QgsMapTool* mapTool(); QgsMapTool* mapTool();
/** Write property of QColor bgColor. */ /** Write property of QColor bgColor. */
virtual void setCanvasColor( const QColor & _newVal ); virtual void setCanvasColor( const QColor & _newVal );
/** Read property of QColor bgColor. */ /** Read property of QColor bgColor. */
virtual QColor canvasColor() const; virtual QColor canvasColor() const;
/** Set color of selected vector features */
//! @note added in 2.4
void setSelectionColor( const QColor& color );
/** Emits signal scaleChanged to update scale in main window */ /** Emits signal scaleChanged to update scale in main window */
void updateScale(); void updateScale();
/** Updates the full extent */ /** Updates the full extent */
void updateFullExtent(); //! @deprecated since v2.4 - does nothing
Q_DECL_DEPRECATED void updateFullExtent() {}
//! return the map layer at position index in the layer stack //! return the map layer at position index in the layer stack
QgsMapLayer *layer( int index ); QgsMapLayer *layer( int index );
//! return number of layers on the map //! return number of layers on the map
int layerCount() const; int layerCount() const;
//! return list of layers within map canvas. Added in v1.5 //! return list of layers within map canvas. Added in v1.5
QList<QgsMapLayer*> layers() const; QList<QgsMapLayer*> layers() const;
skipping to change at line 209 skipping to change at line 273
* responding to events while layers are being added/removed etc. * responding to events while layers are being added/removed etc.
* @param frz Boolean specifying if the canvas should be frozen (true) or * @param frz Boolean specifying if the canvas should be frozen (true) or
* thawed (false). Default is true. * thawed (false). Default is true.
*/ */
void freeze( bool frz = true ); void freeze( bool frz = true );
/*! Accessor for frozen status of canvas */ /*! Accessor for frozen status of canvas */
bool isFrozen(); bool isFrozen();
//! Flag the canvas as dirty and needed a refresh //! Flag the canvas as dirty and needed a refresh
void setDirty( bool _dirty ); //! @deprecated since 2.4 - use refresh() to trigger a refresh (clients
should not decide explicitly whether canvas is dirty or not)
Q_DECL_DEPRECATED void setDirty( bool _dirty );
//! Return the state of the canvas (dirty or not) //! Return the state of the canvas (dirty or not)
bool isDirty() const; //! @deprecated since 2.4 - dirty flag is not kept anymore - always ret
urns false
Q_DECL_DEPRECATED bool isDirty() const;
//! Set map units (needed by project properties dialog) //! Set map units (needed by project properties dialog)
void setMapUnits( QGis::UnitType mapUnits ); void setMapUnits( QGis::UnitType mapUnits );
//! Get the current canvas map units //! Get the current canvas map units
QGis::UnitType mapUnits() const; QGis::UnitType mapUnits() const;
//! Get the current coordinate transform //! Get the current coordinate transform
const QgsMapToPixel* getCoordinateTransform(); const QgsMapToPixel* getCoordinateTransform();
//! true if canvas currently drawing //! Find out whether rendering is in progress
bool isDrawing(); bool isDrawing();
//! returns current layer (set by legend widget) //! returns current layer (set by legend widget)
QgsMapLayer* currentLayer(); QgsMapLayer* currentLayer();
//! set wheel action and zoom factor (should be greater than 1) //! set wheel action and zoom factor (should be greater than 1)
void setWheelAction( WheelAction action, double factor = 2 ); void setWheelAction( WheelAction action, double factor = 2 );
//! Zoom in with fixed factor //! Zoom in with fixed factor
void zoomIn( ); void zoomIn( );
skipping to change at line 252 skipping to change at line 318
//! Zoom with the factor supplied. Factor > 1 zooms out, interval (0,1) zooms in //! Zoom with the factor supplied. Factor > 1 zooms out, interval (0,1) zooms in
void zoomByFactor( double scaleFactor ); void zoomByFactor( double scaleFactor );
//! Zooms in/out with a given center //! Zooms in/out with a given center
void zoomWithCenter( int x, int y, bool zoomIn ); void zoomWithCenter( int x, int y, bool zoomIn );
//! used to determine if anti-aliasing is enabled or not //! used to determine if anti-aliasing is enabled or not
void enableAntiAliasing( bool theFlag ); void enableAntiAliasing( bool theFlag );
//! true if antialising is enabled //! true if antialising is enabled
bool antiAliasingEnabled() const { return mAntiAliasing; } bool antiAliasingEnabled() const { return mSettings.testFlag( QgsMapSet tings::Antialiasing ); }
//! Select which Qt class to render with //! Select which Qt class to render with
void useImageToRender( bool theFlag ); //! @deprecated since 2.4 - does nothing because now we always render t
o QImage
Q_DECL_DEPRECATED void useImageToRender( bool theFlag );
// following 2 methods should be moved elsewhere or changed to private // following 2 methods should be moved elsewhere or changed to private
// currently used by pan map tool // currently used by pan map tool
//! Ends pan action and redraws the canvas. //! Ends pan action and redraws the canvas.
void panActionEnd( QPoint releasePoint ); void panActionEnd( QPoint releasePoint );
//! Called when mouse is moving and pan is activated //! Called when mouse is moving and pan is activated
void panAction( QMouseEvent * event ); void panAction( QMouseEvent * event );
//! returns last position of mouse cursor //! returns last position of mouse cursor
QPoint mouseLastXY(); QPoint mouseLastXY();
/** Enables a preview mode for the map canvas
* @param previewEnabled set to true to enable a preview mode
* @see setPreviewMode
* @note added in 2.3 */
void setPreviewModeEnabled( bool previewEnabled );
/** Returns whether a preview mode is enabled for the map canvas
* @returns true if a preview mode is currently enabled
* @see setPreviewModeEnabled
* @see previewMode
* @note added in 2.3 */
bool previewModeEnabled() const;
/** Sets a preview mode for the map canvas. This setting only has an ef
fect if
* previewModeEnabled is true.
* @param mode preview mode for the canvas
* @see previewMode
* @see setPreviewModeEnabled
* @see previewModeEnabled
* @note added in 2.3 */
void setPreviewMode( QgsPreviewEffect::PreviewMode mode );
/** Returns the current preview mode for the map canvas. This setting o
nly has an effect if
* previewModeEnabled is true.
* @returns preview mode for map canvas
* @see setPreviewMode
* @see previewModeEnabled
* @note added in 2.3 */
QgsPreviewEffect::PreviewMode previewMode() const;
public slots: public slots:
/**Repaints the canvas map*/ /**Repaints the canvas map*/
void refresh(); void refresh();
//! Receives signal about selection change, and pass it on with layer i nfo //! Receives signal about selection change, and pass it on with layer i nfo
void selectionChangedSlot(); void selectionChangedSlot();
//! Save the convtents of the map canvas to disk as an image //! Save the convtents of the map canvas to disk as an image
void saveAsImage( QString theFileName, QPixmap * QPixmap = 0, QString = "PNG" ); void saveAsImage( QString theFileName, QPixmap * QPixmap = 0, QString = "PNG" );
skipping to change at line 290 skipping to change at line 387
void layerStateChange(); void layerStateChange();
//! Whether to suppress rendering or not //! Whether to suppress rendering or not
void setRenderFlag( bool theFlag ); void setRenderFlag( bool theFlag );
//! State of render suppression flag //! State of render suppression flag
bool renderFlag() {return mRenderFlag;}; bool renderFlag() {return mRenderFlag;};
/** A simple helper method to find out if on the fly projections are en abled or not */ /** A simple helper method to find out if on the fly projections are en abled or not */
bool hasCrsTransformEnabled(); bool hasCrsTransformEnabled();
/** The map units may have changed, so cope with that */ //! @deprecated in 2.4 - does nothing - kept for API compatibility
void mapUnitsChanged(); Q_DECL_DEPRECATED void updateMap();
/** updates pixmap on render progress */ //! stop rendering (if there is any right now)
void updateMap(); //! @note added in 2.4
void stopRendering();
//! show whatever error is exposed by the QgsMapLayer. //! @deprecated since 2.4 - does nothing - errors are reported by diffe
void showError( QgsMapLayer * mapLayer ); rent means
Q_DECL_DEPRECATED 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 & );
//! ask user about datum transformation //! ask user about datum transformation
void getDatumTransformInfo( const QgsMapLayer* ml, const QString& srcAu thId, const QString& destAuthId ); void getDatumTransformInfo( const QgsMapLayer* ml, const QString& srcAu thId, const QString& destAuthId );
private slots: private slots:
//! called when current maptool is destroyed //! called when current maptool is destroyed
void mapToolDestroyed(); void mapToolDestroyed();
//! called when a renderer job has finished successfully or when it was
cancelled
void rendererJobFinished();
void mapUpdateTimeout();
void refreshMap();
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 ); //! @deprecated since 2.4 - already unused in 2.0 anyway
Q_DECL_DEPRECATED 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 );
//! Emitted when the extents of the map change //! Emitted when the extents of the map change
void extentsChanged(); void extentsChanged();
/** Emitted when the canvas has rendered. /** Emitted when the canvas has rendered.
Passes a pointer to the painter on which the map was drawn. This is Passes a pointer to the painter on which the map was drawn. This is
useful for plugins that wish to draw on the map after it has been useful for plugins that wish to draw on the map after it has been
rendered. Passing the painter allows plugins to work when the map is rendered. Passing the painter allows plugins to work when the map is
being rendered onto a pixmap other than the mapCanvas own pixmap membe r. being rendered onto a pixmap other than the mapCanvas own pixmap membe r.
*/ */
//! TODO: deprecate when decorations are reimplemented as map canvas it
ems
//! - anything related to rendering progress is not visible outside of
map canvas
//! - additional drawing shall be done directly within the renderer job
or independently as a map canvas item
void renderComplete( QPainter * ); void renderComplete( QPainter * );
// ### QGIS 3: renamte to mapRefreshFinished()
/** Emitted when canvas finished a refresh request. /** Emitted when canvas finished a refresh request.
\note Added in 2.0 */ \note Added in 2.0 */
void mapCanvasRefreshed(); void mapCanvasRefreshed();
// ### QGIS 3: rename to mapRefreshStarted()
/** Emitted when the canvas is about to be rendered. /** Emitted when the canvas is about to be rendered.
\note Added in 1.5 */ \note Added in 1.5 */
void renderStarting(); void renderStarting();
//! Emitted when a new set of layers has been received //! Emitted when a new set of layers has been received
void layersChanged(); void layersChanged();
//! Emit key press event //! Emit key press event
void keyPressed( QKeyEvent * e ); void keyPressed( QKeyEvent * e );
//! Emit key release event //! Emit key release event
void keyReleased( QKeyEvent * e ); void keyReleased( QKeyEvent * e );
//! Emit map tool changed event //! Emit map tool changed event
void mapToolSet( QgsMapTool *tool ); void mapToolSet( QgsMapTool *tool );
/** Emit map tool changed with the old tool
* @note added in 2.3
*/
void mapToolSet( QgsMapTool *newTool, QgsMapTool* oldTool );
// ### QGIS 3: remove the signal
//! Emitted when selection in any layer gets changed //! Emitted when selection in any layer gets changed
void selectionChanged( QgsMapLayer * layer ); void selectionChanged( QgsMapLayer * layer );
//! 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 );
//! Emitted when on-the-fly projection has been turned on/off
//! @note added in 2.4
void hasCrsTransformEnabledChanged( bool flag );
//! Emitted when map CRS has changed
//! @note added in 2.4
void destinationCrsChanged();
//! Emmitted when map units are changed
//! @note added in 2.4
void mapUnitsChanged();
protected: protected:
#ifdef HAVE_TOUCH #ifdef HAVE_TOUCH
//! Overridden standard event to be gestures aware //! Overridden standard event to be gestures aware
bool event( QEvent * e ); bool event( QEvent * e );
#endif #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
skipping to change at line 420 skipping to change at line 549
class CanvasProperties; class CanvasProperties;
/// Handle pattern for implementation object /// Handle pattern for implementation object
std::auto_ptr<CanvasProperties> mCanvasProperties; std::auto_ptr<CanvasProperties> mCanvasProperties;
/**debugging member /**debugging member
invoked when a connect() is made to this object invoked when a connect() is made to this object
*/ */
void connectNotify( const char * signal ); void connectNotify( const char * signal );
private slots: //! Make sure the datum transform store is properly populated
void crsTransformEnabled( bool ); void updateDatumTransformEntries();
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 & );
//! encompases all map settings necessary for map rendering
QgsMapSettings mSettings;
//! all map rendering is done in this class //! all map rendering is done in this class
QgsMapRenderer* mMapRenderer; QgsMapRenderer* mMapRenderer;
//! owns pixmap with rendered map and controls rendering //! owns pixmap with rendered map and controls rendering
QgsMapCanvasMap* mMap; QgsMapCanvasMap* mMap;
//! map overview widget - it's controlled by QgsMapCanvas //! map overview widget - it's controlled by QgsMapCanvas
QgsMapOverviewCanvas* mMapOverview; QgsMapOverviewCanvas* mMapOverview;
//! If backbuffering is currently enabled
bool mBackbufferEnabled;
//! Flag indicating a map refresh is in progress
bool mDrawing;
//! Flag indicating if the map canvas is frozen. //! Flag indicating if the map canvas is frozen.
bool mFrozen; bool mFrozen;
/*! \brief Flag to track the state of the Map canvas. //! Flag that allows squashing multiple refresh() calls into just one d
* elayed rendering job
* The canvas is bool mRefreshScheduled;
* flagged as dirty by any operation that changes the state of
* the layers or the view extent. If the canvas is not dirty, paint
* events are handled by bit-blitting the stored canvas bitmap to
* the canvas. This improves performance by not reading the data source
* when no real change has occurred
*/
bool mDirty;
//! determines whether user has requested to suppress rendering //! determines whether user has requested to suppress rendering
bool mRenderFlag; bool mRenderFlag;
/**Resize events that have been ignored because the canvas is busy with
rendering may put their sizes into this list. The canvas then picks
up
the last entry in case a lot of resize events arrive in short time*/
QList< QPair<int, int> > mResizeQueue;
//! current layer in legend //! current layer in legend
QgsMapLayer* mCurrentLayer; QgsMapLayer* mCurrentLayer;
//! graphics scene manages canvas items //! graphics scene manages canvas items
QGraphicsScene* mScene; QGraphicsScene* mScene;
//! pointer to current map tool //! pointer to current map tool
QgsMapTool* mMapTool; QgsMapTool* mMapTool;
//! previous tool if current is for zooming/panning //! previous tool if current is for zooming/panning
skipping to change at line 491 skipping to change at line 605
//! recently used extent //! recently used extent
QList <QgsRectangle> mLastExtent; QList <QgsRectangle> mLastExtent;
int mLastExtentIndex; int mLastExtentIndex;
//! Scale factor multiple for default zoom in/out //! Scale factor multiple for default zoom in/out
double mWheelZoomFactor; double mWheelZoomFactor;
//! Mouse wheel action //! Mouse wheel action
WheelAction mWheelAction; WheelAction mWheelAction;
//! resize canvas size //! Timer that periodically fires while map rendering is in progress to
QSize mNewSize; update the visible map
QTimer mMapUpdateTimer;
//! Job that takes care of map rendering in background
QgsMapRendererQImageJob* mJob;
//! currently in paint event //! Flag determining whether the active job has been cancelled
bool mPainting; bool mJobCancelled;
//! indicates whether antialiasing will be used for rendering //! Labeling results from the recently rendered map
bool mAntiAliasing; QgsLabelingResults* mLabelingResults;
//! Whether layers are rendered sequentially or in parallel
bool mUseParallelRendering;
//! Whether to add rendering stats to the rendered image
bool mDrawRenderingStats;
//! Optionally use cache with rendered map layers for the current map s
ettings
QgsMapRendererCache* mCache;
QTimer *mResizeTimer; QTimer *mResizeTimer;
QgsPreviewEffect* mPreviewEffect;
}; // class QgsMapCanvas }; // class QgsMapCanvas
/** Class that does synchronization between QgsMapCanvas and its associated
QgsMapRenderer:
* - changes done in map canvas settings are pushed to map renderer
* - changes done in map renderer are pushed to map canvas settings
*
* This class can be removed within API cleanup when QgsMapRenderer will no
t be accessible from canvas API anymore.
* Added in 2.4. This class is not a part of public API!
*/
class QgsMapCanvasRendererSync : public QObject
{
Q_OBJECT
public:
QgsMapCanvasRendererSync( QgsMapCanvas* canvas, QgsMapRenderer* rendere
r );
protected slots:
void onExtentC2R();
void onExtentR2C();
void onMapUnitsC2R();
void onMapUnitsR2C();
void onCrsTransformC2R();
void onCrsTransformR2C();
void onDestCrsC2R();
void onDestCrsR2C();
void onLayersC2R();
protected:
QgsMapCanvas* mCanvas;
QgsMapRenderer* mRenderer;
bool mSyncingExtent;
};
#endif #endif
 End of changes. 38 change blocks. 
47 lines changed or deleted 234 lines changed or added


 qgsmapcanvasitem.h   qgsmapcanvasitem.h 
skipping to change at line 66 skipping to change at line 66
public: public:
//! called on changed extent or resize event to update position of the item //! called on changed extent or resize event to update position of the item
virtual void updatePosition(); virtual void updatePosition();
//! default implementation for canvas items //! default implementation for canvas items
virtual QRectF boundingRect() const; virtual QRectF boundingRect() const;
//! sets current offset, to be called from QgsMapCanvas //! sets current offset, to be called from QgsMapCanvas
void setPanningOffset( const QPoint& point ); //! @deprecated since v2.4 - not called by QgsMapCanvas anymore
Q_DECL_DEPRECATED void setPanningOffset( const QPoint& point );
//! returns canvas item rectangle //! returns canvas item rectangle
QgsRectangle rect() const; QgsRectangle rect() const;
//! sets canvas item rectangle //! sets canvas item rectangle
void setRect( const QgsRectangle& r ); void setRect( const QgsRectangle& r );
//! transformation from screen coordinates to map coordinates //! transformation from screen coordinates to map coordinates
QgsPoint toMapCoordinates( const QPoint& point ); QgsPoint toMapCoordinates( const QPoint& point );
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 qgsmapcanvasmap.h   qgsmapcanvasmap.h 
skipping to change at line 21 skipping to change at line 21
* 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 QGSMAPCANVASMAP_H #ifndef QGSMAPCANVASMAP_H
#define QGSMAPCANVASMAP_H #define QGSMAPCANVASMAP_H
#include <QGraphicsRectItem> #include <QGraphicsRectItem>
#include <QPixmap> #include <QPixmap>
#include <QTimer>
#include <qgis.h> #include <qgis.h>
#include <qgsmaptopixel.h>
class QgsMapRenderer; #include <qgsmapcanvasitem.h>
class QgsMapSettings;
class QgsMapCanvas; class QgsMapCanvas;
/** \ingroup gui /** \ingroup gui
* A rectangular graphics item representing the map on the canvas. * A rectangular graphics item representing the map on the canvas.
*/ */
class GUI_EXPORT QgsMapCanvasMap : public QGraphicsRectItem class GUI_EXPORT QgsMapCanvasMap : public QgsMapCanvasItem // public QObje ct, public QGraphicsRectItem
{ {
public: public:
//! constructor //! constructor
QgsMapCanvasMap( QgsMapCanvas* canvas ); QgsMapCanvasMap( QgsMapCanvas* canvas );
//! resize canvas item and pixmap ~QgsMapCanvasMap();
void resize( QSize size );
void enableAntiAliasing( bool flag ) { mAntiAliasing = flag; } //! @note added in 2.4
void setContent( const QImage& image, const QgsRectangle& rect );
void useImageToRender( bool flag ) { mUseQImageToRender = flag; } //! @note added in 2.4
QImage contentImage() const { return mImage; }
//! renders map using QgsMapRenderer to mPixmap virtual void paint( QPainter * painter );
void render();
void setBackgroundColor( const QColor& color ) { mBgColor = color; } //! @deprecated in 2.4 - does nothing. Kept for API compatibility
Q_DECL_DEPRECATED void refresh() {}
void setPanningOffset( const QPoint& point ); //! @deprecated in 2.4 - does nothing. Kept for API compatibility
Q_DECL_DEPRECATED void resize( QSize size ) { Q_UNUSED( size ); }
QPaintDevice& paintDevice(); //! @deprecated in 2.4 - does nothing. Kept for API compatibility
Q_DECL_DEPRECATED void enableAntiAliasing( bool flag ) { Q_UNUSED( flag
); }
void paint( QPainter* p, const QStyleOptionGraphicsItem*, QWidget* ); //! @deprecated in 2.4 - does nothing. Kept for API compatibility
Q_DECL_DEPRECATED void render() {}
QRectF boundingRect() const; //! @deprecated in 2.4 - does nothing. Kept for API compatibility
Q_DECL_DEPRECATED void setBackgroundColor( const QColor& color ) { Q_UN
USED( color ); }
//! Update contents - can be called while drawing to show the status. //! @deprecated in 2.4 - not called by QgsMapCanvas anymore
//! Added in version 1.2 Q_DECL_DEPRECATED void setPanningOffset( const QPoint& point ) { Q_UNUS
void updateContents(); ED( point ); }
private: //! @deprecated in 2.4
Q_DECL_DEPRECATED QPaintDevice& paintDevice();
//! indicates whether antialiasing will be used for rendering //! @deprecated in 2.4 - does nothing. Kept for API compatibility
bool mAntiAliasing; Q_DECL_DEPRECATED void updateContents() {}
//! Whether to use a QPixmap or a QImage for the rendering private:
bool mUseQImageToRender;
QPixmap mPixmap;
QImage mImage; QImage mImage;
//QgsMapRenderer* mRender;
QgsMapCanvas* mCanvas;
QColor mBgColor;
QPoint mOffset;
}; };
#endif #endif
 End of changes. 19 change blocks. 
29 lines changed or deleted 32 lines changed or added


 qgsmaplayer.h   qgsmaplayer.h 
skipping to change at line 33 skipping to change at line 33
#include <QUndoStack> #include <QUndoStack>
#include <QVariant> #include <QVariant>
#include <QImage> #include <QImage>
#include <QDomNode> #include <QDomNode>
#include <QPainter> #include <QPainter>
#include "qgis.h" #include "qgis.h"
#include "qgserror.h" #include "qgserror.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include "qgsmaprenderer.h" #include "qgsmaprenderer.h"
#include "qgsobjectcustomproperties.h"
class QgsRenderContext; class QgsRenderContext;
class QgsCoordinateReferenceSystem; class QgsCoordinateReferenceSystem;
class QgsMapLayerRenderer;
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 131 skipping to change at line 133
/* Set the blending mode used for rendering a layer */ /* Set the blending mode used for rendering a layer */
void setBlendMode( const QPainter::CompositionMode &blendMode ); void setBlendMode( const QPainter::CompositionMode &blendMode );
/* Returns the current blending mode for a layer */ /* Returns the current blending mode for a layer */
QPainter::CompositionMode blendMode() const; QPainter::CompositionMode blendMode() const;
/**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() {}
/** Return new instance of QgsMapLayerRenderer that will be used for re
ndering of given context
* @note added in 2.4
*/
virtual QgsMapLayerRenderer* createMapRenderer( QgsRenderContext& rende
rerContext ) { Q_UNUSED( rendererContext ); return 0; }
/** 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.
*/ */
virtual bool draw( QgsRenderContext& rendererContext ); virtual bool draw( QgsRenderContext& rendererContext );
/** Draw labels /** Draw labels
* @todo to be removed: used only in vector layers * @todo to be removed: used only in vector layers
skipping to change at line 213 skipping to change at line 220
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
that they can write their own specific state to the given Dom node. that they can write their own specific state to the given Dom node.
Invoked by QgsProject::write(). Invoked by QgsProject::write().
@returns true if successful @returns true if successful
*/ */
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document ) ; bool writeLayerXML( QDomElement& layerElement, QDomDocument& document ) ;
/** Returns the given layer as a layer definition document
Layer definitions store the data source as well as styling and cust
om properties.
Layer definitions can be used to load a layer and styling all from
a single file.
*/
static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers );
/** Creates a new layer from a layer defininition document
*/
static QList<QgsMapLayer*> fromLayerDefinition( QDomDocument& document
);
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString qlrfi
le );
/** Set a custom property for layer. Properties are stored in a map and saved in project file. /** Set a custom property for layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */ * @note Added in v1.4 */
void setCustomProperty( const QString& key, const QVariant& value ); void setCustomProperty( const QString& key, const QVariant& value );
/** Read a custom property from layer. Properties are stored in a map a nd saved in project file. /** Read a custom property from layer. Properties are stored in a map a nd saved in project file.
* @note Added in v1.4 */ * @note Added in v1.4 */
QVariant customProperty( const QString& value, const QVariant& defaultV alue = QVariant() ) const; QVariant customProperty( const QString& value, const QVariant& defaultV alue = QVariant() ) const;
/** Remove a custom property from layer. Properties are stored in a map and saved in project file. /** Remove a custom property from layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */ * @note Added in v1.4 */
void removeCustomProperty( const QString& key ); void removeCustomProperty( const QString& key );
/** //! @deprecated since 2.4 - returns empty string
* If an operation returns 0 (e.g. draw()), this function Q_DECL_DEPRECATED virtual QString lastErrorTitle();
* returns the text of the error associated with the failure.
* Interactive users of this provider can then, for example,
* call a QMessageBox to display the contents.
*/
virtual QString lastErrorTitle();
/** //! @deprecated since 2.4 - returns empty string
* If an operation returns 0 (e.g. draw()), this function Q_DECL_DEPRECATED virtual QString lastError();
* returns the text of the error associated with the failure.
* Interactive users of this provider can then, for example,
* call a QMessageBox to display the contents.
*/
virtual QString lastError();
/** Get current status error. This error describes some principal probl em /** Get current status error. This error describes some principal probl em
* for which layer cannot work and thus is not valid. It is not last e rror * for which layer cannot work and thus is not valid. It is not last e rror
* after accessing data by draw() etc. * after accessing data by draw() etc.
*/ */
virtual QgsError error() const { return mError; } virtual QgsError error() const { return mError; }
/** 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
*/ */
skipping to change at line 359 skipping to change at line 368
* @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.
*/ */
virtual bool writeSymbology( QDomNode &node, QDomDocument& doc, QString & errorMessage ) const = 0; virtual bool writeSymbology( QDomNode &node, QDomDocument& doc, QString & errorMessage ) const = 0;
/** Return pointer to layer's undo stack */ /** Return pointer to layer's undo stack */
QUndoStack *undoStack(); QUndoStack *undoStack();
/** Get the QImage used for caching render operations /* Layer legendUrl information */
* @note This method was added in QGIS 1.4 **/ void setLegendUrl( const QString& legendUrl ) { mLegendUrl = legendUrl;
QImage *cacheImage() { return mpCacheImage; } }
/** Set the QImage used for caching render operations const QString& legendUrl() const { return mLegendUrl; }
* @note This method was added in QGIS 1.4 **/ void setLegendUrlFormat( const QString& legendUrlFormat ) { mLegendUrlF
void setCacheImage( QImage * thepImage ); ormat = legendUrlFormat; }
const QString& legendUrlFormat() const { return mLegendUrlFormat; }
/**
* @brief Is called when the cache image is being deleted. Overwrite an /** @deprecated since 2.4 - returns NULL */
d use to clean up. Q_DECL_DEPRECATED QImage *cacheImage() { return 0; }
* @note added in 2.0 /** @deprecated since 2.4 - caches listen to repaintRequested() signal
*/ to invalidate the cached image */
virtual void onCacheImageDelete() {} Q_DECL_DEPRECATED void setCacheImage( QImage * );
/** @deprecated since 2.4 - does nothing */
Q_DECL_DEPRECATED virtual void onCacheImageDelete() {}
public slots: public slots:
/** Event handler for when a coordinate transform fails due to bad vert ex error */ /** Event handler for when a coordinate transform fails due to bad vert ex error */
virtual void invalidTransformInput(); virtual void invalidTransformInput();
/** Accessor and mutator for the minimum scale denominator member */ /** Accessor and mutator for the minimum scale denominator member */
void setMinimumScale( float theMinScale ); void setMinimumScale( float theMinScale );
float minimumScale() const; float minimumScale() const;
/** Accessor and mutator for the maximum scale denominator member */ /** Accessor and mutator for the maximum scale denominator member */
void setMaximumScale( float theMaxScale ); void setMaximumScale( float theMaxScale );
float maximumScale() const; float maximumScale() const;
/** 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() const; bool hasScaleBasedVisibility() const;
/** Clear cached image /** Clear cached image
* added in 1.5 */ * @deprecated in 2.4 - caches listen to repaintRequested() signal to
void clearCacheImage(); invalidate the cached image */
Q_DECL_DEPRECATED void clearCacheImage();
/** \brief Obtain Metadata for this layer */ /** \brief Obtain Metadata for this layer */
virtual QString metadata(); 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 */ //! @deprecated in 2.4 - not emitted anymore
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 );
/** Emit a signal that the layer name has been changed */ /** Emit a signal that the layer name has been changed */
void layerNameChanged(); void layerNameChanged();
/** Emit a signal that layer's CRS has been reset /** Emit a signal that layer's CRS has been reset
added in 1.4 added in 1.4
*/ */
void layerCrsChanged(); void layerCrsChanged();
/** This signal should be connected with the slot QgsMapCanvas::refresh /** By emitting this signal the layer tells that either appearance or c
() ontent have been changed
* \todo to be removed - GUI dependency * and any view showing the rendered layer should refresh itself.
*/ */
void repaintRequested(); void repaintRequested();
/**The layer emits this signal when a screen update is requested. //! \note Deprecated in 2.4 and not emitted anymore
This signal should be connected with the slot QgsMapCanvas::updateMap(
)*/
void screenUpdateRequested(); void screenUpdateRequested();
/** This is used to send a request that any mapcanvas using this layer update its extents */ /** This is used to send a request that any mapcanvas using this layer update its extents */
void recalculateExtents(); void recalculateExtents();
/** data of layer changed /** data of layer changed
* added in 1.5 */ * added in 1.5 */
void dataChanged(); void dataChanged();
/** Signal emitted when the blend mode is changed, through QgsMapLayer: :setBlendMode() */ /** Signal emitted when the blend mode is changed, through QgsMapLayer: :setBlendMode() */
void blendModeChanged( const QPainter::CompositionMode &blendMode ); void blendModeChanged( const QPainter::CompositionMode &blendMode );
/** Signal emitted when renderer is changed */
void rendererChanged();
protected: protected:
/** Set the extent */ /** Set the extent */
virtual void setExtent( const QgsRectangle &rect ); virtual void setExtent( const QgsRectangle &rect );
/** 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 readLayerXML(), used by children to read state specific t o them from /** called by readLayerXML(), used by children to read state specific t o them from
project files. project files.
skipping to change at line 504 skipping to change at line 515
/**Attribution of the layer*/ /**Attribution of the layer*/
QString mAttribution; QString mAttribution;
QString mAttributionUrl; QString mAttributionUrl;
/**MetadataUrl of the layer*/ /**MetadataUrl of the layer*/
QString mMetadataUrl; QString mMetadataUrl;
QString mMetadataUrlType; QString mMetadataUrlType;
QString mMetadataUrlFormat; QString mMetadataUrlFormat;
/**WMS legend*/
QString mLegendUrl;
QString mLegendUrlFormat;
/** \brief Error */ /** \brief Error */
QgsError mError; QgsError mError;
private: private:
/** layer's spatial reference system. /** layer's spatial reference system.
private to make sure setCrs must be used and layerCrsChanged() is e mitted */ private to make sure setCrs must be used and layerCrsChanged() is e mitted */
QgsCoordinateReferenceSystem* mCRS; QgsCoordinateReferenceSystem* mCRS;
/** private copy constructor - QgsMapLayer not copyable */ /** private copy constructor - QgsMapLayer not copyable */
QgsMapLayer( QgsMapLayer const & ); QgsMapLayer( QgsMapLayer const & );
skipping to change at line 540 skipping to change at line 555
/** Minimum scale denominator at which this layer should be displayed * / /** Minimum scale denominator at which this layer should be displayed * /
float mMinScale; float mMinScale;
/** Maximum scale denominator at which this layer should be displayed * / /** Maximum scale denominator at which this layer should be displayed * /
float mMaxScale; float mMaxScale;
/** A flag that tells us whether to use the above vars to restrict laye r visibility */ /** A flag that tells us whether to use the above vars to restrict laye r visibility */
bool mScaleBasedVisibility; bool mScaleBasedVisibility;
/** Collection of undoable operations for this layer. **/ /** Collection of undoable operations for this layer. **/
QUndoStack mUndoStack; QUndoStack mUndoStack;
QMap<QString, QVariant> mCustomProperties; //! Layer's persistent storage of additional properties (may be used by
plugins)
/**QImage for caching of rendering operations QgsObjectCustomProperties mCustomProperties;
* @note This property was added in QGIS 1.4 **/
QImage * mpCacheImage;
}; };
#endif #endif
 End of changes. 14 change blocks. 
42 lines changed or deleted 62 lines changed or added


 qgsmaplayerregistry.h   qgsmaplayerregistry.h 
skipping to change at line 155 skipping to change at line 155
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
* caches are used to speed up rendering in certain situations * caches are used to speed up rendering in certain situations
* see ticket #1974 for more details. * see ticket #1974 for more details.
* *
* @note Added in QGIS 1.4 * @note Added in QGIS 1.4
*/ */
void clearAllLayerCaches(); //! @deprecated since 2.4 - does nothing
Q_DECL_DEPRECATED 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 Added in QGIS 1.6 * @note Added in QGIS 1.6
*/ */
void reloadAllLayers(); void reloadAllLayers();
signals: signals:
/** /**
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 qgsmapoverviewcanvas.h   qgsmapoverviewcanvas.h 
skipping to change at line 29 skipping to change at line 29
#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>
class QgsMapCanvas; class QgsMapCanvas;
class QgsMapRenderer;
class QgsPanningWidget; // defined in .cpp class QgsPanningWidget; // defined in .cpp
class QgsRectangle; class QgsRectangle;
class QgsMapRendererQImageJob;
#include "qgsmapsettings.h"
/** \ingroup gui /** \ingroup gui
* A widget that displays an overview map. * A widget that displays an overview map.
*/ */
class GUI_EXPORT QgsMapOverviewCanvas : public QWidget class GUI_EXPORT QgsMapOverviewCanvas : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsMapOverviewCanvas( QWidget * parent = 0, QgsMapCanvas* mapCanvas = N ULL ); QgsMapOverviewCanvas( QWidget * parent = 0, QgsMapCanvas* mapCanvas = N ULL );
~QgsMapOverviewCanvas(); ~QgsMapOverviewCanvas();
//! used for overview canvas to reflect changed extent in main map canv
as
void drawExtentRect();
//! renders overview and updates panning widget //! renders overview and updates panning widget
void refresh(); void refresh();
//! changes background color //! changes background color
void setBackgroundColor( const QColor& color ); void setBackgroundColor( const QColor& color );
//! updates layer set for overview //! updates layer set for overview
void setLayerSet( const QStringList& layerSet ); void setLayerSet( const QStringList& layerSet );
QStringList& layerSet(); QStringList layerSet() const;
void enableAntiAliasing( bool flag ) { mAntiAliasing = flag; } void enableAntiAliasing( bool flag ) { mSettings.setFlag( QgsMapSetting s::Antialiasing, flag ); }
void updateFullExtent(); void updateFullExtent();
public slots: public slots:
// ### QGIS 3: make protected
//! used for overview canvas to reflect changed extent in main map canv
as
void drawExtentRect();
// ### QGIS 3: rename so it does not look like getter, make protected
void hasCrsTransformEnabled( bool flag ); void hasCrsTransformEnabled( bool flag );
// ### QGIS 3: rename Srs to Crs, make protected
void destinationSrsChanged(); void destinationSrsChanged();
protected slots:
void mapRenderingFinished();
protected: protected:
//! Overridden paint event //! Overridden paint event
void paintEvent( QPaintEvent * pe ); void paintEvent( QPaintEvent * pe );
//! Overridden resize event //! Overridden resize event
void resizeEvent( QResizeEvent * e ); void resizeEvent( QResizeEvent * e );
//! Overridden mouse move event //! Overridden mouse move event
void mouseMoveEvent( QMouseEvent * e ); void mouseMoveEvent( QMouseEvent * e );
skipping to change at line 98 skipping to change at line 106
//! widget for panning map in overview //! widget for panning map in overview
QgsPanningWidget* mPanningWidget; QgsPanningWidget* mPanningWidget;
//! position of cursor inside panning widget //! position of cursor inside panning widget
QPoint mPanningCursorOffset; QPoint mPanningCursorOffset;
//! main map canvas - used to get/set extent //! main map canvas - used to get/set extent
QgsMapCanvas* mMapCanvas; QgsMapCanvas* mMapCanvas;
//! for rendering overview
QgsMapRenderer* mMapRenderer;
//! pixmap where the map is stored //! pixmap where the map is stored
QPixmap mPixmap; QPixmap mPixmap;
//! background color //! map settings used for rendering of the overview map
QColor mBgColor; QgsMapSettings mSettings;
//! indicates whether antialiasing will be used for rendering
bool mAntiAliasing;
//! resized canvas size //! for rendering overview
QSize mNewSize; QgsMapRendererQImageJob* mJob;
}; };
#endif #endif
 End of changes. 11 change blocks. 
17 lines changed or deleted 19 lines changed or added


 qgsmaprenderer.h   qgsmaprenderer.h 
skipping to change at line 29 skipping to change at line 29
#include <QMutex> #include <QMutex>
#include <QSize> #include <QSize>
#include <QStringList> #include <QStringList>
#include <QVector> #include <QVector>
#include <QPainter> #include <QPainter>
#include "qgis.h" #include "qgis.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include "qgsrendercontext.h" #include "qgsrendercontext.h"
#include "qgsfeature.h" #include "qgsfeature.h"
#include "qgsmapsettings.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;
skipping to change at line 75 skipping to change at line 76
/** Labeling engine interface. /** Labeling engine interface.
* \note Added in QGIS v1.4 * \note Added in QGIS v1.4
*/ */
class CORE_EXPORT QgsLabelingEngineInterface class CORE_EXPORT QgsLabelingEngineInterface
{ {
public: public:
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; //! @deprecated since 2.4 - use override with QgsMapSettings
Q_DECL_DEPRECATED virtual void init( QgsMapRenderer* mp ) = 0;
//! called when we're going to start with rendering
virtual void init( const QgsMapSettings& mapSettings ) = 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;
//! clears all PAL layer settings for registered layers //! clears all PAL layer settings for registered layers
//! @note: this method was added in version 1.9 //! @note: this method was added in version 1.9
virtual void clearActiveLayers() = 0; virtual void clearActiveLayers() = 0;
//! clears data defined objects from PAL layer settings for a registere d layer //! clears data defined objects from PAL layer settings for a registere d layer
//! @note: this method was added in version 1.9 //! @note: this method was added in version 1.9
virtual void clearActiveLayer( QgsVectorLayer* layer ) = 0; virtual void clearActiveLayer( const QString& layerID ) = 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, QStringList& attrNames , QgsRenderContext& ctx ) = 0;
//! returns PAL layer settings for a registered layer //! returns PAL layer settings for a registered layer
//! @note: this method was added in version 1.9 //! @note: this method was added in version 1.9
virtual QgsPalLayerSettings& layer( const QString& layerName ) = 0; virtual QgsPalLayerSettings& layer( const QString& layerName ) = 0;
//! adds a diagram layer to the labeling engine //! adds a diagram layer to the labeling engine
virtual int addDiagramLayer( QgsVectorLayer* layer, QgsDiagramLayerSett ings* s ) virtual int addDiagramLayer( QgsVectorLayer* layer, const QgsDiagramLay erSettings* s )
{ Q_UNUSED( layer ); Q_UNUSED( s ); return 0; } { 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( const QString& layerID, 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( const QString& layerID, QgsFeature
feat, const QgsRenderContext& context = QgsRenderContext() ) & feat, const QgsRenderContext& context = QgsRenderContext() )
{ Q_UNUSED( layer ); Q_UNUSED( feat ); Q_UNUSED( context ); } { Q_UNUSED( layerID ); 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 ) = //! @deprecated since 2.4 - use takeResults() and methods of QgsLabelin
0; gResults
Q_DECL_DEPRECATED virtual QList<QgsLabelPosition> labelsAtPosition( con
st QgsPoint& p ) = 0;
//! return infos about labels within a given (map) rectangle //! return infos about labels within a given (map) rectangle
//! @note: this method was added in version 1.9 //! @note: this method was added in version 1.9
virtual QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r //! @deprecated since 2.4 - use takeResults() and methods of QgsLabelin
) = 0; gResults
Q_DECL_DEPRECATED virtual QList<QgsLabelPosition> labelsWithinRect( con
st QgsRectangle& r ) = 0;
//! called when passing engine among map renderers //! called when passing engine among map renderers
virtual QgsLabelingEngineInterface* clone() = 0; virtual QgsLabelingEngineInterface* clone() = 0;
}; };
struct CORE_EXPORT QgsLayerCoordinateTransform struct CORE_EXPORT QgsLayerCoordinateTransform
{ {
QString srcAuthId; QString srcAuthId;
QString destAuthId; QString destAuthId;
int srcDatumTransform; //-1 if unknown or not specified int srcDatumTransform; //-1 if unknown or not specified
int destDatumTransform; int destDatumTransform;
}; };
// ### QGIS 3: remove QgsMapRenderer in favor of QgsMapRendererJob
/** \ingroup core /** \ingroup core
* A non GUI class for rendering a map layer set onto a QPainter. * A non GUI class for rendering a map layer set onto a QPainter.
*/ */
class CORE_EXPORT QgsMapRenderer : public QObject class CORE_EXPORT QgsMapRenderer : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
skipping to change at line 166 skipping to change at line 174
BlendSubtract BlendSubtract
}; };
//! constructor //! constructor
QgsMapRenderer(); QgsMapRenderer();
//! destructor //! destructor
~QgsMapRenderer(); ~QgsMapRenderer();
//! starts rendering //! starts rendering
//! @ param forceWidthScale Force a specific scale factor for line widt //! @param painter painter to render to
hs and marker sizes. Automatically calculated from output device DPI if 0 //! @param forceWidthScale Force a specific scale factor for line width
s and marker sizes. Automatically calculated from output device DPI if 0
void render( QPainter* painter, double* forceWidthScale = 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() ); }
//! Scale denominator //! Scale denominator
double scale() const { return mScale; } double scale() const { return mScale; }
/**Sets scale for scale based visibility. Normally, the scale is calcul ated automatically. This /**Sets scale for scale based visibility. Normally, the scale is calcul ated automatically. This
function is only used to force a preview scale (e.g. for print compose r)*/ function is only used to force a preview scale (e.g. for print compose r)*/
void setScale( double scale ) {mScale = scale;} void setScale( double scale ) {mScale = scale;}
double mapUnitsPerPixel() const { return mMapUnitsPerPixel; } double mapUnitsPerPixel() const { return mMapUnitsPerPixel; }
int width() const { return mSize.width(); }; int width() const { return ( int ) mSize.width(); }
int height() const { return mSize.height(); }; int height() const { return ( int ) mSize.height(); }
//! Recalculate the map scale //! Recalculate the map scale
void updateScale(); void updateScale();
QGis::UnitType mapUnits() const; QGis::UnitType mapUnits() const;
void setMapUnits( QGis::UnitType u ); void setMapUnits( QGis::UnitType u );
//! sets whether map image will be for overview //! sets whether map image will be for overview
void enableOverviewMode( bool isOverview = true ) { mOverview = isOverv iew; } void enableOverviewMode( bool isOverview = true ) { mOverview = isOverv iew; }
skipping to change at line 252 skipping to change at line 261
*/ */
QgsRectangle mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ); QgsRectangle mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRectangle rect );
//! sets whether to use projections for this layer set //! sets whether to use projections for this layer set
void setProjectionsEnabled( bool enabled ); void setProjectionsEnabled( bool enabled );
//! returns true if projections are enabled for this layer set //! returns true if projections are enabled for this layer set
bool hasCrsTransformEnabled() const; bool hasCrsTransformEnabled() const;
//! sets destination coordinate reference system //! sets destination coordinate reference system
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs, bool r efreshCoordinateTransformInfo = true ); void setDestinationCrs( const QgsCoordinateReferenceSystem& crs, bool r efreshCoordinateTransformInfo = true, bool transformExtent = true );
//! returns CRS of destination coordinate reference system //! returns CRS of destination coordinate reference system
const QgsCoordinateReferenceSystem& destinationCrs() const; const QgsCoordinateReferenceSystem& destinationCrs() const;
void setOutputUnits( OutputUnits u ) {mOutputUnits = u;} void setOutputUnits( OutputUnits u ) {mOutputUnits = u;}
OutputUnits outputUnits() const {return mOutputUnits;} OutputUnits outputUnits() const {return mOutputUnits;}
//! returns current extent of layer set //! returns current extent of layer set
QgsRectangle fullExtent(); QgsRectangle fullExtent();
skipping to change at line 303 skipping to change at line 312
static QPainter::CompositionMode getCompositionMode( const QgsMapRender er::BlendMode &blendMode ); static QPainter::CompositionMode getCompositionMode( const QgsMapRender er::BlendMode &blendMode );
//! Returns a BlendMode corresponding to a QPainter::CompositionMode //! Returns a BlendMode corresponding to a QPainter::CompositionMode
//! Added in 1.9 //! Added in 1.9
static QgsMapRenderer::BlendMode getBlendModeEnum( const QPainter::Comp ositionMode &blendMode ); static QgsMapRenderer::BlendMode getBlendModeEnum( const QPainter::Comp ositionMode &blendMode );
void addLayerCoordinateTransform( const QString& layerId, const QString & srcAuthId, const QString& destAuthId, int srcDatumTransform = -1, int des tDatumTransform = -1 ); void addLayerCoordinateTransform( const QString& layerId, const QString & srcAuthId, const QString& destAuthId, int srcDatumTransform = -1, int des tDatumTransform = -1 );
void clearLayerCoordinateTransforms(); void clearLayerCoordinateTransforms();
const QgsCoordinateTransform* transformation( const QgsMapLayer *layer ) const; const QgsCoordinateTransform* transformation( const QgsMapLayer *layer ) const;
//! bridge to QgsMapSettings
//! @note added in 2.4
const QgsMapSettings& mapSettings();
signals: signals:
//! @deprecated in 2.4 - not emitted anymore
void drawingProgress( int current, int total ); void drawingProgress( int current, int total );
/** This signal is emitted when CRS transformation is enabled/disabled. /** This signal is emitted when CRS transformation is enabled/disabled.
* @param flag true if transformation is enabled. * @param flag true if transformation is enabled.
* @deprecated Use hasCrsTransformEnabledChanged( bool flag ) * @deprecated Use hasCrsTransformEnabledChanged( bool flag )
* to avoid conflict with method of the same name). */ * to avoid conflict with method of the same name). */
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
Q_DECL_DEPRECATED Q_DECL_DEPRECATED
#endif #endif
void hasCrsTransformEnabled( bool flag ); void hasCrsTransformEnabled( bool flag );
/** This signal is emitted when CRS transformation is enabled/disabled. /** This signal is emitted when CRS transformation is enabled/disabled.
* @param flag true if transformation is enabled. * @param flag true if transformation is enabled.
* @note Added in 2.1 */ * @note Added in 2.4 */
void hasCrsTransformEnabledChanged( bool flag ); void hasCrsTransformEnabledChanged( bool flag );
void destinationSrsChanged(); void destinationSrsChanged();
//! @deprecated in 2.4 - not emitted anymore
void updateMap(); void updateMap();
void mapUnitsChanged(); void mapUnitsChanged();
//! emitted when layer's draw() returned false //! emitted when layer's draw() returned false
void drawError( QgsMapLayer* ); void drawError( QgsMapLayer* );
//! emitted when the current extent gets changed
//! @note added in 2.4
void extentsChanged();
//! Notifies higher level components to show the datum transform dialog and add a QgsLayerCoordinateTransformInfo for that layer //! Notifies higher level components to show the datum transform dialog and add a QgsLayerCoordinateTransformInfo for that layer
void datumTransformInfoRequested( const QgsMapLayer* ml, const QString& srcAuthId, const QString& destAuthId ) const; void datumTransformInfoRequested( const QgsMapLayer* ml, const QString& srcAuthId, const QString& destAuthId ) const;
public slots: public slots:
//! called by signal from layer current being drawn //! @deprecated in 2.4 - does nothing
void onDrawingProgress( int current, int total ); Q_DECL_DEPRECATED void onDrawingProgress( int current, int total );
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
skipping to change at line 405 skipping to change at line 424
//!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 //! Locks rendering loop for concurrent draws
QMutex mRenderMutex; QMutex mRenderMutex;
//! map settings - used only for export in mapSettings() for use in cla
sses that deal with QgsMapSettings
QgsMapSettings mMapSettings;
QHash< QString, QgsLayerCoordinateTransform > mLayerCoordinateTransform Info; QHash< QString, QgsLayerCoordinateTransform > mLayerCoordinateTransform Info;
}; };
#endif #endif
 End of changes. 20 change blocks. 
20 lines changed or deleted 45 lines changed or added


 qgsmaptool.h   qgsmaptool.h 
skipping to change at line 20 skipping to change at line 20
* 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 QGSMAPTOOL_H #ifndef QGSMAPTOOL_H
#define QGSMAPTOOL_H #define QGSMAPTOOL_H
#include "qgsconfig.h" #include "qgsconfig.h"
#include "qgsmessagebar.h"
#include <QCursor> #include <QCursor>
#include <QString> #include <QString>
#include <QObject> #include <QObject>
#ifdef HAVE_TOUCH #ifdef HAVE_TOUCH
#include <QGestureEvent> #include <QGestureEvent>
#endif #endif
class QgsMapLayer; class QgsMapLayer;
class QgsMapCanvas; class QgsMapCanvas;
class QgsRenderContext;
class QKeyEvent; class QKeyEvent;
class QMouseEvent; class QMouseEvent;
class QWheelEvent; class QWheelEvent;
class QgsPoint; class QgsPoint;
class QgsRectangle; class QgsRectangle;
class QPoint; class QPoint;
class QAction; class QAction;
class QAbstractButton; class QAbstractButton;
/** \ingroup gui /** \ingroup gui
* Abstract base class for all map tools. * Abstract base class for all map tools.
* Map tools are user interactive tools for manipulating the * Map tools are user interactive tools for manipulating the
* map canvas. For example map pan and zoom features are * map canvas. For example map pan and zoom features are
* implemented as map tools. * implemented as map tools.
*/ */
class GUI_EXPORT QgsMapTool : public QObject class GUI_EXPORT QgsMapTool : public QObject
{ {
Q_OBJECT
public: public:
//! virtual destructor //! virtual destructor
virtual ~QgsMapTool(); virtual ~QgsMapTool();
//! Mouse move event for overriding. Default implementation does nothin g. //! Mouse move event for overriding. Default implementation does nothin g.
virtual void canvasMoveEvent( QMouseEvent * e ); virtual void canvasMoveEvent( QMouseEvent * e );
//! Mouse double click event for overriding. Default implementation doe s nothing. //! Mouse double click event for overriding. Default implementation doe s nothing.
virtual void canvasDoubleClickEvent( QMouseEvent * e ); virtual void canvasDoubleClickEvent( QMouseEvent * e );
skipping to change at line 82 skipping to change at line 87
//! 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 #ifdef HAVE_TOUCH
//! gesture event for overriding. Default implementation does nothing. //! gesture event for overriding. Default implementation does nothing.
virtual bool gestureEvent( QGestureEvent* e ); virtual bool gestureEvent( QGestureEvent* e );
#endif #endif
//! Called when rendering has finished. Default implementation does not hing. //! Called when rendering has finished. Default implementation does not hing.
virtual void renderComplete(); //! @deprecated since 2.4 - not called anymore - map tools must not dir
ectly depend on rendering progress
Q_DECL_DEPRECATED 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 */
QAction* action(); QAction* action();
skipping to change at line 122 skipping to change at line 128
//! called when set as currently active map tool //! called when set as currently active map tool
virtual void activate(); virtual void activate();
//! called when map tool is being deactivated //! called when map tool is being deactivated
virtual void deactivate(); virtual void deactivate();
//! returns pointer to the tool's map canvas //! returns pointer to the tool's map canvas
QgsMapCanvas* canvas(); QgsMapCanvas* canvas();
//! Emit map tool changed with the old tool
//! @note added in 2.3
QString toolName() { return mToolName; }
/** Get search radius in mm. Used by identify, tip etc.
* The values is currently set in identify tool options (move somewher
e else?)
* and defaults to QGis::DEFAULT_SEARCH_RADIUS_MM.
* @note added in 2.3 */
static double searchRadiusMM();
/** Get search radius in map units for given context. Used by identify,
tip etc.
* The values is calculated from searchRadiusMM().
* @note added in 2.3 */
static double searchRadiusMU( const QgsRenderContext& context );
/** Get search radius in map units for given canvas. Used by identify,
tip etc.
* The values is calculated from searchRadiusMM().
* @note added in 2.3 */
static double searchRadiusMU( QgsMapCanvas * canvas );
signals:
//! emit a message
void messageEmitted( QString message, QgsMessageBar::MessageLevel = Qgs
MessageBar::INFO );
//! emit signal to clear previous message
void messageDiscarded();
private slots:
//! clear pointer when action is destroyed
void actionDestroyed();
protected: protected:
//! constructor takes map canvas as a parameter //! constructor takes map canvas as a parameter
QgsMapTool( QgsMapCanvas* canvas ); QgsMapTool( QgsMapCanvas* canvas );
//! transformation from screen coordinates to map coordinates //! transformation from screen coordinates to map coordinates
QgsPoint toMapCoordinates( const QPoint& point ); QgsPoint toMapCoordinates( const QPoint& point );
//! transformation from screen coordinates to layer's coordinates //! transformation from screen coordinates to layer's coordinates
QgsPoint toLayerCoordinates( QgsMapLayer* layer, const QPoint& point ); QgsPoint toLayerCoordinates( QgsMapLayer* layer, const QPoint& point );
skipping to change at line 159 skipping to change at line 196
QCursor mCursor; QCursor mCursor;
//! optionally map tool can have pointer to action //! optionally map tool can have pointer to action
//! which will be used to set that action as active //! which will be used to set that action as active
QAction* mAction; QAction* mAction;
//! optionally map tool can have pointer to a button //! optionally map tool can have pointer to a button
//! which will be used to set that action as active //! which will be used to set that action as active
QAbstractButton* mButton; QAbstractButton* mButton;
//! translated name of the map tool
QString mToolName;
}; };
#endif #endif
 End of changes. 6 change blocks. 
1 lines changed or deleted 45 lines changed or added


 qgsmaptoolidentify.h   qgsmaptoolidentify.h 
skipping to change at line 41 skipping to change at line 41
class QgsMapLayer; class QgsMapLayer;
class QgsMapCanvas; class QgsMapCanvas;
class QgsHighlight; class QgsHighlight;
/** /**
\brief Map tool for identifying features in layers \brief Map tool for identifying features in layers
after selecting a point, performs the identification: after selecting a point, performs the identification:
- for raster layers shows value of underlying pixel - for raster layers shows value of underlying pixel
- for vector layers shows feature attributes within search radius - for vector layers shows feature attributes within search radius
(allows to edit values when vector layer is in editing mode) (allows editing values when vector layer is in editing mode)
*/ */
class GUI_EXPORT QgsMapToolIdentify : public QgsMapTool class GUI_EXPORT QgsMapToolIdentify : public QgsMapTool
{ {
Q_OBJECT Q_OBJECT
public: public:
enum IdentifyMode enum IdentifyMode
{ {
DefaultQgsSetting = -1, DefaultQgsSetting = -1,
skipping to change at line 129 skipping to change at line 129
@param layerType Only performs identification in a certain type of laye rs (raster, vector). Default value is AllLayers. @param layerType Only performs identification in a certain type of laye rs (raster, vector). Default value is AllLayers.
@return a list of IdentifyResult*/ @return a list of IdentifyResult*/
QList<IdentifyResult> identify( int x, int y, IdentifyMode mode, LayerT ype layerType = AllLayers ); QList<IdentifyResult> identify( int x, int y, IdentifyMode mode, LayerT ype layerType = AllLayers );
protected: protected:
//! rubber bands for layer select mode //! rubber bands for layer select mode
void deleteRubberBands(); void deleteRubberBands();
public slots: public slots:
void formatChanged( QgsRasterLayer *layer ); void formatChanged( QgsRasterLayer *layer );
void layerDestroyed();
signals: signals:
void identifyProgress( int, int ); void identifyProgress( int, int );
void identifyMessage( QString ); void identifyMessage( QString );
void changedRasterResults( QList<IdentifyResult>& ); void changedRasterResults( QList<IdentifyResult>& );
private: private:
/** Performs the identification. /** Performs the identification.
To avoid beeing forced to specify IdentifyMode with a list of layers To avoid beeing forced to specify IdentifyMode with a list of layers
this has been made private and two publics methods are offered this has been made private and two publics methods are offered
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 qgsmaptopixel.h   qgsmaptopixel.h 
skipping to change at line 69 skipping to change at line 69
/*! Tranform device coordinates to map (world) coordinates /*! Tranform device coordinates to map (world) coordinates
* @param x x coordinate of point to be converted to map cooordinates * @param x x coordinate of point to be converted to map cooordinates
* @param y y coordinate of point to be converted to map cooordinates * @param y y coordinate of point to be converted to map cooordinates
* @return QgsPoint in map coordinates * @return QgsPoint in map coordinates
*/ */
/* 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( double& x, double& y ) const; void transformInPlace( double& x, double& y ) const;
#ifdef QT_ARCH_ARM
void transformInPlace( qreal& x, qreal& y ) const;
#endif
/* 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.
@note not available in python bindings @note not available in python bindings
*/ */
void transformInPlace( QVector<double>& x, QVector<double>& y ) const; void transformInPlace( QVector<double>& x, QVector<double>& y ) const;
#ifdef ANDROID #ifdef ANDROID
void transformInPlace( float& x, float& y ) const; void transformInPlace( float& x, float& y ) const;
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 qgsmarkersymbollayerv2.h   qgsmarkersymbollayerv2.h 
/************************************************************************** * /************************************************************************** *
qgsmarkersymbollayerv2.h qgsmarkersymbollayerv2.h
--------------------- ---------------------
begin : November 2009 begin : November 2009
copyright : (C) 2009 by Martin Dobias copyright : (C) 2009 by Martin Dobias
email : wonder dot sk at gmail dot com email : wonder dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSMARKERSYMBOLLAYERV2_H #ifndef QGSMARKERSYMBOLLAYERV2_H
skipping to change at line 93 skipping to change at line 93
/** Get fill color. /** Get fill color.
* @note added in 2.1 */ * @note added in 2.1 */
QColor fillColor() const { return color(); } QColor fillColor() const { return color(); }
/** Set fill color. /** Set fill color.
* @note added in 2.1 */ * @note added in 2.1 */
void setFillColor( const QColor& color ) { setColor( color ); } void setFillColor( const QColor& color ) { setColor( color ); }
double outlineWidth() const { return mOutlineWidth; } double outlineWidth() const { return mOutlineWidth; }
void setOutlineWidth( double w ) { mOutlineWidth = w; } void setOutlineWidth( double w ) { mOutlineWidth = w; }
QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidth Unit; }
void setOutlineWidthUnit( QgsSymbolV2::OutputUnit u ) { mOutlineWidthUn it = u; } void setOutlineWidthUnit( QgsSymbolV2::OutputUnit u ) { mOutlineWidthUn it = u; }
QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidth
Unit; }
void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mOut
lineWidthMapUnitScale = scale; }
const QgsMapUnitScale& outlineWidthMapUnitScale() const { return mOutli
neWidthMapUnitScale; }
bool writeDxf( QgsDxfExport& e, double mmMapUnitScaleFactor, const QStr ing& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature* f, const QPointF& shift = QPointF( 0.0, 0.0 ) ) const; bool writeDxf( QgsDxfExport& e, double mmMapUnitScaleFactor, const QStr ing& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature* f, const QPointF& shift = QPointF( 0.0, 0.0 ) ) const;
protected: void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
protected:
void drawMarker( QPainter* p, QgsSymbolV2RenderContext& context ); void drawMarker( QPainter* p, QgsSymbolV2RenderContext& context );
bool prepareShape( QString name = QString() ); bool prepareShape( QString name = QString() );
bool preparePath( QString name = QString() ); bool preparePath( QString name = QString() );
/**Prepares cache image /**Prepares cache image
@return true in case of success, false if cache image size too large*/ @return true in case of success, false if cache image size too large*/
bool prepareCache( QgsSymbolV2RenderContext& context ); bool prepareCache( QgsSymbolV2RenderContext& context );
QColor mBorderColor; QColor mBorderColor;
Qt::PenStyle mOutlineStyle; Qt::PenStyle mOutlineStyle;
double mOutlineWidth; double mOutlineWidth;
QgsSymbolV2::OutputUnit mOutlineWidthUnit; QgsSymbolV2::OutputUnit mOutlineWidthUnit;
QgsMapUnitScale mOutlineWidthMapUnitScale;
QPen mPen; QPen mPen;
QBrush mBrush; QBrush mBrush;
QPolygonF mPolygon; QPolygonF mPolygon;
QPainterPath mPath; QPainterPath mPath;
QString mName; QString mName;
QImage mCache; QImage mCache;
QPen mSelPen; QPen mSelPen;
QBrush mSelBrush; QBrush mSelBrush;
QImage mSelCache; QImage mSelCache;
bool mUsingCache; bool mUsingCache;
skipping to change at line 143 skipping to change at line 152
#define DEFAULT_SVGMARKER_NAME "/crosses/Star1.svg" #define DEFAULT_SVGMARKER_NAME "/crosses/Star1.svg"
#define DEFAULT_SVGMARKER_SIZE 2*DEFAULT_POINT_SIZE #define DEFAULT_SVGMARKER_SIZE 2*DEFAULT_POINT_SIZE
#define DEFAULT_SVGMARKER_ANGLE 0 #define DEFAULT_SVGMARKER_ANGLE 0
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,
QgsSymbolV2::ScaleMethod scaleMethod = DEFAU
LT_SCALE_METHOD );
// 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 ); static QgsSymbolLayerV2* createFromSld( QDomElement &element );
// implemented from base classes // implemented from base classes
QString layerType() const; QString layerType() const;
skipping to change at line 181 skipping to change at line 191
QColor outlineColor() const { return mOutlineColor; } QColor outlineColor() const { return mOutlineColor; }
void setOutlineColor( const QColor& c ) { mOutlineColor = c; } void setOutlineColor( const QColor& c ) { mOutlineColor = c; }
double outlineWidth() const { return mOutlineWidth; } double outlineWidth() const { return mOutlineWidth; }
void setOutlineWidth( double w ) { mOutlineWidth = w; } void setOutlineWidth( double w ) { mOutlineWidth = w; }
void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mOutlineWidt hUnit = unit; } void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit ) { mOutlineWidt hUnit = unit; }
QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidth Unit; } QgsSymbolV2::OutputUnit outlineWidthUnit() const { return mOutlineWidth Unit; }
void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale ) { mOut
lineWidthMapUnitScale = scale; }
const QgsMapUnitScale& outlineWidthMapUnitScale() const { return mOutli
neWidthMapUnitScale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
bool writeDxf( QgsDxfExport& e, double mmMapUnitScaleFactor, const QStr ing& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature* f, const QPointF& shift = QPointF( 0.0, 0.0 ) ) const; bool writeDxf( QgsDxfExport& e, double mmMapUnitScaleFactor, const QStr ing& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature* f, const QPointF& shift = QPointF( 0.0, 0.0 ) ) const;
protected: protected:
QString mPath; QString mPath;
//param(fill), param(outline), param(outline-width) are going //param(fill), param(outline), param(outline-width) are going
//to be replaced in memory //to be replaced in memory
QColor mFillColor; QColor mFillColor;
QColor mOutlineColor; QColor mOutlineColor;
double mOutlineWidth; double mOutlineWidth;
QgsSymbolV2::OutputUnit mOutlineWidthUnit; QgsSymbolV2::OutputUnit mOutlineWidthUnit;
QgsMapUnitScale mOutlineWidthMapUnitScale;
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')
 End of changes. 10 change blocks. 
8 lines changed or deleted 31 lines changed or added


 qgsmessagelogviewer.h   qgsmessagelogviewer.h 
skipping to change at line 39 skipping to change at line 39
class QHideEvent; class QHideEvent;
/** \ingroup gui /** \ingroup gui
* A generic message for displaying QGIS log messages. * A generic message for displaying QGIS log messages.
* \note added in 1.8 * \note added in 1.8
*/ */
class GUI_EXPORT QgsMessageLogViewer: public QDialog, private Ui::QgsMessag eLogViewer class GUI_EXPORT QgsMessageLogViewer: public QDialog, private Ui::QgsMessag eLogViewer
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsMessageLogViewer( QStatusBar *statusBar = 0, QWidget *parent = 0, Qt ::WFlags fl = QgisGui::ModalDialogFlags ); QgsMessageLogViewer( QStatusBar *statusBar = 0, QWidget *parent = 0, Qt ::WindowFlags fl = QgisGui::ModalDialogFlags );
~QgsMessageLogViewer(); ~QgsMessageLogViewer();
//! @note added in 2.4
void setShowToolTips( bool enabled ) { mShowToolTips = enabled; }
//! @note added in 2.4
bool showToolTips() const { return mShowToolTips; }
public slots: public slots:
void logMessage( QString message, QString tag, QgsMessageLog::MessageLe vel level ); void logMessage( QString message, QString tag, QgsMessageLog::MessageLe vel level );
protected: protected:
void showEvent( QShowEvent * ); void showEvent( QShowEvent * );
void hideEvent( QHideEvent * ); void hideEvent( QHideEvent * );
private: private:
QToolButton *mButton; QToolButton *mButton;
int mCount; int mCount;
bool mShowToolTips;
private slots: private slots:
void closeTab( int index ); void closeTab( int index );
void buttonToggled( bool checked ); void buttonToggled( bool checked );
void buttonDestroyed(); void buttonDestroyed();
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added


 qgsmessageviewer.h   qgsmessageviewer.h 
skipping to change at line 33 skipping to change at line 33
#include <QString> #include <QString>
/** \ingroup gui /** \ingroup gui
* A generic message view for displaying QGIS messages. * A generic message view for displaying QGIS messages.
*/ */
class GUI_EXPORT QgsMessageViewer: public QDialog, public QgsMessageOutput, private Ui::QgsMessageViewer class GUI_EXPORT QgsMessageViewer: public QDialog, public QgsMessageOutput, private Ui::QgsMessageViewer
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsMessageViewer( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDi alogFlags, bool deleteOnClose = true ); QgsMessageViewer( QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::Mo dalDialogFlags, bool deleteOnClose = true );
~QgsMessageViewer(); ~QgsMessageViewer();
virtual void setMessage( const QString& message, MessageType msgType ); virtual void setMessage( const QString& message, MessageType msgType );
virtual void appendMessage( const QString& message ); virtual void appendMessage( const QString& message );
virtual void showMessage( bool blocking = true ); virtual void showMessage( bool blocking = true );
virtual void setTitle( const QString& title ); virtual void setTitle( const QString& title );
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsnetworkaccessmanager.h   qgsnetworkaccessmanager.h 
skipping to change at line 27 skipping to change at line 27
#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>
#include <QNetworkRequest> #include <QNetworkRequest>
class QTimer;
/* /*
* \class QgsNetworkAccessManager * \class QgsNetworkAccessManager
* \brief network access manager for QGIS * \brief network access manager for QGIS
* \ingroup core * \ingroup core
* \since 1.5 * \since 1.5
* *
* This class implements the QGIS network access manager. It's a singleton * This class implements the QGIS network access manager. It's a singleton
* that can be used across QGIS. * that can be used across QGIS.
* *
* Plugins can insert proxy factories and thereby redirect requests to * Plugins can insert proxy factories and thereby redirect requests to
skipping to change at line 55 skipping to change at line 53
*/ */
class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager
{ {
Q_OBJECT Q_OBJECT
public: public:
//! returns a pointer to the single instance //! returns a pointer to the single instance
// and creates that instance on the first call. // and creates that instance on the first call.
static QgsNetworkAccessManager *instance(); static QgsNetworkAccessManager *instance();
QgsNetworkAccessManager( QObject *parent = 0 );
//! destructor //! destructor
~QgsNetworkAccessManager(); ~QgsNetworkAccessManager();
//! insert a factory into the proxy factories list //! insert a factory into the proxy factories list
void insertProxyFactory( QNetworkProxyFactory *factory ); void insertProxyFactory( QNetworkProxyFactory *factory );
//! remove a factory from the proxy factories list //! remove a factory from the proxy factories list
void removeProxyFactory( QNetworkProxyFactory *factory ); void removeProxyFactory( QNetworkProxyFactory *factory );
//! retrieve proxy factory list //! retrieve proxy factory list
skipping to change at line 82 skipping to change at line 82
//! set fallback proxy and URL that shouldn't use it. //! set fallback proxy and URL that shouldn't use it.
void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QSt ringList &excludes ); void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QSt ringList &excludes );
//! Get name for QNetworkRequest::CacheLoadControl //! Get name for QNetworkRequest::CacheLoadControl
static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl theControl ); static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl theControl );
//! Get QNetworkRequest::CacheLoadControl from name //! Get QNetworkRequest::CacheLoadControl from name
static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( cons t QString &theName ); static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( cons t QString &theName );
//! Setup the NAM according to the user's settings
void setupDefaultProxyAndCache();
bool useSystemProxy() { return mUseSystemProxy; }
signals: signals:
void requestAboutToBeCreated( QNetworkAccessManager::Operation, const Q NetworkRequest &, QIODevice * ); void requestAboutToBeCreated( QNetworkAccessManager::Operation, const Q NetworkRequest &, QIODevice * );
void requestCreated( QNetworkReply * ); void requestCreated( QNetworkReply * );
void requestTimedOut( QNetworkReply * );
private slots: private slots:
void connectionProgress();
void connectionDestroyed( QObject* );
void abortRequest(); void abortRequest();
protected: protected:
virtual QNetworkReply *createRequest( QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0 ); virtual QNetworkReply *createRequest( QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0 );
private: private:
QgsNetworkAccessManager( QObject *parent = 0 );
QList<QNetworkProxyFactory*> mProxyFactories; QList<QNetworkProxyFactory*> mProxyFactories;
QNetworkProxy mFallbackProxy; QNetworkProxy mFallbackProxy;
QStringList mExcludedURLs; QStringList mExcludedURLs;
bool mUseSystemProxy;
QMap<QNetworkReply*, QTimer*> mActiveRequests;
}; };
#endif // QGSNETWORKACCESSMANAGER_H #endif // QGSNETWORKACCESSMANAGER_H
 End of changes. 7 change blocks. 
7 lines changed or deleted 9 lines changed or added


 qgsnewhttpconnection.h   qgsnewhttpconnection.h 
skipping to change at line 32 skipping to change at line 32
/*! /*!
* \brief Dialog to allow the user to configure and save connection * \brief Dialog to allow the user to configure and save connection
* information for an HTTP Server for WMS, etc. * information for an HTTP Server for WMS, etc.
*/ */
class GUI_EXPORT QgsNewHttpConnection : public QDialog, private Ui::QgsNewH ttpConnectionBase class GUI_EXPORT QgsNewHttpConnection : public QDialog, private Ui::QgsNewH ttpConnectionBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! Constructor //! Constructor
QgsNewHttpConnection( QWidget *parent = 0, const QString& baseKey = "/Q gis/connections-wms/", const QString& connName = QString::null, Qt::WFlags fl = QgisGui::ModalDialogFlags ); QgsNewHttpConnection( QWidget *parent = 0, const QString& baseKey = "/Q gis/connections-wms/", const QString& connName = QString::null, Qt::WindowF lags fl = QgisGui::ModalDialogFlags );
//! Destructor //! Destructor
~QgsNewHttpConnection(); ~QgsNewHttpConnection();
public slots: public slots:
//! Saves the connection to ~/.qt/qgisrc //! Saves the connection to ~/.qt/qgisrc
void accept(); void accept();
void on_txtName_textChanged( const QString & ); void on_txtName_textChanged( const QString & );
void on_txtUrl_textChanged( const QString & ); void on_txtUrl_textChanged( const QString & );
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsnewvectorlayerdialog.h   qgsnewvectorlayerdialog.h 
skipping to change at line 32 skipping to change at line 32
#include "qgscontexthelp.h" #include "qgscontexthelp.h"
#include "qgis.h" #include "qgis.h"
class GUI_EXPORT QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNe wVectorLayerDialogBase class GUI_EXPORT QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNe wVectorLayerDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
// run the dialog, create the layer. Return file name if the creation w // run the dialog, create the layer.
as successful // @return fileName on success, empty string use aborted, QString::null
if creation failed
static QString runAndCreateLayer( QWidget* parent = 0, QString* enc = 0 ); static QString runAndCreateLayer( QWidget* parent = 0, QString* enc = 0 );
QgsNewVectorLayerDialog( QWidget *parent = 0, Qt::WFlags fl = QgisGui:: ModalDialogFlags ); QgsNewVectorLayerDialog( QWidget *parent = 0, Qt::WindowFlags fl = Qgis Gui::ModalDialogFlags );
~QgsNewVectorLayerDialog(); ~QgsNewVectorLayerDialog();
/**Returns the selected geometry type*/ /**Returns the selected geometry type*/
QGis::WkbType selectedType() const; QGis::WkbType selectedType() const;
/**Appends the chosen attribute names and types to at*/ /**Appends the chosen attribute names and types to at*/
void attributes( QList< QPair<QString, QString> >& at ) const; void attributes( QList< QPair<QString, QString> >& at ) const;
/**Returns the file format for storage*/ /**Returns the file format for storage*/
QString selectedFileFormat() const; QString selectedFileFormat() const;
/**Returns the file format for storage*/
QString selectedFileEncoding() const;
/**Returns the selected crs id*/ /**Returns the selected crs id*/
int selectedCrsId() const; int selectedCrsId() const;
protected slots: protected slots:
void on_mAddAttributeButton_clicked(); void on_mAddAttributeButton_clicked();
void on_mRemoveAttributeButton_clicked(); void on_mRemoveAttributeButton_clicked();
void on_mFileFormatComboBox_currentIndexChanged( int index );
void on_mTypeBox_currentIndexChanged( int index ); void on_mTypeBox_currentIndexChanged( int index );
void on_pbnChangeSpatialRefSys_clicked(); void on_pbnChangeSpatialRefSys_clicked();
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()-> className() ); } void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()-> className() ); }
void nameChanged( QString ); void nameChanged( QString );
void selectionChanged(); void selectionChanged();
private: private:
QPushButton *mOkButton; QPushButton *mOkButton;
int mCrsId; int mCrsId;
}; };
 End of changes. 4 change blocks. 
3 lines changed or deleted 7 lines changed or added


 qgsoptionsdialogbase.h   qgsoptionsdialogbase.h 
skipping to change at line 23 skipping to change at line 23
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSOPTIONSDIALOGBASE_H #ifndef QGSOPTIONSDIALOGBASE_H
#define QGSOPTIONSDIALOGBASE_H #define QGSOPTIONSDIALOGBASE_H
#include "qgisgui.h" #include "qgisgui.h"
#include <QDialog> #include <QDialog>
#include <QPointer>
#include <QSettings>
class QDialogButtonBox; class QDialogButtonBox;
class QListWidget; class QListWidget;
class QStackedWidget; class QStackedWidget;
class QSplitter; class QSplitter;
/** \ingroup gui /** \ingroup gui
* \class QgsOptionsDialogBase * \class QgsOptionsDialogBase
* A base dialog for options and properties dialogs that offers vertical ta bs. * A base dialog for options and properties dialogs that offers vertical ta bs.
* It handles saving/restoring of geometry, splitter and current tab states , * It handles saving/restoring of geometry, splitter and current tab states ,
skipping to change at line 56 skipping to change at line 58
class GUI_EXPORT QgsOptionsDialogBase : public QDialog class GUI_EXPORT QgsOptionsDialogBase : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
/** Constructor /** Constructor
* @param settingsKey QSettings subgroup key for saving/restore ui stat es, e.g. "ProjectProperties". * @param settingsKey QSettings subgroup key for saving/restore ui stat es, e.g. "ProjectProperties".
* @param parent parent object (owner) * @param parent parent object (owner)
* @param fl widget flags * @param fl widget flags
* @param settings custom QSettings pointer
*/ */
QgsOptionsDialogBase( QString settingsKey, QWidget* parent = 0, Qt::WFl ags fl = 0 ); QgsOptionsDialogBase( QString settingsKey, QWidget* parent = 0, Qt::Win dowFlags fl = 0, QSettings* settings = 0 );
~QgsOptionsDialogBase(); ~QgsOptionsDialogBase();
/** Set up the base ui connections for vertical tabs. /** Set up the base ui connections for vertical tabs.
* @param restoreUi Whether to restore the base ui at this time. * @param restoreUi Whether to restore the base ui at this time.
* @param title the window title * @param title the window title
*/ */
void initOptionsBase( bool restoreUi = true, QString title = QString() ); void initOptionsBase( bool restoreUi = true, QString title = QString() );
// set custom QSettings pointer if dialog used outside QGIS (in plugin)
void setSettings( QSettings* settings );
/** Restore the base ui. /** Restore the base ui.
* Sometimes useful to do at end of subclass's constructor. * Sometimes useful to do at end of subclass's constructor.
* @param title the window title (it does not need to be defined if pre viously given to initOptionsBase(); * @param title the window title (it does not need to be defined if pre viously given to initOptionsBase();
*/ */
void restoreOptionsBaseUi( QString title = QString() ); void restoreOptionsBaseUi( QString title = QString() );
/** determine if the options list is in icon only mode /** determine if the options list is in icon only mode
*/ */
bool iconOnly() {return mIconOnly;} bool iconOnly() {return mIconOnly;}
skipping to change at line 96 skipping to change at line 102
virtual void updateWindowTitle(); virtual void updateWindowTitle();
QString mOptsKey; QString mOptsKey;
bool mInit; bool mInit;
QListWidget* mOptListWidget; QListWidget* mOptListWidget;
QStackedWidget* mOptStackedWidget; QStackedWidget* mOptStackedWidget;
QSplitter* mOptSplitter; QSplitter* mOptSplitter;
QDialogButtonBox* mOptButtonBox; QDialogButtonBox* mOptButtonBox;
QString mDialogTitle; QString mDialogTitle;
bool mIconOnly; bool mIconOnly;
// pointer to app or custom, external QSettings
// QPointer in case custom settings obj gets deleted while dialog is op
en
QPointer<QSettings> mSettings;
bool mDelSettings;
}; };
#endif // QGSOPTIONSDIALOGBASE_H #endif // QGSOPTIONSDIALOGBASE_H
 End of changes. 5 change blocks. 
1 lines changed or deleted 12 lines changed or added


 qgsowssourceselect.h   qgsowssourceselect.h 
skipping to change at line 62 skipping to change at line 62
public: public:
/** Formats supported by provider */ /** Formats supported by provider */
struct SupportedFormat struct SupportedFormat
{ {
QString format; QString format;
QString label; QString label;
}; };
//! Constructor //! Constructor
QgsOWSSourceSelect( QString service, QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags, bool managerMode = false, bool embeddedMode = false ); QgsOWSSourceSelect( QString service, QWidget *parent = 0, Qt::WindowFla gs fl = QgisGui::ModalDialogFlags, bool managerMode = false, bool embeddedM ode = false );
//! Destructor //! Destructor
~QgsOWSSourceSelect(); ~QgsOWSSourceSelect();
public slots: public slots:
//! Opens the create connection dialog to build a new connection //! Opens the create connection dialog to build a new connection
void on_mNewButton_clicked(); void on_mNewButton_clicked();
//! Opens a dialog to edit an existing connection //! Opens a dialog to edit an existing connection
void on_mEditButton_clicked(); void on_mEditButton_clicked();
//! Deletes the selected connection //! Deletes the selected connection
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgspallabeling.h   qgspallabeling.h 
/************************************************************************** * /************************************************************************** *
qgspallabeling.h qgspallabeling.h
Smart labeling for vector layers Smart labeling for vector layers
------------------- -------------------
begin : June 2009 begin : June 2009
copyright : (C) Martin Dobias copyright : (C) Martin Dobias
email : wonder dot sk at gmail dot com email : wonder dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
skipping to change at line 33 skipping to change at line 33
class QFontMetricsF; class QFontMetricsF;
class QPainter; class QPainter;
class QPicture; class QPicture;
class QgsGeometry; class QgsGeometry;
class QgsMapRenderer; class QgsMapRenderer;
class QgsRectangle; class QgsRectangle;
class QgsCoordinateTransform; class QgsCoordinateTransform;
class QgsLabelSearchTree; class QgsLabelSearchTree;
class QgsMapSettings;
#include <QString> #include <QString>
#include <QFont> #include <QFont>
#include <QFontDatabase> #include <QFontDatabase>
#include <QColor> #include <QColor>
#include <QHash> #include <QHash>
#include <QList> #include <QList>
#include <QRectF> #include <QRectF>
namespace pal namespace pal
{ {
skipping to change at line 57 skipping to change at line 59
class QgsMapToPixel; class QgsMapToPixel;
class QgsFeature; class QgsFeature;
#include "qgspoint.h" #include "qgspoint.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include "qgsmaprenderer.h" // definition of QgsLabelingEngineInterface #include "qgsmaprenderer.h" // definition of QgsLabelingEngineInterface
#include "qgsexpression.h" #include "qgsexpression.h"
#include "qgsdatadefined.h" #include "qgsdatadefined.h"
#include "qgsdiagramrendererv2.h" #include "qgsdiagramrendererv2.h"
#include "qgsmapunitscale.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();
//! @note added in 2.4
static QgsPalLayerSettings fromLayer( QgsVectorLayer* layer );
enum Placement enum Placement
{ {
AroundPoint, // Point / Polygon AroundPoint, // Point / Polygon
OverPoint, // Point / Polygon OverPoint, // Point / Polygon
Line, // Line / Polygon Line, // Line / Polygon
Curved, // Line Curved, // Line
Horizontal, // Polygon Horizontal, // Polygon
Free // Polygon Free // Polygon
}; };
skipping to change at line 251 skipping to change at line 257
LabelDistance = 13, LabelDistance = 13,
DistanceUnits = 81, DistanceUnits = 81,
OffsetRotation = 82, OffsetRotation = 82,
CurvedCharAngleInOut = 83, CurvedCharAngleInOut = 83,
// (data defined only) // (data defined only)
PositionX = 9, //x-coordinate data defined label position PositionX = 9, //x-coordinate data defined label position
PositionY = 10, //y-coordinate data defined label position PositionY = 10, //y-coordinate data defined label position
Hali = 11, //horizontal alignment for data defined label position (Le ft, Center, Right) Hali = 11, //horizontal alignment for data defined label position (Le ft, Center, Right)
Vali = 12, //vertical alignment for data defined label position (Bott om, Base, Half, Cap, Top) Vali = 12, //vertical alignment for data defined label position (Bott om, Base, Half, Cap, Top)
Rotation = 14, //data defined rotation Rotation = 14, //data defined rotation
RepeatDistance = 84,
RepeatDistanceUnit = 86,
// rendering // rendering
ScaleVisibility = 23, ScaleVisibility = 23,
MinScale = 16, MinScale = 16,
MaxScale = 17, MaxScale = 17,
FontLimitPixel = 24, FontLimitPixel = 24,
FontMinPixel = 25, FontMinPixel = 25,
FontMaxPixel = 26, FontMaxPixel = 26,
// (data defined only) // (data defined only)
Show = 15, Show = 15,
skipping to change at line 282 skipping to change at line 290
*/ */
bool isExpression; bool isExpression;
/** Returns the QgsExpression for this label settings. /** Returns the QgsExpression for this label settings.
*/ */
QgsExpression* getLabelExpression(); QgsExpression* getLabelExpression();
QFont textFont; QFont textFont;
QString textNamedStyle; QString textNamedStyle;
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)
QgsMapUnitScale fontSizeMapUnitScale; // scale range for map units for font size
QColor textColor; QColor textColor;
int textTransp; int textTransp;
QPainter::CompositionMode blendMode; QPainter::CompositionMode blendMode;
QColor previewBkgrdColor; QColor previewBkgrdColor;
//-- text formatting //-- text formatting
QString wrapChar; QString wrapChar;
double multilineHeight; //0.0 to 10.0, leading between lines as multipl yer of line height double multilineHeight; //0.0 to 10.0, leading between lines as multipl yer of line height
MultiLineAlign multilineAlign; // horizontal alignment of multi-line la bels MultiLineAlign multilineAlign; // horizontal alignment of multi-line la bels
skipping to change at line 311 skipping to change at line 320
bool formatNumbers; bool formatNumbers;
int decimals; int decimals;
bool plusSign; bool plusSign;
//-- text buffer //-- text buffer
bool bufferDraw; bool bufferDraw;
double bufferSize; // buffer size double bufferSize; // buffer size
bool bufferSizeInMapUnits; //true if buffer is in map units (otherwise in mm) bool bufferSizeInMapUnits; //true if buffer is in map units (otherwise in mm)
QgsMapUnitScale bufferSizeMapUnitScale; // scale range for map units fo r buffer size
QColor bufferColor; QColor bufferColor;
bool bufferNoFill; //set interior of buffer to 100% transparent bool bufferNoFill; //set interior of buffer to 100% transparent
int bufferTransp; int bufferTransp;
Qt::PenJoinStyle bufferJoinStyle; Qt::PenJoinStyle bufferJoinStyle;
QPainter::CompositionMode bufferBlendMode; QPainter::CompositionMode bufferBlendMode;
//-- shape background //-- shape background
bool shapeDraw; bool shapeDraw;
ShapeType shapeType; ShapeType shapeType;
QString shapeSVGFile; QString shapeSVGFile;
SizeType shapeSizeType; SizeType shapeSizeType;
QPointF shapeSize; QPointF shapeSize;
SizeUnit shapeSizeUnits; SizeUnit shapeSizeUnits;
QgsMapUnitScale shapeSizeMapUnitScale;
RotationType shapeRotationType; RotationType shapeRotationType;
double shapeRotation; double shapeRotation;
QPointF shapeOffset; QPointF shapeOffset;
SizeUnit shapeOffsetUnits; SizeUnit shapeOffsetUnits;
QgsMapUnitScale shapeOffsetMapUnitScale;
QPointF shapeRadii; QPointF shapeRadii;
SizeUnit shapeRadiiUnits; SizeUnit shapeRadiiUnits;
QgsMapUnitScale shapeRadiiMapUnitScale;
int shapeTransparency; int shapeTransparency;
QPainter::CompositionMode shapeBlendMode; QPainter::CompositionMode shapeBlendMode;
QColor shapeFillColor; QColor shapeFillColor;
QColor shapeBorderColor; QColor shapeBorderColor;
double shapeBorderWidth; double shapeBorderWidth;
SizeUnit shapeBorderWidthUnits; SizeUnit shapeBorderWidthUnits;
QgsMapUnitScale shapeBorderWidthMapUnitScale;
Qt::PenJoinStyle shapeJoinStyle; Qt::PenJoinStyle shapeJoinStyle;
//-- drop shadow //-- drop shadow
bool shadowDraw; bool shadowDraw;
ShadowType shadowUnder; ShadowType shadowUnder;
int shadowOffsetAngle; int shadowOffsetAngle;
double shadowOffsetDist; double shadowOffsetDist;
SizeUnit shadowOffsetUnits; SizeUnit shadowOffsetUnits;
QgsMapUnitScale shadowOffsetMapUnitScale;
bool shadowOffsetGlobal; bool shadowOffsetGlobal;
double shadowRadius; double shadowRadius;
SizeUnit shadowRadiusUnits; SizeUnit shadowRadiusUnits;
QgsMapUnitScale shadowRadiusMapUnitScale;
bool shadowRadiusAlphaOnly; bool shadowRadiusAlphaOnly;
int shadowTransparency; int shadowTransparency;
int shadowScale; int shadowScale;
QColor shadowColor; QColor shadowColor;
QPainter::CompositionMode shadowBlendMode; QPainter::CompositionMode shadowBlendMode;
//-- placement //-- placement
Placement placement; Placement placement;
unsigned int placementFlags; unsigned int placementFlags;
bool centroidWhole; // whether centroid calculated from whole or visibl e polygon bool centroidWhole; // whether centroid calculated from whole or visibl e polygon
bool centroidInside; // whether centroid-point calculated must be insid e polygon
double dist; // distance from the feature (in mm) double dist; // distance from the feature (in mm)
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)
QgsMapUnitScale distMapUnitScale;
double repeatDistance;
SizeUnit repeatDistanceUnit;
QgsMapUnitScale repeatDistanceMapUnitScale;
// offset labels of point/centroid features default to center // offset labels of point/centroid features default to center
// move label to quadrant: left/down, don't move, right/up (-1, 0, 1) // move label to quadrant: left/down, don't move, right/up (-1, 0, 1)
QuadrantPosition quadOffset; QuadrantPosition quadOffset;
double xOffset; // offset from point in mm or map units double xOffset; // offset from point in mm or map units
double yOffset; // offset from point in mm or map units double yOffset; // offset from point in mm or map units
bool labelOffsetInMapUnits; //true if label offset is in map units (oth erwise in mm) bool labelOffsetInMapUnits; //true if label offset is in map units (oth erwise in mm)
QgsMapUnitScale labelOffsetMapUnitScale;
double angleOffset; // rotation applied to offset labels double angleOffset; // rotation applied to offset labels
bool preserveRotation; // preserve predefined rotation data during labe l pin/unpin operations bool preserveRotation; // preserve predefined rotation data during labe l pin/unpin operations
double maxCurvedCharAngleIn; // maximum angle between inside curved lab el characters (defaults to 20.0, range 20.0 to 60.0) double maxCurvedCharAngleIn; // maximum angle between inside curved lab el characters (defaults to 20.0, range 20.0 to 60.0)
double maxCurvedCharAngleOut; // maximum angle between outside curved l abel characters (defaults to -20.0, range -20.0 to -95.0) double maxCurvedCharAngleOut; // maximum angle between outside curved l abel characters (defaults to -20.0, range -20.0 to -95.0)
int priority; // 0 = low, 10 = high int priority; // 0 = low, 10 = high
//-- rendering //-- rendering
skipping to change at line 409 skipping to change at line 432
bool obstacle; // whether features for layer are obstacles to labels of other layers bool obstacle; // whether features for layer are obstacles to labels of other layers
//-- scale factors //-- scale factors
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
// called from register feature hook // called from register feature hook
void calculateLabelSize( const QFontMetricsF* fm, QString text, double& labelX, double& labelY, QgsFeature* f = 0 ); void calculateLabelSize( const QFontMetricsF* fm, QString text, double& labelX, double& labelY, QgsFeature* f = 0 );
// implementation of register feature hook // implementation of register feature hook
void registerFeature( QgsVectorLayer* layer, QgsFeature& f, const QgsRe nderContext& context ); void registerFeature( QgsFeature& f, const QgsRenderContext& context );
void readFromLayer( QgsVectorLayer* layer ); void readFromLayer( QgsVectorLayer* layer );
void writeToLayer( QgsVectorLayer* layer ); void writeToLayer( QgsVectorLayer* layer );
/** Get a data defined property pointer /** Get a data defined property pointer
* @note added in 1.9, helpful for Python access * @note added in 1.9, helpful for Python access
*/ */
QgsDataDefined* dataDefinedProperty( QgsPalLayerSettings::DataDefinedPr operties p ); QgsDataDefined* dataDefinedProperty( QgsPalLayerSettings::DataDefinedPr operties p );
/** Set a property as data defined /** Set a property as data defined
skipping to change at line 467 skipping to change at line 490
/** Map of current data defined properties /** Map of current data defined properties
*/ */
QMap< QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined* > dat aDefinedProperties; QMap< QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined* > dat aDefinedProperties;
/** Calculates pixel size (considering output size should be in pixel o r map units, scale factors and optionally oversampling) /** Calculates pixel size (considering output size should be in pixel o r map units, scale factors and optionally oversampling)
* @param size size to convert * @param size size to convert
* @param c rendercontext * @param c rendercontext
* @param unit SizeUnit enum value of size * @param unit SizeUnit enum value of size
* @param rasterfactor whether to consider oversampling * @param rasterfactor whether to consider oversampling
* @param mapUnitScale a mapUnitScale clamper
* @return font pixel size * @return font pixel size
*/ */
int sizeToPixel( double size, const QgsRenderContext& c , SizeUnit unit , bool rasterfactor = false ) const; int sizeToPixel( double size, const QgsRenderContext& c , SizeUnit unit , bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUn itScale() ) const;
/** Calculates size (considering output size should be in pixel or map units, scale factors and optionally oversampling) /** Calculates size (considering output size should be in pixel or map units, scale factors and optionally oversampling)
* @param size size to convert * @param size size to convert
* @param c rendercontext * @param c rendercontext
* @param unit SizeUnit enum value of size * @param unit SizeUnit enum value of size
* @param rasterfactor whether to consider oversampling * @param rasterfactor whether to consider oversampling
* @param mapUnitScale a mapUnitScale clamper
* @return size that will render, as double * @return size that will render, as double
* @note added in 1.9, as a better precision replacement for sizeToPixe l * @note added in 1.9, as a better precision replacement for sizeToPixe l
*/ */
double scaleToPixelContext( double size, const QgsRenderContext& c, Siz eUnit unit, bool rasterfactor = false ) const; double scaleToPixelContext( double size, const QgsRenderContext& c, Siz eUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ) const;
/** Map of data defined enum to names and old-style indecies /** Map of data defined enum to names and old-style indecies
* The QPair contains a new string for layer property key, and a refere nce to old-style numeric key (< QGIS 2.0) * The QPair contains a new string for layer property key, and a refere nce to old-style numeric key (< QGIS 2.0)
* @note not available in python bindings; added in 1.9 * @note not available in python bindings; added in 1.9
*/ */
QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> > dataDefinedNames() const { return mDataDefinedNames; } QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> > dataDefinedNames() const { return mDataDefinedNames; }
// temporary stuff: set when layer gets prepared or labeled // temporary stuff: set when layer gets prepared or labeled
// NOTE: not in Python binding // NOTE: not in Python binding
pal::Layer* palLayer; pal::Layer* palLayer;
skipping to change at line 579 skipping to change at line 604
, mUseRotation( false ) , mUseRotation( false )
, mCenter( QgsPoint() ) , mCenter( QgsPoint() )
, mUseCenter( false ) , mUseCenter( false )
, mSize( QgsPoint() ) , mSize( QgsPoint() )
, mOffset( QgsPoint() ) , mOffset( QgsPoint() )
, mPicture( 0 ) , mPicture( 0 )
, mPictureBuffer( 0.0 ) , mPictureBuffer( 0.0 )
, mDpiRatio( 1.0 ) , mDpiRatio( 1.0 )
{} {}
// methods
const QString& text() { return mText; } const QString& text() { return mText; }
void setText( const QString& text ) { mText = text; } void setText( const QString& text ) { mText = text; }
const QgsPoint& origin() { return mOrigin; } const QgsPoint& origin() { return mOrigin; }
void setOrigin( QgsPoint point ) { mOrigin = point; } void setOrigin( QgsPoint point ) { mOrigin = point; }
bool useOrigin() const { return mUseOrigin; } bool useOrigin() const { return mUseOrigin; }
void setUseOrigin( bool use ) { mUseOrigin = use; } void setUseOrigin( bool use ) { mUseOrigin = use; }
double rotation() const { return mRotation; } double rotation() const { return mRotation; }
skipping to change at line 651 skipping to change at line 678
// a stored QPicture of painting for the component // a stored QPicture of painting for the component
QPicture* mPicture; QPicture* mPicture;
// buffer for component to accommodate graphic items ignored by QPictur e, // buffer for component to accommodate graphic items ignored by QPictur e,
// e.g. half-width of an applied QPen, which would extend beyond boundi ngRect() of QPicture // e.g. half-width of an applied QPen, which would extend beyond boundi ngRect() of QPicture
double mPictureBuffer; double mPictureBuffer;
// a ratio of native painter dpi and that of rendering context's painte r // a ratio of native painter dpi and that of rendering context's painte r
double mDpiRatio; double mDpiRatio;
}; };
/**
* Class that stores computed placement from labeling engine.
* @note added in 2.4
*/
class CORE_EXPORT QgsLabelingResults
{
public:
QgsLabelingResults();
~QgsLabelingResults();
//! return infos about labels at a given (map) position
QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ) const;
//! return infos about labels within a given (map) rectangle
QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r ) const
;
private:
QgsLabelingResults( const QgsLabelingResults& ) {} // no copying allowe
d
QgsLabelSearchTree* mLabelSearchTree;
friend class QgsPalLabeling;
};
Q_NOWARN_DEPRECATED_PUSH
class CORE_EXPORT QgsPalLabeling : public QgsLabelingEngineInterface class CORE_EXPORT QgsPalLabeling : public QgsLabelingEngineInterface
{ {
public: public:
enum DrawLabelType enum DrawLabelType
{ {
LabelText = 0, LabelText = 0,
LabelBuffer, LabelBuffer,
LabelShape, LabelShape,
LabelSVG, LabelSVG,
LabelShadow LabelShadow
skipping to change at line 689 skipping to change at line 740
bool isShowingShadowRectangles() const { return mShowingShadowRects; } bool isShowingShadowRectangles() const { return mShowingShadowRects; }
void setShowingShadowRectangles( bool showing ) { mShowingShadowRects = showing; } void setShowingShadowRectangles( bool showing ) { mShowingShadowRects = showing; }
bool isShowingAllLabels() const { return mShowingAllLabels; } bool isShowingAllLabels() const { return mShowingAllLabels; }
void setShowingAllLabels( bool showing ) { mShowingAllLabels = showing; } void setShowingAllLabels( bool showing ) { mShowingAllLabels = showing; }
bool isShowingPartialsLabels() const { return mShowingPartialsLabels; } bool isShowingPartialsLabels() const { return mShowingPartialsLabels; }
void setShowingPartialsLabels( bool showing ) { mShowingPartialsLabels = showing; } void setShowingPartialsLabels( bool showing ) { mShowingPartialsLabels = showing; }
//! @note added in 2.4
bool isDrawingOutlineLabels() const { return mDrawOutlineLabels; }
void setDrawingOutlineLabels( bool outline ) { mDrawOutlineLabels = out
line; }
// implemented methods from labeling engine interface // implemented methods from labeling engine interface
//! called when we're going to start with rendering //! called when we're going to start with rendering
virtual void init( QgsMapRenderer* mr ); //! @deprecated since 2.4 - use override with QgsMapSettings
Q_DECL_DEPRECATED virtual void init( QgsMapRenderer* mr );
//! called when we're going to start with rendering
virtual void init( const QgsMapSettings& mapSettings );
//! 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 ); virtual bool willUseLayer( QgsVectorLayer* layer );
//! called to find out whether the layer is used for labeling
//! @note added in 2.4
static bool staticWillUseLayer( QgsVectorLayer* layer );
static bool staticWillUseLayer( const QString& layerID );
//! clears all PAL layer settings for registered layers //! clears all PAL layer settings for registered layers
//! @note: this method was added in version 1.9 //! @note: this method was added in version 1.9
virtual void clearActiveLayers(); virtual void clearActiveLayers();
//! clears data defined objects from PAL layer settings for a registere d layer //! clears data defined objects from PAL layer settings for a registere d layer
//! @note: this method was added in version 1.9 //! @note: this method was added in version 1.9
virtual void clearActiveLayer( QgsVectorLayer* layer ); virtual void clearActiveLayer( const QString& layerID );
//! hook called when drawing layer before issuing select() //! hook called when drawing layer before issuing select()
virtual int prepareLayer( QgsVectorLayer* layer, QSet<int>& attrIndices , QgsRenderContext& ctx ); virtual int prepareLayer( QgsVectorLayer* layer, QStringList &attrNames , QgsRenderContext& ctx );
//! adds a diagram layer to the labeling engine //! adds a diagram layer to the labeling engine
virtual int addDiagramLayer( QgsVectorLayer* layer, QgsDiagramLayerSett ings *s ); virtual int addDiagramLayer( QgsVectorLayer* layer, const QgsDiagramLay erSettings *s );
//! hook called when drawing for every feature in a layer //! hook called when drawing for every feature in a layer
virtual void registerFeature( QgsVectorLayer* layer, QgsFeature& feat, virtual void registerFeature( const QString& layerID, QgsFeature& feat,
const QgsRenderContext& context = QgsRenderContext() ); const QgsRenderContext& context = QgsRenderContext() );
virtual void registerDiagramFeature( QgsVectorLayer* layer, QgsFeature& virtual void registerDiagramFeature( const QString& layerID, QgsFeature
feat, const QgsRenderContext& context = QgsRenderContext() ); & feat, const QgsRenderContext& context = QgsRenderContext() );
//! 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 ); virtual void drawLabeling( QgsRenderContext& context );
//! 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 ); //! @deprecated since 2.4 - use takeResults() and methods of QgsLabelin
gResults
Q_DECL_DEPRECATED virtual QList<QgsLabelPosition> labelsAtPosition( con
st QgsPoint& p );
//! return infos about labels within a given (map) rectangle //! return infos about labels within a given (map) rectangle
virtual QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r //! @deprecated since 2.4 - use takeResults() and methods of QgsLabelin
); gResults
Q_DECL_DEPRECATED virtual QList<QgsLabelPosition> labelsWithinRect( con
st QgsRectangle& r );
//! Return pointer to recently computed results (in drawLabeling()) and
pass the ownership of results to the caller
//! @note added in 2.4
QgsLabelingResults* takeResults();
//! called when passing engine among map renderers //! called when passing engine among map renderers
virtual QgsLabelingEngineInterface* clone(); virtual QgsLabelingEngineInterface* clone();
//! @note not available in python bindings //! @note not available in python bindings
void drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* painter, const QgsMapToPixel* xform ); void drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* painter, const QgsMapToPixel* xform );
//!drawLabel //!drawLabel
//! @note not available in python bindings //! @note not available in python bindings
virtual void drawLabel( pal::LabelPosition* label, QgsRenderContext& co ntext, QgsPalLayerSettings& tmpLyr, DrawLabelType drawType, double dpiRatio = 1.0 ); virtual void drawLabel( pal::LabelPosition* label, QgsRenderContext& co ntext, QgsPalLayerSettings& tmpLyr, DrawLabelType drawType, double dpiRatio = 1.0 );
skipping to change at line 743 skipping to change at line 814
static void drawLabelShadow( QgsRenderContext& context, static void drawLabelShadow( QgsRenderContext& context,
QgsLabelComponent component, QgsLabelComponent component,
const QgsPalLayerSettings& tmpLyr ); const QgsPalLayerSettings& tmpLyr );
//! load/save engine settings to project file //! load/save engine settings to project file
//! @note added in QGIS 1.9 //! @note added in QGIS 1.9
void loadEngineSettings(); void loadEngineSettings();
void saveEngineSettings(); void saveEngineSettings();
void clearEngineSettings(); void clearEngineSettings();
bool isStoredWithProject() const { return mSavedWithProject; } //! @deprecated since 2.4 - settings are always stored in project
void setStoredWithProject( bool store ) { mSavedWithProject = store; } Q_DECL_DEPRECATED bool isStoredWithProject() const { return true; }
//! @deprecated since 2.4 - settings are always stored in project
Q_DECL_DEPRECATED void setStoredWithProject( bool store ) { Q_UNUSED( s
tore ); }
protected: protected:
// update temporary QgsPalLayerSettings with any data defined text styl e values // update temporary QgsPalLayerSettings with any data defined text styl e values
void dataDefinedTextStyle( QgsPalLayerSettings& tmpLyr, void dataDefinedTextStyle( QgsPalLayerSettings& tmpLyr,
const QMap< QgsPalLayerSettings::DataDefined Properties, QVariant >& ddValues ); const QMap< QgsPalLayerSettings::DataDefined Properties, QVariant >& ddValues );
// update temporary QgsPalLayerSettings with any data defined text form atting values // update temporary QgsPalLayerSettings with any data defined text form atting values
void dataDefinedTextFormatting( QgsPalLayerSettings& tmpLyr, void dataDefinedTextFormatting( QgsPalLayerSettings& tmpLyr,
const QMap< QgsPalLayerSettings::DataDe finedProperties, QVariant >& ddValues ); const QMap< QgsPalLayerSettings::DataDe finedProperties, QVariant >& ddValues );
skipping to change at line 767 skipping to change at line 840
const QMap< QgsPalLayerSettings::DataDefine dProperties, QVariant >& ddValues ); const QMap< QgsPalLayerSettings::DataDefine dProperties, QVariant >& ddValues );
// update temporary QgsPalLayerSettings with any data defined shape bac kground values // update temporary QgsPalLayerSettings with any data defined shape bac kground values
void dataDefinedShapeBackground( QgsPalLayerSettings& tmpLyr, void dataDefinedShapeBackground( QgsPalLayerSettings& tmpLyr,
const QMap< QgsPalLayerSettings::DataD efinedProperties, QVariant >& ddValues ); const QMap< QgsPalLayerSettings::DataD efinedProperties, QVariant >& ddValues );
// update temporary QgsPalLayerSettings with any data defined drop shad ow values // update temporary QgsPalLayerSettings with any data defined drop shad ow values
void dataDefinedDropShadow( QgsPalLayerSettings& tmpLyr, void dataDefinedDropShadow( QgsPalLayerSettings& tmpLyr,
const QMap< QgsPalLayerSettings::DataDefine dProperties, QVariant >& ddValues ); const QMap< QgsPalLayerSettings::DataDefine dProperties, QVariant >& ddValues );
// hashtable of layer settings, being filled during labeling void deleteTemporaryData();
QHash<QgsVectorLayer*, QgsPalLayerSettings> mActiveLayers;
// hashtable of active diagram layers // hashtable of layer settings, being filled during labeling (key = lay
QHash<QgsVectorLayer*, QgsDiagramLayerSettings> mActiveDiagramLayers; er ID)
QHash<QString, QgsPalLayerSettings> mActiveLayers;
// hashtable of active diagram layers (key = layer ID)
QHash<QString, QgsDiagramLayerSettings> mActiveDiagramLayers;
QgsPalLayerSettings mInvalidLayerSettings; QgsPalLayerSettings mInvalidLayerSettings;
QgsMapRenderer* mMapRenderer; const QgsMapSettings* mMapSettings;
int mCandPoint, mCandLine, mCandPolygon; int mCandPoint, mCandLine, mCandPolygon;
Search mSearch; Search mSearch;
pal::Pal* mPal; pal::Pal* mPal;
// list of candidates from last labeling // list of candidates from last labeling
QList<QgsLabelCandidate> mCandidates; QList<QgsLabelCandidate> mCandidates;
bool mShowingCandidates; bool mShowingCandidates;
bool mShowingAllLabels; // whether to avoid collisions or not bool mShowingAllLabels; // whether to avoid collisions or not
bool mSavedWithProject; // whether engine settings have been read from project file
bool mShowingShadowRects; // whether to show debugging rectangles for d rop shadows bool mShowingShadowRects; // whether to show debugging rectangles for d rop shadows
bool mShowingPartialsLabels; // whether to avoid partials labels or not bool mShowingPartialsLabels; // whether to avoid partials labels or not
bool mDrawOutlineLabels; // whether to draw labels as text or outlines
QgsLabelSearchTree* mLabelSearchTree; QgsLabelingResults* mResults;
}; };
Q_NOWARN_DEPRECATED_POP
#endif // QGSPALLABELING_H #endif // QGSPALLABELING_H
 End of changes. 40 change blocks. 
26 lines changed or deleted 111 lines changed or added


 qgspiediagram.h   qgspiediagram.h 
skipping to change at line 38 skipping to change at line 38
class QgsDiagramInterpolationSettings; class QgsDiagramInterpolationSettings;
class QgsRenderContext; class QgsRenderContext;
class CORE_EXPORT QgsPieDiagram: public QgsDiagram class CORE_EXPORT QgsPieDiagram: public QgsDiagram
{ {
public: public:
QgsPieDiagram(); QgsPieDiagram();
~QgsPieDiagram(); ~QgsPieDiagram();
virtual QgsDiagram* clone() const;
void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, con st QgsDiagramSettings& s, const QPointF& position ); void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, con st QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderCon text& c, const QgsDiagramSettings& s ); QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderCon text& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) ; QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) ;
QString diagramName() const { return DIAGRAM_NAME_PIE; } QString diagramName() const { return DIAGRAM_NAME_PIE; }
private: private:
QBrush mCategoryBrush; QBrush mCategoryBrush;
QPen mPen; QPen mPen;
static int sCount; static int sCount;
}; };
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added


 qgspluginlayer.h   qgspluginlayer.h 
skipping to change at line 49 skipping to change at line 49
/** return plugin layer type (the same as used in QgsPluginLayerRegistr y) */ /** return plugin layer type (the same as used in QgsPluginLayerRegistr y) */
QString pluginLayerType(); QString pluginLayerType();
void setExtent( const QgsRectangle &extent ); void setExtent( const QgsRectangle &extent );
//! return a list of symbology items for the legend //! return a list of symbology items for the legend
//! (defult implementation returns nothing) //! (defult implementation returns nothing)
//! @note Added in v2.1 //! @note Added in v2.1
virtual QgsLegendSymbologyList legendSymbologyItems( const QSize& iconS ize ); virtual QgsLegendSymbologyList legendSymbologyItems( const QSize& iconS ize );
/** Return new instance of QgsMapLayerRenderer that will be used for re
ndering of given context
*
* The default implementation returns map layer renderer which just cal
ls draw().
* This may work, but it is unsafe for multi-threaded rendering because
of the run
* conditions that may happen (e.g. something is changed in the layer w
hile it is
* being rendered).
*
* @note added in 2.4
*/
virtual QgsMapLayerRenderer* createMapRenderer( QgsRenderContext& rende
rerContext );
protected: protected:
QString mPluginLayerType; QString mPluginLayerType;
}; };
#endif // QGSPLUGINLAYER_H #endif // QGSPLUGINLAYER_H
 End of changes. 1 change blocks. 
0 lines changed or deleted 16 lines changed or added


 qgspluginmanagerinterface.h   qgspluginmanagerinterface.h 
skipping to change at line 23 skipping to change at line 23
* (at your option) any later version. * * (at your option) any later version. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSPLUGINMANAGERINTERFACE_H #ifndef QGSPLUGINMANAGERINTERFACE_H
#define QGSPLUGINMANAGERINTERFACE_H #define QGSPLUGINMANAGERINTERFACE_H
#include <QObject> #include <QObject>
#include <QString> #include <QString>
#include <QMap> #include <QMap>
#include "qgsmessagebar.h"
class GUI_EXPORT QgsPluginManagerInterface : public QObject class GUI_EXPORT QgsPluginManagerInterface : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
//! Constructor //! Constructor
QgsPluginManagerInterface(); QgsPluginManagerInterface();
skipping to change at line 57 skipping to change at line 58
//! clear the repository listWidget //! clear the repository listWidget
virtual void clearRepositoryList() = 0; virtual void clearRepositoryList() = 0;
//! add repository to the repository listWidget //! add repository to the repository listWidget
virtual void addToRepositoryList( QMap<QString, QString> repository ) = 0; virtual void addToRepositoryList( QMap<QString, QString> repository ) = 0;
//! show the Plugin Manager window and optionally open tab tabIndex //! show the Plugin Manager window and optionally open tab tabIndex
virtual void showPluginManager( int tabIndex = -1 ) = 0; virtual void showPluginManager( int tabIndex = -1 ) = 0;
//! show the given message in the Plugin Manager internal message bar
virtual void pushMessage( const QString &text, QgsMessageBar::MessageLe
vel level = QgsMessageBar::INFO, int duration = -1 ) = 0;
}; };
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added


 qgspointdisplacementrenderer.h   qgspointdisplacementrenderer.h 
skipping to change at line 28 skipping to change at line 28
#ifndef QGSPOINTDISPLACEMENTRENDERER_H #ifndef QGSPOINTDISPLACEMENTRENDERER_H
#define QGSPOINTDISPLACEMENTRENDERER_H #define QGSPOINTDISPLACEMENTRENDERER_H
#include "qgsfeature.h" #include "qgsfeature.h"
#include "qgssymbolv2.h" #include "qgssymbolv2.h"
#include "qgspoint.h" #include "qgspoint.h"
#include "qgsrendererv2.h" #include "qgsrendererv2.h"
#include <QFont> #include <QFont>
#include <QSet> #include <QSet>
class QgsVectorLayer; class QgsSpatialIndex;
/**A renderer that automatically displaces points with the same position*/ /**A renderer that automatically displaces points with the same position*/
class CORE_EXPORT QgsPointDisplacementRenderer: public QgsFeatureRendererV2 class CORE_EXPORT QgsPointDisplacementRenderer: public QgsFeatureRendererV2
{ {
public: public:
QgsPointDisplacementRenderer( const QString& labelAttributeName = "" ); QgsPointDisplacementRenderer( const QString& labelAttributeName = "" );
~QgsPointDisplacementRenderer(); ~QgsPointDisplacementRenderer();
QgsFeatureRendererV2* clone(); QgsFeatureRendererV2* clone();
virtual void toSld( QDomDocument& doc, QDomElement &element ) const; virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
/**Reimplemented from QgsFeatureRendererV2*/ /**Reimplemented from QgsFeatureRendererV2*/
bool renderFeature( QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false ); bool renderFeature( QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false );
QgsSymbolV2* symbolForFeature( QgsFeature& feature ); QgsSymbolV2* symbolForFeature( QgsFeature& feature );
void startRender( QgsRenderContext& context, const QgsVectorLayer *vlay er ); void startRender( QgsRenderContext& context, const QgsFields& fields );
void stopRender( QgsRenderContext& context ); void stopRender( QgsRenderContext& context );
QList<QString> usedAttributes(); QList<QString> usedAttributes();
QgsSymbolV2List symbols(); QgsSymbolV2List symbols();
//! create a renderer from XML element //! create a renderer from XML element
static QgsFeatureRendererV2* create( QDomElement& symbologyElem ); static QgsFeatureRendererV2* create( QDomElement& symbologyElem );
QDomElement save( QDomDocument& doc ); QDomElement save( QDomDocument& doc );
skipping to change at line 70 skipping to change at line 70
QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QS tring rule = "" ); QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QS tring rule = "" );
void setLabelAttributeName( const QString& name ) { mLabelAttributeName = name; } void setLabelAttributeName( const QString& name ) { mLabelAttributeName = name; }
QString labelAttributeName() const { return mLabelAttributeName; } QString labelAttributeName() const { return mLabelAttributeName; }
/**Sets embedded renderer (takes ownership)*/ /**Sets embedded renderer (takes ownership)*/
void setEmbeddedRenderer( QgsFeatureRendererV2* r ); void setEmbeddedRenderer( QgsFeatureRendererV2* r );
QgsFeatureRendererV2* embeddedRenderer() { return mRenderer;} QgsFeatureRendererV2* embeddedRenderer() { return mRenderer;}
//! not available in python bindings //! not available in python bindings
void setDisplacementGroups( const QList<QMap<QgsFeatureId, QgsFeature> //! @deprecated since 2.4
>& list ); Q_DECL_DEPRECATED void setDisplacementGroups( const QList<QMap<QgsFeatu
reId, QgsFeature> >& list ) { Q_UNUSED( list ); }
void setLabelFont( const QFont& f ) { mLabelFont = f; } void setLabelFont( const QFont& f ) { mLabelFont = f; }
QFont labelFont() const { return mLabelFont;} QFont labelFont() const { return mLabelFont;}
void setCircleWidth( double w ) { mCircleWidth = w; } void setCircleWidth( double w ) { mCircleWidth = w; }
double circleWidth() const { return mCircleWidth; } double circleWidth() const { return mCircleWidth; }
void setCircleColor( const QColor& c ) { mCircleColor = c; } void setCircleColor( const QColor& c ) { mCircleColor = c; }
QColor circleColor() const { return mCircleColor; } QColor circleColor() const { return mCircleColor; }
skipping to change at line 128 skipping to change at line 129
double mCircleWidth; double mCircleWidth;
/**Color to draw the circle*/ /**Color to draw the circle*/
QColor mCircleColor; QColor mCircleColor;
/**Addition to the default circle radius*/ /**Addition to the default circle radius*/
double mCircleRadiusAddition; double mCircleRadiusAddition;
/**Is set internally from startRender() depending on scale denominator* / /**Is set internally from startRender() depending on scale denominator* /
bool mDrawLabels; bool mDrawLabels;
/**Maximum scale denominator for label display. Negative number means n o scale limitation*/ /**Maximum scale denominator for label display. Negative number means n o scale limitation*/
double mMaxLabelScaleDenominator; double mMaxLabelScaleDenominator;
typedef QMap<QgsFeatureId, QgsFeature> DisplacementGroup;
/**Groups of features that have the same position*/ /**Groups of features that have the same position*/
QList<QMap<QgsFeatureId, QgsFeature> > mDisplacementGroups; QList<DisplacementGroup> mDisplacementGroups;
/**Set that contains all the ids the display groups (for quicker lookup /**Mapping from feature ID to its group index*/
)*/ QMap<QgsFeatureId, int> mGroupIndex;
QSet<QgsFeatureId> mDisplacementIds; /**Spatial index for fast lookup of close points*/
QgsSpatialIndex* mSpatialIndex;
/** keeps trask which features are selected */
QSet<QgsFeatureId> mSelectedFeatures;
/**Create the displacement groups efficiently using a spatial index*/
void createDisplacementGroups( QgsVectorLayer *vlayer, const QgsRectang
le& viewExtent );
/**Creates a search rectangle with mTolerance*/ /**Creates a search rectangle with mTolerance*/
QgsRectangle searchRect( const QgsPoint& p ) const; QgsRectangle searchRect( const QgsPoint& p ) const;
/**This is a debugging function to check the entries in the displacemen t groups*/ /**This is a debugging function to check the entries in the displacemen t groups*/
void printInfoDisplacementGroups(); void printInfoDisplacementGroups();
/**Returns the label for a feature (using mLabelAttributeName as attrib ute field)*/ /**Returns the label for a feature (using mLabelAttributeName as attrib ute field)*/
QString getLabel( const QgsFeature& f ); QString getLabel( const QgsFeature& f );
//rendering methods //rendering methods
void renderPoint( const QPointF& point, QgsSymbolV2RenderContext& conte xt, const QList<QgsMarkerSymbolV2*>& symbols, void renderPoint( const QPointF& point, QgsSymbolV2RenderContext& conte xt, const QList<QgsMarkerSymbolV2*>& symbols,
const QStringList& labels ); const QStringList& labels );
//helper functions //helper functions
void calculateSymbolAndLabelPositions( const QPointF& centerPoint, int nPosition, double radius, double symbolDiagonal, QList<QPointF>& symbolPosi tions, QList<QPointF>& labelShifts ) const; void calculateSymbolAndLabelPositions( const QPointF& centerPoint, int nPosition, double radius, double symbolDiagonal, QList<QPointF>& symbolPosi tions, QList<QPointF>& labelShifts ) const;
void drawGroup( const DisplacementGroup& group, QgsRenderContext& conte xt );
void drawCircle( double radiusPainterUnits, QgsSymbolV2RenderContext& c ontext, const QPointF& centerPoint, int nSymbols ); void drawCircle( double radiusPainterUnits, QgsSymbolV2RenderContext& c ontext, const QPointF& centerPoint, int nSymbols );
void drawSymbols( QgsFeature& f, QgsRenderContext& context, const QList <QgsMarkerSymbolV2*>& symbolList, const QList<QPointF>& symbolPositions, bo ol selected = false ); void drawSymbols( const QgsFeature& f, QgsRenderContext& context, const QList<QgsMarkerSymbolV2*>& symbolList, const QList<QPointF>& symbolPositio ns, bool selected = false );
void drawLabels( const QPointF& centerPoint, QgsSymbolV2RenderContext& context, const QList<QPointF>& labelShifts, const QStringList& labelList ); void drawLabels( const QPointF& centerPoint, QgsSymbolV2RenderContext& context, const QList<QPointF>& labelShifts, const QStringList& labelList );
/**Returns first symbol for feature or 0 if none*/ /**Returns first symbol for feature or 0 if none*/
QgsSymbolV2* firstSymbolForFeature( QgsFeatureRendererV2* r, QgsFeature & f ); QgsSymbolV2* firstSymbolForFeature( QgsFeatureRendererV2* r, QgsFeature & f );
}; };
#endif // QGSPOINTDISPLACEMENTRENDERER_H #endif // QGSPOINTDISPLACEMENTRENDERER_H
 End of changes. 8 change blocks. 
12 lines changed or deleted 15 lines changed or added


 qgsproject.h   qgsproject.h 
skipping to change at line 42 skipping to change at line 42
#include "qgssnapper.h" #include "qgssnapper.h"
#include "qgstolerance.h" #include "qgstolerance.h"
//#include <QDomDocument> //#include <QDomDocument>
class QFileInfo; class QFileInfo;
class QDomDocument; class QDomDocument;
class QDomElement; class QDomElement;
class QDomNode; class QDomNode;
class QgsLayerTreeGroup;
class QgsLayerTreeRegistryBridge;
class QgsMapLayer; class QgsMapLayer;
class QgsProjectBadLayerHandler; class QgsProjectBadLayerHandler;
class QgsRelationManager; class QgsRelationManager;
class QgsVectorLayer; class QgsVectorLayer;
/** \ingroup core /** \ingroup core
* Reads and writes project states. * Reads and writes project states.
@note @note
skipping to change at line 81 skipping to change at line 83
@todo XXX Should have semantics for saving project if dirty as last gasp? @todo XXX Should have semantics for saving project if dirty as last gasp?
*/ */
~QgsProject(); ~QgsProject();
/// access to canonical QgsProject instance /// access to canonical QgsProject instance
static QgsProject * instance(); static QgsProject * instance();
/** /**
Every project has an associated title string Every project has an associated title string
@todo However current dialogs don't allow setting of it yet ### QGIS 3: remove in favor of setTitle(...)
*/ */
//@{ //@{
void title( const QString & title ); void title( const QString & title );
/** Set project title
* @note added in 2.4 */
void setTitle( const QString& title );
/** returns title */ /** returns title */
const QString & title() const; const QString & title() const;
//@} //@}
/** /**
the dirty flag is true if the project has been modified since the la st the dirty flag is true if the project has been modified since the la st
write() write()
*/ */
//@{ //@{
bool isDirty() const; bool isDirty() const;
// ### QGIS 3: remove in favor of setDirty(...)
void dirty( bool b ); void dirty( bool b );
/** Set project as dirty (modified).
* @note added in 2.4 */
void setDirty( bool b );
//@} //@}
/** /**
Every project has an associated file that contains its XML Every project has an associated file that contains its XML
*/ */
//@{ //@{
void setFileName( const QString & name ); void setFileName( const QString & name );
/** returns file name */ /** returns file name */
QString fileName() const; QString fileName() const;
//@} //@}
/** Clear the project
* @note added in 2.4
*/
void clear();
/** read project file /** read project file
@note Any current plug-in state is erased @note Any current plug-in state is erased
@note dirty set to false after successful invocation @note dirty set to false after successful invocation
@note file name argument implicitly sets file @note file name argument implicitly sets file
(Is that really desirable behavior? Maybe prompt to save before
reading new one?)
Should we presume the file is opened elsewhere? Or do we open it
ourselves?
XXX How to best get modify access to Qgis state? Actually we can fi
nagle
that by searching for qgisapp in object hiearchy.
@note @note
- Gets the extents - Gets the extents
- Creates maplayers - Creates maplayers
- Registers maplayers - Registers maplayers
@note it's presumed that the caller has already reset the map canvas , map registry, and legend @note it's presumed that the caller has already reset the map canvas , map registry, and legend
*/ */
//@{ //@{
bool read( const QFileInfo & file ); bool read( const QFileInfo & file );
skipping to change at line 198 skipping to change at line 205
the qgis specific state properites are different since they aren't the qgis specific state properites are different since they aren't
accessible here. Actually, what if we make "qgis" yet another accessible here. Actually, what if we make "qgis" yet another
scope that stores its state in the properties list? E.g., scope that stores its state in the properties list? E.g.,
QgsProject::instance()->properties()["qgis"]? QgsProject::instance()->properties()["qgis"]?
*/ */
// DEPRECATED Properties & properties( QString const & scope ); // DEPRECATED Properties & properties( QString const & scope );
/** /**
removes all project properties removes all project properties
### QGIS 3: remove in favor of clear()
*/ */
void clearProperties(); void clearProperties();
/* key value mutators /* key value mutators
keys would be the familiar QSettings-like '/' delimited entries, impl ying keys would be the familiar QSettings-like '/' delimited entries, impl ying
a hierarchy of keys and corresponding values a hierarchy of keys and corresponding values
@note The key string <em>must</em> include '/'s. E.g., "/foo" not "f oo". @note The key string <em>must</em> include '/'s. E.g., "/foo" not "f oo".
*/ */
skipping to change at line 279 skipping to change at line 288
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 f ile. Returns empty string if layer is not embedded*/ /** Returns project file path if layer is embedded from other project f ile. Returns empty string if layer is not embedded*/
QString layerIsEmbedded( const QString& id ) const; QString layerIsEmbedded( const QString& id ) const;
/** Creates a maplayer instance defined in an arbitrary project file. C aller takes ownership /** Creates a maplayer instance defined in an arbitrary project file. C aller takes ownership
@return the layer or 0 in case of error @return the layer or 0 in case of error
@note: added in version 1.8 @note: added in version 1.8
@note not available in python bindings
*/ */
bool createEmbeddedLayer( const QString& layerId, const QString& projec tFilePath, QList<QDomNode>& brokenNodes, bool createEmbeddedLayer( const QString& layerId, const QString& projec tFilePath, QList<QDomNode>& brokenNodes,
QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList, bool saveFlag = true ); QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList, bool saveFlag = true );
/** Create layer group instance defined in an arbitrary project file.
* @note: added in version 2.4
*/
QgsLayerTreeGroup* createEmbeddedGroup( const QString& groupName, const
QString& projectFilePath );
/** Convenience function to set snap settings per layer /** Convenience function to set snap settings per layer
@note added in version 1.9*/ @note added in version 1.9*/
void setSnapSettingsForLayer( const QString& layerId, bool enabled, Qgs Snapper::SnappingType type, QgsTolerance::UnitType unit, double tolerance, void setSnapSettingsForLayer( const QString& layerId, bool enabled, Qgs Snapper::SnappingType type, QgsTolerance::UnitType unit, double tolerance,
bool avoidIntersection ); bool avoidIntersection );
/** Convenience function to query snap settings of a layer /** Convenience function to query snap settings of a layer
@note added in version 1.9*/ @note added in version 1.9*/
bool snapSettingsForLayer( const QString& layerId, bool& enabled, QgsSn apper::SnappingType& type, QgsTolerance::UnitType& units, double& tolerance , bool snapSettingsForLayer( const QString& layerId, bool& enabled, QgsSn apper::SnappingType& type, QgsTolerance::UnitType& units, double& tolerance ,
bool& avoidIntersection ) const; bool& avoidIntersection ) const;
skipping to change at line 309 skipping to change at line 322
@note added in version 1.9*/ @note added in version 1.9*/
bool topologicalEditing() const; bool topologicalEditing() const;
/** Return project's home path /** Return project's home path
@return home path of project (or QString::null if not set) @return home path of project (or QString::null if not set)
@note added in version 2.0 */ @note added in version 2.0 */
QString homePath() const; QString homePath() const;
QgsRelationManager* relationManager() const; QgsRelationManager* relationManager() const;
/** Return pointer to the root (invisible) node of the project's layer
tree
* @note added in 2.4
*/
QgsLayerTreeGroup* layerTreeRoot() const;
/** Return pointer to the helper class that synchronizes map layer regi
stry with layer tree
* @note added in 2.4
*/
QgsLayerTreeRegistryBridge* layerTreeRegistryBridge() const { return mL
ayerTreeRegistryBridge; }
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 //Creates layer and adds it to maplayer registry
//! @note not available in python bindings //! @note not available in python bindings
bool addLayer( const QDomElement& layerElem, QList<QDomNode>& brokenNod es, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList ); bool addLayer( const QDomElement& layerElem, QList<QDomNode>& brokenNod es, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList );
//! @note not available in python bindings
void initializeEmbeddedSubtree( const QString& projectFilePath, QgsLaye
rTreeGroup* group );
//! @note not available in python bindings
void loadEmbeddedNodes( QgsLayerTreeGroup* group );
//! @note not available in python bindings
void updateEmbeddedGroupsProjectPath( QgsLayerTreeGroup* group );
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, after the basic initialisation of a layer from the project * Emitted, after the basic initialisation of a layer from the project
* file is done. You can use this signal to read additional information * file is done. You can use this signal to read additional information
skipping to change at line 394 skipping to change at line 426
/**Embeded layers which are defined in other projects. Key: layer id, /**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) 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 )*/ 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; QHash< QString, QPair< QString, bool> > mEmbeddedLayers;
void snapSettings( QStringList& layerIdList, QStringList& enabledList, QStringList& snapTypeList, QStringList& snapUnitList, QStringList& toleranc eUnitList, void snapSettings( QStringList& layerIdList, QStringList& enabledList, QStringList& snapTypeList, QStringList& snapUnitList, QStringList& toleranc eUnitList,
QStringList& avoidIntersectionList ) const; QStringList& avoidIntersectionList ) const;
QgsRelationManager* mRelationManager; QgsRelationManager* mRelationManager;
QgsLayerTreeGroup* mRootGroup;
QgsLayerTreeRegistryBridge* mLayerTreeRegistryBridge;
}; // 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. 13 change blocks. 
12 lines changed or deleted 52 lines changed or added


 qgsprojectbadlayerguihandler.h   qgsprojectbadlayerguihandler.h 
skipping to change at line 78 skipping to change at line 78
However, if the layer is a raster, then there won't be a However, if the layer is a raster, then there won't be a
provider tag. It will always have an associated file. provider tag. It will always have an associated file.
If the layer doesn't fall into either of the previous two categories, then If the layer doesn't fall into either of the previous two categories, then
it's either a database or URL. If the datasource tag has "url=", the n it's it's either a database or URL. If the datasource tag has "url=", the n it's
URL based and if it has "dbname=">, then the layer data is in a datab ase. URL based and if it has "dbname=">, then the layer data is in a datab ase.
*/ */
ProviderType providerType( QDomNode & layerNode ); ProviderType providerType( QDomNode & layerNode );
/** set the datasource element to the new value */ /** set the datasource element to the new value */
void setDataSource( QDomNode & layerNode, QString const & dataSource ); void setDataSource( QDomNode & layerNode, const QString &dataSource );
/** this is used to locate files that have moved or otherwise are missi ng */ /** this is used to locate files that have moved or otherwise are missi ng */
bool findMissingFile( QString const & fileFilters, QDomNode & layerNode ); bool findMissingFile( const QString &fileFilters, QDomNode &layerNode ) ;
/** find relocated data source for the given layer /** find relocated data source for the given layer
This QDom object represents a QgsProject node that maps to a specific layer. This QDom object represents a QgsProject node that maps to a specific layer.
@param fileFilters file filters to use @param fileFilters file filters to use
@param constLayerNode QDom node containing layer project information @param constLayerNode QDom node containing layer project information
@todo @todo
XXX Only implemented for file based layers. It will need to be exten ded for XXX Only implemented for file based layers. It will need to be exten ded for
XXX other data source types such as databases. XXX other data source types such as databases.
*/ */
bool findLayer( QString const & fileFilters, QDomNode const & constLaye rNode ); bool findLayer( const QString &fileFilters, const QDomNode &constLayerN ode );
/** find relocated data sources for given layers /** find relocated data sources for given layers
These QDom objects represent QgsProject nodes that map to specific la yers. These QDom objects represent QgsProject nodes that map to specific la yers.
*/ */
void findLayers( QString const & fileFilters, QList<QDomNode> const & l ayerNodes ); void findLayers( const QString &fileFilters, const QList<QDomNode> &lay erNodes );
}; };
#endif // QGSPROJECTBADLAYERGUIHANDLER_H #endif // QGSPROJECTBADLAYERGUIHANDLER_H
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 qgsprojectfiletransform.h   qgsprojectfiletransform.h 
skipping to change at line 86 skipping to change at line 86
// define them in qgsprojectfiletransform.cpp and add them // define them in qgsprojectfiletransform.cpp and add them
// to the transformArray with proper version number // to the transformArray with proper version number
void transformNull() {}; // Do absolutely nothing void transformNull() {}; // Do absolutely nothing
void transform081to090(); void transform081to090();
void transform091to0100(); void transform091to0100();
void transform0100to0110(); void transform0100to0110();
void transform0110to1000(); void transform0110to1000();
void transform1100to1200(); void transform1100to1200();
void transform1400to1500(); void transform1400to1500();
void transform1800to1900(); void transform1800to1900();
void transform2200to2300();
//helper functions //helper functions
static int rasterBandNumber( const QDomElement &rasterPropertiesElem, c onst QString &bandName, QgsRasterLayer *rlayer ); static int rasterBandNumber( const QDomElement &rasterPropertiesElem, c onst QString &bandName, QgsRasterLayer *rlayer );
static void transformContrastEnhancement( QDomDocument &doc, const QDom Element &rasterproperties, QDomElement &rendererElem ); static void transformContrastEnhancement( QDomDocument &doc, const QDom Element &rasterproperties, QDomElement &rendererElem );
static void transformRasterTransparency( QDomDocument& doc, const QDomE lement& orig, QDomElement& rendererElem ); static void transformRasterTransparency( QDomDocument& doc, const QDomE lement& orig, QDomElement& rendererElem );
}; };
#endif //QGSPROJECTFILETRANSFORM_H #endif //QGSPROJECTFILETRANSFORM_H
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 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::QgsPro jectionSelectorBase class GUI_EXPORT QgsProjectionSelector : public QWidget, private Ui::QgsPro jectionSelectorBase
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsProjectionSelector( QWidget* parent, const char *name = "", Qt::WFla gs fl = 0 ); QgsProjectionSelector( QWidget* parent, const char *name = "", Qt::Wind owFlags 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.
* *
skipping to change at line 107 skipping to change at line 107
* 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 nt, QTreeWidgetItem *prev ); void on_lstCoordinateSystems_currentItemChanged( QTreeWidgetItem *curre nt, QTreeWidgetItem *prev );
void on_lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWi dgetItem *prev ); void on_lstRecent_currentItemChanged( QTreeWidgetItem *current, QTreeWi dgetItem *prev );
void on_cbxHideDeprecated_stateChanged(); void on_cbxHideDeprecated_stateChanged();
void on_leSearch_textChanged( const QString & ); void on_leSearch_textChanged( const QString & );
//! mark selected projection for push to front
void pushProjectionToFront();
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:
/** /**
* \brief converts the CRS group to a SQL expression fragment * \brief converts the CRS group to a SQL expression fragment
skipping to change at line 183 skipping to change at line 186
//! 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;
enum columns { NAME_COLUMN, AUTHID_COLUMN, QGIS_CRS_ID_COLUMN, NONE }; enum columns { NAME_COLUMN, AUTHID_COLUMN, QGIS_CRS_ID_COLUMN, NONE };
int mSearchColumn; int mSearchColumn;
QString mSearchValue; QString mSearchValue;
bool mSkipFirstRecent; bool mPushProjectionToFront;
//! 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:
//! 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 );
//! Notify others that the widget is now fully initialized, including d
eferred selection of projection
//! @note added in 2.4
void initialized();
}; };
#endif #endif
 End of changes. 4 change blocks. 
2 lines changed or deleted 9 lines changed or added


 qgsprojectproperty.h   qgsprojectproperty.h 
skipping to change at line 123 skipping to change at line 123
*/ */
class CORE_EXPORT QgsPropertyValue : public QgsProperty class CORE_EXPORT QgsPropertyValue : public QgsProperty
{ {
public: public:
QgsPropertyValue() {} QgsPropertyValue() {}
QgsPropertyValue( const QVariant &value ) QgsPropertyValue( const QVariant &value )
: value_( value ) : value_( value )
{} {}
virtual ~ QgsPropertyValue() {} virtual ~QgsPropertyValue() {}
/** returns true if is a QgsPropertyKey */ /** returns true if is a QgsPropertyKey */
virtual bool isKey() const { return false; } virtual bool isKey() const { return false; }
/** returns true if is a QgsPropertyValue */ /** returns true if is a QgsPropertyValue */
virtual bool isValue() const { return true; } virtual bool isValue() const { return true; }
QVariant value() const { return value_; } QVariant value() const { return value_; }
/** returns true if is a leaf node /** returns true if is a leaf node
skipping to change at line 190 skipping to change at line 190
*/ */
class CORE_EXPORT QgsPropertyKey : public QgsProperty class CORE_EXPORT QgsPropertyKey : public QgsProperty
{ {
public: public:
QgsPropertyKey( const QString &name = "" ); QgsPropertyKey( const QString &name = "" );
virtual ~ QgsPropertyKey(); virtual ~ QgsPropertyKey();
/// every key has a name /// every key has a name
// @{ // @{
const QString &name() const const QString &name() const { return mName; }
{ return mName; }
QString & name() QString &name() { return mName; }
{ return mName; }
// @} // @}
/** if this key has a value, it will be stored by its name in its /** if this key has a value, it will be stored by its name in its
* properties * properties
*/ */
QVariant value() const; QVariant value() const;
/// add the given property key /// add the given property key
QgsPropertyKey * addKey( const QString & keyName ) QgsPropertyKey * addKey( const QString & keyName )
{ {
 End of changes. 3 change blocks. 
5 lines changed or deleted 3 lines changed or added


 qgsproviderregistry.h   qgsproviderregistry.h 
skipping to change at line 70 skipping to change at line 70
/** 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 *provider( const QString & providerKey, QgsDataProvider *provider( const QString & providerKey,
const QString & dataSource ); const QString & dataSource );
QWidget *selectWidget( const QString & providerKey, QWidget *selectWidget( const QString & providerKey,
QWidget * parent = 0, Qt::WFlags fl = 0 ); QWidget * parent = 0, Qt::WindowFlags fl = 0 );
/** Get pointer to provider function /** Get pointer to provider function
@param providerKey identificator of the provider @param providerKey identificator of the provider
@param functionName name of function @param functionName name of function
@return pointer to function or NULL on error @return pointer to function or NULL on error
*/ */
void *function( const QString & providerKey, void *function( const QString & providerKey,
const QString & functionName ); const QString & functionName );
QLibrary *providerLibrary( const QString & providerKey ) const; QLibrary *providerLibrary( const QString & providerKey ) const;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsquerybuilder.h   qgsquerybuilder.h 
skipping to change at line 51 skipping to change at line 51
{ {
Q_OBJECT Q_OBJECT
public: public:
/*! This constructor is used when the query builder is called from the /*! This constructor is used when the query builder is called from the
* vector layer properties dialog * vector layer properties dialog
* @param layer existing vector layer * @param layer existing vector layer
* @param parent Parent widget * @param parent Parent widget
* @param fl dialog flags * @param fl dialog flags
*/ */
QgsQueryBuilder( QgsVectorLayer *layer, QWidget *parent = 0, QgsQueryBuilder( QgsVectorLayer *layer, QWidget *parent = 0,
Qt::WFlags fl = QgisGui::ModalDialogFlags ); Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
~QgsQueryBuilder(); ~QgsQueryBuilder();
void showEvent( QShowEvent *event );
public slots: public slots:
void accept(); void accept();
void reject(); void reject();
void clear(); void clear();
void on_btnEqual_clicked(); void on_btnEqual_clicked();
void on_btnLessThan_clicked(); void on_btnLessThan_clicked();
void on_btnGreaterThan_clicked(); void on_btnGreaterThan_clicked();
void on_btnPct_clicked(); void on_btnPct_clicked();
void on_btnIn_clicked(); void on_btnIn_clicked();
void on_btnNotIn_clicked(); void on_btnNotIn_clicked();
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 qgsraster.h   qgsraster.h 
skipping to change at line 56 skipping to change at line 56
/*! Yellow band of CMYK image */ YellowBand = 12 , /*! Yellow band of CMYK image */ YellowBand = 12 ,
/*! Black band of CMLY image */ BlackBand = 13, /*! Black band of CMLY image */ BlackBand = 13,
/*! Y Luminance */ YCbCr_YBand = 1 4, /*! Y Luminance */ YCbCr_YBand = 1 4,
/*! Cb Chroma */ YCbCr_CbBand = 15, /*! Cb Chroma */ YCbCr_CbBand = 15,
/*! Cr Chroma */ YCbCr_CrBand = 16, /*! Cr Chroma */ YCbCr_CrBand = 16,
/*! Continuous palette, QGIS addition, GRASS */ ContinuousPalet te = 17 /*! Continuous palette, QGIS addition, GRASS */ ContinuousPalet te = 17
}; };
enum IdentifyFormat enum IdentifyFormat
{ {
IdentifyFormatUndefined = 0, IdentifyFormatUndefined = 0,
IdentifyFormatValue = 1, // numerical pixel value IdentifyFormatValue = 1, // numerical pixel value
IdentifyFormatText = 1 << 1, // WMS text IdentifyFormatText = 1 << 1, // WMS text
IdentifyFormatHtml = 1 << 2, // WMS HTML IdentifyFormatHtml = 1 << 2, // WMS HTML
IdentifyFormatFeature = 1 << 3 // WMS GML -> feature IdentifyFormatFeature = 1 << 3, // WMS GML/JSON -> feature
}; };
// Progress types // Progress types
enum RasterProgressType enum RasterProgressType
{ {
ProgressHistogram = 0, ProgressHistogram = 0,
ProgressPyramids = 1, ProgressPyramids = 1,
ProgressStatistics = 2 ProgressStatistics = 2
}; };
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 qgsrasterblock.h   qgsrasterblock.h 
skipping to change at line 294 skipping to change at line 294
bool setImage( const QImage * image ); bool setImage( const QImage * image );
// @note not available in python bindings // @note not available in python bindings
inline static double readValue( void *data, QGis::DataType type, qgssiz e index ); inline static double readValue( void *data, QGis::DataType type, qgssiz e index );
// @note not available in python bindings // @note not available in python bindings
inline static void writeValue( void *data, QGis::DataType type, qgssize index, double value ); inline static void writeValue( void *data, QGis::DataType type, qgssize index, double value );
void applyNoDataValues( const QgsRasterRangeList & rangeList ); void applyNoDataValues( const QgsRasterRangeList & rangeList );
/** apply band scale and offset to raster block values
* @@note added in 2.3 */
void applyScaleOffset( double scale, double offset );
/** \brief Get error */ /** \brief Get error */
QgsError error() const { return mError; } QgsError error() const { return mError; }
/** \brief Set error */ /** \brief Set error */
void setError( const QgsError & theError ) { mError = theError;} void setError( const QgsError & theError ) { mError = theError;}
/** \brief For theExtent and theWidht, theHeight find rectangle covered by subextent. /** \brief For theExtent and theWidht, theHeight find rectangle covered by subextent.
* The output rect has x oriented from left to right and y from top to bottom * The output rect has x oriented from left to right and y from top to bottom
* (upper-left to lower-right orientation). * (upper-left to lower-right orientation).
* @param theExtent extent, usually the larger * @param theExtent extent, usually the larger
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 qgsrasterdataprovider.h   qgsrasterdataprovider.h 
skipping to change at line 70 skipping to change at line 70
QgsRasterDataProvider( const QString & uri ); QgsRasterDataProvider( const QString & uri );
virtual ~QgsRasterDataProvider() {}; virtual ~QgsRasterDataProvider() {};
virtual QgsRasterInterface * clone() const = 0; virtual QgsRasterInterface * clone() const = 0;
/* It makes no sense to set input on provider */ /* It makes no sense to set input on provider */
bool setInput( QgsRasterInterface* input ) { Q_UNUSED( input ); return false; } bool setInput( QgsRasterInterface* input ) { Q_UNUSED( input ); return false; }
/** \brief Renders the layer as an image /** \brief Renders the layer as an image
\note When render caching (/qgis/enable_render_caching) is on the wm \note When render caching (/qgis/enable_render_caching) is on the wms
s provider doesn't wait for the reply of the getmap request or all
provider doesn't wait for the reply of the getmap request or a tiles replies and can return incomplete images.
ll Temporarily disable render caching if you require the complete
tiles replies and can return incomplete images. wms image in the first call.
Temporarily disable render caching if you require the complete
wms image in the first call.
*/ */
virtual QImage* draw( const QgsRectangle & viewExtent, int pixelWidth, int pixelHeight ) = 0; virtual QImage* draw( const QgsRectangle & viewExtent, int pixelWidth, int pixelHeight ) = 0;
/** Get the extent of the data source. /** Get the extent of the data source.
* @return QgsRectangle containing the extent of the layer */ * @return QgsRectangle containing the extent of the layer */
virtual QgsRectangle extent() = 0; virtual QgsRectangle extent() = 0;
/** Returns data type for the band specified by number */ /** Returns data type for the band specified by number */
virtual QGis::DataType dataType( int bandNo ) const = 0; virtual QGis::DataType dataType( int bandNo ) const = 0;
skipping to change at line 164 skipping to change at line 164
} }
} }
/** Reload data (data could change) */ /** Reload data (data could change) */
virtual bool reload() { return true; } virtual bool reload() { return true; }
virtual QString colorInterpretationName( int theBandNo ) const virtual QString colorInterpretationName( int theBandNo ) const
{ {
return colorName( colorInterpretation( theBandNo ) ); return colorName( colorInterpretation( theBandNo ) );
} }
/** Read band scale for raster value
* @@note added in 2.3 */
virtual double bandScale( int bandNo ) const { Q_UNUSED( bandNo ); retu
rn 1.0; }
/** Read band offset for raster value
* @@note added in 2.3 */
virtual double bandOffset( int bandNo ) const { Q_UNUSED( bandNo ); ret
urn 0.0; }
// TODO: remove or make protected all readBlock working with void* // TODO: remove or make protected all readBlock working with void*
/** Read block of data using given extent and size. */ /** Read block of data using given extent and size. */
virtual QgsRasterBlock *block( int theBandNo, const QgsRectangle &theEx tent, int theWidth, int theHeight ); virtual QgsRasterBlock *block( int theBandNo, const QgsRectangle &theEx tent, int theWidth, int theHeight );
/* Return true if source band has no data value */ /* Return true if source band has no data value */
virtual bool srcHasNoDataValue( int bandNo ) const { return mSrcHasNoDa taValue.value( bandNo -1 ); } virtual bool srcHasNoDataValue( int bandNo ) const { return mSrcHasNoDa taValue.value( bandNo -1 ); }
/** \brief Get source nodata value usage */ /** \brief Get source nodata value usage */
virtual bool useSrcNoDataValue( int bandNo ) const { return mUseSrcNoDa taValue.value( bandNo -1 ); } virtual bool useSrcNoDataValue( int bandNo ) const { return mUseSrcNoDa taValue.value( bandNo -1 ); }
/** \brief Set source nodata value usage */ /** \brief Set source nodata value usage */
virtual void setUseSrcNoDataValue( int bandNo, bool use ); virtual void setUseSrcNoDataValue( int bandNo, bool use );
/** Value representing no data value. */ /** Value representing no data value. */
virtual double srcNoDataValue( int bandNo ) const { return mSrcNoDataVa lue.value( bandNo -1 ); } virtual double srcNoDataValue( int bandNo ) const { return mSrcNoDataVa lue.value( bandNo -1 ); }
virtual void setUserNoDataValue( int bandNo, QgsRasterRangeList noData ); virtual void setUserNoDataValue( int bandNo, QgsRasterRangeList noData );
/** Get list of user no data value ranges */ /** Get list of user no data value ranges */
virtual QgsRasterRangeList userNoDataValues( int bandNo ) const { retu rn mUserNoDataValue.value( bandNo -1 ); } virtual QgsRasterRangeList userNoDataValues( int bandNo ) const { retur n mUserNoDataValue.value( bandNo -1 ); }
virtual QList<QgsColorRampShader::ColorRampItem> colorTable( int bandNo ) const virtual QList<QgsColorRampShader::ColorRampItem> colorTable( int bandNo ) const
{ Q_UNUSED( bandNo ); return QList<QgsColorRampShader::ColorRampItem>() ; } { Q_UNUSED( bandNo ); return QList<QgsColorRampShader::ColorRampItem>() ; }
/** \brief Returns the sublayers of this layer - useful for providers t hat manage /** \brief Returns the sublayers of this layer - useful for providers t hat manage
* their own layers, such as WMS */ * their own layers, such as WMS */
virtual QStringList subLayers() const virtual QStringList subLayers() const
{ {
return QStringList(); return QStringList();
} }
skipping to change at line 236 skipping to change at line 243
/** \brief Returns true if raster has at least one populated histogram. */ /** \brief Returns true if raster has at least one populated histogram. */
bool hasPyramids(); bool hasPyramids();
/** /**
* 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. The co ntext /** \brief Identify raster value(s) found on the point position. The co ntext
* parameters theExtent, theWidth and theHeigh are important to identify * parameters theExtent, theWidth and theHeight are important t o identify
* on the same zoom level as a displayed map and to do effectiv e * on the same zoom level as a displayed map and to do effectiv e
* caching (WCS). If context params are not specified the highe st * caching (WCS). If context params are not specified the highe st
* resolution is used. capabilities() may be used to test if fo rmat * resolution is used. capabilities() may be used to test if fo rmat
* is supported by provider. Values are set to 'no data' or emp ty string * is supported by provider. Values are set to 'no data' or emp ty string
* if point is outside data source extent. * if point is outside data source extent.
* *
* \note The arbitraryness of the returned document is enforced by WMS standards * \note The arbitraryness of the returned document is enforced by WMS standards
* up to at least v1.3.0 * up to at least v1.3.0
* @param thePoint coordinates in data source CRS * @param thePoint coordinates in data source CRS
* @param theFormat result format * @param theFormat result format
skipping to change at line 291 skipping to change at line 298
/** /**
* \brief Returns the format of the error text for the last error in this provider * \brief Returns the format of the error text for the last error in this provider
* *
* \note added in 1.6 * \note added in 1.6
*/ */
virtual QString lastErrorFormat(); virtual QString lastErrorFormat();
/**Returns the dpi of the output device. /**Returns the dpi of the output device.
@note: this method was added in version 1.2*/ @note: this method was added in version 1.2*/
int dpi() const {return mDpi;} int dpi() const { return mDpi; }
/**Sets the output device resolution. /**Sets the output device resolution.
@note: this method was added in version 1.2*/ @note: this method was added in version 1.2*/
void setDpi( int dpi ) {mDpi = dpi;} void setDpi( int dpi ) { mDpi = dpi; }
/** Time stamp of data source in the moment when data/metadata were 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 mTimestamp; } virtual QDateTime timestamp() const { return mTimestamp; }
/** Current time stamp of data source */ /** Current time stamp of data source */
virtual QDateTime dataTimestamp() const { return QDateTime(); } virtual QDateTime dataTimestamp() const { return QDateTime(); }
/**Writes into the provider datasource*/ /**Writes into the provider datasource*/
// TODO: add data type (may be defferent from band type) // TODO: add data type (may be defferent from band type)
virtual bool write( void* data, int band, int width, int height, int xO ffset, int yOffset ) virtual bool write( void* data, int band, int width, int height, int xO ffset, int yOffset )
skipping to change at line 331 skipping to change at line 338
int width, int height, double* ge oTransform, int width, int height, double* ge oTransform,
const QgsCoordinateReferenceSyste m& crs, const QgsCoordinateReferenceSyste m& crs,
QStringList createOptions = QStri ngList() ); QStringList createOptions = QStri ngList() );
/** Set no data value on created dataset /** Set no data value on created dataset
* @param bandNo band number * @param bandNo band number
* @param noDataValue no data value * @param noDataValue no data value
*/ */
virtual bool setNoDataValue( int bandNo, double noDataValue ) { Q_UNUSE D( bandNo ); Q_UNUSED( noDataValue ); return false; } virtual bool setNoDataValue( int bandNo, double noDataValue ) { Q_UNUSE D( bandNo ); Q_UNUSED( noDataValue ); return false; }
/** Returns the formats supported by create() */
// TODO: this should be static and call C functions in provider library
//static QStringList createFormats();
/** Remove dataset*/ /** Remove dataset*/
virtual bool remove() { return false; } virtual bool remove() { return false; }
/** Returns a list of pyramid resampling method name and label pairs /** Returns a list of pyramid resampling method name and label pairs
* for given provider */ * for given provider */
static QList<QPair<QString, QString> > pyramidResamplingMethods( QStrin g providerKey ); static QList<QPair<QString, QString> > pyramidResamplingMethods( QStrin g providerKey );
/** Validates creation options for a specific dataset and destination f ormat. /** Validates creation options for a specific dataset and destination f ormat.
* @note used by GDAL provider only * @note used by GDAL provider only
* @note see also validateCreationOptionsFormat() in gdal provider for validating options based on format only */ * @note see also validateCreationOptionsFormat() in gdal provider for validating options based on format only */
skipping to change at line 379 skipping to change at line 382
{ Q_UNUSED( bandNo ); Q_UNUSED( xBlock ); Q_UNUSED( yBlock ); Q_UNUSED( data ); } { Q_UNUSED( bandNo ); Q_UNUSED( xBlock ); Q_UNUSED( yBlock ); Q_UNUSED( data ); }
/** Read block of data using give extent and size /** Read block of data using give extent and size
* @note not available in python bindings */ * @note not available in python bindings */
virtual void readBlock( int bandNo, QgsRectangle const & viewExtent, i nt width, int height, void *data ) virtual void readBlock( int bandNo, QgsRectangle const & viewExtent, i nt width, int height, void *data )
{ Q_UNUSED( bandNo ); Q_UNUSED( viewExtent ); Q_UNUSED( width ); Q_UNUS ED( height ); Q_UNUSED( data ); } { Q_UNUSED( bandNo ); Q_UNUSED( viewExtent ); Q_UNUSED( width ); Q_UNUS ED( height ); Q_UNUSED( data ); }
/** Returns true if user no data contains value */ /** Returns true if user no data contains value */
bool userNoDataValuesContains( int bandNo, double value ) const; bool userNoDataValuesContains( int bandNo, double value ) const;
/** Copy member variables from other raster data provider. Useful for i
mplementation of clone() method in subclasses */
void copyBaseSettings( const QgsRasterDataProvider& other );
static QStringList cStringList2Q_( char ** stringList ); static QStringList cStringList2Q_( char ** stringList );
static QString makeTableCell( const QString & value ); static QString makeTableCell( const QString & value );
static QString makeTableCells( const QStringList & values ); static QString makeTableCells( const QStringList & values );
/** Dots per inch. Extended WMS (e.g. QGIS mapserver) support DPI depen dent output and therefore /** Dots per inch. Extended WMS (e.g. QGIS mapserver) support DPI depen dent output and therefore
are suited for printing. A value of -1 means it has not been set are suited for printing. A value of -1 means it has not been set
@note: this member has been added in version 1.2*/ @note: this member has been added in version 1.2*/
int mDpi; int mDpi;
 End of changes. 8 change blocks. 
15 lines changed or deleted 22 lines changed or added


 qgsrasterhistogramwidget.h   qgsrasterhistogramwidget.h 
skipping to change at line 117 skipping to change at line 117
QwtPlotPicker* mHistoPicker; QwtPlotPicker* mHistoPicker;
QwtPlotZoomer* mHistoZoomer; QwtPlotZoomer* mHistoZoomer;
QwtPlotMarker* mHistoMarkerMin; QwtPlotMarker* mHistoMarkerMin;
QwtPlotMarker* mHistoMarkerMax; QwtPlotMarker* mHistoMarkerMax;
double mHistoMin; double mHistoMin;
double mHistoMax; double mHistoMax;
QVector<QColor> mHistoColors; QVector<QColor> mHistoColors;
bool mHistoShowMarkers; bool mHistoShowMarkers;
bool mHistoZoomToMinMax; bool mHistoZoomToMinMax;
bool mHistoUpdateStyleToMinMax; bool mHistoUpdateStyleToMinMax;
bool mHistoDrawLines;
/* bool mHistoLoadApplyAll; */ /* bool mHistoLoadApplyAll; */
HistoShowBands mHistoShowBands; HistoShowBands mHistoShowBands;
/** \brief Returns a list of selected bands in the histogram widget- or empty if there is no selection restriction. */ /** \brief Returns a list of selected bands in the histogram widget- or empty if there is no selection restriction. */
QList< int > histoSelectedBands(); QList< int > histoSelectedBands();
/** \brief Returns a list of selected bands in the renderer widget. */ /** \brief Returns a list of selected bands in the renderer widget. */
QList< int > rendererSelectedBands(); QList< int > rendererSelectedBands();
QPair< QString, QString > rendererMinMax( int theBandNo ); QPair< QString, QString > rendererMinMax( int theBandNo );
}; };
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 qgsrasterinterface.h   qgsrasterinterface.h 
skipping to change at line 43 skipping to change at line 43
* Base class for processing filters like renderers, reprojector, resampler etc. * Base class for processing filters like renderers, reprojector, resampler etc.
*/ */
class CORE_EXPORT QgsRasterInterface class CORE_EXPORT QgsRasterInterface
{ {
Q_DECLARE_TR_FUNCTIONS( QgsRasterInterface ); Q_DECLARE_TR_FUNCTIONS( QgsRasterInterface );
public: public:
//! If you add to this, please also add to capabilitiesString() //! If you add to this, please also add to capabilitiesString()
enum Capability enum Capability
{ {
NoCapabilities = 0, NoCapabilities = 0,
Size = 1 << 1, // original data source size (and t Size = 1 << 1, // original data source size (and thus res
hus resolution) is known, it is not always available, for example for WMS olution) is known, it is not always available, for example for WMS
Create = 1 << 2, // create new datasets Create = 1 << 2, // create new datasets
Remove = 1 << 3, // delete datasets Remove = 1 << 3, // delete datasets
BuildPyramids = 1 << 4, // supports building of pyramids (o BuildPyramids = 1 << 4, // supports building of pyramids (overview
verviews) s)
Identify = 1 << 5, // at least one identify format sup Identify = 1 << 5, // at least one identify format supported
ported IdentifyValue = 1 << 6, // numerical values
IdentifyValue = 1 << 6, // numerical values IdentifyText = 1 << 7, // WMS text
IdentifyText = 1 << 7, // WMS text IdentifyHtml = 1 << 8, // WMS HTML
IdentifyHtml = 1 << 8, // WMS HTML IdentifyFeature = 1 << 9, // WMS GML -> feature
IdentifyFeature = 1 << 9 // WMS GML -> feature
}; };
QgsRasterInterface( QgsRasterInterface * input = 0 ); QgsRasterInterface( QgsRasterInterface * input = 0 );
virtual ~QgsRasterInterface(); virtual ~QgsRasterInterface();
/** Clone itself, create deep copy */ /** Clone itself, create deep copy */
virtual QgsRasterInterface *clone() const = 0; virtual QgsRasterInterface *clone() const = 0;
/** Returns a bitmask containing the supported capabilities */ /** Returns a bitmask containing the supported capabilities */
skipping to change at line 100 skipping to change at line 100
/** Get block size */ /** Get block size */
virtual int xBlockSize() const { if ( mInput ) return mInput->xBlockSiz e(); else return 0; } virtual int xBlockSize() const { if ( mInput ) return mInput->xBlockSiz e(); else return 0; }
virtual int yBlockSize() const { if ( mInput ) return mInput->yBlockSiz e(); else return 0; } virtual int yBlockSize() const { if ( mInput ) return mInput->yBlockSiz e(); else return 0; }
/** Get raster size */ /** Get raster size */
virtual int xSize() const { if ( mInput ) return mInput->xSize(); else return 0; } virtual int xSize() const { if ( mInput ) return mInput->xSize(); else return 0; }
virtual int ySize() const { if ( mInput ) return mInput->ySize(); else return 0; } virtual int ySize() const { if ( mInput ) return mInput->ySize(); else return 0; }
/** \brief helper function to create zero padded band names */ /** \brief helper function to create zero padded band names */
virtual QString generateBandName( int theBandNumber ) const virtual QString generateBandName( int theBandNumber ) const
{ {
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' ) );
} }
/** Read block of data using given extent and size. /** Read block of data using given extent and size.
* Returns pointer to data. * Returns pointer to data.
* Caller is responsible to free the memory returned. * Caller is responsible to free the memory returned.
* @param bandNo band number * @param bandNo band number
* @param extent extent of block * @param extent extent of block
* @param width pixel width of block * @param width pixel width of block
 End of changes. 2 change blocks. 
14 lines changed or deleted 13 lines changed or added


 qgsrasterlayer.h   qgsrasterlayer.h 
skipping to change at line 56 skipping to change at line 56
#include "qgsrasterviewport.h" #include "qgsrasterviewport.h"
class QgsMapToPixel; class QgsMapToPixel;
class QgsRasterRenderer; class QgsRasterRenderer;
class QgsRectangle; class QgsRectangle;
class QImage; class QImage;
class QLibrary; class QLibrary;
class QPixmap; class QPixmap;
class QSlider; class QSlider;
typedef QList < QPair< QString, QColor > > QgsLegendColorList;
/** \ingroup core /** \ingroup core
* This class provides qgis with the ability to render raster datasets * This class provides qgis with the ability to render raster datasets
* onto the mapcanvas. * onto the mapcanvas.
* *
* The qgsrasterlayer class makes use of gdal for data io, and thus suppor ts * The qgsrasterlayer class makes use of gdal for data io, and thus suppor ts
* any gdal supported format. The constructor attempts to infer what type of * any gdal supported format. The constructor attempts to infer what type of
* file (LayerType) is being opened - not in terms of the file format (tif , ascii grid etc.) * file (LayerType) is being opened - not in terms of the file format (tif , ascii grid etc.)
* but rather in terms of whether the image is a GRAYSCALE, PaletteD or Mu ltiband, * but rather in terms of whether the image is a GRAYSCALE, PaletteD or Mu ltiband,
* *
* Within the three allowable raster layer types, there are 8 permutations of * Within the three allowable raster layer types, there are 8 permutations of
skipping to change at line 285 skipping to change at line 287
/** Returns the data provider in a const-correct manner /** Returns the data provider in a const-correct manner
@note available in python bindings as constDataProvider() @note available in python bindings as constDataProvider()
*/ */
const QgsRasterDataProvider* dataProvider() const; const QgsRasterDataProvider* dataProvider() const;
/**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();
/** Return new instance of QgsMapLayerRenderer that will be used for re
ndering of given context
* @note added in 2.4
*/
virtual QgsMapLayerRenderer* createMapRenderer( QgsRenderContext& rende
rerContext );
/** \brief This is called when the view on the raster layer needs to be redrawn */ /** \brief This is called when the view on the raster layer needs to be redrawn */
bool draw( QgsRenderContext& rendererContext ); bool draw( QgsRenderContext& rendererContext );
/** \brief This is an overloaded version of the draw() function that is called by both draw() and thumbnailAsPixmap */ /** \brief This is an overloaded version of the draw() function that is called by both draw() and thumbnailAsPixmap */
void draw( QPainter * theQPainter, void draw( QPainter * theQPainter,
QgsRasterViewPort * myRasterViewPort, QgsRasterViewPort * myRasterViewPort,
const QgsMapToPixel* theQgsMapToPixel = 0 ); const QgsMapToPixel* theQgsMapToPixel = 0 );
/** \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();
/** \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();
/**Returns a list with classification items (Text and color) /**Returns a list with classification items (Text and color)
@note this method was added in version 1.8*/ @note this method was added in version 1.8*/
QList< QPair< QString, QColor > > legendSymbologyItems() const; QgsLegendColorList legendSymbologyItems() const;
/** \brief Obtain GDAL Metadata for this layer */ /** \brief Obtain GDAL Metadata for this layer */
QString metadata(); QString metadata();
/** \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 theBandNumber = 1 ); QPixmap paletteAsPixmap( int theBandNumber = 1 );
/** \brief [ data provider interface ] Which provider is being used fo r this Raster Layer? /** \brief [ data provider interface ] Which provider is being used fo r this Raster Layer?
* @note added in 2.0 * @note added in 2.0
*/ */
skipping to change at line 343 skipping to change at line 344
/** \brief Overloaded version of the above function for convenience whe n restoring from xml */ /** \brief Overloaded version of the above function for convenience whe n restoring from xml */
void setDrawingStyle( const QString & theDrawingStyleQString ); void setDrawingStyle( const QString & theDrawingStyleQString );
/** \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 */
virtual QStringList subLayers() const; virtual QStringList subLayers() const;
/** \brief Draws a preview of the rasterlayer into a pixmap */ /** \brief Draws a preview of the rasterlayer into a pixmap
QPixmap previewAsPixmap( QSize size, QColor bgColor = Qt::white ); @note - use previewAsImage() for rendering with QGIS>=2.4 */
Q_DECL_DEPRECATED QPixmap previewAsPixmap( QSize size, QColor bgColor =
Qt::white );
/** \brief Draws a preview of the rasterlayer into a QImage
@note added in 2.4 */
QImage previewAsImage( QSize size, QColor bgColor = Qt::white,
QImage::Format format = QImage::Format_ARGB32_Pr
emultiplied );
/** \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();
/** /**
* 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)
* *
*/ */
skipping to change at line 368 skipping to change at line 375
* 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 );
/** 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:
void showStatusMessage( const QString & theMessage ); void showStatusMessage( const QString & theMessage );
/** \brief Propagate progress updates from GDAL up to the parent app */ //! @deprecated in 2.4 - does nothing
void updateProgress( int, int ); Q_DECL_DEPRECATED void updateProgress( int, int );
/** \brief receive 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();
/** Signal emitted when the symbology changes, through call to setRende
rer() */
void rendererChanged();
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( const 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;
skipping to change at line 422 skipping to change at line 426
/** \brief Constant defining flag for XML and a constant that signals property not used */ /** \brief Constant defining flag for XML and a constant that signals property not used */
const QString QSTRING_NOT_SET; const QString QSTRING_NOT_SET;
const QString TRSTRING_NOT_SET; const QString TRSTRING_NOT_SET;
/** Pointer to data provider */ /** Pointer to data provider */
QgsRasterDataProvider* mDataProvider; QgsRasterDataProvider* mDataProvider;
//DrawingStyle mDrawingStyle; //DrawingStyle mDrawingStyle;
/** [ data provider interface ]The error message associated with the la
st error */
QString mError;
/** [ data provider interface ] The error caption associated with the l
ast error */
QString mErrorCaption;
/** [ data provider interface ] Timestamp, the last modified time of t he data source when the layer was created */ /** [ data provider interface ] Timestamp, the last modified time of t he data source when the layer was created */
QDateTime mLastModified; QDateTime mLastModified;
QgsRasterViewPort mLastViewPort; QgsRasterViewPort mLastViewPort;
/** [ data provider interface ] Data provider key */ /** [ data provider interface ] Data provider key */
QString mProviderKey; QString mProviderKey;
LayerType mRasterType; LayerType mRasterType;
 End of changes. 8 change blocks. 
27 lines changed or deleted 22 lines changed or added


 qgsrasterlayersaveasdialog.h   qgsrasterlayersaveasdialog.h 
skipping to change at line 42 skipping to change at line 42
{ {
RawDataMode, RawDataMode,
RenderedImageMode RenderedImageMode
}; };
enum CrsState enum CrsState
{ {
OriginalCrs, OriginalCrs,
CurrentCrs, CurrentCrs,
UserCrs UserCrs
}; };
enum ExtentState
{
OriginalExtent,
CurrentExtent,
UserExtent,
};
enum ResolutionState enum ResolutionState
{ {
OriginalResolution, OriginalResolution,
UserResolution UserResolution
}; };
QgsRasterLayerSaveAsDialog( QgsRasterLayer* rasterLayer, QgsRasterLayerSaveAsDialog( QgsRasterLayer* rasterLayer,
QgsRasterDataProvider* sourceProvider, cons t QgsRectangle& currentExtent, QgsRasterDataProvider* sourceProvider, cons t QgsRectangle& currentExtent,
const QgsCoordinateReferenceSystem& layerCr s, const QgsCoordinateReferenceSystem& currentCrs, const QgsCoordinateReferenceSystem& layerCr s, const QgsCoordinateReferenceSystem& currentCrs,
QWidget* parent = 0, Qt::WindowFlags f = 0 ); QWidget* parent = 0, Qt::WindowFlags f = 0 );
skipping to change at line 91 skipping to change at line 85
void hideFormat(); void hideFormat();
void hideOutput(); void hideOutput();
public slots: public slots:
virtual void accept() { if ( validate() ) return QDialog::accept(); } virtual void accept() { if ( validate() ) return QDialog::accept(); }
private slots: private slots:
void on_mRawModeRadioButton_toggled( bool ); void on_mRawModeRadioButton_toggled( bool );
void on_mBrowseButton_clicked(); void on_mBrowseButton_clicked();
void on_mSaveAsLineEdit_textChanged( const QString& text ); void on_mSaveAsLineEdit_textChanged( const QString& text );
void on_mCurrentExtentButton_clicked();
void on_mOriginalExtentButton_clicked();
void on_mFormatComboBox_currentIndexChanged( const QString& text ); void on_mFormatComboBox_currentIndexChanged( const QString& text );
void on_mResolutionRadioButton_toggled( bool ) { toggleResolutionSize() ; } void on_mResolutionRadioButton_toggled( bool ) { toggleResolutionSize() ; }
void on_mOriginalResolutionPushButton_clicked() { setOriginalResolution (); } void on_mOriginalResolutionPushButton_clicked() { setOriginalResolution (); }
void on_mXResolutionLineEdit_textEdited( const QString & ) { mResolutio nState = UserResolution; recalcSize(); } void on_mXResolutionLineEdit_textEdited( const QString & ) { mResolutio nState = UserResolution; recalcSize(); }
void on_mYResolutionLineEdit_textEdited( const QString & ) { mResolutio nState = UserResolution; recalcSize(); } void on_mYResolutionLineEdit_textEdited( const QString & ) { mResolutio nState = UserResolution; recalcSize(); }
void on_mOriginalSizePushButton_clicked() { setOriginalSize(); } void on_mOriginalSizePushButton_clicked() { setOriginalSize(); }
void on_mColumnsLineEdit_textEdited( const QString & ) { mResolutionSta te = UserResolution; recalcResolution(); } void on_mColumnsLineEdit_textEdited( const QString & ) { mResolutionSta te = UserResolution; recalcResolution(); }
void on_mRowsLineEdit_textEdited( const QString & ) { mResolutionState = UserResolution; recalcResolution(); } void on_mRowsLineEdit_textEdited( const QString & ) { mResolutionState = UserResolution; recalcResolution(); }
void on_mXMinLineEdit_textEdited( const QString & ) { mExtentState = Us
erExtent; extentChanged(); }
void on_mXMaxLineEdit_textEdited( const QString & ) { mExtentState = Us
erExtent; extentChanged(); }
void on_mYMinLineEdit_textEdited( const QString & ) { mExtentState = Us
erExtent; extentChanged(); }
void on_mYMaxLineEdit_textEdited( const QString & ) { mExtentState = Us
erExtent; extentChanged(); }
void on_mChangeCrsPushButton_clicked(); void on_mChangeCrsPushButton_clicked();
void on_mCrsComboBox_currentIndexChanged( int ) { crsChanged(); } void on_mCrsComboBox_currentIndexChanged( int ) { crsChanged(); }
void on_mAddNoDataManuallyToolButton_clicked(); void on_mAddNoDataManuallyToolButton_clicked();
void on_mLoadTransparentNoDataToolButton_clicked(); void on_mLoadTransparentNoDataToolButton_clicked();
void on_mRemoveSelectedNoDataToolButton_clicked(); void on_mRemoveSelectedNoDataToolButton_clicked();
void on_mRemoveAllNoDataToolButton_clicked(); void on_mRemoveAllNoDataToolButton_clicked();
void noDataCellTextEdited( const QString & text ); void noDataCellTextEdited( const QString & text );
void on_mTileModeCheckBox_toggled( bool toggled ); void on_mTileModeCheckBox_toggled( bool toggled );
void on_mPyramidsGroupBox_toggled( bool toggled ); void on_mPyramidsGroupBox_toggled( bool toggled );
void populatePyramidsLevels(); void populatePyramidsLevels();
void extentChanged();
private: private:
QgsRasterLayer* mRasterLayer; QgsRasterLayer* mRasterLayer;
QgsRasterDataProvider* mDataProvider; QgsRasterDataProvider* mDataProvider;
QgsRectangle mCurrentExtent; QgsRectangle mCurrentExtent;
QgsCoordinateReferenceSystem mLayerCrs; // may differ from provider CRS QgsCoordinateReferenceSystem mLayerCrs; // may differ from provider CRS
QgsCoordinateReferenceSystem mCurrentCrs; QgsCoordinateReferenceSystem mCurrentCrs;
QgsCoordinateReferenceSystem mUserCrs; QgsCoordinateReferenceSystem mUserCrs;
QgsCoordinateReferenceSystem mPreviousCrs; QgsCoordinateReferenceSystem mPreviousCrs;
ExtentState mExtentState;
ResolutionState mResolutionState; ResolutionState mResolutionState;
QVector<bool> mNoDataToEdited; QVector<bool> mNoDataToEdited;
void setValidators(); void setValidators();
void setOutputExtent( const QgsRectangle& r, const QgsCoordinateReferen
ceSystem& srcCrs, ExtentState state );
void extentChanged();
void updateExtentStateMsg();
void toggleResolutionSize(); void toggleResolutionSize();
void setResolution( double xRes, double yRes, const QgsCoordinateRefere nceSystem& srcCrs ); void setResolution( double xRes, double yRes, const QgsCoordinateRefere nceSystem& srcCrs );
void setOriginalResolution(); void setOriginalResolution();
void setOriginalSize(); void setOriginalSize();
void recalcSize(); void recalcSize();
void recalcResolution(); void recalcResolution();
void updateResolutionStateMsg(); void updateResolutionStateMsg();
void recalcResolutionSize(); void recalcResolutionSize();
void crsChanged(); void crsChanged();
void updateCrsGroup(); void updateCrsGroup();
 End of changes. 6 change blocks. 
22 lines changed or deleted 1 lines changed or added


 qgsrectangle.h   qgsrectangle.h 
skipping to change at line 101 skipping to change at line 101
//! return true when rectangle contains other rectangle //! return true when rectangle contains other rectangle
//! @note added in version 1.1 //! @note added in version 1.1
bool contains( const QgsRectangle& rect ) const; bool contains( const QgsRectangle& rect ) const;
//! return true when rectangle contains a point //! return true when rectangle contains a point
//! @note added in version 1.3 //! @note added in version 1.3
bool contains( const QgsPoint &p ) const; bool contains( const QgsPoint &p ) const;
//! expand the rectangle so that covers both the original rectangle and the given rectangle //! expand the rectangle so that covers both the original rectangle and the given rectangle
void combineExtentWith( QgsRectangle *rect ); void combineExtentWith( QgsRectangle *rect );
//! expand the rectangle so that covers both the original rectangle and the given point //! expand the rectangle so that covers both the original rectangle and the given point
void combineExtentWith( double x, double y ); void combineExtentWith( double x, double y );
//! test if rectangle is empty //! test if rectangle is empty.
//! Empty rectangle may still be non-null if it contains valid informat
ion (e.g. bounding box of a point)
bool isEmpty() const; bool isEmpty() const;
//! test if the rectangle is null (all coordinates zero or after call t
o setMinimal()).
//! Null rectangle is also an empty rectangle.
//! @note added in 2.4
bool isNull() const;
//! returns string representation in Wkt form //! returns string representation in Wkt form
QString asWktCoordinates() const; QString asWktCoordinates() const;
//! returns string representation as WKT Polygon //! returns string representation as WKT Polygon
//! @note added in 2.0 //! @note added in 2.0
QString asWktPolygon() const; QString asWktPolygon() const;
//! returns a QRectF with same coordinates. //! returns a QRectF with same coordinates.
//! @note added in 2.0 //! @note added in 2.0
QRectF toRectF() const; QRectF toRectF() const;
//! returns string representation of form xmin,ymin xmax,ymax //! returns string representation of form xmin,ymin xmax,ymax
QString toString( bool automaticPrecision = false ) const; QString toString( bool automaticPrecision = false ) const;
 End of changes. 2 change blocks. 
1 lines changed or deleted 8 lines changed or added


 qgsrelation.h   qgsrelation.h 
skipping to change at line 121 skipping to change at line 121
* @param referencedField The field name on the referenced layer (PK ) * @param referencedField The field name on the referenced layer (PK )
*/ */
void addFieldPair( QString referencingField, QString referencedField ); void addFieldPair( QString referencingField, QString referencedField );
/** /**
* Add a field pairs which is part of this relation * Add a field pairs which is part of this relation
* The first element of each pair are the field names fo the foreign ke y. * The first element of each pair are the field names fo the foreign ke y.
* The second element of each pair are the field names of the matching primary key. * The second element of each pair are the field names of the matching primary key.
* *
* @param fieldPair A pair of two strings * @param fieldPair A pair of two strings
* @note not available in python bindings
*/ */
void addFieldPair( FieldPair fieldPair ); void addFieldPair( FieldPair fieldPair );
/** /**
* Creates an iterator which returns all the features on the referencin g (child) layer * Creates an iterator which returns all the features on the referencin g (child) layer
* which have a foreign key pointing to the provided feature. * which have a foreign key pointing to the provided feature.
* *
* @param feature A feature from the referenced (parent) layer * @param feature A feature from the referenced (parent) layer
* *
* @return An iterator with all the referenced features * @return An iterator with all the referenced features
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 qgsrelationadddlg.h   qgsrelationadddlg.h 
#ifndef QGSRELATIONADDDLG_H #ifndef QGSRELATIONADDDLG_H
#define QGSRELATIONADDDLG_H #define QGSRELATIONADDDLG_H
#include <QDialog> #include <QDialog>
#include "ui_qgsrelationadddlgbase.h" #include "ui_qgsrelationadddlgbase.h"
class QgsVectorLayer; class QgsVectorLayer;
class QgsRelationAddDlg : public QDialog, private Ui::QgsRelationAddDlgBase class GUI_EXPORT QgsRelationAddDlg : public QDialog, private Ui::QgsRelatio nAddDlgBase
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit QgsRelationAddDlg( QWidget *parent = 0 ); explicit QgsRelationAddDlg( QWidget *parent = 0 );
void addLayers( QList<QgsVectorLayer* > layers ); void addLayers( QList<QgsVectorLayer* > layers );
QString referencingLayerId(); QString referencingLayerId();
QString referencedLayerId(); QString referencedLayerId();
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsrelationeditor.h   qgsrelationeditor.h 
skipping to change at line 31 skipping to change at line 31
#include "ui_qgsrelationeditorwidgetbase.h" #include "ui_qgsrelationeditorwidgetbase.h"
#include "qgsattributeeditorcontext.h" #include "qgsattributeeditorcontext.h"
#include "qgsrelation.h" #include "qgsrelation.h"
class QgsDualView; class QgsDualView;
class QgsFeature; class QgsFeature;
class QgsGenericFeatureSelectionManager; class QgsGenericFeatureSelectionManager;
class QgsVectorLayer; class QgsVectorLayer;
class QgsVectorLayerTools; class QgsVectorLayerTools;
class QgsRelationEditorWidget : public QgsCollapsibleGroupBox, private Ui:: QgsRelationEditorWidgetBase class GUI_EXPORT QgsRelationEditorWidget : public QgsCollapsibleGroupBox, p rivate Ui::QgsRelationEditorWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsRelationEditorWidget( const QgsRelation& relation, const QgsFeature&
feature, QgsAttributeEditorContext context, QWidget* parent = NULL );
static QgsRelationEditorWidget* createRelationEditor( const QgsRelation & relation, const QgsFeature& feature, QgsAttributeEditorContext context, Q Widget* parent = NULL ); static QgsRelationEditorWidget* createRelationEditor( const QgsRelation & relation, const QgsFeature& feature, QgsAttributeEditorContext context, Q Widget* parent = NULL );
private slots: private slots:
void onCollapsedStateChanged( bool state ); void onCollapsedStateChanged( bool state );
void referencingLayerEditingToggled(); void referencingLayerEditingToggled();
void viewModeChanged( int mode ); void viewModeChanged( int mode );
void on_mAddFeatureButton_clicked(); void on_mAddFeatureButton_clicked();
void on_mLinkFeatureButton_clicked(); void on_mLinkFeatureButton_clicked();
void on_mDeleteFeatureButton_clicked(); void on_mDeleteFeatureButton_clicked();
void on_mUnlinkFeatureButton_clicked(); void on_mUnlinkFeatureButton_clicked();
void on_mToggleEditingButton_toggled( bool state ); void on_mToggleEditingButton_toggled( bool state );
private: private:
/**
* You should use the static method createRelationEditor
*
* @param relation
* @param feature
* @param context
* @param parent
*/
QgsRelationEditorWidget( const QgsRelation& relation, const QgsFeature&
feature, QgsAttributeEditorContext context, QWidget* parent = NULL );
QgsDualView* mDualView; QgsDualView* mDualView;
QgsGenericFeatureSelectionManager* mFeatureSelectionMgr; QgsGenericFeatureSelectionManager* mFeatureSelectionMgr;
QgsAttributeEditorContext mEditorContext; QgsAttributeEditorContext mEditorContext;
QgsRelation mRelation; QgsRelation mRelation;
QgsFeature mFeature; QgsFeature mFeature;
}; };
#endif // QGSRELATIONEDITOR_H #endif // QGSRELATIONEDITOR_H
 End of changes. 3 change blocks. 
4 lines changed or deleted 12 lines changed or added


 qgsrelationmanager.h   qgsrelationmanager.h 
skipping to change at line 53 skipping to change at line 53
void removeRelation( const QgsRelation& relation ); void removeRelation( const QgsRelation& relation );
QgsRelation relation( const QString& id ) const; QgsRelation relation( const QString& id ) const;
void clear(); void clear();
QList<QgsRelation> referencingRelations( QgsVectorLayer *layer = 0, int fieldIdx = -2 ) const; QList<QgsRelation> referencingRelations( QgsVectorLayer *layer = 0, int fieldIdx = -2 ) const;
QList<QgsRelation> referencedRelations( QgsVectorLayer *layer = 0 ) con st; QList<QgsRelation> referencedRelations( QgsVectorLayer *layer = 0 ) con st;
signals: signals:
void relationsLoaded(); void relationsLoaded();
public slots:
private slots: private slots:
void readProject( const QDomDocument &doc ); void readProject( const QDomDocument &doc );
void writeProject( QDomDocument &doc ); void writeProject( QDomDocument &doc );
void layersRemoved( const QStringList& layers );
private: private:
/** The references */ /** The references */
QMap<QString, QgsRelation> mRelations; QMap<QString, QgsRelation> mRelations;
QgsProject* mProject; QgsProject* mProject;
}; };
#endif // QGSRELATIONMANAGER_H #endif // QGSRELATIONMANAGER_H
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 qgsrelationreferencefactory.h   qgsrelationreferencefactory.h 
skipping to change at line 73 skipping to change at line 73
/** /**
* Serialize your configuration and save it in a xml doc. * Serialize your configuration and save it in a xml doc.
* *
* @param config The configuration to serialize * @param config The configuration to serialize
* @param configElement The element, where you can write your configura tion into * @param configElement The element, where you can write your configura tion into
* @param doc The document. You can use this to create new no des * @param doc The document. You can use this to create new no des
* @param layer The layer for which this configuration applies * @param layer The layer for which this configuration applies
* @param fieldIdx The field on the layer for which this configura tion applies * @param fieldIdx The field on the layer for which this configura tion applies
*/ */
virtual void writeConfig( const QgsEditorWidgetConfig& config, QDomElem ent& configElement, const QDomDocument& doc, const QgsVectorLayer* layer, i nt fieldIdx ); virtual void writeConfig( const QgsEditorWidgetConfig& config, QDomElem ent& configElement, QDomDocument& doc, const QgsVectorLayer* layer, int fie ldIdx );
private: private:
QgsAttributeEditorContext mEditorContext; QgsAttributeEditorContext mEditorContext;
}; };
#endif // QGSRELATIONREFERENCEFACTORY_H #endif // QGSRELATIONREFERENCEFACTORY_H
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsrenderchecker.h   qgsrenderchecker.h 
skipping to change at line 27 skipping to change at line 27
#define QGSRENDERCHECKER_H #define QGSRENDERCHECKER_H
#include <qgis.h> #include <qgis.h>
#include <QDir> #include <QDir>
#include <QString> #include <QString>
#include <QRegExp> #include <QRegExp>
#include <QList> #include <QList>
#include <qgsmaprenderer.h> #include <qgsmaprenderer.h>
#include <qgslogger.h> #include <qgslogger.h>
#include <qgsmapsettings.h>
class QImage; class QImage;
/** \ingroup UnitTests /** \ingroup UnitTests
* This is a helper class for unit tests that need to * This is a helper class for unit tests that need to
* write an image and compare it to an expected result * write an image and compare it to an expected result
* or render time. * or render time.
*/ */
class CORE_EXPORT QgsRenderChecker class CORE_EXPORT QgsRenderChecker
{ {
skipping to change at line 70 skipping to change at line 71
*/ */
void setControlName( const QString theName ); void setControlName( const QString theName );
/** Prefix where the control images are kept. /** Prefix where the control images are kept.
* This will be appended to controlImagePath * This will be appended to controlImagePath
*/ */
void setControlPathPrefix( const QString theName ) { mControlPathPrefix = theName + QDir::separator(); } void setControlPathPrefix( const QString theName ) { mControlPathPrefix = theName + QDir::separator(); }
/** Get an md5 hash that uniquely identifies an image */ /** Get an md5 hash that uniquely identifies an image */
QString imageToHash( QString theImageFile ); QString imageToHash( QString theImageFile );
void setRenderedImage( QString theImageFileName ) { mRenderedImageFile = theImageFileName; } void setRenderedImage( QString theImageFileName ) { mRenderedImageFile = theImageFileName; }
void setMapRenderer( QgsMapRenderer *thepMapRenderer ) { mpMapRenderer //! @deprecated since 2.4 - use setMapSettings()
= thepMapRenderer; } Q_DECL_DEPRECATED void setMapRenderer( QgsMapRenderer * thepMapRendere
r );
//! @note added in 2.4
void setMapSettings( const QgsMapSettings& mapSettings );
/** Set tolerance for color components used by runTest() and compareIma ges(). /** Set tolerance for color components used by runTest() and compareIma ges().
* Default value is 0. * Default value is 0.
* @param theColorTolerance is maximum difference for each color compon ent * @param theColorTolerance is maximum difference for each color compon ent
* including alpha to be considered correct. * including alpha to be considered correct.
* @note added in 2.1 * @note added in 2.1
*/ */
void setColorTolerance( unsigned int theColorTolerance ) { mColorTolera nce = theColorTolerance; } void setColorTolerance( unsigned int theColorTolerance ) { mColorTolera nce = theColorTolerance; }
/** /**
* Test using renderer to generate the image to be compared. * Test using renderer to generate the image to be compared.
skipping to change at line 115 skipping to change at line 120
* mismatch), but where the output was still acceptible. If the render * mismatch), but where the output was still acceptible. If the render
* diff matches one of these anomalies we will still consider it to be * diff matches one of these anomalies we will still consider it to be
* acceptible. * acceptible.
* @return a bool indicating if the diff matched one of the anomaly fi les * @return a bool indicating if the diff matched one of the anomaly fi les
*/ */
bool isKnownAnomaly( QString theDiffImageFile ); bool isKnownAnomaly( QString theDiffImageFile );
QString expectedImageFile() { return mExpectedImageFile; }; QString expectedImageFile() { return mExpectedImageFile; };
protected: protected:
QString mReport; QString mReport;
unsigned int mMatchTarget; unsigned int mMatchTarget;
QgsMapRenderer * mpMapRenderer;
int mElapsedTime; int mElapsedTime;
QString mRenderedImageFile; QString mRenderedImageFile;
QString mExpectedImageFile; QString mExpectedImageFile;
private: private:
QString mControlName; QString mControlName;
unsigned int mMismatchCount; unsigned int mMismatchCount;
unsigned int mColorTolerance; unsigned int mColorTolerance;
int mElapsedTimeTarget; int mElapsedTimeTarget;
QgsMapSettings mMapSettings;
QString mControlPathPrefix; QString mControlPathPrefix;
}; // class QgsRenderChecker }; // class QgsRenderChecker
/** Compare two WKT strings with some tolerance /** Compare two WKT strings with some tolerance
* @param a first WKT string * @param a first WKT string
* @param b second WKT string * @param b second WKT string
* @param tolerance tolerance to use (optional, defaults to 0.000001) * @param tolerance tolerance to use (optional, defaults to 0.000001)
* @return bool indicating if the WKT are sufficiently equal * @return bool indicating if the WKT are sufficiently equal
*/ */
 End of changes. 6 change blocks. 
5 lines changed or deleted 8 lines changed or added


 qgsrendercontext.h   qgsrendercontext.h 
skipping to change at line 26 skipping to change at line 26
************************************************************************** */ ************************************************************************** */
#ifndef QGSRENDERCONTEXT_H #ifndef QGSRENDERCONTEXT_H
#define QGSRENDERCONTEXT_H #define QGSRENDERCONTEXT_H
#include <QColor> #include <QColor>
#include "qgscoordinatetransform.h" #include "qgscoordinatetransform.h"
#include "qgsmaptopixel.h" #include "qgsmaptopixel.h"
#include "qgsrectangle.h" #include "qgsrectangle.h"
#include "qgsvectorsimplifymethod.h"
class QPainter; class QPainter;
class QgsLabelingEngineInterface; class QgsLabelingEngineInterface;
class QgsMapSettings;
/** \ingroup core /** \ingroup core
* Contains information about the context of a rendering operation. * Contains information about the context of a rendering operation.
* The context of a rendering operation defines properties such as * The context of a rendering operation defines properties such as
* the conversion ratio between screen and map units, the extents / * the conversion ratio between screen and map units, the extents /
* bounding box to be rendered etc. * bounding box to be rendered etc.
**/ **/
class CORE_EXPORT QgsRenderContext class CORE_EXPORT QgsRenderContext
{ {
public: public:
QgsRenderContext(); QgsRenderContext();
~QgsRenderContext(); ~QgsRenderContext();
//! create initialized QgsRenderContext instance from given QgsMapSetti
ngs
//! @note added in 2.4
static QgsRenderContext fromMapSettings( const QgsMapSettings& mapSetti
ngs );
//getters //getters
QPainter* painter() {return mPainter;} QPainter* painter() {return mPainter;}
const QPainter* constPainter() const { return mPainter; } const QPainter* constPainter() const { return mPainter; }
const QgsCoordinateTransform* coordinateTransform() const {return mCoor dTransform;} const QgsCoordinateTransform* coordinateTransform() const {return mCoor dTransform;}
const QgsRectangle& extent() const {return mExtent;} const QgsRectangle& extent() const {return mExtent;}
const QgsMapToPixel& mapToPixel() const {return mMapToPixel;} const QgsMapToPixel& mapToPixel() const {return mMapToPixel;}
skipping to change at line 79 skipping to change at line 85
bool drawEditingInformation() const {return mDrawEditingInformation;} bool drawEditingInformation() const {return mDrawEditingInformation;}
double rendererScale() const {return mRendererScale;} double rendererScale() const {return mRendererScale;}
//! Added in QGIS v1.4 //! Added in QGIS v1.4
QgsLabelingEngineInterface* labelingEngine() const { return mLabelingEn gine; } QgsLabelingEngineInterface* labelingEngine() const { return mLabelingEn gine; }
//! Added in QGIS v2.0 //! Added in QGIS v2.0
QColor selectionColor() const { return mSelectionColor; } QColor selectionColor() const { return mSelectionColor; }
/**Returns true if vector selections should be shown in the rendered ma
p
* @returns true if selections should be shown
* @see setShowSelection
* @see selectionColor
* @note Added in QGIS v2.4
*/
bool showSelection() const { return mShowSelection; }
//setters //setters
/**Sets coordinate transformation. QgsRenderContext does not take owner ship*/ /**Sets coordinate transformation. QgsRenderContext does not take owner ship*/
void setCoordinateTransform( const QgsCoordinateTransform* t ); void setCoordinateTransform( const QgsCoordinateTransform* t );
void setMapToPixel( const QgsMapToPixel& mtp ) {mMapToPixel = mtp;} void setMapToPixel( const QgsMapToPixel& mtp ) {mMapToPixel = mtp;}
void setExtent( const QgsRectangle& extent ) {mExtent = extent;} void setExtent( const QgsRectangle& extent ) {mExtent = extent;}
void setDrawEditingInformation( bool b ) {mDrawEditingInformation = b;} void setDrawEditingInformation( bool b ) {mDrawEditingInformation = b;}
void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;} void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;}
void setScaleFactor( double factor ) {mScaleFactor = factor;} void setScaleFactor( double factor ) {mScaleFactor = factor;}
void setRasterScaleFactor( double factor ) {mRasterScaleFactor = factor ;} void setRasterScaleFactor( double factor ) {mRasterScaleFactor = factor ;}
void setRendererScale( double scale ) {mRendererScale = scale;} void setRendererScale( double scale ) {mRendererScale = scale;}
void setPainter( QPainter* p ) {mPainter = p;} void setPainter( QPainter* p ) {mPainter = p;}
//! Added in QGIS v1.5 //! Added in QGIS v1.5
void setForceVectorOutput( bool force ) {mForceVectorOutput = force;} void setForceVectorOutput( bool force ) {mForceVectorOutput = force;}
//! Added in QGIS v1.4 //! Added in QGIS v1.4
void setLabelingEngine( QgsLabelingEngineInterface* iface ) { mLabeling Engine = iface; } void setLabelingEngine( QgsLabelingEngineInterface* iface ) { mLabeling Engine = iface; }
//! Added in QGIS v2.0 //! Added in QGIS v2.0
void setSelectionColor( const QColor& color ) { mSelectionColor = color ; } void setSelectionColor( const QColor& color ) { mSelectionColor = color ; }
/**Sets whether vector selections should be shown in the rendered map
* @param showSelection set to true if selections should be shown
* @see showSelection
* @see setSelectionColor
* @note Added in QGIS v2.4
*/
void setShowSelection( const bool showSelection ) { mShowSelection = sh
owSelection; }
/**Returns true if the rendering optimization (geometry simplification) can be executed*/ /**Returns true if the rendering optimization (geometry simplification) can be executed*/
bool useRenderingOptimization() const { return mUseRenderingOptimizatio n; } bool useRenderingOptimization() const { return mUseRenderingOptimizatio n; }
void setUseRenderingOptimization( bool enabled ) { mUseRenderingOptimiz ation = enabled; } void setUseRenderingOptimization( bool enabled ) { mUseRenderingOptimiz ation = enabled; }
//! Added in QGIS v2.4
const QgsVectorSimplifyMethod& vectorSimplifyMethod() const { return mV
ectorSimplifyMethod; }
void setVectorSimplifyMethod( const QgsVectorSimplifyMethod& simplifyMe
thod ) { mVectorSimplifyMethod = simplifyMethod; }
private: private:
/**Painter for rendering operations*/ /**Painter for rendering operations*/
QPainter* mPainter; QPainter* mPainter;
/**For transformation between coordinate systems. Can be 0 if on-the-fl y reprojection is not used*/ /**For transformation between coordinate systems. Can be 0 if on-the-fl y reprojection is not used*/
const QgsCoordinateTransform* mCoordTransform; const QgsCoordinateTransform* mCoordTransform;
/**True if vertex markers for editing should be drawn*/ /**True if vertex markers for editing should be drawn*/
bool mDrawEditingInformation; bool mDrawEditingInformation;
skipping to change at line 138 skipping to change at line 164
/**Factor to scale rasters*/ /**Factor to scale rasters*/
double mRasterScaleFactor; double mRasterScaleFactor;
/**Map scale*/ /**Map scale*/
double mRendererScale; double mRendererScale;
/**Labeling engine (can be NULL)*/ /**Labeling engine (can be NULL)*/
QgsLabelingEngineInterface* mLabelingEngine; QgsLabelingEngineInterface* mLabelingEngine;
/** Color used for features that are marked as selected */ /**Whether selection should be shown*/
bool mShowSelection;
/**Color used for features that are marked as selected */
QColor mSelectionColor; QColor mSelectionColor;
/**True if the rendering optimization (geometry simplification) can be executed*/ /**True if the rendering optimization (geometry simplification) can be executed*/
bool mUseRenderingOptimization; bool mUseRenderingOptimization;
/**Simplification object which holds the information about how to simpl
ify the features for fast rendering */
QgsVectorSimplifyMethod mVectorSimplifyMethod;
}; };
#endif #endif
 End of changes. 8 change blocks. 
1 lines changed or deleted 40 lines changed or added


 qgsrendererv2.h   qgsrendererv2.h 
skipping to change at line 32 skipping to change at line 32
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
#include <QPair> #include <QPair>
#include <QPixmap> #include <QPixmap>
#include <QDomDocument> #include <QDomDocument>
#include <QDomElement> #include <QDomElement>
class QgsSymbolV2; class QgsSymbolV2;
class QgsRenderContext; class QgsRenderContext;
class QgsFeature; class QgsFeature;
class QgsFields;
class QgsVectorLayer; class QgsVectorLayer;
typedef QMap<QString, QString> QgsStringMap; 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;
skipping to change at line 83 skipping to change at line 84
static QgsFeatureRendererV2* defaultRenderer( QGis::GeometryType geomTy pe ); static QgsFeatureRendererV2* defaultRenderer( QGis::GeometryType geomTy pe );
QString type() const { return mType; } QString type() const { return mType; }
/** to be overridden /** to be overridden
* @param feature feature * @param feature feature
* @return returns pointer to symbol or 0 if symbol was not found * @return returns pointer to symbol or 0 if symbol was not found
*/ */
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature ) = 0; virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature ) = 0;
virtual void startRender( QgsRenderContext& context, const QgsVectorLay virtual void startRender( QgsRenderContext& context, const QgsFields& f
er *vlayer ) = 0; ields ) = 0;
//! @deprecated since 2.4 - not using QgsVectorLayer directly anymore
Q_DECL_DEPRECATED virtual void startRender( QgsRenderContext& context,
const QgsVectorLayer* vlayer );
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 bool 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() const; virtual QString dump() const;
enum Capabilities enum Capabilities
{ {
SymbolLevels = 1, // rendering with symbol levels (i.e. implement SymbolLevels = 1, // rendering with symbol levels (i.e.
s symbols(), symbolForFeature()) implements symbols(), symbolForFeature())
RotationField = 1 << 1, // rotate symbols by attribute value RotationField = 1 << 1, // rotate symbols by attribute value
MoreSymbolsPerFeature = 1 << 2, // may use more than one symbol to r MoreSymbolsPerFeature = 1 << 2, // may use more than one symbol to re
ender a feature: symbolsForFeature() will return them nder a feature: symbolsForFeature() will return them
Filter = 1 << 3, // features may be filtered, i.e. some featu Filter = 1 << 3, // features may be filtered, i.e. som
res may not be rendered (categorized, rule based ...) e features may not be rendered (categorized, rule based ...)
ScaleDependent = 1 << 4 // depends on scale if feature will be render ScaleDependent = 1 << 4 // depends on scale if feature will b
ed (rule based ) e rendered (rule based )
}; };
//! returns bitwise OR-ed capabilities of the renderer //! returns bitwise OR-ed capabilities of the renderer
//! \note added in 2.0 //! \note added in 2.0
virtual int capabilities() { return 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; }
 End of changes. 3 change blocks. 
11 lines changed or deleted 16 lines changed or added


 qgsrendererv2widget.h   qgsrendererv2widget.h 
skipping to change at line 90 skipping to change at line 90
//////////// ////////////
#include <QObject> #include <QObject>
class QMenu; class QMenu;
class QgsField; class QgsField;
class QgsFields; class QgsFields;
/** /**
Utility class for prividing GUI for data-defined rendering. Utility class for providing GUI for data-defined rendering.
*/ */
class QgsRendererV2DataDefinedMenus : public QObject class QgsRendererV2DataDefinedMenus : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsRendererV2DataDefinedMenus( QMenu* menu, QgsVectorLayer* layer, QStr ing rotationField, QString sizeScaleField, QgsSymbolV2::ScaleMethod scaleMe thod ); QgsRendererV2DataDefinedMenus( QMenu* menu, QgsVectorLayer* layer, QStr ing rotationField, QString sizeScaleField, QgsSymbolV2::ScaleMethod scaleMe thod );
~QgsRendererV2DataDefinedMenus(); ~QgsRendererV2DataDefinedMenus();
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgsrulebasedrendererv2.h   qgsrulebasedrendererv2.h 
skipping to change at line 125 skipping to change at line 125
//! clone this rule, return new instance //! clone this rule, return new instance
Rule* clone() const; Rule* clone() const;
void toSld( QDomDocument& doc, QDomElement &element, QgsStringMap p rops ); void toSld( QDomDocument& doc, QDomElement &element, QgsStringMap p rops );
static Rule* createFromSld( QDomElement& element, QGis::GeometryTyp e geomType ); static Rule* createFromSld( QDomElement& element, QGis::GeometryTyp e geomType );
QDomElement save( QDomDocument& doc, QgsSymbolV2Map& symbolMap ); QDomElement save( QDomDocument& doc, QgsSymbolV2Map& symbolMap );
//! prepare the rule for rendering and its children (build active c hildren array) //! prepare the rule for rendering and its children (build active c hildren array)
bool startRender( QgsRenderContext& context, const QgsVectorLayer * vlayer ); bool startRender( QgsRenderContext& context, const QgsFields& field s );
//! get all used z-levels from this rule and children //! get all used z-levels from this rule and children
QSet<int> collectZLevels(); QSet<int> collectZLevels();
//! assign normalized z-levels [0..N-1] for this rule's symbol for quick access during rendering //! assign normalized z-levels [0..N-1] for this rule's symbol for quick access during rendering
//! @note not available in python bindings //! @note not available in python bindings
void setNormZLevels( const QMap<int, int>& zLevelsToNormLevels ); void setNormZLevels( const QMap<int, int>& zLevelsToNormLevels );
bool renderFeature( FeatureToRender& featToRender, QgsRenderContext & context, RenderQueue& renderQueue ); bool renderFeature( FeatureToRender& featToRender, QgsRenderContext & context, RenderQueue& renderQueue );
//! only tell whether a feature will be rendered without actually r endering it //! only tell whether a feature will be rendered without actually r endering it
//! @note added in 1.9 //! @note added in 1.9
skipping to change at line 205 skipping to change at line 205
//! Constructor for convenience. Creates a root rule and adds a default rule with symbol (takes ownership) //! Constructor for convenience. Creates a root rule and adds a default rule with symbol (takes ownership)
QgsRuleBasedRendererV2( QgsSymbolV2* defaultSymbol ); QgsRuleBasedRendererV2( QgsSymbolV2* defaultSymbol );
~QgsRuleBasedRendererV2(); ~QgsRuleBasedRendererV2();
//! return symbol for current feature. Should not be used individually: there could be more symbols for a feature //! return symbol for current feature. Should not be used individually: there could be more symbols for a feature
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature ); virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
virtual bool 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 ) ;
virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer ); virtual void startRender( QgsRenderContext& context, const QgsFields& f ields );
virtual void stopRender( QgsRenderContext& context ); virtual void stopRender( QgsRenderContext& context );
virtual QList<QString> usedAttributes(); virtual QList<QString> usedAttributes();
virtual QgsFeatureRendererV2* clone(); virtual QgsFeatureRendererV2* clone();
virtual void toSld( QDomDocument& doc, QDomElement &element ) const; virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
static QgsFeatureRendererV2* createFromSld( QDomElement& element, QGis: :GeometryType geomType ); static QgsFeatureRendererV2* createFromSld( QDomElement& element, QGis: :GeometryType geomType );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 qgssearchquerybuilder.h   qgssearchquerybuilder.h 
skipping to change at line 43 skipping to change at line 43
* \brief Query Builder for search strings * \brief Query Builder for search strings
* *
*/ */
class GUI_EXPORT QgsSearchQueryBuilder : public QDialog, private Ui::QgsQue ryBuilderBase class GUI_EXPORT QgsSearchQueryBuilder : public QDialog, private Ui::QgsQue ryBuilderBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! Constructor - takes pointer to vector layer as a parameter //! Constructor - takes pointer to vector layer as a parameter
QgsSearchQueryBuilder( QgsVectorLayer* layer, QWidget *parent = 0, QgsSearchQueryBuilder( QgsVectorLayer* layer, QWidget *parent = 0,
Qt::WFlags fl = QgisGui::ModalDialogFlags ); Qt::WindowFlags fl = QgisGui::ModalDialogFlags ) ;
~QgsSearchQueryBuilder(); ~QgsSearchQueryBuilder();
//! returns newly created search string //! returns newly created search string
QString searchString(); QString searchString();
//! change search string shown in text field //! change search string shown in text field
void setSearchString( QString searchString ); void setSearchString( QString searchString );
public slots: public slots:
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgssinglesymbolrendererv2.h   qgssinglesymbolrendererv2.h 
skipping to change at line 34 skipping to change at line 34
class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2 class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
{ {
public: public:
QgsSingleSymbolRendererV2( QgsSymbolV2* symbol ); QgsSingleSymbolRendererV2( QgsSymbolV2* symbol );
virtual ~QgsSingleSymbolRendererV2(); virtual ~QgsSingleSymbolRendererV2();
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature ); virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
virtual void startRender( QgsRenderContext& context, const QgsVectorLay er *vlayer ); virtual void startRender( QgsRenderContext& context, const QgsFields& f ields );
virtual void stopRender( QgsRenderContext& context ); virtual void stopRender( QgsRenderContext& context );
virtual QList<QString> usedAttributes(); virtual QList<QString> usedAttributes();
QgsSymbolV2* symbol() const; QgsSymbolV2* symbol() const;
void setSymbol( QgsSymbolV2* s ); void setSymbol( QgsSymbolV2* s );
//! @note added in 1.5 //! @note added in 1.5
void setRotationField( QString fieldOrExpression ); void setRotationField( QString fieldOrExpression );
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgssnapper.h   qgssnapper.h 
skipping to change at line 29 skipping to change at line 29
#define QGSSNAPPER_H #define QGSSNAPPER_H
#include "qgspoint.h" #include "qgspoint.h"
#include "qgstolerance.h" #include "qgstolerance.h"
#include "qgsfeature.h" #include "qgsfeature.h"
#include <QList> #include <QList>
#include <QMultiMap> #include <QMultiMap>
class QgsMapRenderer; class QgsMapRenderer;
class QgsMapSettings;
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.
* */ * */
struct CORE_EXPORT QgsSnappingResult struct CORE_EXPORT QgsSnappingResult
{ {
/**The coordinates of the snapping result*/ /**The coordinates of the snapping result*/
QgsPoint snappedVertex; QgsPoint snappedVertex;
skipping to change at line 94 skipping to change at line 95
/**The layer to which snapping is applied*/ /**The layer to which snapping is applied*/
QgsVectorLayer* mLayer; QgsVectorLayer* mLayer;
/**The snapping tolerances for the layers, always in source coordinat e systems of the layer*/ /**The snapping tolerances for the layers, always in source coordinat e systems of the layer*/
double mTolerance; double mTolerance;
/**What snapping type to use (snap to segment or to vertex)*/ /**What snapping type to use (snap to segment or to vertex)*/
QgsSnapper::SnappingType mSnapTo; QgsSnapper::SnappingType mSnapTo;
/**What unit is used for tolerance*/ /**What unit is used for tolerance*/
QgsTolerance::UnitType mUnitType; QgsTolerance::UnitType mUnitType;
}; };
QgsSnapper( QgsMapRenderer* mapRender ); //!@ deprecated since 2.4 - use constructor with QgsMapSettings
Q_DECL_DEPRECATED QgsSnapper( QgsMapRenderer* mapRender );
explicit QgsSnapper( const QgsMapSettings& mapSettings );
~QgsSnapper(); ~QgsSnapper();
/**Does the snapping operation /**Does the snapping operation
@param startPoint the start point for snapping (in pixel coordinates) @param startPoint the start point for snapping (in pixel coordinates)
@param snappingResult the list where the results are inserted (everythi @param snappingResult the list where the results are inserted (everyth
ng in map coordinate system) ing in map coordinate system)
@param excludePoints a list with (map coordinate) points that should be @param excludePoints a list with (map coordinate) points that should b
excluded in the snapping result. Useful e.g. for vertex moves where a vert e excluded in the snapping result. Useful e.g. for vertex moves where a ver
ex should not be snapped to its original position tex should not be snapped to its original position
@return 0 in case of success*/ @return 0 in case of success
*/
int snapPoint( const QPoint& startPoint, QList<QgsSnappingResult>& snap pingResult, const QList<QgsPoint>& excludePoints = QList<QgsPoint>() ); int snapPoint( const QPoint& startPoint, QList<QgsSnappingResult>& snap pingResult, const QList<QgsPoint>& excludePoints = QList<QgsPoint>() );
//setters //setters
void setSnapLayers( const QList<QgsSnapper::SnapLayer>& snapLayers ); void setSnapLayers( const QList<QgsSnapper::SnapLayer>& snapLayers );
void setSnapMode( QgsSnapper::SnappingMode snapMode ); void setSnapMode( QgsSnapper::SnappingMode snapMode );
private: private:
/**Don't use the default constructor*/
QgsSnapper();
/**Removes the snapping results that contains points in exclude list*/ /**Removes the snapping results that contains points in exclude list*/
void cleanResultList( QMultiMap<double, QgsSnappingResult>& list, const QList<QgsPoint>& excludeList ) const; void cleanResultList( QMultiMap<double, QgsSnappingResult>& list, const QList<QgsPoint>& excludeList ) const;
/**The maprender object contains information about the output coordinat e system /**The map settings object contains information about the output coordi nate system
of the map and about the relationship between pixel space and map spac e*/ of the map and about the relationship between pixel space and map spac e*/
QgsMapRenderer* mMapRenderer; const QgsMapSettings& mMapSettings;
/**Snap mode to apply*/ /**Snap mode to apply*/
QgsSnapper::SnappingMode mSnapMode; QgsSnapper::SnappingMode mSnapMode;
/**List of layers to which snapping is applied*/ /**List of layers to which snapping is applied*/
QList<QgsSnapper::SnapLayer> mSnapLayers; QList<QgsSnapper::SnapLayer> mSnapLayers;
}; };
#endif #endif
 End of changes. 6 change blocks. 
11 lines changed or deleted 15 lines changed or added


 qgsspatialindex.h   qgsspatialindex.h 
skipping to change at line 38 skipping to change at line 38
{ {
class IBuffer; class IBuffer;
} }
} }
class QgsFeature; class QgsFeature;
class QgsRectangle; class QgsRectangle;
class QgsPoint; class QgsPoint;
#include <QList> #include <QList>
#include <QSharedDataPointer>
#include "qgsfeature.h" #include "qgsfeature.h"
class QgsSpatialIndexData;
class CORE_EXPORT QgsSpatialIndex class CORE_EXPORT QgsSpatialIndex
{ {
public: public:
/* creation of spatial index */ /* creation of spatial index */
/** constructor - creates R-tree */ /** constructor - creates R-tree */
QgsSpatialIndex(); QgsSpatialIndex();
/** copy constructor */
QgsSpatialIndex( const QgsSpatialIndex& other );
/** destructor finalizes work with spatial index */ /** destructor finalizes work with spatial index */
~QgsSpatialIndex(); ~QgsSpatialIndex();
/** implement assignment operator */
QgsSpatialIndex& operator=( const QgsSpatialIndex& other );
/* operations */ /* operations */
/** add feature to index */ /** add feature to index */
bool insertFeature( QgsFeature& f ); bool insertFeature( const QgsFeature& f );
/** remove feature from index */ /** remove feature from index */
bool deleteFeature( QgsFeature& f ); bool deleteFeature( const QgsFeature& f );
/* queries */ /* queries */
/** returns features that intersect the specified rectangle */ /** returns features that intersect the specified rectangle */
QList<QgsFeatureId> intersects( QgsRectangle rect ); QList<QgsFeatureId> intersects( QgsRectangle rect ) const;
/** returns nearest neighbors (their count is specified by second param eter) */ /** returns nearest neighbors (their count is specified by second param eter) */
QList<QgsFeatureId> nearestNeighbor( QgsPoint point, int neighbors ); QList<QgsFeatureId> nearestNeighbor( QgsPoint point, int neighbors ) co
nst;
/* debugging */
//! get reference count - just for debugging!
int refs() const;
protected: protected:
// @note not available in python bindings // @note not available in python bindings
SpatialIndex::Region rectToRegion( QgsRectangle rect ); static SpatialIndex::Region rectToRegion( QgsRectangle rect );
// @note not available in python bindings // @note not available in python bindings
bool featureInfo( QgsFeature& f, SpatialIndex::Region& r, QgsFeatureId &id ); bool featureInfo( const QgsFeature& f, SpatialIndex::Region& r, QgsFeat ureId &id );
private: private:
/** storage manager */ QSharedDataPointer<QgsSpatialIndexData> d;
SpatialIndex::IStorageManager* mStorageManager;
/** buffer for index data */
SpatialIndex::StorageManager::IBuffer* mStorage;
/** R-tree containing spatial index */
SpatialIndex::ISpatialIndex* mRTree;
}; };
#endif #endif
 End of changes. 11 change blocks. 
14 lines changed or deleted 22 lines changed or added


 qgsstylev2.h   qgsstylev2.h 
skipping to change at line 66 skipping to change at line 66
typedef QMultiMap<QString, QString> QgsSmartConditionMap; typedef QMultiMap<QString, QString> QgsSmartConditionMap;
// enumerators representing sqlite DB columns // enumerators representing sqlite DB columns
enum SymbolTable { SymbolId, SymbolName, SymbolXML, SymbolGroupId }; enum SymbolTable { SymbolId, SymbolName, SymbolXML, SymbolGroupId };
enum SymgroupTable { SymgroupId, SymgroupName, SymgroupParent }; enum SymgroupTable { SymgroupId, SymgroupName, SymgroupParent };
enum TagTable { TagId, TagName }; enum TagTable { TagId, TagName };
enum TagmapTable { TagmapTagId, TagmapSymbolId }; enum TagmapTable { TagmapTagId, TagmapSymbolId };
enum ColorrampTable { ColorrampId, ColorrampName, ColorrampXML, ColorrampGr oupId }; enum ColorrampTable { ColorrampId, ColorrampName, ColorrampXML, ColorrampGr oupId };
enum SmartgroupTable { SmartgroupId, SmartgroupName, SmartgroupXML }; enum SmartgroupTable { SmartgroupId, SmartgroupName, SmartgroupXML };
class CORE_EXPORT QgsStyleV2 class CORE_EXPORT QgsStyleV2 : public QObject
{ {
Q_OBJECT
public: public:
QgsStyleV2(); QgsStyleV2();
~QgsStyleV2(); ~QgsStyleV2();
//! Enum for Entities involved in a style //! Enum for Entities involved in a style
/*! /*!
The enumerator is used for identifying the entity being operated on when generic The enumerator is used for identifying the entity being operated on when generic
database functions are being run. database functions are being run.
\sa group(), rename(), remove(), symbolsOfGroup(), symbolsWithTag() , symbolsOfSmartgroup() \sa group(), rename(), remove(), symbolsOfGroup(), symbolsWithTag() , symbolsOfSmartgroup()
*/ */
skipping to change at line 317 skipping to change at line 319
//! returns the symbols for the smartgroup //! returns the symbols for the smartgroup
QStringList symbolsOfSmartgroup( StyleEntity type, int id ); QStringList symbolsOfSmartgroup( StyleEntity type, int id );
//! Exports the style as a XML file //! Exports the style as a XML file
bool exportXML( QString filename ); bool exportXML( QString filename );
//! Imports the symbols and colorramps into the default style database from the given XML file //! Imports the symbols and colorramps into the default style database from the given XML file
bool importXML( QString filename ); bool importXML( QString filename );
signals:
void symbolSaved( QString name, QgsSymbolV2* symbol );
protected: protected:
QgsSymbolV2Map mSymbols; QgsSymbolV2Map mSymbols;
QgsVectorColorRampV2Map mColorRamps; QgsVectorColorRampV2Map mColorRamps;
QString mErrorString; QString mErrorString;
QString mFileName; QString mFileName;
sqlite3* mCurrentDB; sqlite3* mCurrentDB;
skipping to change at line 352 skipping to change at line 357
int getId( QString table, QString name ); int getId( QString table, QString name );
//! updates the properties of an existing symbol/colorramp //! updates the properties of an existing symbol/colorramp
/*! /*!
* \note This should not be called separately, only called through add Symbol or addColorRamp * \note This should not be called separately, only called through add Symbol or addColorRamp
* \param type is either SymbolEntity or ColorrampEntity * \param type is either SymbolEntity or ColorrampEntity
* \param name is the name of an existing symbol or a color ramp * \param name is the name of an existing symbol or a color ramp
* \return Success state of the update operation * \return Success state of the update operation
*/ */
bool updateSymbol( StyleEntity type, QString name ); bool updateSymbol( StyleEntity type, QString name );
private:
Q_DISABLE_COPY( QgsStyleV2 )
}; };
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 9 lines changed or added


 qgssublayersdialog.h   qgssublayersdialog.h 
skipping to change at line 35 skipping to change at line 35
Q_OBJECT Q_OBJECT
public: public:
enum ProviderType enum ProviderType
{ {
Ogr, Ogr,
Gdal, Gdal,
Vsifile Vsifile
}; };
QgsSublayersDialog( ProviderType providerType, QString name, QWidget* p arent = 0, Qt::WFlags fl = 0 ); QgsSublayersDialog( ProviderType providerType, QString name, QWidget* p arent = 0, Qt::WindowFlags fl = 0 );
~QgsSublayersDialog(); ~QgsSublayersDialog();
void populateLayerTable( QStringList theList, QString delim = ":" ); void populateLayerTable( QStringList theList, QString delim = ":" );
// Returns list of selected layers, if there are more layers with the s ame name, // Returns list of selected layers, if there are more layers with the s ame name,
// geometry type is appended separated by semicolon, example: <layer>:< geometryType> // geometry type is appended separated by semicolon, example: <layer>:< geometryType>
QStringList selectionNames(); QStringList selectionNames();
QList<int> selectionIndexes(); QList<int> selectionIndexes();
public slots: public slots:
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()-> className() ); } void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()-> className() ); }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgssvgcache.h   qgssvgcache.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 QGSSVGCACHE_H #ifndef QGSSVGCACHE_H
#define QGSSVGCACHE_H #define QGSSVGCACHE_H
#include <QColor> #include <QColor>
#include <QMap> #include <QMap>
#include <QMultiHash> #include <QMultiHash>
#include <QMutex>
#include <QString> #include <QString>
#include <QUrl> #include <QUrl>
class QDomElement; class QDomElement;
class QImage; class QImage;
class QPicture; class QPicture;
class CORE_EXPORT QgsSvgCacheEntry class CORE_EXPORT QgsSvgCacheEntry
{ {
public: public:
skipping to change at line 179 skipping to change at line 180
bool& hasOutlineWidthParam, double& defaultOut lineWidth ) const; bool& hasOutlineWidthParam, double& defaultOut lineWidth ) const;
/**Release memory and remove cache entry from mEntryLookup*/ /**Release memory and remove cache entry from mEntryLookup*/
void removeCacheEntry( QString s, QgsSvgCacheEntry* entry ); void removeCacheEntry( QString s, QgsSvgCacheEntry* entry );
/**For debugging*/ /**For debugging*/
void printEntryList(); void printEntryList();
/** SVG content to be rendered if SVG file was not found. */ /** SVG content to be rendered if SVG file was not found. */
QByteArray mMissingSvg; QByteArray mMissingSvg;
//! Mutex to prevent concurrent access to the class from multiple threa
ds at once (may corrupt the entries otherwise).
QMutex mMutex;
}; };
#endif // QGSSVGCACHE_H #endif // QGSSVGCACHE_H
 End of changes. 2 change blocks. 
0 lines changed or deleted 5 lines changed or added


 qgssvgselectorwidget.h   qgssvgselectorwidget.h 
skipping to change at line 110 skipping to change at line 110
void on_mFileLineEdit_textChanged( const QString& text ); void on_mFileLineEdit_textChanged( const QString& text );
private: private:
QString mCurrentSvgPath; // always stored as absolute path QString mCurrentSvgPath; // always stored as absolute path
}; };
class GUI_EXPORT QgsSvgSelectorDialog : public QDialog class GUI_EXPORT QgsSvgSelectorDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
QgsSvgSelectorDialog( QWidget* parent = 0, Qt::WFlags fl = QgisGui::Mod alDialogFlags, QgsSvgSelectorDialog( QWidget* parent = 0, Qt::WindowFlags fl = QgisGui ::ModalDialogFlags,
QDialogButtonBox::StandardButtons buttons = QDial ogButtonBox::Close | QDialogButtonBox::Ok, QDialogButtonBox::StandardButtons buttons = QDial ogButtonBox::Close | QDialogButtonBox::Ok,
Qt::Orientation orientation = Qt::Horizontal ); Qt::Orientation orientation = Qt::Horizontal );
~QgsSvgSelectorDialog(); ~QgsSvgSelectorDialog();
//! Returns the central layout. Widgets added to it must have this dial og as parent //! Returns the central layout. Widgets added to it must have this dial og as parent
QVBoxLayout* layout() { return mLayout; } QVBoxLayout* layout() { return mLayout; }
//! Returns the button box //! Returns the button box
QDialogButtonBox* buttonBox() { return mButtonBox; } QDialogButtonBox* buttonBox() { return mButtonBox; }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 qgssymbollayerv2.h   qgssymbollayerv2.h 
/************************************************************************** * /************************************************************************** *
qgssymbollayerv2.h qgssymbollayerv2.h
--------------------- ---------------------
begin : November 2009 begin : November 2009
copyright : (C) 2009 by Martin Dobias copyright : (C) 2009 by Martin Dobias
email : wonder dot sk at gmail dot com email : wonder dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSSYMBOLLAYERV2_H #ifndef QGSSYMBOLLAYERV2_H
#define QGSSYMBOLLAYERV2_H #define QGSSYMBOLLAYERV2_H
skipping to change at line 101 skipping to change at line 101
/**Returns the estimated maximum distance which the layer style will bl eed outside /**Returns the estimated maximum distance which the layer style will bl eed outside
the drawn shape. Eg, polygons drawn with an outline will draw half th e width the drawn shape. Eg, polygons drawn with an outline will draw half th e width
of the outline outside of the polygon. This amount is estimated, sinc e it may of the outline outside of the polygon. This amount is estimated, sinc e it may
be affected by data defined symbology rules.*/ be affected by data defined symbology rules.*/
virtual double estimateMaxBleed() const { return 0; } virtual double estimateMaxBleed() const { return 0; }
virtual void setOutputUnit( QgsSymbolV2::OutputUnit unit ) { Q_UNUSED( unit ); } //= 0; virtual void setOutputUnit( QgsSymbolV2::OutputUnit unit ) { Q_UNUSED( unit ); } //= 0;
virtual QgsSymbolV2::OutputUnit outputUnit() const { return QgsSymbolV2 ::Mixed; } //= 0; virtual QgsSymbolV2::OutputUnit outputUnit() const { return QgsSymbolV2 ::Mixed; } //= 0;
virtual void setMapUnitScale( const QgsMapUnitScale& scale ) { Q_UNUSED
( scale ); } //= 0;
virtual QgsMapUnitScale mapUnitScale() const { return QgsMapUnitScale()
; } //= 0;
// 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 // symbol layers normally only use additional attributes to provide dat a defined settings
virtual QSet<QString> usedAttributes() const; virtual QSet<QString> usedAttributes() const;
virtual const QgsExpression* dataDefinedProperty( const QString& proper ty ) const; virtual const QgsExpression* dataDefinedProperty( const QString& proper ty ) const;
virtual QString dataDefinedPropertyString( const QString& property ) co nst; virtual QString dataDefinedPropertyString( const QString& property ) co nst;
virtual void setDataDefinedProperty( const QString& property, const QSt ring& expressionString ); virtual void setDataDefinedProperty( const QString& property, const QSt ring& expressionString );
skipping to change at line 145 skipping to change at line 148
QColor mColor; QColor mColor;
int mRenderingPass; int mRenderingPass;
QMap< QString, QgsExpression* > mDataDefinedProperties; QMap< QString, QgsExpression* > mDataDefinedProperties;
// Configuration of selected symbology implementation // Configuration of selected symbology implementation
static const bool selectionIsOpaque = true; // Selection ignores symbo l alpha static const bool selectionIsOpaque = true; // Selection ignores symbo l alpha
static const bool selectFillBorder = false; // Fill symbol layer also selects border symbology static const bool selectFillBorder = false; // Fill symbol layer also selects border symbology
static const bool selectFillStyle = false; // Fill symbol uses symbol layer style.. static const bool selectFillStyle = false; // Fill symbol uses symbol layer style..
virtual void prepareExpressions( const QgsVectorLayer* vl, double scale = -1.0 ); virtual void prepareExpressions( const QgsFields* fields, double scale = -1.0 );
virtual QgsExpression* expression( const QString& property ) const; virtual QgsExpression* expression( const QString& property ) const;
/**Saves data defined properties to string map*/ /**Saves data defined properties to string map*/
void saveDataDefinedProperties( QgsStringMap& stringMap ) const; void saveDataDefinedProperties( QgsStringMap& stringMap ) const;
/**Copies data defined properties of this layer to another symbol layer */ /**Copies data defined properties of this layer to another symbol layer */
void copyDataDefinedProperties( QgsSymbolLayerV2* destLayer ) const; void copyDataDefinedProperties( QgsSymbolLayerV2* destLayer ) const;
}; };
////////////////////// //////////////////////
class CORE_EXPORT QgsMarkerSymbolLayerV2 : public QgsSymbolLayerV2 class CORE_EXPORT QgsMarkerSymbolLayerV2 : public QgsSymbolLayerV2
skipping to change at line 199 skipping to change at line 202
QPointF offset() { return mOffset; } QPointF offset() { return mOffset; }
virtual void toSld( QDomDocument &doc, QDomElement &element, QgsStringM ap props ) const; virtual void toSld( QDomDocument &doc, QDomElement &element, QgsStringM ap props ) const;
virtual void writeSldMarker( QDomDocument &doc, QDomElement &element, Q gsStringMap 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() ) ) ); } { Q_UNUSED( props ); element.appendChild( doc.createComment( QString( " QgsMarkerSymbolLayerV2 %1 not implemented yet" ).arg( layerType() ) ) ); }
void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; } void setOffsetUnit( QgsSymbolV2::OutputUnit unit ) { mOffsetUnit = unit ; }
QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; } QgsSymbolV2::OutputUnit offsetUnit() const { return mOffsetUnit; }
void setOffsetMapUnitScale( const QgsMapUnitScale& scale ) { mOffsetMap
UnitScale = scale; }
const QgsMapUnitScale& offsetMapUnitScale() const { return mOffsetMapUn
itScale; }
void setSizeUnit( QgsSymbolV2::OutputUnit unit ) { mSizeUnit = unit; } void setSizeUnit( QgsSymbolV2::OutputUnit unit ) { mSizeUnit = unit; }
QgsSymbolV2::OutputUnit sizeUnit() const { return mSizeUnit; } QgsSymbolV2::OutputUnit sizeUnit() const { return mSizeUnit; }
virtual void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setSizeMapUnitScale( const QgsMapUnitScale& scale ) { mSizeMapUnit
virtual QgsSymbolV2::OutputUnit outputUnit() const; Scale = scale; }
const QgsMapUnitScale& sizeMapUnitScale() const { return mSizeMapUnitSc
ale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
void setHorizontalAnchorPoint( HorizontalAnchorPoint h ) { mHorizontalA nchorPoint = h; } void setHorizontalAnchorPoint( HorizontalAnchorPoint h ) { mHorizontalA nchorPoint = h; }
HorizontalAnchorPoint horizontalAnchorPoint() const { return mHorizonta lAnchorPoint; } HorizontalAnchorPoint horizontalAnchorPoint() const { return mHorizonta lAnchorPoint; }
void setVerticalAnchorPoint( VerticalAnchorPoint v ) { mVerticalAnchorP oint = v; } void setVerticalAnchorPoint( VerticalAnchorPoint v ) { mVerticalAnchorP oint = v; }
VerticalAnchorPoint verticalAnchorPoint() const { return mVerticalAncho rPoint; } VerticalAnchorPoint verticalAnchorPoint() const { return mVerticalAncho rPoint; }
protected: protected:
QgsMarkerSymbolLayerV2( bool locked = false ); QgsMarkerSymbolLayerV2( bool locked = false );
//handles marker offset and anchor point shift together //handles marker offset and anchor point shift together
void markerOffset( const QgsSymbolV2RenderContext& context, double& off setX, double& offsetY ) const; void markerOffset( const QgsSymbolV2RenderContext& context, double& off setX, double& offsetY ) const;
void markerOffset( const QgsSymbolV2RenderContext& context, double widt
h, double height, double& offsetX, double& offsetY ) const;
//! @note available in python bindings as markerOffset2 //! @note available in python bindings as markerOffset2
void markerOffset( const QgsSymbolV2RenderContext& context, double widt h, double height, void markerOffset( const QgsSymbolV2RenderContext& context, double widt h, double height,
QgsSymbolV2::OutputUnit widthUnit, QgsSymbolV2::Outp utUnit heightUnit, QgsSymbolV2::OutputUnit widthUnit, QgsSymbolV2::Outp utUnit heightUnit,
double& offsetX, double& offsetY ) const; double& offsetX, double& offsetY,
const QgsMapUnitScale &widthMapUnitScale, const QgsM
apUnitScale &heightMapUnitScale ) const;
static QPointF _rotatedOffset( const QPointF& offset, double angle ); static QPointF _rotatedOffset( const QPointF& offset, double angle );
double mAngle; double mAngle;
double mSize; double mSize;
QgsSymbolV2::OutputUnit mSizeUnit; QgsSymbolV2::OutputUnit mSizeUnit;
QgsMapUnitScale mSizeMapUnitScale;
QPointF mOffset; QPointF mOffset;
QgsSymbolV2::OutputUnit mOffsetUnit; QgsSymbolV2::OutputUnit mOffsetUnit;
QgsMapUnitScale mOffsetMapUnitScale;
QgsSymbolV2::ScaleMethod mScaleMethod; QgsSymbolV2::ScaleMethod mScaleMethod;
HorizontalAnchorPoint mHorizontalAnchorPoint; HorizontalAnchorPoint mHorizontalAnchorPoint;
VerticalAnchorPoint mVerticalAnchorPoint; VerticalAnchorPoint mVerticalAnchorPoint;
private: private:
static QgsMarkerSymbolLayerV2::HorizontalAnchorPoint decodeHorizontalAn chorPoint( const QString& str ); static QgsMarkerSymbolLayerV2::HorizontalAnchorPoint decodeHorizontalAn chorPoint( const QString& str );
static QgsMarkerSymbolLayerV2::VerticalAnchorPoint decodeVerticalAnchor Point( const QString& str ); static QgsMarkerSymbolLayerV2::VerticalAnchorPoint decodeVerticalAnchor Point( const QString& str );
QgsExpression* mOffsetExpression; QgsExpression* mOffsetExpression;
QgsExpression* mHorizontalAnchorExpression; QgsExpression* mHorizontalAnchorExpression;
skipping to change at line 256 skipping to change at line 273
//! @note added in v1.7 //! @note added in v1.7
virtual void renderPolygonOutline( const QPolygonF& points, QList<QPoly gonF>* rings, QgsSymbolV2RenderContext& context ); virtual void renderPolygonOutline( const QPolygonF& points, QList<QPoly gonF>* rings, QgsSymbolV2RenderContext& context );
virtual void setWidth( double width ) { mWidth = width; } virtual void setWidth( double width ) { mWidth = width; }
virtual double width() const { return mWidth; } virtual double width() const { return mWidth; }
void setWidthUnit( QgsSymbolV2::OutputUnit unit ) { mWidthUnit = unit; } void setWidthUnit( QgsSymbolV2::OutputUnit unit ) { mWidthUnit = unit; }
QgsSymbolV2::OutputUnit widthUnit() const { return mWidthUnit; } QgsSymbolV2::OutputUnit widthUnit() const { return mWidthUnit; }
void setWidthMapUnitScale( const QgsMapUnitScale& scale ) { mWidthMapUn
itScale = scale; }
const QgsMapUnitScale& widthMapUnitScale() const { return mWidthMapUnit
Scale; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size ); void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size );
virtual double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2Render Context& context ) const; virtual double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2Render Context& context ) const;
protected: protected:
QgsLineSymbolLayerV2( bool locked = false ); QgsLineSymbolLayerV2( bool locked = false );
double mWidth; double mWidth;
QgsSymbolV2::OutputUnit mWidthUnit; QgsSymbolV2::OutputUnit mWidthUnit;
QgsMapUnitScale mWidthMapUnitScale;
}; };
class CORE_EXPORT QgsFillSymbolLayerV2 : public QgsSymbolLayerV2 class CORE_EXPORT QgsFillSymbolLayerV2 : public QgsSymbolLayerV2
{ {
public: public:
virtual void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context ) = 0; virtual void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context ) = 0;
void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size ); void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size );
void setAngle( double angle ) { mAngle = angle; } void setAngle( double angle ) { mAngle = angle; }
 End of changes. 11 change blocks. 
9 lines changed or deleted 46 lines changed or added


 qgssymbollayerv2utils.h   qgssymbollayerv2utils.h 
/************************************************************************** * /************************************************************************** *
qgssymbollayerv2utils.h qgssymbollayerv2utils.h
--------------------- ---------------------
begin : November 2009 begin : November 2009
copyright : (C) 2009 by Martin Dobias copyright : (C) 2009 by Martin Dobias
email : wonder dot sk at gmail dot com email : wonder dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
#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 <QFont>
#include <QColor> #include <QColor>
#include "qgssymbolv2.h" #include "qgssymbolv2.h"
#include "qgis.h" #include "qgis.h"
#include "qgsmapunitscale.h"
class QgsExpression; class QgsExpression;
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 QDomDocument; class QDomDocument;
class QDomElement; class QDomElement;
skipping to change at line 81 skipping to change at line 82
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 QString encodeSldBrushStyle( Qt::BrushStyle style );
static Qt::BrushStyle decodeSldBrushStyle( QString str ); 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 encodeMapUnitScale( const QgsMapUnitScale& mapUnitScale
);
static QgsMapUnitScale decodeMapUnitScale( const 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 QString encodeSldRealVector( const QVector<qreal>& v );
static QVector<qreal> decodeSldRealVector( const QString& s ); 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 QString encodeSldUom( QgsSymbolV2::OutputUnit unit, double *scal eFactor );
static QgsSymbolV2::OutputUnit decodeSldUom( QString str, double *scale Factor ); static QgsSymbolV2::OutputUnit decodeSldUom( QString str, double *scale Factor );
static QString encodeScaleMethod( QgsSymbolV2::ScaleMethod scaleMethod ); static QString encodeScaleMethod( QgsSymbolV2::ScaleMethod scaleMethod );
static QgsSymbolV2::ScaleMethod decodeScaleMethod( QString str ); static QgsSymbolV2::ScaleMethod decodeScaleMethod( QString str );
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, const QgsMapUnitScale& scale = QgsMapUnitScal e() );
static QIcon colorRampPreviewIcon( QgsVectorColorRampV2* ramp, QSize si ze ); static QIcon colorRampPreviewIcon( QgsVectorColorRampV2* ramp, QSize si ze );
static void drawStippledBackround( QPainter* painter, QRect rect ); static void drawStippledBackround( QPainter* painter, QRect rect );
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 );
/**Returns the maximum estimated bleed for the symbol */ /**Returns the maximum estimated bleed for the symbol */
static double estimateMaxSymbolBleed( QgsSymbolV2* symbol ); static double estimateMaxSymbolBleed( QgsSymbolV2* symbol );
skipping to change at line 184 skipping to change at line 188
static void labelTextToSld( QDomDocument &doc, QDomElement &element, QS tring label, static void labelTextToSld( QDomDocument &doc, QDomElement &element, QS tring label,
QFont font, QColor color = QColor(), double size = -1 ); QFont font, QColor color = QColor(), double size = -1 );
/**Create ogr feature style string for pen */ /**Create ogr feature style string for pen */
static QString ogrFeatureStylePen( double width, double mmScaleFactor, double mapUnitsScaleFactor, const QColor& c, static QString ogrFeatureStylePen( double width, double mmScaleFactor, double mapUnitsScaleFactor, const QColor& c,
Qt::PenJoinStyle joinStyle = Qt::Mit erJoin, Qt::PenJoinStyle joinStyle = Qt::Mit erJoin,
Qt::PenCapStyle capStyle = Qt::FlatC ap, Qt::PenCapStyle capStyle = Qt::FlatC ap,
double offset = 0.0, double offset = 0.0,
const QVector<qreal>* dashPattern = 0 ); const QVector<qreal>* dashPattern = 0 );
/**Create ogr feature style string for brush /**Create ogr feature style string for brush
@param fillColr fill color*/ @param fillColr fill color*/
static QString ogrFeatureStyleBrush( const QColor& fillColr ); static QString ogrFeatureStyleBrush( const QColor& fillColr );
static void createRotationElement( QDomDocument &doc, QDomElement &elem ent, QString rotationFunc ); static void createRotationElement( QDomDocument &doc, QDomElement &elem ent, QString rotationFunc );
static bool rotationFromSldElement( QDomElement &element, QString &rota tionFunc ); static bool rotationFromSldElement( QDomElement &element, QString &rota tionFunc );
static void createOpacityElement( QDomDocument &doc, QDomElement &eleme nt, QString alphaFunc ); static void createOpacityElement( QDomDocument &doc, QDomElement &eleme nt, QString alphaFunc );
static bool opacityFromSldElement( QDomElement &element, QString &alpha Func ); static bool opacityFromSldElement( QDomElement &element, QString &alpha Func );
static void createDisplacementElement( QDomDocument &doc, QDomElement & element, QPointF offset ); static void createDisplacementElement( QDomDocument &doc, QDomElement & element, QPointF offset );
static bool displacementFromSldElement( QDomElement &element, QPointF & offset ); static bool displacementFromSldElement( QDomElement &element, QPointF & offset );
skipping to change at line 222 skipping to change at line 226
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 );
/** parse color definition with format "rgb(0,0,0)" or "0,0,0" */ /**
* Attempts to parse a string as a color using a variety of common form
ats, including hex
* codes, rgb and rgba strings.
* @param colorStr string representing the color
* @returns parsed color
* @note added in 2.3
*/
static QColor parseColor( QString colorStr ); static QColor parseColor( QString colorStr );
/**
* Attempts to parse a string as a color using a variety of common form
ats, including hex
* codes, rgb and rgba strings.
* @param colorStr string representing the color
* @param containsAlpha if colorStr contains an explicit alpha value th
en containsAlpha will be set to true
* @returns parsed color
* @note added in 2.3
*/
static QColor parseColorWithAlpha( const QString colorStr, bool &contai
nsAlpha );
/**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( const QgsRenderContext& c, QgsSymbo lV2::OutputUnit u ); static double lineWidthScaleFactor( const QgsRenderContext& c, QgsSymbo lV2::OutputUnit u, const QgsMapUnitScale& scale = QgsMapUnitScale() );
/**Returns scale factor painter units -> pixel dimensions*/ /**Returns scale factor painter units -> pixel dimensions*/
static double pixelSizeScaleFactor( const QgsRenderContext& c, QgsSymbo lV2::OutputUnit u ); static double pixelSizeScaleFactor( const QgsRenderContext& c, QgsSymbo lV2::OutputUnit u, const QgsMapUnitScale& scale = QgsMapUnitScale() );
/**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 );
/** Blurs an image in place, e.g. creating Qt-independent drop shadows /** Blurs an image in place, e.g. creating Qt-independent drop shadows
* @note added in 1.9 * @note added in 1.9
*/ */
static void blurImageInPlace( QImage& image, const QRect& rect, int rad ius, bool alphaOnly ); static void blurImageInPlace( QImage& image, const QRect& rect, int rad ius, bool alphaOnly );
/** Converts a QColor into a premultiplied ARGB QColor value using a sp
ecified alpha value
* @note added in 2.3
*/
static void premultiplyColor( QColor& rgb, int alpha );
/**Sorts the passed list in requested order*/ /**Sorts the passed list in requested order*/
static void sortVariantList( QList<QVariant>& list, Qt::SortOrder order ); static void sortVariantList( QList<QVariant>& list, Qt::SortOrder order );
/**Returns a point on the line from startPoint to directionPoint that i s a certain distance away from the starting point*/ /**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 ); static QPointF pointOnLineWithDistance( const QPointF& startPoint, cons t QPointF& directionPoint, double distance );
//! Return a list of all available svg files //! Return a list of all available svg files
static QStringList listSvgFiles(); static QStringList listSvgFiles();
//! Return a list of svg files at the specified directory //! Return a list of svg files at the specified directory
static QStringList listSvgFilesAt( QString directory ); static QStringList listSvgFilesAt( QString directory );
skipping to change at line 263 skipping to change at line 288
* in settings svg/searchPathsForSVG. * in settings svg/searchPathsForSVG.
*/ */
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 );
//! Calculate the centroid point of a QPolygonF //! Calculate the centroid point of a QPolygonF
static QPointF polygonCentroid( const QPolygonF& points ); static QPointF polygonCentroid( const QPolygonF& points );
//! Calculate a point within of a QPolygonF
static QPointF polygonPointOnSurface( const QPolygonF& points );
//! Calculate whether a point is within of a QPolygonF
static bool pointInPolygon( const QPolygonF &points, const QPointF &poi
nt );
/** Return a new valid expression instance for given field or expressio n string. /** Return a new valid expression instance for given field or expressio n string.
* If the input is not a valid expression, it is assumed that it is a f ield name and gets properly quoted. * If the input is not a valid expression, it is assumed that it is a f ield name and gets properly quoted.
* If the string is empty, returns null pointer. * If the string is empty, returns null pointer.
* This is useful when accepting input which could be either a non-quot ed field name or expression. * This is useful when accepting input which could be either a non-quot ed field name or expression.
* @note added in 2.2 * @note added in 2.2
*/ */
static QgsExpression* fieldOrExpressionToExpression( const QString& fie ldOrExpression ); static QgsExpression* fieldOrExpressionToExpression( const QString& fie ldOrExpression );
/** Return a field name if the whole expression is just a name of the f ield . /** Return a field name if the whole expression is just a name of the f ield .
* Returns full expression string if the expression is more complex th an just one field. * Returns full expression string if the expression is more complex th an just one field.
* Using just expression->expression() method may return quoted field name, but that is not * Using just expression->expression() method may return quoted field name, but that is not
* wanted for saving (due to backward compatibility) or display in GUI . * wanted for saving (due to backward compatibility) or display in GUI .
* @note added in 2.2 * @note added in 2.2
*/ */
static QString fieldOrExpressionFromExpression( QgsExpression* expressi on ); static QString fieldOrExpressionFromExpression( QgsExpression* expressi on );
}; };
class QPolygonF; class QPolygonF;
//! calculate line shifted by a specified distance //! @deprecated since 2.4 - calculate line shifted by a specified distance
QPolygonF offsetLine( QPolygonF polyline, double dist ); QList<QPolygonF> offsetLine( QPolygonF polyline, double dist );
//! calculate geometry shifted by a specified distance
QList<QPolygonF> offsetLine( QPolygonF polyline, double dist, QGis::Geometr
yType geometryType );
#endif #endif
 End of changes. 12 change blocks. 
12 lines changed or deleted 53 lines changed or added


 qgssymbollayerv2widget.h   qgssymbollayerv2widget.h 
/************************************************************************** * /************************************************************************** *
qgssymbollayerv2widget.h - symbol layer widgets qgssymbollayerv2widget.h - symbol layer widgets
--------------------- ---------------------
begin : November 2009 begin : November 2009
copyright : (C) 2009 by Martin Dobias copyright : (C) 2009 by Martin Dobias
email : wonder dot sk at gmail dot com email : wonder dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSSYMBOLLAYERV2WIDGET_H #ifndef QGSSYMBOLLAYERV2WIDGET_H
skipping to change at line 73 skipping to change at line 73
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( const QColor& color ); void colorChanged( const QColor& color );
void penStyleChanged(); void penStyleChanged();
void offsetChanged(); void offsetChanged();
void on_mCustomCheckBox_stateChanged( int state ); void on_mCustomCheckBox_stateChanged( int state );
void on_mChangePatternButton_clicked(); void on_mChangePatternButton_clicked();
void on_mPenWidthUnitComboBox_currentIndexChanged( int index ); void on_mPenWidthUnitWidget_changed( );
void on_mOffsetUnitComboBox_currentIndexChanged( int index ); void on_mOffsetUnitWidget_changed( );
void on_mDashPatternUnitComboBox_currentIndexChanged( int index ); void on_mDashPatternUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
void on_mDrawInsideCheckBox_stateChanged( int state ); void on_mDrawInsideCheckBox_stateChanged( int state );
protected: protected:
QgsSimpleLineSymbolLayerV2* mLayer; QgsSimpleLineSymbolLayerV2* mLayer;
//creates a new icon for the 'change pattern' button //creates a new icon for the 'change pattern' button
void updatePatternIcon(); void updatePatternIcon();
}; };
skipping to change at line 112 skipping to change at line 112
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( const QColor& color ); void setColorBorder( const QColor& color );
void setColorFill( const QColor& color ); void setColorFill( const QColor& color );
void setSize(); void setSize();
void setAngle(); void setAngle();
void setOffset(); void setOffset();
void on_mSizeUnitComboBox_currentIndexChanged( int index ); void on_mSizeUnitWidget_changed( );
void on_mOffsetUnitComboBox_currentIndexChanged( int index ); void on_mOffsetUnitWidget_changed( );
void on_mOutlineWidthUnitComboBox_currentIndexChanged( int index ); void on_mOutlineWidthUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
void on_mOutlineStyleComboBox_currentIndexChanged( int index ); void on_mOutlineStyleComboBox_currentIndexChanged( int index );
void on_mOutlineWidthSpinBox_valueChanged( double d ); void on_mOutlineWidthSpinBox_valueChanged( double d );
void on_mHorizontalAnchorComboBox_currentIndexChanged( int index ); void on_mHorizontalAnchorComboBox_currentIndexChanged( int index );
void on_mVerticalAnchorComboBox_currentIndexChanged( int index ); void on_mVerticalAnchorComboBox_currentIndexChanged( int index );
protected: protected:
QgsSimpleMarkerSymbolLayerV2* mLayer; QgsSimpleMarkerSymbolLayerV2* mLayer;
}; };
skipping to change at line 151 skipping to change at line 151
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
public slots: public slots:
void setColor( const QColor& color ); void setColor( const QColor& color );
void setBorderColor( const QColor& color ); void setBorderColor( const QColor& color );
void setBrushStyle(); void setBrushStyle();
void borderWidthChanged(); void borderWidthChanged();
void borderStyleChanged(); void borderStyleChanged();
void offsetChanged(); void offsetChanged();
void on_mBorderWidthUnitComboBox_currentIndexChanged( int index ); void on_mBorderWidthUnitWidget_changed( );
void on_mOffsetUnitComboBox_currentIndexChanged( int index ); void on_mOffsetUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
protected: protected:
QgsSimpleFillSymbolLayerV2* mLayer; QgsSimpleFillSymbolLayerV2* mLayer;
}; };
/////////// ///////////
#include "ui_widget_gradientfill.h" #include "ui_widget_gradientfill.h"
skipping to change at line 187 skipping to change at line 187
public slots: public slots:
void setColor( const QColor& color ); void setColor( const QColor& color );
void setColor2( const QColor& color ); void setColor2( const QColor& color );
void applyColorRamp(); void applyColorRamp();
void setGradientType( int index ); void setGradientType( int index );
void setCoordinateMode( int index ); void setCoordinateMode( int index );
void setGradientSpread( int index ); void setGradientSpread( int index );
void offsetChanged(); void offsetChanged();
void referencePointChanged(); void referencePointChanged();
void on_mOffsetUnitComboBox_currentIndexChanged( int index ); void on_mOffsetUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
void colorModeChanged(); void colorModeChanged();
void on_mSpinAngle_valueChanged( double value ); void on_mSpinAngle_valueChanged( double value );
protected: protected:
QgsGradientFillSymbolLayerV2* mLayer; QgsGradientFillSymbolLayerV2* mLayer;
}; };
/////////// ///////////
#include "ui_widget_shapeburstfill.h"
class QgsShapeburstFillSymbolLayerV2;
class GUI_EXPORT QgsShapeburstFillSymbolLayerV2Widget : public QgsSymbolLay
erV2Widget, private Ui::WidgetShapeburstFill
{
Q_OBJECT
public:
QgsShapeburstFillSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget
* parent = NULL );
static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret
urn new QgsShapeburstFillSymbolLayerV2Widget( vl ); }
// from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer();
public slots:
void setColor( const QColor& color );
void setColor2( const QColor& color );
void colorModeChanged();
void on_mSpinBlurRadius_valueChanged( int value );
void on_mSpinMaxDistance_valueChanged( double value );
void on_mDistanceUnitWidget_changed( );
void on_mRadioUseWholeShape_toggled( bool value );
void applyColorRamp();
void offsetChanged();
void on_mOffsetUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked();
void on_mIgnoreRingsCheckBox_stateChanged( int state );
protected:
QgsShapeburstFillSymbolLayerV2* mLayer;
};
///////////
#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( const QgsVectorLayer* vl, QWidget* pa rent = NULL ); QgsMarkerLineSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* pa rent = NULL );
static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsMarkerLineSymbolLayerV2Widget( vl ); } 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 setOffsetAlongLine( double val );
void setRotate(); void setRotate();
void setOffset(); void setOffset();
void setPlacement(); void setPlacement();
void on_mIntervalUnitComboBox_currentIndexChanged( int index ); void on_mIntervalUnitWidget_changed( );
void on_mOffsetUnitComboBox_currentIndexChanged( int index ); void on_mOffsetUnitWidget_changed( );
void on_mOffsetAlongLineUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
protected: protected:
QgsMarkerLineSymbolLayerV2* mLayer; QgsMarkerLineSymbolLayerV2* mLayer;
}; };
/////////// ///////////
#include "ui_widget_svgmarker.h" #include "ui_widget_svgmarker.h"
skipping to change at line 261 skipping to change at line 300
void populateIcons( const QModelIndex& idx ); void populateIcons( const QModelIndex& idx );
void setSize(); void setSize();
void setAngle(); void setAngle();
void setOffset(); void setOffset();
void on_mFileToolButton_clicked(); void on_mFileToolButton_clicked();
void on_mFileLineEdit_textEdited( const QString& text ); void on_mFileLineEdit_textEdited( const QString& text );
void on_mFileLineEdit_editingFinished(); void on_mFileLineEdit_editingFinished();
void on_mChangeColorButton_colorChanged( const QColor& color ); void on_mChangeColorButton_colorChanged( const QColor& color );
void on_mChangeBorderColorButton_colorChanged( const QColor& color ); void on_mChangeBorderColorButton_colorChanged( const QColor& color );
void on_mBorderWidthSpinBox_valueChanged( double d ); void on_mBorderWidthSpinBox_valueChanged( double d );
void on_mSizeUnitComboBox_currentIndexChanged( int index ); void on_mSizeUnitWidget_changed( );
void on_mBorderWidthUnitComboBox_currentIndexChanged( int index ); void on_mBorderWidthUnitWidget_changed( );
void on_mOffsetUnitComboBox_currentIndexChanged( int index ); void on_mOffsetUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
void on_mHorizontalAnchorComboBox_currentIndexChanged( int index ); void on_mHorizontalAnchorComboBox_currentIndexChanged( int index );
void on_mVerticalAnchorComboBox_currentIndexChanged( int index ); void on_mVerticalAnchorComboBox_currentIndexChanged( int index );
protected: protected:
void populateList(); void populateList();
//update gui for svg file (insert new path, update activation of gui el ements for svg params) //update gui for svg file (insert new path, update activation of gui el ements for svg params)
void setGuiForSvg( const QgsSvgMarkerSymbolLayerV2* layer ); void setGuiForSvg( const QgsSvgMarkerSymbolLayerV2* layer );
skipping to change at line 299 skipping to change at line 338
static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsSVGFillSymbolLayerWidget( vl ); } 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;
void insertIcons(); void insertIcons();
void updateParamGui(); /**Enables or disables svg fill color, border color and border width ba
sed on whether the
* svg file supports custom parameters.
* @param resetValues set to true to overwrite existing layer fill colo
r, border color and border width
* with default values from svg file
*/
void updateParamGui( bool resetValues = true );
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_textEdited( const QString & text ); void on_mSVGLineEdit_textEdited( const QString & text );
void on_mSVGLineEdit_editingFinished(); void on_mSVGLineEdit_editingFinished();
void setFile( const QModelIndex& item ); void setFile( const QModelIndex& item );
void populateIcons( const QModelIndex& item ); void populateIcons( const QModelIndex& item );
void on_mRotationSpinBox_valueChanged( double d ); void on_mRotationSpinBox_valueChanged( double d );
void on_mChangeColorButton_colorChanged( const QColor& color ); void on_mChangeColorButton_colorChanged( const QColor& color );
void on_mChangeBorderColorButton_colorChanged( const QColor& color ); void on_mChangeBorderColorButton_colorChanged( const QColor& color );
void on_mBorderWidthSpinBox_valueChanged( double d ); void on_mBorderWidthSpinBox_valueChanged( double d );
void on_mTextureWidthUnitComboBox_currentIndexChanged( int index ); void on_mTextureWidthUnitWidget_changed( );
void on_mSvgOutlineWidthUnitComboBox_currentIndexChanged( int index ); void on_mSvgOutlineWidthUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
}; };
////////// //////////
#include "ui_widget_linepatternfill.h" #include "ui_widget_linepatternfill.h"
class QgsLinePatternFillSymbolLayer; class QgsLinePatternFillSymbolLayer;
class GUI_EXPORT QgsLinePatternFillSymbolLayerWidget : public QgsSymbolLaye rV2Widget, private Ui::WidgetLinePatternFill class GUI_EXPORT QgsLinePatternFillSymbolLayerWidget : public QgsSymbolLaye rV2Widget, private Ui::WidgetLinePatternFill
skipping to change at line 342 skipping to change at line 386
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
protected: protected:
QgsLinePatternFillSymbolLayer* mLayer; QgsLinePatternFillSymbolLayer* mLayer;
private slots: private slots:
void on_mAngleSpinBox_valueChanged( double d ); void on_mAngleSpinBox_valueChanged( double d );
void on_mDistanceSpinBox_valueChanged( double d ); void on_mDistanceSpinBox_valueChanged( double d );
void on_mOffsetSpinBox_valueChanged( double d ); void on_mOffsetSpinBox_valueChanged( double d );
void on_mDistanceUnitComboBox_currentIndexChanged( int index ); void on_mDistanceUnitWidget_changed( );
void on_mOffsetUnitComboBox_currentIndexChanged( int index ); void on_mOffsetUnitWidget_changed( );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
}; };
////////// //////////
#include "ui_widget_pointpatternfill.h" #include "ui_widget_pointpatternfill.h"
class QgsPointPatternFillSymbolLayer; class QgsPointPatternFillSymbolLayer;
class GUI_EXPORT QgsPointPatternFillSymbolLayerWidget: public QgsSymbolLaye rV2Widget, private Ui::WidgetPointPatternFill class GUI_EXPORT QgsPointPatternFillSymbolLayerWidget: public QgsSymbolLaye rV2Widget, private Ui::WidgetPointPatternFill
skipping to change at line 372 skipping to change at line 416
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
protected: protected:
QgsPointPatternFillSymbolLayer* mLayer; QgsPointPatternFillSymbolLayer* mLayer;
private slots: private slots:
void on_mHorizontalDistanceSpinBox_valueChanged( double d ); void on_mHorizontalDistanceSpinBox_valueChanged( double d );
void on_mVerticalDistanceSpinBox_valueChanged( double d ); void on_mVerticalDistanceSpinBox_valueChanged( double d );
void on_mHorizontalDisplacementSpinBox_valueChanged( double d ); void on_mHorizontalDisplacementSpinBox_valueChanged( double d );
void on_mVerticalDisplacementSpinBox_valueChanged( double d ); void on_mVerticalDisplacementSpinBox_valueChanged( double d );
void on_mHorizontalDistanceUnitComboBox_currentIndexChanged( int index void on_mHorizontalDistanceUnitWidget_changed( );
); void on_mVerticalDistanceUnitWidget_changed( );
void on_mVerticalDistanceUnitComboBox_currentIndexChanged( int index ); void on_mHorizontalDisplacementUnitWidget_changed( );
void on_mHorizontalDisplacementUnitComboBox_currentIndexChanged( int in void on_mVerticalDisplacementUnitWidget_changed( );
dex );
void on_mVerticalDisplacementUnitComboBox_currentIndexChanged( int inde
x );
void on_mDataDefinedPropertiesButton_clicked(); void on_mDataDefinedPropertiesButton_clicked();
}; };
///////// /////////
#include "ui_widget_fontmarker.h" #include "ui_widget_fontmarker.h"
class QgsFontMarkerSymbolLayerV2; class QgsFontMarkerSymbolLayerV2;
class CharacterWidget; class CharacterWidget;
skipping to change at line 406 skipping to change at line 450
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( const QColor& color ); void setColor( const QColor& color );
void setSize( double size ); void setSize( double size );
void setAngle( double angle ); void setAngle( double angle );
void setCharacter( const QChar& chr ); void setCharacter( const QChar& chr );
void setOffset(); void setOffset();
void on_mSizeUnitComboBox_currentIndexChanged( int index ); void on_mSizeUnitWidget_changed( );
void on_mOffsetUnitComboBox_currentIndexChanged( int index ); void on_mOffsetUnitWidget_changed( );
void on_mHorizontalAnchorComboBox_currentIndexChanged( int index ); void on_mHorizontalAnchorComboBox_currentIndexChanged( int index );
void on_mVerticalAnchorComboBox_currentIndexChanged( int index ); void on_mVerticalAnchorComboBox_currentIndexChanged( int index );
protected: protected:
QgsFontMarkerSymbolLayerV2* mLayer; QgsFontMarkerSymbolLayerV2* mLayer;
CharacterWidget* widgetChar; CharacterWidget* widgetChar;
}; };
////////// //////////
skipping to change at line 435 skipping to change at line 479
public: public:
QgsCentroidFillSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* parent = NULL ); QgsCentroidFillSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* parent = NULL );
static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { ret urn new QgsCentroidFillSymbolLayerV2Widget( vl ); } 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:
void on_mDrawInsideCheckBox_stateChanged( int state );
protected: protected:
QgsCentroidFillSymbolLayerV2* mLayer; QgsCentroidFillSymbolLayerV2* mLayer;
}; };
#endif #endif
 End of changes. 16 change blocks. 
33 lines changed or deleted 82 lines changed or added


 qgssymbolslistwidget.h   qgssymbolslistwidget.h 
/************************************************************************** * /************************************************************************** *
qgssymbolslistwidget.h qgssymbolslistwidget.h
--------------------- ---------------------
begin : June 2012 begin : June 2012
copyright : (C) 2012 by Arunmozhi copyright : (C) 2012 by Arunmozhi
email : aruntheguy at gmail.com email : aruntheguy at gmail.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. *
* * * *
************************************************************************** */ ************************************************************************** */
#ifndef QGSSYMBOLSLISTWIDGET_H #ifndef QGSSYMBOLSLISTWIDGET_H
skipping to change at line 42 skipping to change at line 42
public: public:
QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* style, QMenu* me nu, QWidget* parent ); QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* style, QMenu* me nu, QWidget* parent );
public slots: public slots:
void setSymbolFromStyle( const QModelIndex & index ); void setSymbolFromStyle( const QModelIndex & index );
void setSymbolColor( const QColor& color ); void setSymbolColor( const QColor& color );
void setMarkerAngle( double angle ); void setMarkerAngle( double angle );
void setMarkerSize( double size ); void setMarkerSize( double size );
void setLineWidth( double width ); void setLineWidth( double width );
void addSymbolToStyle(); void addSymbolToStyle();
void on_mSymbolUnitComboBox_currentIndexChanged( const QString & text ) void symbolAddedToStyle( QString name, QgsSymbolV2* symbol );
; void on_mSymbolUnitWidget_changed( );
void on_mTransparencySlider_valueChanged( int value ); void on_mTransparencySlider_valueChanged( int value );
void on_groupsCombo_currentIndexChanged( int index ); void on_groupsCombo_currentIndexChanged( int index );
void on_groupsCombo_editTextChanged( const QString &text ); void on_groupsCombo_editTextChanged( const QString &text );
void openStyleManager(); void openStyleManager();
signals: signals:
void changed(); void changed();
 End of changes. 2 change blocks. 
7 lines changed or deleted 7 lines changed or added


 qgssymbolv2.h   qgssymbolv2.h 
/************************************************************************** * /************************************************************************** *
qgssymbolv2.h qgssymbolv2.h
--------------------- ---------------------
begin : November 2009 begin : November 2009
copyright : (C) 2009 by Martin Dobias copyright : (C) 2009 by Martin Dobias
email : wonder dot sk at gmail dot com email : wonder dot 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. *
* * * *
************************************************************************** */ ************************************************************************** */
#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>
#include "qgsmapunitscale.h"
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 QDomDocument;
class QDomElement; class QDomElement;
//class //class
class QgsFeature; class QgsFeature;
class QgsFields;
class QgsSymbolLayerV2; class QgsSymbolLayerV2;
class QgsRenderContext; class QgsRenderContext;
class QgsVectorLayer; class QgsVectorLayer;
typedef QList<QgsSymbolLayerV2*> QgsSymbolLayerV2List; typedef QList<QgsSymbolLayerV2*> QgsSymbolLayerV2List;
class CORE_EXPORT QgsSymbolV2 class CORE_EXPORT QgsSymbolV2
{ {
public: public:
skipping to change at line 100 skipping to change at line 102
//! 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, const QgsVectorLayer* laye r = 0 ); void startRender( QgsRenderContext& context, const QgsFields* fields = 0 );
void stopRender( QgsRenderContext& context ); void stopRender( QgsRenderContext& context );
void setColor( const QColor& color ); void setColor( const QColor& color );
QColor color() const; QColor color() const;
void drawPreviewIcon( QPainter* painter, QSize size ); void drawPreviewIcon( QPainter* painter, QSize size );
QImage bigSymbolPreviewImage(); QImage bigSymbolPreviewImage();
QString dump() const; QString dump() const;
virtual QgsSymbolV2* clone() const = 0; virtual QgsSymbolV2* clone() const = 0;
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setOutputUnit( QgsSymbolV2::OutputUnit u ); void setOutputUnit( QgsSymbolV2::OutputUnit u );
QgsMapUnitScale mapUnitScale() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
//! Get alpha transparency 1 for opaque, 0 for invisible //! 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 //! 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() const { return mRenderHints; } int renderHints() const { return mRenderHints; }
skipping to change at line 160 skipping to change at line 165
int mRenderHints; int mRenderHints;
const QgsVectorLayer* mLayer; //current vectorlayer const QgsVectorLayer* mLayer; //current vectorlayer
}; };
/////////////////////// ///////////////////////
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, const Qg sFeature* f = 0 ); QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u , qreal alpha = 1.0, bool selected = false, int renderHints = 0, const Qg sFeature* f = 0, const QgsFields* = 0, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() );
~QgsSymbolV2RenderContext(); ~QgsSymbolV2RenderContext();
QgsRenderContext& renderContext() { return mRenderContext; } QgsRenderContext& renderContext() { return mRenderContext; }
const QgsRenderContext& renderContext() const { return mRenderContext; } const QgsRenderContext& renderContext() const { 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; }
QgsMapUnitScale mapUnitScale() const { return mMapUnitScale; }
void setMapUnitScale( const QgsMapUnitScale& scale ) { mMapUnitScale =
scale; }
//! Get alpha transparency 1 for opaque, 0 for invisible //! 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 //! 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; } void setFeature( const QgsFeature* f ) { mFeature = f; }
//! Current feature being rendered - may be null
const QgsFeature* feature() const { return mFeature; } const QgsFeature* feature() const { return mFeature; }
void setLayer( const QgsVectorLayer* layer ) { mLayer = layer; } //! Fields of the layer. Currently only available in startRender() call
const QgsVectorLayer* layer() const { return mLayer; } s
//! to allow symbols with data-defined properties prepare the expressio
ns
//! (other times fields() returns null)
//! @note added in 2.4
const QgsFields* fields() const { return mFields; }
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;
QgsMapUnitScale mMapUnitScale;
qreal mAlpha; qreal mAlpha;
bool mSelected; bool mSelected;
int mRenderHints; int mRenderHints;
const QgsFeature* mFeature; //current feature const QgsFeature* mFeature; //current feature
const QgsVectorLayer* mLayer; //current vectorlayer const QgsFields* mFields;
}; };
////////////////////// //////////////////////
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
 End of changes. 11 change blocks. 
10 lines changed or deleted 26 lines changed or added


 qgssymbolv2selectordialog.h   qgssymbolv2selectordialog.h 
skipping to change at line 75 skipping to change at line 75
signals: signals:
void symbolModified(); void symbolModified();
public slots: public slots:
void moveLayerDown(); void moveLayerDown();
void moveLayerUp(); void moveLayerUp();
void addLayer(); void addLayer();
void removeLayer(); void removeLayer();
void saveSymbol();
void lockLayer(); void lockLayer();
void layerChanged(); void layerChanged();
void updateLayerPreview(); void updateLayerPreview();
void updatePreview(); void updatePreview();
//! Slot to update tree when a new symbol from style //! Slot to update tree when a new symbol from style
void symbolChanged(); void symbolChanged();
//! alters tree and sets proper widget when Layer Type is changed //! alters tree and sets proper widget when Layer Type is changed
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 qgstextdiagram.h   qgstextdiagram.h 
skipping to change at line 50 skipping to change at line 50
}; };
enum Orientation enum Orientation
{ {
Horizontal = 0, Horizontal = 0,
Vertical Vertical
}; };
QgsTextDiagram(); QgsTextDiagram();
~QgsTextDiagram(); ~QgsTextDiagram();
virtual QgsDiagram* clone() const;
void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, con st QgsDiagramSettings& s, const QPointF& position ); void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, con st QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderCon text& c, const QgsDiagramSettings& s ); QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderCon text& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) ; QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) ;
QString diagramName() const { return DIAGRAM_NAME_TEXT; } QString diagramName() const { return DIAGRAM_NAME_TEXT; }
private: private:
Orientation mOrientation; Orientation mOrientation;
Shape mShape; Shape mShape;
QBrush mBrush; //transparent brush QBrush mBrush; //transparent brush
QPen mPen; QPen mPen;
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added


 qgstolerance.h   qgstolerance.h 
skipping to change at line 46 skipping to change at line 46
MapUnits, MapUnits,
/**Pixels unit of tolerance*/ /**Pixels unit of tolerance*/
Pixels Pixels
}; };
/** /**
* Static function to get vertex tolerance value for a layer. * Static function to get vertex tolerance value for a layer.
* The value is read from settings and transformed if necessary. * The value is read from settings and transformed if necessary.
* @return value of vertex tolerance in map units * @return value of vertex tolerance in map units
*/ */
static double vertexSearchRadius( QgsMapLayer* layer, QgsMapRenderer* r static double vertexSearchRadius( QgsMapLayer* layer, const QgsMapSetti
enderer ); ngs& mapSettings );
/**
* Static function to get vertex tolerance value for a layer.
* The value is read from settings and transformed if necessary.
* @return value of vertex tolerance in map units
*/
//! @deprecated since 2.4 - use override with QgsMapSettings
Q_DECL_DEPRECATED static double vertexSearchRadius( QgsMapLayer* layer,
QgsMapRenderer* renderer );
/**
* Static function to get default tolerance value for a layer.
* The value is read from settings and transformed if necessary.
* @return value of default tolerance in map units
*/
static double defaultTolerance( QgsMapLayer* layer, const QgsMapSetting
s& mapSettings );
/** /**
* Static function to get default tolerance value for a layer. * Static function to get default tolerance value for a layer.
* The value is read from settings and transformed if necessary. * The value is read from settings and transformed if necessary.
* @return value of default tolerance in map units * @return value of default tolerance in map units
*/ */
static double defaultTolerance( QgsMapLayer* layer, QgsMapRenderer* ren //! @deprecated since 2.4 - use override with QgsMapSettings
derer ); Q_DECL_DEPRECATED static double defaultTolerance( QgsMapLayer* layer, Q
gsMapRenderer* renderer );
/**
* Static function to translate tolerance value into current map unit va
lue
* @param tolerance tolerance value to be translated
* @param layer reference layer
* @param mapSettings settings of the map
* @param units type of units to be translated
* @return value of tolerance in map units
*/
static double toleranceInMapUnits( double tolerance, QgsMapLayer* layer
, const QgsMapSettings& mapSettings, UnitType units = MapUnits );
/** /**
* Static function to translate tolerance value into current map unit va lue * Static function to translate tolerance value into current map unit va lue
* @param tolerance tolerance value to be translated * @param tolerance tolerance value to be translated
* @param layer reference layer * @param layer reference layer
* @param renderer renderer * @param renderer renderer
* @param units type of units to be translated * @param units type of units to be translated
* @return value of tolerance in map units * @return value of tolerance in map units
*/ */
static double toleranceInMapUnits( double tolerance, QgsMapLayer* layer //! @deprecated since 2.4 - use the override with QgsMapSettings
, QgsMapRenderer* renderer, UnitType units = MapUnits ); Q_DECL_DEPRECATED static double toleranceInMapUnits( double tolerance,
QgsMapLayer* layer, QgsMapRenderer* renderer, UnitType units = MapUnits );
private: private:
static double computeMapUnitPerPixel( QgsMapLayer* layer, QgsMapRendere static double computeMapUnitPerPixel( QgsMapLayer* layer, const QgsMapS
r* renderer ); ettings& mapSettings );
static QgsPoint toLayerCoordinates( QgsMapLayer* layer, QgsMapRenderer* static QgsPoint toLayerCoordinates( QgsMapLayer* layer, const QgsMapSet
renderer, const QPoint& point ); tings& mapSettings, const QPoint& point );
}; };
#endif #endif
 End of changes. 4 change blocks. 
10 lines changed or deleted 41 lines changed or added


 qgsvectorcolorrampv2.h   qgsvectorcolorrampv2.h 
skipping to change at line 97 skipping to change at line 97
void convertToDiscrete( bool discrete ); void convertToDiscrete( bool discrete );
void setStops( const QgsGradientStopsList& stops ) { mStops = stops; } void setStops( const QgsGradientStopsList& stops ) { mStops = stops; }
const QgsGradientStopsList& stops() const { return mStops; } const QgsGradientStopsList& stops() const { return mStops; }
QgsStringMap info() const { return mInfo; } QgsStringMap info() const { return mInfo; }
void setInfo( const QgsStringMap& info ) { mInfo = info; } void setInfo( const QgsStringMap& info ) { mInfo = info; }
/**copy color ramp stops to a QGradient /**copy color ramp stops to a QGradient
* @note added in 2.1 */ * @note added in 2.1 */
void addStopsToGradient( QGradient* gradient ); void addStopsToGradient( QGradient* gradient, double alpha = 1 );
protected: protected:
QColor mColor1, mColor2; QColor mColor1, mColor2;
bool mDiscrete; bool mDiscrete;
QgsGradientStopsList mStops; QgsGradientStopsList mStops;
QgsStringMap mInfo; QgsStringMap mInfo;
}; };
#define DEFAULT_RANDOM_COUNT 10 #define DEFAULT_RANDOM_COUNT 10
#define DEFAULT_RANDOM_HUE_MIN 0 #define DEFAULT_RANDOM_HUE_MIN 0
skipping to change at line 134 skipping to change at line 134
virtual double value( int index ) const; virtual double value( int index ) const;
virtual QColor color( double value ) const; virtual QColor color( double value ) const;
virtual QString type() const { return "random"; } virtual QString type() const { return "random"; }
virtual QgsVectorColorRampV2* clone() const; virtual QgsVectorColorRampV2* clone() const;
virtual QgsStringMap properties() const; virtual QgsStringMap properties() const;
/** get a list of random colors
* @note added in 2.4 */
static QList<QColor> randomColors( int count,
int hueMax = DEFAULT_RANDOM_HUE_MAX,
int hueMin = DEFAULT_RANDOM_HUE_MIN,
int satMax = DEFAULT_RANDOM_SAT_MAX,
int satMin = DEFAULT_RANDOM_SAT_MIN,
int valMax = DEFAULT_RANDOM_VAL_MAX,
int valMin = DEFAULT_RANDOM_VAL_MIN );
void updateColors(); void updateColors();
int count() const { return mCount; } int count() const { return mCount; }
int hueMin() const { return mHueMin; } int hueMin() const { return mHueMin; }
int hueMax() const { return mHueMax; } int hueMax() const { return mHueMax; }
int satMin() const { return mSatMin; } int satMin() const { return mSatMin; }
int satMax() const { return mSatMax; } int satMax() const { return mSatMax; }
int valMin() const { return mValMin; } int valMin() const { return mValMin; }
int valMax() const { return mValMax; } int valMax() const { return mValMax; }
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added


 qgsvectordataprovider.h   qgsvectordataprovider.h 
skipping to change at line 111 skipping to change at line 111
* @param uri uniform resource locator (URI) for a dataset * @param uri uniform resource locator (URI) for a dataset
*/ */
QgsVectorDataProvider( QString uri = QString() ); QgsVectorDataProvider( QString uri = QString() );
/** /**
* Destructor * Destructor
*/ */
virtual ~QgsVectorDataProvider(); virtual ~QgsVectorDataProvider();
/** /**
* Return feature source object that can be used for querying provider'
s data. The returned feature source
* is independent from provider - any changes to provider's state (e.g.
change of subset string) will not be
* reflected in the feature source, therefore it can be safely used for
processing in background without
* having to care about possible changes within provider that may happe
n concurrently. Also, even in the case
* of provider being deleted, any feature source obtained from the prov
ider will be kept alive and working
* (they are independent and owned by the caller).
*
* Sometimes there are cases when some data needs to be shared between
vector data provider and its feature source.
* In such cases, the implementation must ensure that the data is not s
usceptible to run condition. For example,
* if it is possible that both feature source and provider may need rea
ding/writing to some shared data at the
* same time, some synchronization mechanisms must be used (e.g. mutexe
s) to prevent data corruption.
*
* @note added in 2.4
* @return new instance of QgsAbstractFeatureSource (caller is responsi
ble for deleting it)
*/
virtual QgsAbstractFeatureSource* featureSource() const { Q_ASSERT( 0 &
& "All providers must support featureSource()" ); return 0; }
/**
* Returns the permanent storage type for this layer as a friendly name . * Returns the permanent storage type for this layer as a friendly name .
*/ */
virtual QString storageType() const; virtual QString storageType() const;
/** /**
* Query the provider for features specified in request. * Query the provider for features specified in request.
*/ */
virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& reques t = QgsFeatureRequest() ) = 0; virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& reques t = QgsFeatureRequest() ) = 0;
/** /**
skipping to change at line 135 skipping to change at line 153
/** /**
* Number of features in the layer * Number of features in the layer
* @return long containing number of features * @return long containing number of features
*/ */
virtual long featureCount() const = 0; virtual long featureCount() const = 0;
/** /**
* Return a map of indexes with field names for this layer * Return a map of indexes with field names for this layer
* @return map of fields * @return map of fields
* @see QgsFieldMap * @see QgsFields
*/ */
virtual const QgsFields &fields() const = 0; virtual const QgsFields &fields() const = 0;
/** /**
* Return a short comment for the data that this provider is * Return a short comment for the data that this provider is
* providing access to (e.g. the comment for postgres table). * providing access to (e.g. the comment for postgres table).
*/ */
virtual QString dataComment() const; virtual QString dataComment() const;
/** /**
skipping to change at line 348 skipping to change at line 366
* @note added in 1.7 * @note added in 1.7
*/ */
QStringList errors(); QStringList errors();
/** /**
* It returns false by default. * It returns false by default.
* Must be implemented by providers that support saving and loading sty les to db returning true * Must be implemented by providers that support saving and loading sty les to db returning true
*/ */
virtual bool isSaveAndLoadStyleToDBSupported() { return false; } virtual bool isSaveAndLoadStyleToDBSupported() { return false; }
protected: static QVariant convertValue( QVariant::Type type, QString value );
QVariant convertValue( QVariant::Type type, QString value );
protected:
void clearMinMaxCache(); void clearMinMaxCache();
void fillMinMaxCache(); void fillMinMaxCache();
bool mCacheMinMaxDirty; bool mCacheMinMaxDirty;
QMap<int, QVariant> mCacheMinValues, mCacheMaxValues; QMap<int, QVariant> mCacheMinValues, mCacheMaxValues;
/** Encoding */ /** Encoding */
QTextCodec* mEncoding; QTextCodec* mEncoding;
/** should provider fetch also features that don't have geometry? */ /** should provider fetch also features that don't have geometry? */
 End of changes. 4 change blocks. 
3 lines changed or deleted 32 lines changed or added


 qgsvectorfieldsymbollayer.h   qgsvectorfieldsymbollayer.h 
/************************************************************************** * /************************************************************************** *
qgsvectorfieldsymbollayer.h qgsvectorfieldsymbollayer.h
------------------------- -------------------------
begin : Octorer 25, 2011 begin : Octorer 25, 2011
copyright : (C) 2011 by Marco Hugentobler copyright : (C) 2011 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch email : marco dot hugentobler at sourcepole dot 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 *
skipping to change at line 87 skipping to change at line 87
void setVectorFieldType( VectorFieldType type ) { mVectorFieldType = ty pe; } void setVectorFieldType( VectorFieldType type ) { mVectorFieldType = ty pe; }
VectorFieldType vectorFieldType() const { return mVectorFieldType; } VectorFieldType vectorFieldType() const { return mVectorFieldType; }
void setAngleOrientation( AngleOrientation orientation ) { mAngleOrient ation = orientation; } void setAngleOrientation( AngleOrientation orientation ) { mAngleOrient ation = orientation; }
AngleOrientation angleOrientation() const { return mAngleOrientation; } AngleOrientation angleOrientation() const { return mAngleOrientation; }
void setAngleUnits( AngleUnits units ) { mAngleUnits = units; } void setAngleUnits( AngleUnits units ) { mAngleUnits = units; }
AngleUnits angleUnits() const { return mAngleUnits; } AngleUnits angleUnits() const { return mAngleUnits; }
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; } void setDistanceUnit( QgsSymbolV2::OutputUnit unit ) { mDistanceUnit = unit; }
QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; } QgsSymbolV2::OutputUnit distanceUnit() const { return mDistanceUnit; }
void setDistanceMapUnitScale( const QgsMapUnitScale& scale ) { mDistanc
eMapUnitScale = scale; }
const QgsMapUnitScale& distanceMapUnitScale() const { return mDistanceM
apUnitScale; }
private: private:
QString mXAttribute; QString mXAttribute;
QString mYAttribute; QString mYAttribute;
QgsSymbolV2::OutputUnit mDistanceUnit; QgsSymbolV2::OutputUnit mDistanceUnit;
QgsMapUnitScale mDistanceMapUnitScale;
double mScale; double mScale;
VectorFieldType mVectorFieldType; VectorFieldType mVectorFieldType;
AngleOrientation mAngleOrientation; AngleOrientation mAngleOrientation;
AngleUnits mAngleUnits; AngleUnits mAngleUnits;
QgsLineSymbolV2* mLineSymbol; QgsLineSymbolV2* mLineSymbol;
//Attribute indices are resolved in startRender method //Attribute indices are resolved in startRender method
int mXIndex; int mXIndex;
int mYIndex; int mYIndex;
 End of changes. 4 change blocks. 
2 lines changed or deleted 11 lines changed or added


 qgsvectorfilewriter.h   qgsvectorfilewriter.h 
skipping to change at line 109 skipping to change at line 109
}; };
class BoolOption : public SetOption class BoolOption : public SetOption
{ {
public: public:
BoolOption( const QString& docString, bool defaultValue ) BoolOption( const QString& docString, bool defaultValue )
: SetOption( docString, QStringList() << "YES" << "NO", default Value ? "YES" : "NO" ) : SetOption( docString, QStringList() << "YES" << "NO", default Value ? "YES" : "NO" )
{} {}
}; };
class HiddenOption: public Option class HiddenOption : public Option
{ {
public: public:
HiddenOption( const QString& value ) HiddenOption( const QString& value )
: Option( "", Hidden ) : Option( "", Hidden )
, mValue( value ) , mValue( value )
{} {}
QString mValue; QString mValue;
}; };
skipping to change at line 178 skipping to change at line 178
@param destCRS pointer to CRS to reproject exported geometries to @param destCRS pointer to CRS to reproject exported geometries to
@param driverName OGR driver to use @param driverName OGR driver to use
@param onlySelected write only selected features of layer @param onlySelected write only selected features of layer
@param errorMessage pointer to buffer fo error message @param errorMessage pointer to buffer fo error message
@param datasourceOptions list of OGR data source creation options @param datasourceOptions list of OGR data source creation options
@param layerOptions list of OGR layer creation options @param layerOptions list of OGR layer creation options
@param skipAttributeCreation only write geometries @param skipAttributeCreation only write geometries
@param newFilename QString pointer which will contain the new file name created (in case it is different to fileName). @param newFilename QString pointer which will contain the new file name created (in case it is different to fileName).
@param symbologyExport symbology to export @param symbologyExport symbology to export
@param symbologyScale scale of symbology @param symbologyScale scale of symbology
@param filterExtent if not a null pointer, only features intersecting t he extent will be saved
*/ */
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 lse, // added in 1.6 bool skipAttributeCreation = fa lse, // added in 1.6
QString *newFilename = 0, // ad ded in 1.9 QString *newFilename = 0, // ad ded in 1.9
SymbologyExport symbologyExport = NoSymbology, //added in 2.0 SymbologyExport symbologyExport = NoSymbology, //added in 2.0
double symbologyScale = 1.0 // double symbologyScale = 1.0, //
added in 2.0 added in 2.0
const QgsRectangle* filterExten
t = 0 // added in 2.4
); );
//! @note added in v2.2
static WriterError writeAsVectorFormat( QgsVectorLayer* layer, static WriterError writeAsVectorFormat( QgsVectorLayer* layer,
const QString& fileName, const QString& fileName,
const QString& fileEncoding, const QString& fileEncoding,
const QgsCoordinateTransform* c t, const QgsCoordinateTransform* c t,
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 const QStringList &datasourceOp
tions = QStringList(), // added in 1.6 tions = QStringList(),
const QStringList &layerOptions const QStringList &layerOptions
= QStringList(), // added in 1.6 = QStringList(),
bool skipAttributeCreation = fa bool skipAttributeCreation = fa
lse, // added in 1.6 lse,
QString *newFilename = 0, // ad QString *newFilename = 0,
ded in 1.9 SymbologyExport symbologyExport
SymbologyExport symbologyExport = NoSymbology,
= NoSymbology, //added in 2.0 double symbologyScale = 1.0,
double symbologyScale = 1.0 // const QgsRectangle* filterExten
added in 2.0 t = 0 // added in 2.4
); );
/** 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 QgsFields& fields, const QgsFields& 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(), / / added in 1.6 const QStringList &layerOptions = QStringList(), / / added in 1.6
QString *newFilename = 0, // added in 1.9 QString *newFilename = 0, // added in 1.9
SymbologyExport symbologyExport = NoSymbology//add ed in 2.0 SymbologyExport symbologyExport = NoSymbology //ad ded in 2.0
); );
/**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. It contains all OG R drivers /**Returns driver list that can be used for dialogs. It contains all OG R drivers
* + some additional internal QGIS driver names to distinguish between more * + some additional internal QGIS driver names to distinguish between more
* supported formats of the same OGR driver * supported formats of the same OGR driver
*/ */
static QMap< QString, QString> ogrDriverList(); static QMap< QString, QString> ogrDriverList();
 End of changes. 6 change blocks. 
16 lines changed or deleted 20 lines changed or added


 qgsvectorlayer.h   qgsvectorlayer.h 
skipping to change at line 100 skipping to change at line 100
protected: protected:
AttributeEditorType mType; AttributeEditorType mType;
QString mName; QString mName;
}; };
/** @note Added in 1.9 */ /** @note Added in 1.9 */
class CORE_EXPORT QgsAttributeEditorContainer : public QgsAttributeEditorEl ement class CORE_EXPORT QgsAttributeEditorContainer : public QgsAttributeEditorEl ement
{ {
public: public:
QgsAttributeEditorContainer( QString name, QObject *parent ) QgsAttributeEditorContainer( QString name, QObject *parent )
: QgsAttributeEditorElement( AeTypeContainer, name, parent ) {} : QgsAttributeEditorElement( AeTypeContainer, name, parent )
, mIsGroupBox( true )
{}
~QgsAttributeEditorContainer() {} ~QgsAttributeEditorContainer() {}
virtual QDomElement toDomElement( QDomDocument& doc ) const; virtual QDomElement toDomElement( QDomDocument& doc ) const;
virtual void addChildElement( QgsAttributeEditorElement *widget ); virtual void addChildElement( QgsAttributeEditorElement *widget );
virtual bool isGroupBox() const { return true; } virtual void setIsGroupBox( bool isGroupBox ) { mIsGroupBox = isGroupBo
x; }
virtual bool isGroupBox() const { return mIsGroupBox; }
QList<QgsAttributeEditorElement*> children() const { return mChildren; } QList<QgsAttributeEditorElement*> children() const { return mChildren; }
virtual QList<QgsAttributeEditorElement*> findElements( AttributeEditor Type type ) const; virtual QList<QgsAttributeEditorElement*> findElements( AttributeEditor Type type ) const;
private: private:
bool mIsGroupBox;
QList<QgsAttributeEditorElement*> mChildren; QList<QgsAttributeEditorElement*> mChildren;
}; };
/** @note Added in 1.9 */ /** @note Added in 1.9 */
class CORE_EXPORT QgsAttributeEditorField : public QgsAttributeEditorElemen t class CORE_EXPORT QgsAttributeEditorField : public QgsAttributeEditorElemen t
{ {
public: public:
QgsAttributeEditorField( QString name , int idx, QObject *parent ) QgsAttributeEditorField( QString name , int idx, QObject *parent )
: QgsAttributeEditorElement( AeTypeField, name, parent ), mIdx( idx ) {} : QgsAttributeEditorElement( AeTypeField, name, parent ), mIdx( idx ) {}
skipping to change at line 463 skipping to change at line 467
public: public:
/** The different types to layout the attribute editor. @note added in 1.9 */ /** The different types to layout the attribute editor. @note added in 1.9 */
enum EditorLayout enum EditorLayout
{ {
GeneratedLayout = 0, GeneratedLayout = 0,
TabLayout = 1, TabLayout = 1,
UiFileLayout = 2 UiFileLayout = 2
}; };
/**
* @deprecated Use the editorWidgetV2() system instead
*/
enum EditType enum EditType
{ {
LineEdit, LineEdit,
UniqueValues, UniqueValues,
UniqueValuesEditable, UniqueValuesEditable,
ValueMap, ValueMap,
Classification, Classification,
EditRange, EditRange,
SliderRange, SliderRange,
CheckBox, /**< @note added in 1.4 */ CheckBox, /**< @note added in 1.4 */
skipping to change at line 499 skipping to change at line 506
* @note added in 2.1 */ * @note added in 2.1 */
enum FeatureFormSuppress enum FeatureFormSuppress
{ {
SuppressDefault = 0, // use the application-wide setting SuppressDefault = 0, // use the application-wide setting
SuppressOn = 1, SuppressOn = 1,
SuppressOff = 2 SuppressOff = 2
}; };
struct RangeData struct RangeData
{ {
RangeData() {} RangeData() { mMin = QVariant( 0 ); mMax = QVariant( 5 ); mStep = QVa riant( 1 );}
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 struct ValueRelationData
{ {
skipping to change at line 729 skipping to change at line 736
const QgsDiagramLayerSettings *diagramLayerSettings() const { return mD iagramLayerSettings; } const QgsDiagramLayerSettings *diagramLayerSettings() const { return mD iagramLayerSettings; }
/** Return renderer V2. /** Return renderer V2.
* @note added in 1.4 */ * @note added in 1.4 */
QgsFeatureRendererV2* rendererV2(); QgsFeatureRendererV2* rendererV2();
/** Set renderer V2. /** Set renderer V2.
* @note added in 1.4 * @note added in 1.4
*/ */
void setRendererV2( QgsFeatureRendererV2* r ); void setRendererV2( QgsFeatureRendererV2* r );
/** Draw layer with renderer V2. QgsFeatureRenderer::startRender() need
s to be called before using this method
* @note added in 1.4
*/
void drawRendererV2( QgsFeatureIterator &fit, QgsRenderContext& rendere
rContext, bool labeling );
/** Draw layer with renderer V2 using symbol levels. QgsFeatureRenderer
::startRender() needs to be called before using this method
* @note added in 1.4
*/
void drawRendererV2Levels( QgsFeatureIterator &fit, QgsRenderContext& r
endererContext, bool labeling );
/** Returns point, line or polygon */ /** Returns point, line or polygon */
QGis::GeometryType geometryType() const; QGis::GeometryType geometryType() const;
/** Returns true if this is a geometry layer and false in case of NoGeo metry (table only) or UnknownGeometry /** Returns true if this is a geometry layer and false in case of NoGeo metry (table only) or UnknownGeometry
* @note added in 1.7 * @note added in 1.7
*/ */
bool hasGeometryType() const; bool hasGeometryType() const;
/**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;
skipping to change at line 1034 skipping to change at line 1031
*/ */
int snapWithContext( const QgsPoint& startPoint, int snapWithContext( const QgsPoint& startPoint,
double snappingTolerance, double snappingTolerance,
QMultiMap < double, QgsSnappingResult > &snappingR esults, QMultiMap < double, QgsSnappingResult > &snappingR 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();
/** Return new instance of QgsMapLayerRenderer that will be used for re
ndering of given context
* @note added in 2.4
*/
virtual QgsMapLayerRenderer* createMapRenderer( QgsRenderContext& rende
rerContext );
/** 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 );
/** Draws the layer labels using coordinate transformation */ /** Draws the layer labels using coordinate transformation */
void drawLabels( QgsRenderContext& rendererContext ); void drawLabels( QgsRenderContext& rendererContext );
/** Return the extent of the layer as a QRect */ /** Return the extent of the layer as a QRect */
QgsRectangle extent(); QgsRectangle extent();
skipping to change at line 1116 skipping to change at line 1118
*/ */
void addAttributeEditorWidget( QgsAttributeEditorElement* data ); void addAttributeEditorWidget( QgsAttributeEditorElement* data );
/** /**
* Get the id for the editor widget used to represent the field at the given index * Get the id for the editor widget used to represent the field at the given index
* *
* @param fieldIdx The index of the field * @param fieldIdx The index of the field
* *
* @return The id for the editor widget or a NULL string if not applica ble * @return The id for the editor widget or a NULL string if not applica ble
*/ */
const QString editorWidgetV2( int fieldIdx ); const QString editorWidgetV2( int fieldIdx ) const;
/**
* Get the id for the editor widget used to represent the field at the
given index
*
* @param fieldName The name of the field
*
* @return The id for the editor widget or a NULL string if not applica
ble
*
* @note python method name editorWidgetV2ByName
*/
const QString editorWidgetV2( const QString& fieldName ) const;
/** /**
* Get the configuration for the editor widget used to represent the fi eld at the given index * Get the configuration for the editor widget used to represent the fi eld at the given index
* *
* @param fieldIdx The index of the field * @param fieldIdx The index of the field
* *
* @return The id for the editor widget or a NULL string if not configu red * @return The configuration for the editor widget or an empty config i f the field does not exist
*/ */
const QgsEditorWidgetConfig editorWidgetV2Config( int fieldIdx ); const QgsEditorWidgetConfig editorWidgetV2Config( int fieldIdx ) const;
/**
* Get the configuration for the editor widget used to represent the fi
eld at the given index
*
* @param fieldName The name of the field
*
* @return The configuration for the editor widget or an empty config i
f the field does not exist
*
* @note python method name is editorWidgetV2ConfigByName
*/
const QgsEditorWidgetConfig editorWidgetV2Config( const QString& fieldN
ame ) const;
/** /**
* Returns a list of tabs holding groups and fields * Returns a list of tabs holding groups and fields
* @note added in version 2.0 * @note added in version 2.0
*/ */
QList< QgsAttributeEditorElement* > &attributeEditorElements(); QList< QgsAttributeEditorElement* > &attributeEditorElements();
/** /**
* Clears all the tabs for the attribute editor form * Clears all the tabs for the attribute editor form
* @note added in version 2.0 * @note added in version 2.0
*/ */
skipping to change at line 1199 skipping to change at line 1223
that the user has some chance of repairing the damage cleanly. that the user has some chance of repairing the damage cleanly.
*/ */
bool commitChanges(); bool commitChanges();
const QStringList &commitErrors(); const QStringList &commitErrors();
/** Stop editing and discard the edits /** Stop editing and discard the edits
* @param deleteBuffer whether to delete editing buffer (added in 1.9) * @param deleteBuffer whether to delete editing buffer (added in 1.9)
*/ */
bool rollBack( bool deleteBuffer = true ); bool rollBack( bool deleteBuffer = true );
/**get edit type*/ /**
EditType editType( int idx ); * Get edit type
*
* @deprecated Use @see{editorWidgetV2} instead
*/
Q_DECL_DEPRECATED EditType editType( int idx );
/**set edit type*/ /**
void setEditType( int idx, EditType edit ); * Get edit type
*
* @deprecated Use @see{setEditorWidgetV2} instead
*/
Q_DECL_DEPRECATED void setEditType( int idx, EditType edit );
/** get the active layout for the attribute editor for this layer (adde d in 1.9) */ /** get the active layout for the attribute editor for this layer (adde d in 1.9) */
EditorLayout editorLayout(); EditorLayout editorLayout();
/** set the active layout for the attribute editor for this layer (adde d in 1.9) */ /** set the active layout for the attribute editor for this layer (adde d in 1.9) */
void setEditorLayout( EditorLayout editorLayout ); void setEditorLayout( EditorLayout editorLayout );
/**
* Set the editor widget type for a field
*
* @param attrIdx Index of the field
* @param widgetType Type id of the editor widget to use
*/
void setEditorWidgetV2( int attrIdx, const QString& widgetType ); void setEditorWidgetV2( int attrIdx, const QString& widgetType );
void setEditorWidgetV2Config( int attrIdx, const QMap<QString, QVariant /**
>& config ); * Set the editor widget config for a field
*
/** set string representing 'true' for a checkbox (added in 1.4) */ * @param attrIdx Index of the field
void setCheckedState( int idx, QString checked, QString notChecked ); * @param config The config to set for this field
*/
void setEditorWidgetV2Config( int attrIdx, const QgsEditorWidgetConfig&
config );
/** return string representing 'true' for a checkbox (added in 1.4) /**
* @note not available in python bindings * Set string representing 'true' for a checkbox (added in 1.4)
* FIXME: need SIP binding for QPair<QString, QString> *
* @deprecated Use @see{setEditorWidgetV2Config} instead
*/ */
QPair<QString, QString> checkedState( int idx ); Q_DECL_DEPRECATED void setCheckedState( int idx, QString checked, QStri ng notChecked );
/** get edit form (added in 1.4) */ /** get edit form (added in 1.4) */
QString editForm(); QString editForm();
/** set edit form (added in 1.4) */ /** set edit form (added in 1.4) */
void setEditForm( QString ui ); void setEditForm( QString ui );
/** Type of feature form pop-up suppression after feature creation (ove rrides app setting) /** Type of feature form pop-up suppression after feature creation (ove rrides app setting)
* @note added in 2.1 */ * @note added in 2.1 */
QgsVectorLayer::FeatureFormSuppress featureFormSuppress() const { retur n mFeatureFormSuppress; } QgsVectorLayer::FeatureFormSuppress featureFormSuppress() const { retur n mFeatureFormSuppress; }
skipping to change at line 1250 skipping to change at line 1292
/** set annotation form for layer (added in 1.5)*/ /** set annotation form for layer (added in 1.5)*/
void setAnnotationForm( const QString& ui ); void setAnnotationForm( const QString& ui );
/** get python function for edit form initialization (added in 1.4) */ /** get python function for edit form initialization (added in 1.4) */
QString editFormInit(); QString editFormInit();
/** 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*/ /**
QMap<QString, QVariant> &valueMap( int idx ); * Access value map
* @deprecated Use @see{editorWidgetV2Config} instead
*/
Q_DECL_DEPRECATED QMap<QString, QVariant> valueMap( int idx );
/**access range */ /**
RangeData &range( int idx ); * Access range widget config data
*
* @deprecated Use @see{editorWidgetV2Config} instead
*/
Q_DECL_DEPRECATED RangeData range( int idx );
/**access relations /**
* Access value relation widget data
*
* @note added in 1.8 * @note added in 1.8
**/ */
ValueRelationData &valueRelation( int idx ); ValueRelationData valueRelation( int idx );
/** /**
* Get relations, where the foreign key is on this layer * Get relations, where the foreign key is on this layer
* *
* @param idx Only get relations, where idx forms part of the foreign k ey * @param idx Only get relations, where idx forms part of the foreign k ey
* @return A list of relations * @return A list of relations
*/ */
QList<QgsRelation> referencingRelations( int idx ); QList<QgsRelation> referencingRelations( int idx );
/**access date format /**
* Access date format
*
* @note added in 1.9 * @note added in 1.9
*
* @deprecated Use @see{setEditorWdigetV2Config} instead
*/ */
QString &dateFormat( int idx ); Q_DECL_DEPRECATED QString dateFormat( int idx );
/**access widget size for photo and webview widget /**
* Access widget size for photo and webview widget
*
* @note added in 1.9 * @note added in 1.9
*
* @deprecated Use @see{setEditorWdigetV2Config} instead
*/ */
QSize &widgetSize( int idx ); Q_DECL_DEPRECATED QSize widgetSize( int idx );
/**is edit widget editable /**is edit widget editable
* @note added in 1.9 * @note added in 1.9
**/ **/
bool fieldEditable( int idx ); bool fieldEditable( int idx );
/**label widget on top /**label widget on top
* @note added in 1.9 * @note added in 1.9
**/ **/
bool labelOnTop( int idx ); bool labelOnTop( int idx );
skipping to change at line 1448 skipping to change at line 1507
/** 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 );
/**
* @brief Is called when the cache image is being deleted. Overwrite an
d use to clean up.
* @note added in 2.0
*/
virtual void onCacheImageDelete();
protected slots: protected slots:
void invalidateSymbolCountedFlag(); void invalidateSymbolCountedFlag();
signals: signals:
/** /**
* This signal is emitted when selection was changed * This signal is emitted when selection was changed
* *
* @param selected Newly selected feature ids * @param selected Newly selected feature ids
* @param deselected Ids of all features which have previously bee n selected but are not any more * @param deselected Ids of all features which have previously bee n selected but are not any more
* @param clearAndSelect In case this is set to true, the old selectio n was dismissed and the new selection corresponds to selected * @param clearAndSelect In case this is set to true, the old selectio n was dismissed and the new selection corresponds to selected
*/ */
void selectionChanged( const QgsFeatureIds selected, const QgsFeatureId s deselected, const bool clearAndSelect ); void selectionChanged( const QgsFeatureIds selected, const QgsFeatureId s deselected, const bool clearAndSelect );
/** This signal is emitted when selection was changed */ /** This signal is emitted 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(); void layerModified();
/** Is emitted, when layer is checked for modifications. Use for last-m
inute additions */
void beforeModifiedCheck() const;
/** Is emitted, when editing on this layer has started*/ /** Is emitted, when editing on this layer has started*/
void editingStarted(); void editingStarted();
/** Is emitted, when edited changes successfully have been written to t he data provider */ /** Is emitted, when edited changes successfully have been written to t he data provider */
void editingStopped(); void editingStopped();
/** Is emitted, before changes are commited to the data provider */ /** Is emitted, before changes are commited to the data provider */
void beforeCommitChanges(); void beforeCommitChanges();
/** Is emitted, before changes are rolled back*/ /** Is emitted, before changes are rolled back*/
skipping to change at line 1534 skipping to change at line 1590
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 );
void saveLayerToProject(); void saveLayerToProject();
/** Emitted when the font family defined for labeling layer is not foun d on system /** Emitted when the font family defined for labeling layer is not foun d on system
* @note added in 1.9 * @note added in 1.9
*/ */
void labelingFontNotFound( QgsVectorLayer* layer, const QString& fontfa mily ); void labelingFontNotFound( QgsVectorLayer* layer, const QString& fontfa mily );
/** Signal emitted on symbology changes, when setRendererV2() is called
*/
void rendererChanged();
/** Signal emitted when setFeatureBlendMode() is called */ /** Signal emitted when setFeatureBlendMode() is called */
void featureBlendModeChanged( const QPainter::CompositionMode &blendMod e ); void featureBlendModeChanged( const QPainter::CompositionMode &blendMod e );
/** Signal emitted when setLayerTransparency() is called */ /** Signal emitted when setLayerTransparency() is called */
void layerTransparencyChanged( int layerTransparency ); void layerTransparencyChanged( int layerTransparency );
/** /**
* Signal emitted when a new edit command has been started * Signal emitted when a new edit command has been started
* *
* @param text Description for this edit command * @param text Description for this edit command
skipping to change at line 1603 skipping to change at line 1656
@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, void snapToGeometry( const QgsPoint& startPoint,
QgsFeatureId featureId, QgsFeatureId featureId,
QgsGeometry* geom, QgsGeometry* geom,
double sqrSnappingTolerance, double sqrSnappingTolerance,
QMultiMap<double, QgsSnappingResult>& snappingResu lts, QMultiMap<double, QgsSnappingResult>& snappingResu lts,
QgsSnapper::SnappingType snap_to ) const; QgsSnapper::SnappingType snap_to ) const;
/**Reads vertex marker type from settings*/
static QgsVectorLayer::VertexMarkerType currentVertexMarkerType();
/**Reads vertex marker size from settings*/
static int currentVertexMarkerSize();
/** Add joined attributes to a feature */ /** Add joined attributes to a feature */
//void addJoinedAttributes( QgsFeature& f, bool all = false ); //void addJoinedAttributes( QgsFeature& f, bool all = false );
/** Stop version 2 renderer and selected renderer (if required) */
void stopRendererV2( QgsRenderContext& rendererContext, QgsSingleSymbol
RendererV2* selRenderer );
/**Registers label and diagram layer
@param rendererContext render context
@param attributes attributes needed for labeling and diagrams will be
added to the list
@param labeling out: true if there will be labeling (ng) for this lay
er*/
void prepareLabelingAndDiagrams( QgsRenderContext& rendererContext, Qgs
AttributeList& attributes, bool& labeling );
/** Read labeling from SLD */ /** Read labeling from SLD */
void readSldLabeling( const QDomNode& node ); void readSldLabeling( const QDomNode& node );
private: // Private attributes private: // Private attributes
/** Update threshold for drawing features as they are read. A value of
zero indicates
* that no features will be drawn until all have been read
*/
int mUpdateThreshold;
/** Enables backbuffering for the map window. This improves graphics pe
rformance,
* but the possibility to cancel rendering and incremental feature dra
wing will be lost.
*
*/
bool mEnableBackbuffer;
/** Pointer to data provider derived from the abastract base class QgsD ataProvider */ /** Pointer to data provider derived from the abastract base class QgsD ataProvider */
QgsVectorDataProvider *mDataProvider; QgsVectorDataProvider *mDataProvider;
QgsFeatureIterator mProviderIterator;
/** index of the primary label field */ /** index of the primary label field */
QString mDisplayField; QString mDisplayField;
/** the preview expression used to generate a human readable preview st ring for features */ /** the preview expression used to generate a human readable preview st ring for features */
QString mDisplayExpression; QString mDisplayExpression;
/** Data provider key */ /** Data provider key */
QString mProviderKey; QString mProviderKey;
/** The user-defined actions that are accessed from the Identify Result s dialog box */ /** The user-defined actions that are accessed from the Identify Result s dialog box */
skipping to change at line 1715 skipping to change at line 1740
QgsVectorLayer::VertexMarkerType mCurrentVertexMarkerType; QgsVectorLayer::VertexMarkerType mCurrentVertexMarkerType;
/** The current size of editing marker */ /** The current size of editing marker */
int mCurrentVertexMarkerSize; int mCurrentVertexMarkerSize;
/** Flag if the vertex markers should be drawn only for selection (true ) or for all features (false) */ /** Flag if the vertex markers should be drawn only for selection (true ) or for all features (false) */
bool mVertexMarkerOnlyForSelection; bool mVertexMarkerOnlyForSelection;
QStringList mCommitErrors; QStringList mCommitErrors;
QMap< QString, EditType > mEditTypes;
QMap< QString, bool> mFieldEditables; QMap< QString, bool> mFieldEditables;
QMap< QString, bool> mLabelOnTop; QMap< QString, bool> mLabelOnTop;
QMap< QString, QMap<QString, QVariant> > mValueMaps;
QMap< QString, RangeData > mRanges;
QMap< QString, QPair<QString, QString> > mCheckedStates;
QMap< QString, ValueRelationData > mValueRelations;
QMap< QString, QString> mDateFormats;
QMap< QString, QSize> mWidgetSize;
QMap<int, QString> mEditorWidgetV2Types; QMap<QString, QString> mEditorWidgetV2Types;
QMap<int, QMap<QString, QVariant> > mEditorWidgetV2Configs; QMap<QString, QgsEditorWidgetConfig > mEditorWidgetV2Configs;
/** Defines the default layout to use for the attribute editor (Drag an d drop, UI File, Generated) */ /** Defines the default layout to use for the attribute editor (Drag an d drop, UI File, Generated) */
EditorLayout mEditorLayout; EditorLayout mEditorLayout;
QString mEditForm, mEditFormInit; QString mEditForm, mEditFormInit;
/** Type of feature form suppression after feature creation /** Type of feature form suppression after feature creation
* @note added in 2.1 */ * @note added in 2.1 */
QgsVectorLayer::FeatureFormSuppress mFeatureFormSuppress; QgsVectorLayer::FeatureFormSuppress mFeatureFormSuppress;
skipping to change at line 1765 skipping to change at line 1783
bool mValidExtent; bool mValidExtent;
bool mLazyExtent; bool mLazyExtent;
// Features in renderer classes counted // Features in renderer classes counted
bool mSymbolFeatureCounted; bool mSymbolFeatureCounted;
// Feature counts for each renderer symbol // Feature counts for each renderer symbol
QMap<QgsSymbolV2*, long> mSymbolFeatureCountMap; QMap<QgsSymbolV2*, long> mSymbolFeatureCountMap;
QgsRenderContext *mCurrentRendererContext; friend class QgsVectorLayerFeatureSource;
friend class QgsVectorLayerFeatureIterator;
}; };
#endif #endif
 End of changes. 37 change blocks. 
102 lines changed or deleted 114 lines changed or added


 qgsvectorlayercache.h   qgsvectorlayercache.h 
skipping to change at line 81 skipping to change at line 81
private: private:
QgsFeature* mFeature; QgsFeature* mFeature;
QgsVectorLayerCache* mCache; QgsVectorLayerCache* mCache;
friend class QgsVectorLayerCache; friend class QgsVectorLayerCache;
}; };
public: public:
QgsVectorLayerCache( QgsVectorLayer* layer, int cacheSize, QObject* par ent = NULL ); QgsVectorLayerCache( QgsVectorLayer* layer, int cacheSize, QObject* par ent = NULL );
~QgsVectorLayerCache();
/** /**
* Sets the maximum number of features to keep in the cache. Some featu res will be removed from * Sets the maximum number of features to keep in the cache. Some featu res will be removed from
* the cache if the number is smaller than the previous size of the cac he. * the cache if the number is smaller than the previous size of the cac he.
* *
* @param cacheSize indicates the maximum number of features to keep in the cache * @param cacheSize indicates the maximum number of features to keep in the cache
*/ */
void setCacheSize( int cacheSize ); void setCacheSize( int cacheSize );
/** /**
skipping to change at line 137 skipping to change at line 138
* be used for slow data sources, be aware, that the call to this metho d might take a long time. * be used for slow data sources, be aware, that the call to this metho d might take a long time.
* *
* @param fullCache True: enable full caching, False: disable full ca ching * @param fullCache True: enable full caching, False: disable full ca ching
*/ */
void setFullCache( bool fullCache ); void setFullCache( bool fullCache );
/** /**
* @brief * @brief
* Adds a {@link QgsAbstractCacheIndex} to this cache. Cache indices kn ow about features present * Adds a {@link QgsAbstractCacheIndex} to this cache. Cache indices kn ow about features present
* in this cache and decide, if enough information is present in the ca che to respond to a {@link QgsFeatureRequest}. * in this cache and decide, if enough information is present in the ca che to respond to a {@link QgsFeatureRequest}.
* The layer cache will take ownership of the index.
* *
* @param cacheIndex The cache index to add. * @param cacheIndex The cache index to add.
*/ */
void addCacheIndex( QgsAbstractCacheIndex *cacheIndex ); void addCacheIndex( QgsAbstractCacheIndex *cacheIndex );
/** /**
* Query this VectorLayerCache for features. * Query this VectorLayerCache for features.
* If the VectorLayerCache (and moreover any of its indices) is able to satisfy * If the VectorLayerCache (and moreover any of its indices) is able to satisfy
* the request, the returned {@link QgsFeatureIterator} will iterate ov er cached features. * the request, the returned {@link QgsFeatureIterator} will iterate ov er cached features.
* If it's not possible to fully satisfy the request from the cache, pa rt or all of the features * If it's not possible to fully satisfy the request from the cache, pa rt or all of the features
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 qgsvectorlayerfeatureiterator.h   qgsvectorlayerfeatureiterator.h 
skipping to change at line 27 skipping to change at line 27
#include "qgsfeatureiterator.h" #include "qgsfeatureiterator.h"
#include <QSet> #include <QSet>
typedef QMap<QgsFeatureId, QgsFeature> QgsFeatureMap; typedef QMap<QgsFeatureId, QgsFeature> QgsFeatureMap;
class QgsVectorLayer; class QgsVectorLayer;
class QgsVectorLayerEditBuffer; class QgsVectorLayerEditBuffer;
struct QgsVectorJoinInfo; struct QgsVectorJoinInfo;
class QgsVectorLayerJoinBuffer;
class CORE_EXPORT QgsVectorLayerFeatureIterator : public QgsAbstractFeature class QgsVectorLayerFeatureIterator;
Iterator
/** Partial snapshot of vector layer's state (only the members necessary fo
r access to features) */
class QgsVectorLayerFeatureSource : public QgsAbstractFeatureSource
{
public:
QgsVectorLayerFeatureSource( QgsVectorLayer* layer );
~QgsVectorLayerFeatureSource();
virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& reques
t );
friend class QgsVectorLayerFeatureIterator;
protected:
QgsAbstractFeatureSource* mProviderFeatureSource;
QgsVectorLayerJoinBuffer* mJoinBuffer;
QgsFields mFields;
bool mHasEditBuffer;
bool mCanBeSimplified;
// A deep-copy is only performed, if the original maps change
// see here https://github.com/qgis/Quantum-GIS/pull/673
// for explanation
QgsFeatureMap mAddedFeatures;
QgsGeometryMap mChangedGeometries;
QgsFeatureIds mDeletedFeatureIds;
QList<QgsField> mAddedAttributes;
QgsChangedAttributesMap mChangedAttributeValues;
QgsAttributeList mDeletedAttributeIds;
};
class CORE_EXPORT QgsVectorLayerFeatureIterator : public QgsAbstractFeature
IteratorFromSource<QgsVectorLayerFeatureSource>
{ {
public: public:
QgsVectorLayerFeatureIterator( QgsVectorLayer* layer, const QgsFeatureR equest& request ); QgsVectorLayerFeatureIterator( QgsVectorLayerFeatureSource* source, boo l ownSource, const QgsFeatureRequest& request );
~QgsVectorLayerFeatureIterator(); ~QgsVectorLayerFeatureIterator();
//! reset the iterator to the starting position //! reset the iterator to the starting position
virtual bool rewind(); virtual bool rewind();
//! end of iterating: free the resources / lock //! end of iterating: free the resources / lock
virtual bool close(); virtual bool close();
protected: protected:
//! fetch next feature, return true on success //! fetch next feature, return true on success
virtual bool fetchFeature( QgsFeature& feature ); virtual bool fetchFeature( QgsFeature& feature );
//! Overrides default method as we only need to filter features in the edit buffer //! Overrides default method as we only need to filter features in the edit buffer
//! while for others filtering is left to the provider implementation. //! while for others filtering is left to the provider implementation.
inline virtual bool nextFeatureFilterExpression( QgsFeature &f ) { retu rn fetchFeature( f ); } inline virtual bool nextFeatureFilterExpression( QgsFeature &f ) { retu rn fetchFeature( f ); }
//! Setup the simplification of geometries to fetch using the specified simplify method //! Setup the simplification of geometries to fetch using the specified simplify method
virtual bool prepareSimplification( const QgsSimplifyMethod& simplifyMe thod ); virtual bool prepareSimplification( const QgsSimplifyMethod& simplifyMe thod );
QgsVectorLayer* L;
QgsFeatureRequest mProviderRequest; QgsFeatureRequest mProviderRequest;
QgsFeatureIterator mProviderIterator; QgsFeatureIterator mProviderIterator;
QgsFeatureRequest mChangedFeaturesRequest; QgsFeatureRequest mChangedFeaturesRequest;
QgsFeatureIterator mChangedFeaturesIterator; QgsFeatureIterator mChangedFeaturesIterator;
#if 0
// general stuff
bool mFetching;
QgsRectangle mFetchRect;
QgsAttributeList mFetchAttributes;
QgsAttributeList mFetchProvAttributes;
bool mFetchGeometry;
#endif
// only related to editing // only related to editing
QSet<QgsFeatureId> mFetchConsidered; QSet<QgsFeatureId> mFetchConsidered;
QgsGeometryMap::ConstIterator mFetchChangedGeomIt; QgsGeometryMap::ConstIterator mFetchChangedGeomIt;
QgsFeatureMap::ConstIterator mFetchAddedFeaturesIt; QgsFeatureMap::ConstIterator mFetchAddedFeaturesIt;
bool mFetchedFid; // when iterating by FID: indicator whether it has be en fetched yet or not bool mFetchedFid; // when iterating by FID: indicator whether it has be en fetched yet or not
void rewindEditBuffer(); void rewindEditBuffer();
void prepareJoins(); void prepareJoins();
bool fetchNextAddedFeature( QgsFeature& f ); bool fetchNextAddedFeature( QgsFeature& f );
skipping to change at line 107 skipping to change at line 133
QgsAttributeList attributes; //!< attributes to fetch QgsAttributeList attributes; //!< attributes to fetch
int indexOffset; //!< at what position the joined fi elds start int indexOffset; //!< at what position the joined fi elds start
QgsVectorLayer* joinLayer; //!< resolved pointer to the joined layer QgsVectorLayer* joinLayer; //!< resolved pointer to the joined layer
int targetField; //!< index of field (of this layer) that drives the join int targetField; //!< index of field (of this layer) that drives the join
int joinField; //!< index of field (of the joined layer) must have equal value int joinField; //!< index of field (of the joined layer) must have equal value
void addJoinedAttributesCached( QgsFeature& f, const QVariant& joinVa lue ) const; void addJoinedAttributesCached( QgsFeature& f, const QVariant& joinVa lue ) const;
void addJoinedAttributesDirect( QgsFeature& f, const QVariant& joinVa lue ) const; void addJoinedAttributesDirect( QgsFeature& f, const QVariant& joinVa lue ) const;
}; };
// A deep-copy is only performed, if the original maps change /** information about joins used in the current select() statement.
// see here https://github.com/qgis/Quantum-GIS/pull/673
// for explanation
QgsFeatureMap mAddedFeatures;
QgsGeometryMap mChangedGeometries;
QgsFeatureIds mDeletedFeatureIds;
QList<QgsField> mAddedAttributes;
QgsChangedAttributesMap mChangedAttributeValues;
QgsAttributeList mDeletedAttributeIds;
/** Informations about joins used in the current select() statement.
Allows faster mapping of attribute ids compared to mVectorJoins */ Allows faster mapping of attribute ids compared to mVectorJoins */
QMap<QgsVectorLayer*, FetchJoinInfo> mFetchJoinInfo; QMap<QgsVectorLayer*, FetchJoinInfo> mFetchJoinInfo;
private: private:
//! optional object to locally simplify edited (changed or added) geome tries fetched by this feature iterator //! optional object to locally simplify edited (changed or added) geome tries fetched by this feature iterator
QgsAbstractGeometrySimplifier* mEditGeometrySimplifier; QgsAbstractGeometrySimplifier* mEditGeometrySimplifier;
//! returns whether the iterator supports simplify geometries on provid er side //! returns whether the iterator supports simplify geometries on provid er side
virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodT ype ) const; virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodT ype ) const;
}; };
 End of changes. 6 change blocks. 
25 lines changed or deleted 43 lines changed or added


 ui_qgsgenericprojectionselectorbase.h   ui_qgsgenericprojectionselectorbase.h 
skipping to change at line 44 skipping to change at line 44
{ {
if (QgsGenericProjectionSelectorBase->objectName().isEmpty()) if (QgsGenericProjectionSelectorBase->objectName().isEmpty())
QgsGenericProjectionSelectorBase->setObjectName(QString::fromUt f8("QgsGenericProjectionSelectorBase")); QgsGenericProjectionSelectorBase->setObjectName(QString::fromUt f8("QgsGenericProjectionSelectorBase"));
QgsGenericProjectionSelectorBase->resize(605, 563); QgsGenericProjectionSelectorBase->resize(605, 563);
QIcon icon; QIcon icon;
icon.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon:: Off); icon.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon:: Off);
QgsGenericProjectionSelectorBase->setWindowIcon(icon); QgsGenericProjectionSelectorBase->setWindowIcon(icon);
QgsGenericProjectionSelectorBase->setModal(true); QgsGenericProjectionSelectorBase->setModal(true);
gridLayout = new QGridLayout(QgsGenericProjectionSelectorBase); gridLayout = new QGridLayout(QgsGenericProjectionSelectorBase);
gridLayout->setSpacing(6); gridLayout->setSpacing(6);
gridLayout->setContentsMargins(11, 11, 11, 11); gridLayout->setContentsMargins(3, 3, 3, 3);
gridLayout->setObjectName(QString::fromUtf8("gridLayout")); gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
textEdit = new QTextEdit(QgsGenericProjectionSelectorBase); textEdit = new QTextEdit(QgsGenericProjectionSelectorBase);
textEdit->setObjectName(QString::fromUtf8("textEdit")); textEdit->setObjectName(QString::fromUtf8("textEdit"));
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferr ed); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferr ed);
sizePolicy.setHorizontalStretch(0); sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0); sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(textEdit->sizePolicy().hasHeightForWid th()); sizePolicy.setHeightForWidth(textEdit->sizePolicy().hasHeightForWid th());
textEdit->setSizePolicy(sizePolicy); textEdit->setSizePolicy(sizePolicy);
textEdit->setMaximumSize(QSize(16777215, 160)); textEdit->setMaximumSize(QSize(16777215, 160));
textEdit->setFocusPolicy(Qt::NoFocus); textEdit->setFocusPolicy(Qt::NoFocus);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ui_qgsprojectionselectorbase.h   ui_qgsprojectionselectorbase.h 
skipping to change at line 57 skipping to change at line 57
QHBoxLayout *horizontalLayout; QHBoxLayout *horizontalLayout;
QLabel *label_5; QLabel *label_5;
QgsFilterLineEdit *leSearch; QgsFilterLineEdit *leSearch;
QLabel *label_3; QLabel *label_3;
QTextEdit *teProjection; 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(820, 591); QgsProjectionSelectorBase->resize(538, 635);
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_2 = new QGridLayout(QgsProjectionSelectorBase); gridLayout_2 = new QGridLayout(QgsProjectionSelectorBase);
gridLayout_2->setSpacing(6); gridLayout_2->setSpacing(6);
gridLayout_2->setContentsMargins(11, 11, 11, 11); gridLayout_2->setContentsMargins(0, 0, 0, 0);
gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
horizontalLayout_2 = new QHBoxLayout(); horizontalLayout_2 = new QHBoxLayout();
horizontalLayout_2->setSpacing(6); horizontalLayout_2->setSpacing(6);
horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayo ut_2")); horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayo ut_2"));
label = new QLabel(QgsProjectionSelectorBase); label = new QLabel(QgsProjectionSelectorBase);
label->setObjectName(QString::fromUtf8("label")); label->setObjectName(QString::fromUtf8("label"));
QFont font; QFont font;
font.setBold(true); font.setBold(true);
font.setWeight(75); font.setWeight(75);
label->setFont(font); label->setFont(font);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 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/