Skip to content
Permalink
Browse files
Merge branch 'master' of github.com:qgis/Quantum-GIS
  • Loading branch information
timlinux committed Feb 28, 2012
2 parents c1b268c + cda3693 commit 3334c9c9caf54086aae67bfabfaca3c1f6da9876
Showing with 1,295 additions and 974 deletions.
  1. +2 −1 debian/changelog
  2. +55 −0 debian/qbrowser.desktop
  3. +2 −2 debian/qgis.desktop
  4. +1 −0 debian/qgis.install
  5. +982 −922 i18n/qgis_de.ts
  6. +1 −2 i18n/qgis_it.ts
  7. +1 −1 python/core/qgscomposition.sip
  8. +5 −5 src/app/composer/qgscomposer.cpp
  9. +1 −1 src/app/composer/qgscomposer.h
  10. +35 −0 src/app/qgisapp.cpp
  11. +10 −0 src/app/qgisapp.h
  12. +23 −7 src/core/composer/qgscomposition.cpp
  13. +4 −2 src/core/composer/qgscomposition.h
  14. +4 −2 src/core/qgsvectorlayer.cpp
  15. +27 −0 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  16. +8 −0 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.h
  17. +1 −1 src/gui/qgscomposerview.cpp
  18. +16 −3 src/gui/qgsprojectionselector.cpp
  19. +17 −2 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
  20. +1 −0 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.h
  21. +1 −0 src/mapserver/qgsconfigparser.cpp
  22. +6 −0 src/mapserver/qgsconfigparser.h
  23. +1 −1 src/mapserver/qgsprojectparser.cpp
  24. +3 −3 src/mapserver/qgsprojectparser.h
  25. +3 −0 src/mapserver/qgswmsserver.cpp
  26. +2 −2 src/plugins/grass/modules/default.qgc
  27. BIN src/plugins/grass/modules/r.aspect.1.png
  28. BIN src/plugins/grass/modules/r.aspect.2.png
  29. +7 −0 src/plugins/grass/modules/r.aspect.qgm
  30. BIN src/plugins/grass/modules/r.slope.1.png
  31. BIN src/plugins/grass/modules/r.slope.2.png
  32. +7 −0 src/plugins/grass/modules/r.slope.qgm
  33. +4 −3 src/plugins/grass/modules/v.random.qgm
  34. +5 −0 src/plugins/grass/modules/v.surf.bspline.qgm
  35. +2 −1 src/plugins/grass/modules/v.surf.idw.qgm
  36. +18 −4 src/plugins/grass/modules/v.surf.rst.qgm
  37. +10 −0 src/providers/wms/qgswmsprovider.cpp
  38. +3 −0 src/providers/wms/qgswmsprovider.h
  39. +8 −4 src/providers/wms/qgswmssourceselect.cpp
  40. +19 −5 src/ui/qgswmssourceselectbase.ui
@@ -5,8 +5,9 @@ qgis (1.9.90) UNRELEASED; urgency=low
* include heatmap plugin
* drop extra include path for QtWebkit on oneiric and natty
* add translations for desktop link
* add browser desktop entry

-- Jürgen E. Fischer <jef@norbit.de> Thu, 16 Feb 2012 23:21:09 +0100
-- Jürgen E. Fischer <jef@norbit.de> Thu, 23 Feb 2012 09:36:48 +0100

qgis (1.8.0) UNRELEASED; urgency=low

