Skip to content

Commit

Permalink
Merge branch 'master' into measure_dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jan 8, 2015
2 parents 09074ad + c11319b commit 9fb835f
Show file tree
Hide file tree
Showing 157 changed files with 2,876 additions and 301,237 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -18,7 +18,8 @@ before_install:
install:
- mkdir build
- cd build
- cmake -DWITH_SERVER=ON -DWITH_STAGED_PLUGINS=OFF -DWITH_GRASS=OFF -DSUPPRESS_QT_WARNINGS=ON ..
- cmake -DWITH_SERVER=ON -DWITH_STAGED_PLUGINS=OFF -DWITH_GRASS=OFF \
-DSUPPRESS_QT_WARNINGS=ON -DENABLE_MODELTEST=ON ..

script: xvfb-run ctest -V -E 'Atlas|atlas|PyQgsPalLabelingCanvas|PyQgsPalLabelingServer|qgis_wcsprovidertest' -S ../qgis-test-travis.ctest --output-on-failure

31 changes: 8 additions & 23 deletions CMakeLists.txt
Expand Up @@ -70,14 +70,7 @@ SET (WITH_INTERNAL_QWTPOLAR TRUE CACHE BOOL "Use internal build of QwtPolar")

SET (WITH_INTERNAL_QEXTSERIALPORT TRUE CACHE BOOL "Use internal build of Qextserialport")

SET (WITH_INTERNAL_SPATIALITE FALSE CACHE BOOL "Determines whether SPATIALITE support should be built internally")
SET (WITH_QSPATIALITE FALSE CACHE BOOL "Determines whether QSPATIALITE sql driver should be built")
IF(WITH_INTERNAL_SPATIALITE)
SET(SPATIALITE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/spatialite/headers)
IF(WIN32 OR APPLE OR CYGWIN)
FIND_PACKAGE(Iconv REQUIRED)
ENDIF(WIN32 OR APPLE OR CYGWIN)
ENDIF (WITH_INTERNAL_SPATIALITE)

SET (WITH_ORACLE FALSE CACHE BOOL "Determines whether Oracle support should be built")
IF(WITH_ORACLE)
Expand Down Expand Up @@ -200,21 +193,17 @@ ELSE (WITH_INTERNAL_QEXTSERIALPORT)
FIND_PACKAGE(Qextserialport REQUIRED)
ENDIF(WITH_INTERNAL_QEXTSERIALPORT)

IF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(Sqlite3)
IF (NOT SQLITE3_FOUND)
MESSAGE (SEND_ERROR "sqlite3 dependency was not found (try compiling with internal spatialite)!")
ENDIF (NOT SQLITE3_FOUND)
ENDIF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(Sqlite3)
IF (NOT SQLITE3_FOUND)
MESSAGE (SEND_ERROR "sqlite3 dependency was not found!")
ENDIF (NOT SQLITE3_FOUND)

# optional
IF (WITH_POSTGRESQL)
FIND_PACKAGE(Postgres) # PostgreSQL provider, SPIT plugin
ENDIF (WITH_POSTGRESQL)

IF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(SPATIALITE REQUIRED)
ENDIF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(SPATIALITE REQUIRED)

IF (NOT PROJ_FOUND OR NOT GEOS_FOUND OR NOT GDAL_FOUND)
MESSAGE (SEND_ERROR "Some dependencies were not found!")
Expand Down Expand Up @@ -251,27 +240,23 @@ IF (ENABLE_QT5)
FIND_PACKAGE(Qt5Script REQUIRED)
FIND_PACKAGE(Qt5Sql REQUIRED)
SET(QT5_BUILD TRUE)

INCLUDE("cmake/modules/ECMQt4To5Porting.cmake")
MESSAGE(STATUS "Found Qt version: ${Qt5Core_VERSION_STRING}")
ELSE()
FIND_PACKAGE(Qt4 ${QT_MIN_VERSION} REQUIRED)
SET(QT_USE_QTXML 1)
SET(QT_USE_QTNETWORK 1)
SET(QT_USE_QTSVG 1)
SET(QT_USE_QTSQL 1)
SET(QT_USE_QTWEBKIT 1)
IF (WITH_CUSTOM_WIDGETS)
SET(QT_USE_QTDESIGNER 1)
ENDIF (WITH_CUSTOM_WIDGETS)

