Skip to content
Permalink
Browse files

Merge remote branch 'origin/master' into wcs2

  • Loading branch information
blazek committed Jul 12, 2012
2 parents c840ce1 + b70a0c6 commit 37ab9516cb775699d87acb87b6c684197525fe4f
Showing with 9,345 additions and 5,846 deletions.
  1. +1 −0 doc/AUTHORS
  2. +35 −35 doc/TRANSLATORS
  3. BIN doc/qgis-download-stats.ods
  4. +1,544 −1,049 i18n/qgis_de.ts
  5. +807 −574 i18n/qgis_gl_ES.ts
  6. +4,878 −3,545 i18n/qgis_zh_TW.ts
  7. +1 −1 ms-windows/osgeo4w/browser.bat.tmpl
  8. +2 −0 python/core/core.sip
  9. +44 −9 python/core/qgscomposermap.sip
  10. +8 −0 python/core/qgspaintenginehack.sip
  11. +1 −1 python/plugins/fTools/tools/doValidate.py
  12. BIN resources/srs.db
  13. +1 −1 scripts/tsstat.pl
  14. +31 −56 src/app/composer/qgscomposer.cpp
  15. +8 −0 src/app/composer/qgscomposer.h
  16. +291 −58 src/app/composer/qgscomposermapwidget.cpp
  17. +30 −4 src/app/composer/qgscomposermapwidget.h
  18. +4 −7 src/app/qgisapp.cpp
  19. +22 −2 src/app/qgsattributedialog.cpp
  20. +107 −111 src/app/qgsrasterlayerproperties.cpp
  21. +2 −1 src/app/qgsrasterlayerproperties.h
  22. +4 −0 src/core/CMakeLists.txt
  23. +8 −27 src/core/composer/qgscomposeritem.cpp
  24. +383 −37 src/core/composer/qgscomposermap.cpp
  25. +76 −22 src/core/composer/qgscomposermap.h
  26. +29 −21 src/core/qgsexpression.cpp
  27. +55 −0 src/core/qgspaintenginehack.cpp
  28. +25 −0 src/core/qgspaintenginehack.h
  29. +56 −0 src/core/qgsprojectfiletransform.cpp
  30. +7 −0 src/core/qgsrasterdataprovider.cpp
  31. +2 −0 src/core/qgsrasterdataprovider.h
  32. +25 −1 src/core/raster/qgsmultibandcolorrenderer.cpp
  33. +2 −0 src/core/raster/qgsmultibandcolorrenderer.h
  34. +10 −0 src/core/raster/qgspalettedrasterrenderer.cpp
  35. +2 −0 src/core/raster/qgspalettedrasterrenderer.h
  36. +12 −0 src/core/raster/qgsrasterlayer.cpp
  37. +3 −0 src/core/raster/qgsrasterlayer.h
  38. +3 −0 src/core/raster/qgsrasterrenderer.h
  39. +23 −0 src/core/raster/qgsrasterrendererregistry.cpp
  40. +10 −0 src/core/raster/qgssinglebandcolordatarenderer.cpp
  41. +2 −0 src/core/raster/qgssinglebandcolordatarenderer.h
  42. +10 −0 src/core/raster/qgssinglebandgrayrenderer.cpp
  43. +2 −0 src/core/raster/qgssinglebandgrayrenderer.h
  44. +10 −0 src/core/raster/qgssinglebandpseudocolorrenderer.cpp
  45. +2 −0 src/core/raster/qgssinglebandpseudocolorrenderer.h
  46. +9 −0 src/gui/qgsnewhttpconnection.cpp
  47. +18 −15 src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
  48. +3 −38 src/mapserver/qgswmsserver.cpp
  49. +61 −0 src/providers/gdal/qgsgdalprovider.cpp
  50. +2 −0 src/providers/gdal/qgsgdalprovider.h
  51. +3 −9 src/providers/spatialite/qgsspatialiteprovider.cpp
  52. +2 −0 src/providers/spatialite/qgsspatialitesourceselect.cpp
  53. +355 −221 src/ui/qgscomposermapwidgetbase.ui
  54. +3 −1 tests/src/core/CMakeLists.txt
  55. +133 −0 tests/src/core/qgscompositionchecker.cpp
  56. +41 −0 tests/src/core/qgscompositionchecker.h
  57. +135 −0 tests/src/core/testqgscomposermap.cpp
  58. +2 −0 tests/src/core/testqgsexpression.cpp
  59. BIN tests/testdata/control_images/expected_composermap/composermap_landsat_grid.png
  60. BIN tests/testdata/control_images/expected_composermap/composermap_landsat_overview.png
  61. BIN tests/testdata/control_images/expected_composermap/composermap_landsat_render.png
  62. BIN tests/testdata/control_images/expected_continuous/msvc9_continuous_anomaly.png
  63. BIN tests/testdata/control_images/expected_continuous/osx_hawkeye_continuous_anomaly.png
  64. BIN tests/testdata/control_images/expected_geometry_bufferCheck/osx_hawkeye_anomaly.png
  65. BIN tests/testdata/control_images/expected_geometry_differenceCheck2/osx_hawkeyeanomaly.png
  66. BIN tests/testdata/control_images/expected_geometry_simplifyCheck1/osx_hawkeye_anomaly.png
  67. BIN tests/testdata/control_images/expected_graduated/msvc9_graduated_anomaly.png
  68. BIN tests/testdata/control_images/expected_graduated/osx_hawkeye_graduated_anomaly.png
  69. BIN tests/testdata/control_images/expected_single/osx_hawkeye_single_anomaly.png
  70. BIN tests/testdata/control_images/expected_uniquevalue/msvc9_anomaly.png
  71. BIN tests/testdata/control_images/expected_uniquevalue/osx_hawkeye_anomaly.png