@@ -0,0 +1,55 @@
[Desktop Entry]
Type=Application
Name=Quantum GIS Browser
Version=1.0
GenericName=Geographic Information System
GenericName[ar]=نظام المعلومات الجغرافي
GenericName[az]=Coğrafi informasiya sistemi
GenericName[bg]=Географска информационна система
GenericName[bs]=Geografski informacioni sistem
GenericName[ca]=Sistema d'informació geogràfica
GenericName[cs]=Geografický Informační Systém
GenericName[de]=Geographisches Informationssystem
GenericName[el]=Σύστημα Γεωγραφικών Πληροφοριών
GenericName[es]=Sistema de Información Geográfica
GenericName[et]=Geoinfosüsteem
GenericName[eu]=Geografia-informazioko sistemen
GenericName[fa]=سامانه اطلاعات مکانی
GenericName[fi]=Maantieteellinen Tietojärjestelmä
GenericName[fr]=Système d'Information Géographique
GenericName[gl]=Sistema de información xeográfica
GenericName[he]=מערכת מידע גאוגרפית
GenericName[hi]=भूगोलीय_सूचना_प्रणाली
GenericName[hr]=Geografski informacijski sustav
GenericName[hu]=Földrajzi információs rendszer
GenericName[hy]=Աշխարհագրական տեղեկատվական համակարգ
GenericName[id]=Sistem informasi geografis
GenericName[is]=Landfræðilegt upplýsingakerfi
GenericName[it]=Sistema Informativo Geografico
GenericName[ka]=გეოინფორმაციული სისტემა
GenericName[lt]=Geografinė informacinė sistema
GenericName[lv]=Ģeogrāfiskā informācijas sistēma
GenericName[mk]=Географски информационен систем
GenericName[ml]=ജി.ഐ.എസ്.
GenericName[nl]=Geografisch informatiesysteem
GenericName[nn]=Geografiske informasjonssystem
GenericName[no]=Geografiske informasjonssystemer
GenericName[pl]=System Informacji Geograficznej
GenericName[pt]=Sistema de Informação Geográfica
GenericName[ro]=Sistem Informatic Geografic
GenericName[ru]=Геоинформационная система
GenericName[sh]=Geografski informacijski sistem
GenericName[sk]=Geografický informačný systém
GenericName[sl]=Geografski informacijski sistem
GenericName[sr]=Географски информациони систем
GenericName[sv]=Geografiskt Informationssystem
GenericName[th]=ระบบสารสนเทศภูมิศาสตร์
GenericName[tr]=Coğrafi bilgi sistemi
GenericName[uk]=Геоінформаційна система
GenericName[uz]=Geografik axborot tizimi
Icon=qgis-icon
TryExec=/usr/bin/qbrowser
Exec=/usr/bin/qbrowser %F
Terminal=false
StartupNotify=false
Categories=Qt;Education;Science;Geography;
@@ -1,8 +1,8 @@
[Desktop Entry]
Type=Application
Name=Quantum GIS
Name=Quantum GIS Desktop
Version=1.0
GenericName=Geographical Information System
GenericName=Geographic Information System
GenericName[ar]=نظام المعلومات الجغرافي
GenericName[az]=Coğrafi informasiya sistemi
GenericName[bg]=Географска информационна система
@@ -19,6 +19,7 @@ usr/share/pixmaps/qgis-icon.xpm
usr/share/pixmaps/qgis-mime-icon.png
usr/share/pixmaps/qgis-mime-icon.png usr/share/icons/crystalsvg/128x128/mimetypes
../qgis.desktop usr/share/applications
../qbrowser.desktop usr/share/applications
../qgis.xml usr/share/mime/packages
../mime/application/x-esri-shape.desktop usr/share/mimelnk/application
../mime/application/x-mapinfo-mif.desktop usr/share/mimelnk/application

Large diffs are not rendered by default.

@@ -1806,7 +1806,7 @@ Il plugin non sarà installato.</translation>
</message>
<message>
<source>Miscellaneous</source>
<translation>MIscellanea</translation>
<translation>Miscellanea</translation>
</message>
<message>
<source>GdalTools settings</source>
@@ -12921,7 +12921,6 @@ Database:%2</source>
<comment>number of rows</comment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
@@ -107,7 +107,7 @@ class QgsComposition: QGraphicsScene
@param doc xml document
@param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
@param pos item position. Optional, take position from xml if 0*/
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, bool addUndoCommands = false, QPointF* pos = 0 );
//void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore, bool addUndoCommands = false, QPointF* pos = 0 );