IF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND OR (WITH_CUSTOM_WIDGETS AND NOT QT_QTDESIGNER_FOUND))
MESSAGE(SEND_ERROR "Some Qt4 modules haven't been found!")
ENDIF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND OR (WITH_CUSTOM_WIDGETS AND NOT QT_QTDESIGNER_FOUND))

INCLUDE( ${QT_USE_FILE} )
ENDIF()

MESSAGE(STATUS "Found Qt version: ${QTVERSION}")
MESSAGE(STATUS "Found Qt version: ${QTVERSION}")
ENDIF()

IF (WITH_QTMOBILITY)
FIND_PACKAGE(QtMobility 1.1.0)
Expand Down
6 changes: 3 additions & 3 deletions INSTALL
@@ -1,9 +1,9 @@
QGIS
Building QGIS from source - step by step
Monday November 24, 2014
Tuesday December 30, 2014


Last Updated: Monday November 24, 2014
Last Updated: Tuesday December 30, 2014
Last Change : Monday November 24, 2014


Expand Down Expand Up @@ -1748,7 +1748,7 @@ Leopard and Snow Leopard, but was dropped at Lion. To build the Mapserver
component on Leopard and Snow, add the following line before the last line in
the above configuration:

-D WITH_MAPSERVER=TRUE \
-D WITH_SERVER=TRUE \

On Lion you are on your own to figure out how to install libfcgi and add fcgi
support to the system Apache. Not recommended for the average user.
Expand Down
6 changes: 3 additions & 3 deletions NEWS
@@ -1,6 +1,6 @@
QGIS News
Change history for the QGIS Project
Thursday November 13, 2014
Tuesday December 30, 2014


------------------------------------------------------------------------
Expand Down Expand Up @@ -34,8 +34,8 @@ Thursday November 13, 2014
------------------------------------------------------------------------


Last Updated: Thursday November 13, 2014
Last Change : Thursday November 13, 2014
Last Updated: Tuesday December 30, 2014
Last Change : Monday December 01, 2014


1. What's new in Version 2.6.0 'Brighton'?
Expand Down
3 changes: 3 additions & 0 deletions cmake/modules/ECMQt4To5Porting.cmake
Expand Up @@ -243,3 +243,6 @@ macro(qt4_add_resources)
qt5_add_resources(${ARGN})
endmacro()

# get the Qt plugins directory
GET_TARGET_PROPERTY(QMAKE_EXECUTABLE Qt5::qmake LOCATION)
EXEC_PROGRAM(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_PLUGINS" RETURN_VALUE return_code OUTPUT_VARIABLE QT_PLUGINS_DIR )
6 changes: 3 additions & 3 deletions doc/INSTALL.html
Expand Up @@ -77,12 +77,12 @@
<DIV CLASS="header" ID="header">
<H1>QGIS</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Monday November 24, 2014</H3>
<H3>Tuesday December 30, 2014</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Monday November 24, 2014
Last Updated: Tuesday December 30, 2014
Last Change : Monday November 24, 2014
</P>
<DIV CLASS="toc">
Expand Down Expand Up @@ -2424,7 +2424,7 @@ <H2>5.7. Configure the build</H2>
</P>

<div class="code"><PRE>
-D WITH_MAPSERVER=TRUE \
-D WITH_SERVER=TRUE \
</PRE></div>

<P>
Expand Down
6 changes: 3 additions & 3 deletions doc/news.html
Expand Up @@ -77,7 +77,7 @@
<DIV CLASS="header" ID="header">
<H1>QGIS News</H1>
<H2>Change history for the QGIS Project</H2>
<H3>Thursday November 13, 2014</H3>
<H3>Tuesday December 30, 2014</H3>
</DIV>

<DIV CLASS="toc">
Expand Down Expand Up @@ -111,8 +111,8 @@ <H3>Thursday November 13, 2014</H3>
</DIV>
<DIV CLASS="body" ID="body">
<P>
Last Updated: Thursday November 13, 2014
Last Change : Thursday November 13, 2014
Last Updated: Tuesday December 30, 2014
Last Change : Monday December 01, 2014
</P>

<A NAME="toc1"></A>
Expand Down
2 changes: 1 addition & 1 deletion doc/osx.t2t
Expand Up @@ -812,7 +812,7 @@ mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
-D CMAKE_BUILD_TYPE=MINSIZEREL -D ENABLE_TESTS=FALSE \
-D WITH_INTERNAL_SPATIALITE=FALSE -D WITH_PYSPATIALITE=FALSE \
-D WITH_PYSPATIALITE=FALSE \
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
-D QWT_LIBRARY=/usr/local/qwt-6.0.2/lib/libqwt.dylib \
Expand Down
1 change: 0 additions & 1 deletion ms-windows/cygwin/package.sh
Expand Up @@ -8,7 +8,6 @@ cd build
cmake -D BUILDNAME="cygwin" \
-D SITE="qgis.org" \
-D PEDANTIC=TRUE \
-D WITH_INTERNAL_SPATIALITE=TRUE \
-D WITH_GRASS=FALSE \
-D WITH_SPATIALITE=TRUE \
-D WITH_QSPATIALITE=TRUE \
Expand Down
7 changes: 0 additions & 7 deletions python/CMakeLists.txt
@@ -1,12 +1,5 @@
SET(PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python)

IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(
../src/core/spatialite/headers
../src/core/spatialite/headers/spatialite
)
ENDIF (WITH_INTERNAL_SPATIALITE)

SET (QGIS_PYTHON_OUTPUT_DIRECTORY ${PYTHON_OUTPUT_DIRECTORY}/qgis)
FILE (MAKE_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY})
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY})
Expand Down
1 change: 1 addition & 0 deletions python/core/core.sip
Expand Up @@ -54,6 +54,7 @@
%Include qgsmaplayerlegend.sip
%Include qgsmaplayerregistry.sip
%Include qgsmaplayerrenderer.sip
%Include qgsmaplayerstylemanager.sip
%Include qgsmaprenderer.sip
%Include qgsmaprenderercache.sip
%Include qgsmaprenderercustompainterjob.sip
Expand Down
20 changes: 20 additions & 0 deletions python/core/qgsmaplayer.sip
Expand Up @@ -370,6 +370,21 @@ class QgsMapLayer : QObject
*/
QgsMapLayerLegend* legend() const;

