Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/qgis/Quantum-GIS into col…

…oramp
  • Loading branch information
etiennesky committed Aug 24, 2012
2 parents 69c3774 + eaecf0c commit ebdd1addef20c17ec5474d389c7fecab62412011
Showing with 3,786 additions and 2,147 deletions.
  1. +2 −0 CMakeLists.txt
  2. +0 −7 python/CMakeLists.txt
  3. +4 −2 python/core/qgscomposermultiframe.sip
  4. +2 −1 python/core/qgsrastertransparency.sip
  5. +1 −0 scripts/spelling.dat
  6. +2 −0 src/app/composer/qgscomposerhtmlwidget.cpp
  7. +20 −11 src/app/qgisapp.cpp
  8. +5 −0 src/app/qgsattributetabledialog.cpp
  9. +140 −31 src/app/qgslabelinggui.cpp
  10. +9 −1 src/app/qgslabelinggui.h
  11. +8 −2 src/app/qgslabelpreview.cpp
  12. +1 −0 src/app/qgslabelpropertydialog.cpp
  13. +2 −1 src/app/qgsnewspatialitelayerdialog.cpp
  14. +255 −211 src/app/qgsrasterlayerproperties.cpp
  15. +12 −0 src/app/qgsrasterlayerproperties.h
  16. +1 −0 src/core/CMakeLists.txt
  17. +2 −2 src/core/composer/qgscomposeritem.cpp
  18. +93 −13 src/core/composer/qgscomposermultiframe.cpp
  19. +5 −1 src/core/composer/qgscomposermultiframe.h
  20. +4 −5 src/core/composer/qgscomposerscalebar.cpp
  21. +1 −1 src/core/composer/qgscomposerscalebar.h
  22. +1 −0 src/core/composer/qgscomposition.cpp
  23. +1 −0 src/core/composer/qgscomposition.h
  24. +0 −9 src/core/gps/qgsgpsdetector.h
  25. +0 −1 src/core/qgsmaprenderer.cpp
  26. +19 −1 src/core/qgspallabeling.cpp
  27. +6 −0 src/core/qgspallabeling.h
  28. +6 −0 src/core/qgsrasterdataprovider.h
  29. +6 −0 src/core/qgsrasterprojector.h
  30. +21 −1 src/core/raster/qgsmultibandcolorrenderer.cpp
  31. +7 −0 src/core/raster/qgspalettedrasterrenderer.cpp
  32. +182 −46 src/core/raster/qgsrasterfilewriter.cpp
  33. +23 −6 src/core/raster/qgsrasterfilewriter.h
  34. +47 −0 src/core/raster/qgsrasterinterface.cpp
  35. +100 −0 src/core/raster/qgsrasterinterface.h
  36. +5 −12 src/core/raster/qgsrasterlayer.cpp
  37. +86 −0 src/core/raster/qgsrasternuller.cpp
  38. +52 −0 src/core/raster/qgsrasternuller.h
  39. +7 −1 src/core/raster/qgsrasterrendererregistry.cpp
  40. +25 −7 src/core/raster/qgsrastertransparency.cpp
  41. +2 −1 src/core/raster/qgsrastertransparency.h
  42. +7 −0 src/core/raster/qgssinglebandgrayrenderer.cpp
  43. +6 −0 src/core/raster/qgssinglebandpseudocolorrenderer.cpp
  44. +405 −280 src/core/symbology-ng/qgsstylev2.cpp
  45. +181 −47 src/core/symbology-ng/qgsstylev2.h
  46. +1 −1 src/gui/qgsmapcanvasmap.cpp
  47. +1 −0 src/gui/qgsmessagelogviewer.cpp
  48. +7 −7 src/gui/qgsowssourceselect.cpp
  49. +280 −7 src/gui/qgsrasterlayersaveasdialog.cpp
  50. +59 −1 src/gui/qgsrasterlayersaveasdialog.h
  51. +5 −5 src/gui/symbology-ng/qgsstylev2managerdialog.cpp
  52. +2 −2 src/plugins/coordinate_capture/coordinatecapture.cpp
  53. +70 −57 src/providers/gdal/qgsgdalprovider.cpp
  54. +3 −0 src/providers/gdal/qgsgdalprovider.h
  55. +30 −30 src/providers/grass/qgsgrassrasterprovider.cpp
  56. +2 −0 src/providers/grass/qgsgrassrasterprovider.h
  57. +3 −1 src/providers/postgres/qgscolumntypethread.cpp
  58. +1 −0 src/providers/postgres/qgspgsourceselect.cpp
  59. +20 −0 src/providers/postgres/qgspostgresconn.cpp
  60. +3 −0 src/providers/postgres/qgspostgresconn.h
  61. +47 −24 src/providers/wms/qgswmsprovider.cpp
  62. +1,165 −1,192 src/ui/qgslabelingguibase.ui
  63. +50 −26 src/ui/qgsrasterlayerpropertiesbase.ui
  64. +264 −84 src/ui/qgsrasterlayersaveasdialogbase.ui
  65. +1 −1 tests/src/core/testqgscomposerhtml.cpp
  66. +8 −8 tests/src/core/testqgsstylev2.cpp