/**Adds item to z list. Usually called from constructor of QgsComposerItem*/
void addItemToZList( QgsComposerItem* item );
@@ -1126,10 +1126,10 @@ 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*, QgsComposerMap::PreviewMode >::iterator mapIt = mMapsToRestore.begin();
QMap< QgsComposerMap*, int >::iterator mapIt = mMapsToRestore.begin();
for ( ; mapIt != mMapsToRestore.end(); ++mapIt )
{
mapIt.key()->setPreviewMode( mapIt.value() );
mapIt.key()->setPreviewMode(( QgsComposerMap::PreviewMode )( mapIt.value() ) );
mapIt.key()->cache();
mapIt.key()->update();
}
@@ -1186,10 +1186,10 @@ void QgsComposer::writeXML( QDomNode& parentNode, QDomDocument& doc )
composerElem.setAttribute( "title", mTitle );

//change preview mode of minimised / hidden maps before saving XML (show contents only on demand)
QMap< QgsComposerMap*, QgsComposerMap::PreviewMode >::iterator mapIt = mMapsToRestore.begin();
QMap< QgsComposerMap*, int >::iterator mapIt = mMapsToRestore.begin();
for ( ; mapIt != mMapsToRestore.end(); ++mapIt )
{
mapIt.key()->setPreviewMode( mapIt.value() );
mapIt.key()->setPreviewMode(( QgsComposerMap::PreviewMode )( mapIt.value() ) );
}
mMapsToRestore.clear();

@@ -1281,7 +1281,7 @@ void QgsComposer::readXML( const QDomElement& composerElem, const QDomDocument&
//read and restore all the items
if ( mComposition )
{
mComposition->addItemsFromXML( composerElem, doc );
mComposition->addItemsFromXML( composerElem, doc, &mMapsToRestore );
}

mComposition->sortZList();
@@ -321,7 +321,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
QUndoView* mUndoView;

//! We load composer map content from project xml only on demand. Therefore we need to store the real preview mode type
QMap< QgsComposerMap*, QgsComposerMap::PreviewMode > mMapsToRestore;
QMap< QgsComposerMap*, int > mMapsToRestore;

QDockWidget* mItemDock;
QDockWidget* mUndoDock;
@@ -625,6 +625,11 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
// request notification of FileOpen events (double clicking a file icon in Mac OS X Finder)
QgsApplication::setFileOpenEventReceiver( this );

#ifdef ANDROID
//add reacting to long click in android
grabGesture(Qt::TapAndHoldGesture);
#endif

// update windows
qApp->processEvents();

@@ -734,6 +739,12 @@ bool QgisApp::event( QEvent * event )
openFile( foe->file() );
done = true;
}
#ifdef ANDROID
else if (event->type() == QEvent::Gesture )
{
done = gestureEvent(static_cast<QGestureEvent*>(event));
}
#endif
else
{
// pass other events to base class
@@ -7265,3 +7276,27 @@ QMenu* QgisApp::createPopupMenu()

return menu;
}

#ifdef ANDROID
bool QgisApp::gestureEvent(QGestureEvent *event)
{
if (QGesture *tapAndHold = event->gesture(Qt::TapAndHoldGesture))
{
tapAndHoldTriggered(static_cast<QTapAndHoldGesture *>(tapAndHold));
}
return true;
}