@@ -44,3 +44,4 @@ Alessandro Furieri <a.furieri at lqt.it>
Alexander Bruy <alexander.bruy@gmail.com>
Marco Bernasocchi <marco at bernawebdesign dot ch>
Nathan Woodrow <woodrow.nathan at gmail.com>
Etienne Tourigny <etourigny.dev at gmail.com>

Large diffs are not rendered by default.

BIN +225 Bytes (100%) doc/qgis-download-stats.ods
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -6,4 +6,4 @@ call "%OSGEO4W_ROOT%"\apps\grass\grass-@grassversion@\etc\env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\lib
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
start "Quantum GIS Browser" /B "%OSGEO4W_ROOT%"\@package@-browser.exe %*
start "Quantum GIS Browser" /B "%OSGEO4W_ROOT%"\bin\@package@-browser.exe %*
@@ -100,3 +100,5 @@
%Include qgsgpsdconnection.sip
%Include qgsnmeaconnection.sip
%Include qgsgpsdetector.sip

%Include qgspaintenginehack.sip
@@ -36,7 +36,8 @@ class QgsComposerMap : QgsComposerItem
enum GridAnnotationPosition
{
InsideMapFrame = 0,
OutsideMapFrame
OutsideMapFrame,
Disabled
};

enum GridAnnotationDirection
@@ -47,6 +48,21 @@ class QgsComposerMap : QgsComposerItem
BoundaryDirection
};

/**Enum for different frame borders*/
enum Border
{
Left,
Right,
Bottom,
Top
};

enum GridFrameStyle
{
NoGridFrame = 0,
Zebra //black / white pattern
};

/**@deprecated*/
void draw( QPainter *painter, const QgsRectangle& extent, const QSize& size, int dpi );

@@ -195,20 +211,32 @@ class QgsComposerMap : QgsComposerItem
void setShowGridAnnotation( bool show );
bool showGridAnnotation() const;