/**
* Enable or disable layer's style manager. When disabled (default), the styleManager() will return null pointer.
* By enabling the style manager will be created with one default style (same as the layer's active style).
* By disabling the style manager all associated styles will be lost (only the layer's active style will stay).
* @note added in 2.8
*/
void enableStyleManager( bool enable = true );

/**
* Get access to the layer's style manager. Style manager allows switching between multiple styles.
* If the style manager is not enabled, null pointer will be returned.
* @note added in 2.8
*/
QgsMapLayerStyleManager* styleManager() const;

/**Returns the minimum scale denominator at which the layer is visible.
* Scale based visibility is only used if hasScaleBasedVisibility is true.
* @returns minimum scale denominator at which the layer will render
Expand Down Expand Up @@ -517,6 +532,11 @@ class QgsMapLayer : QObject
/** Write custom properties to project file. */
void writeCustomProperties( QDomNode & layerNode, QDomDocument & doc ) const;

/** Read style manager's configuration (if any). To be called by subclasses. */
void readStyleManager( const QDomNode& layerNode );
/** Write style manager's configuration (if exists). To be called by subclasses. */
void writeStyleManager( QDomNode& layerNode, QDomDocument& doc ) const;

/** debugging member - invoked when a connect() is made to this object */
void connectNotify( const char * signal );

Expand Down
63 changes: 63 additions & 0 deletions python/core/qgsmaplayerstylemanager.sip
@@ -0,0 +1,63 @@

class QgsMapLayerStyle
{
%TypeHeaderCode
#include <qgsmaplayerstylemanager.h>
%End
public:
//! construct invalid style
QgsMapLayerStyle();

//! Tell whether the style is valid (i.e. there is something stored in it)
bool isValid() const;

//! Return information about the style - for debugging purposes only
QString dump() const;

//! Store layer's active style information in the instance
void readFromLayer( QgsMapLayer* layer );
//! Apply stored layer's style information to the layer
void writeToLayer( QgsMapLayer* layer ) const;

//! Read style configuration (for project file reading)
void readXml( const QDomElement& styleElement );
//! Write style configuration (for project file writing)
void writeXml( QDomElement& styleElement ) const;
};