void QgisApp::tapAndHoldTriggered(QTapAndHoldGesture *gesture)
{
if (gesture->state() == Qt::GestureFinished) {
QPoint pos = gesture->position().toPoint();
QWidget * receiver = QApplication::widgetAt( pos );
qDebug() << "tapAndHoldTriggered: LONG CLICK gesture happened at " << pos;
qDebug() << "widget under point of click: " << receiver;

QApplication::postEvent( receiver, new QMouseEvent( QEvent::MouseButtonPress, receiver->mapFromGlobal( pos ), Qt::RightButton, Qt::RightButton, Qt::NoModifier ) );
QApplication::postEvent( receiver, new QMouseEvent( QEvent::MouseButtonRelease, receiver->mapFromGlobal( pos ), Qt::RightButton, Qt::RightButton, Qt::NoModifier ) );
}
}
#endif
@@ -83,6 +83,11 @@ class QgsScaleComboBox;
#include <QPointer>
#include <QSslError>

#ifdef ANDROID
#include <QGestureEvent>
#include <QTapAndHoldGesture>
#endif

#include "qgsconfig.h"
#include "qgsfeature.h"
#include "qgspoint.h"
@@ -1154,6 +1159,11 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
bool cmpByText( QAction* a, QAction* b );

QString mOldScale;

#ifdef ANDROID
bool gestureEvent(QGestureEvent *event);
void tapAndHoldTriggered(QTapAndHoldGesture *gesture);
#endif
};

#ifdef ANDROID
@@ -16,7 +16,6 @@

#include "qgscomposition.h"
#include "qgscomposeritem.h"
#include "qgscomposermap.h"
#include "qgspaperitem.h"
#include "qgscomposerarrow.h"
#include "qgscomposerlabel.h"
@@ -261,7 +260,8 @@ bool QgsComposition::readXML( const QDomElement& compositionElem, const QDomDocu
return true;
}