@@ -289,6 +289,8 @@ ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo
IF(MSVC)
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DQGISDEBUG=1")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQGISDEBUG=1")
# disable macros that offend std::numeric_limits<T>::min()/max()
ADD_DEFINITIONS(-DNOMINMAX)
ENDIF(MSVC)

#############################################################
@@ -39,13 +39,6 @@ INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
)


# In Windef.h there are min() and max() macros that interfere with the usage
# of std::numeric_limits<T>::min() and :max() in qgsrasterbands.h.
IF(MSVC)
ADD_DEFINITIONS(-DNOMINMAX)
ENDIF(MSVC)

IF(PYQT4_VERSION_NUM LESS 263680) # 0x040600
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} PROXY_FACTORY)
ENDIF(PYQT4_VERSION_NUM LESS 263680)
@@ -9,7 +9,9 @@ public:
enum ResizeMode
{
UseExistingFrames = 0,
ExtendToNextPage //duplicates last frame to next page to fit the total size
ExtendToNextPage, //uses the next page(s) until the content has been printed
RepeatOnEveryPage, //repeats the same frame on every page
RepeatUntilFinished //duplicates last frame to next page to fit the total size
};

QgsComposerMultiFrame( QgsComposition* c, bool createUndoCommands );
@@ -41,4 +43,4 @@ public:
void deleteFrames();

int nFrames() const;
};
};
@@ -21,7 +21,8 @@ public:

struct TransparentSingleValuePixel
{
double pixelValue;
double min;
double max;
double percentTransparent;
};

@@ -456,3 +456,4 @@ writeable:writable
vaild:valid
opps:oops
arount:around
acheive:achieve
@@ -13,6 +13,8 @@ QgsComposerHtmlWidget::QgsComposerHtmlWidget( QgsComposerHtml* html, QgsComposer
blockSignals( true );
mResizeModeComboBox->addItem( tr( "Use existing frames" ), QgsComposerMultiFrame::UseExistingFrames );
mResizeModeComboBox->addItem( tr( "Extend to next page" ), QgsComposerMultiFrame::ExtendToNextPage );
mResizeModeComboBox->addItem( tr( "Repeat on every page" ), QgsComposerMultiFrame::RepeatOnEveryPage );
mResizeModeComboBox->addItem( tr( "Repeat until finished" ), QgsComposerMultiFrame::RepeatUntilFinished );
blockSignals( false );
setGuiElementValues();

@@ -163,6 +163,7 @@
#include "qgsrasteriterator.h"
#include "qgsrasterlayer.h"
#include "qgsrasterlayerproperties.h"
#include "qgsrasternuller.h"
#include "qgsrasterrenderer.h"
#include "qgsrasterlayersaveasdialog.h"
#include "qgsrectangle.h"
@@ -1395,8 +1396,8 @@ void QgisApp::createStatusBar()
mCoordsEdit->setWhatsThis( tr( "Shows the map coordinates at the "
"current cursor position. The display is continuously updated "
"as the mouse is moved. It also allows editing to set the canvas "
"center to a given position." ) );
mCoordsEdit->setToolTip( tr( "Current map coordinate (formatted as x,y)" ) );
"center to a given position. The format is lat,lon or east,north" ) );
mCoordsEdit->setToolTip( tr( "Current map coordinate (lat,lon or east,north)" ) );
statusBar()->addPermanentWidget( mCoordsEdit, 0 );
connect( mCoordsEdit, SIGNAL( editingFinished() ), this, SLOT( userCenter() ) );