class QgsMapLayerStyleManager
{
%TypeHeaderCode
#include <qgsmaplayerstylemanager.h>
%End
public:
//! Construct a style manager associated with a map layer (must not be null)
QgsMapLayerStyleManager( QgsMapLayer* layer );

//! Read configuration (for project loading)
void readXml( const QDomElement& mgrElement );
//! Write configuration (for project saving)
void writeXml( QDomElement& mgrElement ) const;

//! Return list of all defined style names
QStringList styles() const;
//! Return data of a stored style - accessed by its unique name
QgsMapLayerStyle style( const QString& name ) const;

//! Add a style with given name and data
//! @return true on success (name is unique and style is valid)
bool addStyle( const QString& name, const QgsMapLayerStyle& style );
//! Add style by cloning the current one
//! @return true on success
bool addStyleFromLayer( const QString& name );
//! Remove a stored style
//! @return true on success (style exists and it is not the last one)
bool removeStyle( const QString& name );

//! Return name of the current style
QString currentStyle() const;
//! Set a different style as the current style - will apply it to the layer
//! @return true on success
bool setCurrentStyle( const QString& name );
};
13 changes: 1 addition & 12 deletions python/ext-libs/pyspatialite/CMakeLists.txt
@@ -1,13 +1,6 @@
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PYTHON_OUTPUT_DIRECTORY}/pyspatialite)
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PYTHON_OUTPUT_DIRECTORY}/pyspatialite)

IF(WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(
../../src/core/spatialite/headers
../../src/core/spatialite/headers/spatialite
)
ENDIF(WITH_INTERNAL_SPATIALITE)

INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_PATH}
${GEOS_INCLUDE_DIR}
Expand Down Expand Up @@ -44,11 +37,7 @@ IF (NOT APPLE)
TARGET_LINK_LIBRARIES(pyspatialite ${PYTHON_LIBRARY})
ENDIF (NOT APPLE)

TARGET_LINK_LIBRARIES(pyspatialite qgis_core)

IF(NOT WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(pyspatialite ${SPATIALITE_LIBRARY})
ENDIF(NOT WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(pyspatialite qgis_core ${SPATIALITE_LIBRARY})

IF (APPLE)
SET_TARGET_PROPERTIES(pyspatialite PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
Expand Down
1 change: 1 addition & 0 deletions python/gui/gui.sip
Expand Up @@ -91,6 +91,7 @@
%Include qgsnumericsortlistviewitem.sip
%Include qgsowssourceselect.sip
%Include qgsprojectbadlayerguihandler.sip
%Include qgsprojectionselectionwidget.sip
%Include qgsprojectionselector.sip
%Include qgsquerybuilder.sip
%Include qgsrasterformatsaveoptionswidget.sip
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgsgenericprojectionselector.sip
Expand Up @@ -31,7 +31,7 @@ class QgsGenericProjectionSelector : QDialog //, private Ui::QgsGenericProjectio
void setSelectedCrsId( long theID );
void setSelectedAuthId( QString authId );

void on_buttonBox_helpRequested();
void on_mButtonBox_helpRequested();

/**
* \brief filters this dialog by the given CRSs
Expand Down
10 changes: 5 additions & 5 deletions python/gui/qgsmapcanvasitem.sip
Expand Up @@ -41,17 +41,17 @@ class QgsMapCanvasItem : QGraphicsItem
//! @deprecated since v2.4 - not called by QgsMapCanvas anymore
void setPanningOffset( const QPoint& point ) /Deprecated/;

//! returns canvas item rectangle
//! returns canvas item rectangle in map units
QgsRectangle rect() const;

//! sets canvas item rectangle
void setRect( const QgsRectangle& r );
//! sets canvas item rectangle in map units
void setRect( const QgsRectangle& r, bool resetRotation = true );

//! transformation from screen coordinates to map coordinates
QgsPoint toMapCoordinates( const QPoint& point );
QgsPoint toMapCoordinates( const QPoint& point ) const;

//! transformation from map coordinates to screen coordinates
QPointF toCanvasCoordinates( const QgsPoint& point );
QPointF toCanvasCoordinates( const QgsPoint& point ) const;
};


7 changes: 2 additions & 5 deletions python/gui/qgsnewmemorylayerdialog.sip
Expand Up @@ -18,13 +18,10 @@ class QgsNewMemoryLayerDialog : QDialog
/**Returns the selected geometry type*/
QGis::WkbType selectedType() const;

/**Returns the selected crs id*/
QString selectedCrsId() const;
/**Returns the selected crs*/
QgsCoordinateReferenceSystem crs() const;

/**Returns the layer name*/
QString layerName() const;

protected slots:

void on_mChangeSrsButton_clicked();
};

0 comments on commit 9fb835f

Please sign in to comment.