/**Sets position of grid annotations. Possibilities are inside or outside of the map frame
@note this function was added in version 1.4*/
void setGridAnnotationPosition( GridAnnotationPosition p );
GridAnnotationPosition gridAnnotationPosition() const;
/**Sets position of grid annotations. Possibilities are inside / outside of the map frame or disabled
@note this function was added in version 1.9*/
void setGridAnnotationPosition( GridAnnotationPosition p, QgsComposerMap::Border border );
/**@note: this function was added in version 1.9*/
GridAnnotationPosition gridAnnotationPosition( QgsComposerMap::Border border ) const;

/**Sets distance between map frame and annotations
@note this function was added in version 1.4*/
void setAnnotationFrameDistance( double d );
double annotationFrameDistance() const;

/**Sets grid annotation direction. Can be horizontal, vertical, direction of axis and horizontal and vertical
@note this function was added in version 1.4*/
void setGridAnnotationDirection( GridAnnotationDirection d );
GridAnnotationDirection gridAnnotationDirection() const;
/**Sets grid annotation direction. Can be horizontal or vertical
@note this function was added in version 1.9*/
void setGridAnnotationDirection( GridAnnotationDirection d, QgsComposerMap::Border border );
/**@note: this function was added in version 1.9*/
GridAnnotationDirection gridAnnotationDirection( QgsComposerMap::Border border ) const;

/**Set grid frame style (NoGridFrame or Zebra)
@note: this function was added in version 1.9*/
void setGridFrameStyle( GridFrameStyle style );
GridFrameStyle gridFrameStyle() const;

/**Set grid frame width
@note: this function was added in version 1.9*/
void setGridFrameWidth( double w );
double gridFrameWidth() const;

/**In case of annotations, the bounding rectangle can be larger than the map item rectangle
@note this function was added in version 1.4*/
@@ -226,6 +254,13 @@ class QgsComposerMap : QgsComposerItem

void updateItem();

/**Sets overview frame map. -1 disables the overview frame
@note: this function was added in version 1.9*/
void setOverviewFrameMap( int mapId );
/**Returns id of overview frame (or -1 if no overfiew frame)
@note: this function was added in version 1.9*/
int overviewFrameMapId() const;

public slots:

/**Called if map canvas has changed*/
@@ -0,0 +1,8 @@
class QgsPaintEngineHack : QPaintEngine
{
%TypeHeaderCode
#include <qgspaintenginehack.h>
%End
public:
static void fixEngineFlags( QPaintEngine *engine );
};
@@ -99,7 +99,7 @@ def __init__(self, iface):
def closeEvent(self, e):
settings = QSettings()
settings.setValue( "/fTools/ValidateDialog/geometry", QVariant(self.saveGeometry()) )
QMainWindow.closeEvent(self, e)
QDialog.closeEvent(self, e)
del self.marker

def keyPressEvent( self, e ):
BIN +0 Bytes (100%) resources/srs.db
Binary file not shown.
@@ -61,7 +61,7 @@
uk => 'Сергей Якунин',
vi => 'Bùi Hữu Mạnh',
zh_CN => 'Zhang Jun',
zh_TW => 'Nungyao Lin',
zh_TW => 'Nung-yao Lin',
};

my $maxn;
@@ -45,6 +45,7 @@
#include "qgsmessageviewer.h"
#include "qgscontexthelp.h"
#include "qgscursors.h"
#include "qgspaintenginehack.h"

#include <QCloseEvent>
#include <QCheckBox>
@@ -524,38 +525,6 @@ void QgsComposer::on_mActionRefreshView_triggered()
mComposition->update();
}

// Hack to workaround Qt #5114 by disabling PatternTransform
class QgsPaintEngineHack : public QPaintEngine
{
public:
void fixFlags()
{
gccaps = 0;
gccaps |= ( QPaintEngine::PrimitiveTransform
// | QPaintEngine::PatternTransform
| QPaintEngine::PixmapTransform
| QPaintEngine::PatternBrush
// | QPaintEngine::LinearGradientFill
// | QPaintEngine::RadialGradientFill
// | QPaintEngine::ConicalGradientFill
| QPaintEngine::AlphaBlend
// | QPaintEngine::PorterDuff
| QPaintEngine::PainterPaths
| QPaintEngine::Antialiasing
| QPaintEngine::BrushStroke
| QPaintEngine::ConstantOpacity
| QPaintEngine::MaskedBrush
// | QPaintEngine::PerspectiveTransform
| QPaintEngine::BlendModes
// | QPaintEngine::ObjectBoundingModeGradients
#if QT_VERSION >= 0x040500
| QPaintEngine::RasterOpModes
#endif
| QPaintEngine::PaintOutsidePaintEvent
);
}
};