@@ -2409,7 +2410,7 @@ bool QgisApp::addVectorLayers( QStringList const & theLayerQStringList, const QS

}

// make sure at least one layer was succesfully added
// make sure at least one layer was successfully added
if ( myList.count() == 0 )
{
return false;
@@ -3924,7 +3925,7 @@ void QgisApp::saveAsRasterFile()
return;
}

QgsRasterLayerSaveAsDialog d( rasterLayer->dataProvider(), mMapCanvas->extent(), mMapCanvas->mapRenderer()->destinationCrs() );
QgsRasterLayerSaveAsDialog d( rasterLayer, rasterLayer->dataProvider(), mMapCanvas->extent(), rasterLayer->crs(), mMapCanvas->mapRenderer()->destinationCrs() );
if ( d.exec() == QDialog::Accepted )
{
QgsRasterFileWriter fileWriter( d.outputFileName() );
@@ -3953,12 +3954,21 @@ void QgisApp::saveAsRasterFile()
QgsDebugMsg( "Cannot set pipe provider" );
return;
}

QgsRasterNuller *nuller = new QgsRasterNuller();
nuller->setNoData( d.noData() );
if ( !pipe->insert( 1, nuller ) )
{
QgsDebugMsg( "Cannot set pipe nuller" );
return;
}

// add projector if necessary
if ( d.outputCrs() != rasterLayer->dataProvider()->crs() )
if ( d.outputCrs() != rasterLayer->crs() )
{
QgsRasterProjector * projector = new QgsRasterProjector;
projector->setCRS( rasterLayer->dataProvider()->crs(), d.outputCrs() );
if ( !pipe->set( projector ) )
projector->setCRS( rasterLayer->crs(), d.outputCrs() );
if ( !pipe->insert( 2, projector ) )
{
QgsDebugMsg( "Cannot set pipe projector" );
return;
@@ -3977,18 +3987,17 @@ void QgisApp::saveAsRasterFile()
delete pipe;
return;
}
projector->setCRS( rasterLayer->dataProvider()->crs(), d.outputCrs() );
projector->setCRS( rasterLayer->crs(), d.outputCrs() );
}

if ( !pipe->last() )
{
delete pipe;
return;
}
QgsRasterIterator iterator( pipe->last() );
fileWriter.setCreateOptions( d.createOptions() );

fileWriter.writeRaster( &iterator, d.nColumns(), d.nRows(), d.outputRectangle(), d.outputCrs(), &pd );
fileWriter.writeRaster( pipe, d.nColumns(), d.nRows(), d.outputRectangle(), d.outputCrs(), &pd );
delete pipe;
}
}
@@ -7361,7 +7370,7 @@ bool QgisApp::addRasterLayers( QStringList const &theFileNameQStringList, bool g
else
{
// Issue message box warning unless we are loading from cmd line since
// non-rasters are passed to this function first and then sucessfully
// non-rasters are passed to this function first and then successfully
// loaded afterwards (see main.cpp)

if ( guiWarning )
@@ -264,6 +264,8 @@ void QgsAttributeTableDialog::columnBoxInit()
QgsFieldMap fieldMap = mLayer->pendingFields();
QgsFieldMap::Iterator it = fieldMap.begin();

mColumnBox->clear();

for ( ; it != fieldMap.end(); ++it )
if ( mLayer->editType( it.key() ) != QgsVectorLayer::Hidden )
mColumnBox->addItem( it.value().name() );
@@ -706,6 +708,7 @@ void QgsAttributeTableDialog::on_mAddAttribute_clicked()
}
// update model - a field has been added or updated
mModel->reload( mModel->index( 0, 0 ), mModel->index( mModel->rowCount() - 1, mModel->columnCount() - 1 ) );
columnBoxInit();
}
}

@@ -747,6 +750,7 @@ void QgsAttributeTableDialog::on_mRemoveAttribute_clicked()
}
// update model - a field has been added or updated
mModel->reload( mModel->index( 0, 0 ), mModel->index( mModel->rowCount() - 1, mModel->columnCount() - 1 ) );
columnBoxInit();
}
}

@@ -760,6 +764,7 @@ void QgsAttributeTableDialog::on_mOpenFieldCalculator_clicked()
if ( col >= 0 )
{
mModel->reload( mModel->index( 0, col ), mModel->index( mModel->rowCount() - 1, col ) );
columnBoxInit();
}
}
}

0 comments on commit ebdd1ad

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