void QgsComposition::addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, bool addUndoCommands, QPointF* pos )
void QgsComposition::addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore,
bool addUndoCommands, QPointF* pos )
{
QDomNodeList composerLabelList = elem.elementsByTagName( "ComposerLabel" );
for ( int i = 0; i < composerLabelList.size(); ++i )
@@ -286,11 +286,19 @@ void QgsComposition::addItemsFromXML( const QDomElement& elem, const QDomDocumen
QDomElement currentComposerMapElem = composerMapList.at( i ).toElement();
QgsComposerMap* newMap = new QgsComposerMap( this );
newMap->readXML( currentComposerMapElem, doc );

if ( mapsToRestore )
{
mapsToRestore->insert( newMap, ( int )( newMap->previewMode() ) );
newMap->setPreviewMode( QgsComposerMap::Rectangle );
}
addComposerMap( newMap, false );

if ( pos )
{
newMap->setItemPosition( pos->x(), pos->y() );
}
addComposerMap( newMap );

if ( addUndoCommands )
{
pushAddRemoveCommand( newMap, tr( "Map added" ) );
@@ -1000,12 +1008,20 @@ void QgsComposition::addComposerLabel( QgsComposerLabel* label )
emit selectedItemChanged( label );
}

void QgsComposition::addComposerMap( QgsComposerMap* map )
void QgsComposition::addComposerMap( QgsComposerMap* map, bool setDefaultPreviewStyle )
{
addItem( map );
//set default preview mode to cache. Must be done here between adding composer map to scene and emiting signal
map->setPreviewMode( QgsComposerMap::Cache );
map->cache();
if ( setDefaultPreviewStyle )
{
//set default preview mode to cache. Must be done here between adding composer map to scene and emiting signal
map->setPreviewMode( QgsComposerMap::Cache );
}

if ( map->previewMode() != QgsComposerMap::Rectangle )
{
map->cache();
}

emit composerMapAdded( map );
clearSelection();
map->setSelected( true );
@@ -144,9 +144,11 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
/**Add items from XML representation to the graphics scene (for project file reading, pasting items from clipboard)
@param elem items parent element, e.g. \verbatim <Composer> \endverbatim or \verbatim <ComposerItemClipboard> \endverbatim
@param doc xml document
@param mapsToRestore for reading from project file: set preview move 'rectangle' to all maps and save the preview states to show composer maps on demand
@param addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
@param pos item position. Optional, take position from xml if 0*/
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, bool addUndoCommands = false, QPointF* pos = 0 );
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0,
bool addUndoCommands = false, QPointF* pos = 0 );

/**Adds item to z list. Usually called from constructor of QgsComposerItem*/
void addItemToZList( QgsComposerItem* item );
@@ -194,7 +196,7 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
/**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/
void addComposerLabel( QgsComposerLabel* label );
/**Adds map to the graphics scene and advices composer to create a widget for it (through signal)*/
void addComposerMap( QgsComposerMap* map );
void addComposerMap( QgsComposerMap* map, bool setDefaultPreviewStyle = true );
/**Adds scale bar to the graphics scene and advices composer to create a widget for it (through signal)*/
void addComposerScaleBar( QgsComposerScaleBar* scaleBar );
/**Adds legend to the graphics scene and advices composer to create a widget for it (through signal)*/
@@ -1304,7 +1304,8 @@ void QgsVectorLayer::setRenderer( QgsRenderer *r )

if ( r != mRenderer )
{
setUsingRendererV2( false );
if ( r )
setUsingRendererV2( false );
delete mRenderer;
mRenderer = r;
}
@@ -4643,7 +4644,8 @@ void QgsVectorLayer::setRendererV2( QgsFeatureRendererV2 *r )

if ( r != mRendererV2 )
{
setUsingRendererV2( true );
if ( r )
setUsingRendererV2( true );
delete mRendererV2;
mRendererV2 = r;
}
@@ -1017,6 +1017,33 @@ void QgsGraduatedSymbolRendererV2::setSourceColorRamp( QgsVectorColorRampV2* ram
mSourceColorRamp = ramp;
}

void QgsGraduatedSymbolRendererV2::updateColorRamp( QgsVectorColorRampV2 *ramp )
{
int i = 0;
foreach( QgsRendererRangeV2 range, mRanges )
{
QgsSymbolV2* symbol = range.symbol()->clone();
double colorValue = ( mRanges.count() > 1 ? ( double ) i / ( mRanges.count() - 1 ) : 0 );
symbol->setColor( ramp->color( colorValue ) );
updateRangeSymbol( i, symbol );
++i;
}
this->setSourceColorRamp( ramp );
}

void QgsGraduatedSymbolRendererV2::updateSymbols( QgsSymbolV2 *sym )
{
int i = 0;
foreach( QgsRendererRangeV2 range, mRanges )
{
QgsSymbolV2* symbol = sym->clone();
symbol->setColor( range.symbol()->color() );
updateRangeSymbol( i, symbol );
++i;
}
this->setSourceSymbol( sym->clone() );
}

void QgsGraduatedSymbolRendererV2::addClass( QgsSymbolV2* symbol )
{
QgsSymbolV2* newSymbol = symbol->clone();
@@ -114,6 +114,14 @@ class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV2
QgsVectorColorRampV2* sourceColorRamp();
void setSourceColorRamp( QgsVectorColorRampV2* ramp );

/** Update the color ramp used. Also updates all symbols colors.
* Doesn't alter current breaks.
*/
void updateColorRamp( QgsVectorColorRampV2* ramp );

/** Update the all symbols but leave breaks and colors. */
void updateSymbols( QgsSymbolV2* sym );

//! @note added in 1.6
void setRotationField( QString fieldName ) { mRotationField = fieldName; }
//! @note added in 1.6
@@ -480,7 +480,7 @@ void QgsComposerView::keyPressEvent( QKeyEvent * e )
if ( composition() )
{
QPointF pt = mapToScene( mapFromGlobal( QCursor::pos() ) );
composition()->addItemsFromXML( docElem, doc, true, &pt );
composition()->addItemsFromXML( docElem, doc, 0, true, &pt );
}
}
}
Loading

0 comments on commit 3334c9c

Please sign in to comment.