void QgsComposer::on_mActionExportAsPDF_triggered()
{
QSettings myQSettings; // where we keep last used filter in persistent state
@@ -582,13 +551,7 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
printer.setOutputFileName( outputFileName );
printer.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );

QPaintEngine *engine = printer.paintEngine();
if ( engine )
{
QgsPaintEngineHack *hack = static_cast<QgsPaintEngineHack*>( engine );
hack->fixFlags();
}

QgsPaintEngineHack::fixEngineFlags( printer.paintEngine() );
print( printer );
}

@@ -1131,23 +1094,8 @@ void QgsComposer::showEvent( QShowEvent* event )
{
if ( event->spontaneous() ) //event from the window system
{
//go through maps and restore original preview modes (show on demand after loading from project file)
QMap< QgsComposerMap*, int >::iterator mapIt = mMapsToRestore.begin();
for ( ; mapIt != mMapsToRestore.end(); ++mapIt )
{
mapIt.key()->setPreviewMode(( QgsComposerMap::PreviewMode )( mapIt.value() ) );
mapIt.key()->cache();
mapIt.key()->update();
}
mMapsToRestore.clear();

//create composer picture widget previews
QList< QgsComposerPictureWidget* >::iterator picIt = mPicturePreviews.begin();
for ( ; picIt != mPicturePreviews.end(); ++picIt )
{
( *picIt )->addStandardDirectoriesToPreview();
}
mPicturePreviews.clear();
restoreComposerMapStates();
initialiseComposerPicturePreviews();
}

#ifdef Q_WS_MAC
@@ -1542,6 +1490,9 @@ void QgsComposer::cleanupAfterTemplateRead()
}
}
}

restoreComposerMapStates();
initialiseComposerPicturePreviews();
}

void QgsComposer::on_mActionPageSetup_triggered()
@@ -1554,3 +1505,27 @@ void QgsComposer::on_mActionPageSetup_triggered()
QPageSetupDialog pageSetupDialog( &mPrinter, this );
pageSetupDialog.exec();
}

void QgsComposer::restoreComposerMapStates()
{
//go through maps and restore original preview modes (show on demand after loading from project file)
QMap< QgsComposerMap*, int >::iterator mapIt = mMapsToRestore.begin();
for ( ; mapIt != mMapsToRestore.end(); ++mapIt )
{
mapIt.key()->setPreviewMode(( QgsComposerMap::PreviewMode )( mapIt.value() ) );
mapIt.key()->cache();
mapIt.key()->update();
}
mMapsToRestore.clear();
}

void QgsComposer::initialiseComposerPicturePreviews()
{
//create composer picture widget previews
QList< QgsComposerPictureWidget* >::iterator picIt = mPicturePreviews.begin();
for ( ; picIt != mPicturePreviews.end(); ++picIt )
{
( *picIt )->addStandardDirectoriesToPreview();
}
mPicturePreviews.clear();
}
@@ -289,6 +289,14 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
//! Removes all the item from the graphics scene and deletes them
void deleteItems();

//! Restores composer map preview states.
//! Initially after reading from xml, states are set to rectangle to achieve faster project loading.
void restoreComposerMapStates();

//! Fills icons into composer picture widgets
//! To make loading from project faster, the previews are generated when the composer becomes visible.
void initialiseComposerPicturePreviews();

/**Composer title*/
QString mTitle;

0 comments on commit 37ab951

Please sign in to comment.
You can’t perform that action at this time.