[QGIS Commit] r14216 - in trunk/qgis: images/themes/default
src/app/legend src/core src/core/composer src/mapserver
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Sep 10 10:40:53 EDT 2010
Author: jef
Date: 2010-09-10 14:40:53 +0000 (Fri, 10 Sep 2010)
New Revision: 14216
Added:
trunk/qgis/images/themes/default/mIconTableLayer.png
Modified:
trunk/qgis/src/app/legend/qgslegendlayer.cpp
trunk/qgis/src/core/composer/qgscomposeritem.cpp
trunk/qgis/src/core/composer/qgscomposerlegend.cpp
trunk/qgis/src/core/composer/qgscomposerlegenditem.cpp
trunk/qgis/src/core/qgsgeometry.cpp
trunk/qgis/src/mapserver/qgswmsserver.cpp
Log:
add table icon and fix warnings related to geometryless layers
Added: trunk/qgis/images/themes/default/mIconTableLayer.png
===================================================================
(Binary files differ)
Property changes on: trunk/qgis/images/themes/default/mIconTableLayer.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/qgis/src/app/legend/qgslegendlayer.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayer.cpp 2010-09-09 14:46:42 UTC (rev 14215)
+++ trunk/qgis/src/app/legend/qgslegendlayer.cpp 2010-09-10 14:40:53 UTC (rev 14216)
@@ -370,7 +370,7 @@
return QgisApp::getThemePixmap( "/mIconPolygonLayer.png" );
break;
case QGis::NoGeometry:
- return QgisApp::getThemePixmap( "mActionOpenTable.png" );
+ return QgisApp::getThemePixmap( "/mIconTableLayer.png" );
default:
return QgisApp::getThemePixmap( "/mIconLayer.png" );
}
Modified: trunk/qgis/src/core/composer/qgscomposeritem.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposeritem.cpp 2010-09-09 14:46:42 UTC (rev 14215)
+++ trunk/qgis/src/core/composer/qgscomposeritem.cpp 2010-09-10 14:40:53 UTC (rev 14216)
@@ -39,8 +39,15 @@
#define FONT_WORKAROUND_SCALE 10 //scale factor for upscaling fontsize and downscaling painter
-QgsComposerItem::QgsComposerItem( QgsComposition* composition, bool manageZValue ): QObject( 0 ), QGraphicsRectItem( 0 ), mComposition( composition ), mBoundingResizeRectangle( 0 ), \
- mFrame( true ), mItemPositionLocked( false ), mLastValidViewScaleFactor( -1 ), mRotation( 0 )
+QgsComposerItem::QgsComposerItem( QgsComposition* composition, bool manageZValue )
+ : QObject( 0 )
+ , QGraphicsRectItem( 0 )
+ , mComposition( composition )
+ , mBoundingResizeRectangle( 0 )
+ , mFrame( true )
+ , mItemPositionLocked( false )
+ , mLastValidViewScaleFactor( -1 )
+ , mRotation( 0 )
{
setFlag( QGraphicsItem::ItemIsSelectable, true );
setAcceptsHoverEvents( true );
@@ -58,9 +65,15 @@
}
}
-QgsComposerItem::QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition, bool manageZValue ): \
- QObject( 0 ), QGraphicsRectItem( 0, 0, width, height, 0 ), mComposition( composition ), mBoundingResizeRectangle( 0 ), mFrame( true ), \
- mItemPositionLocked( false ), mLastValidViewScaleFactor( -1 ), mRotation( 0 )
+QgsComposerItem::QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition, bool manageZValue )
+ : QObject( 0 )
+ , QGraphicsRectItem( 0, 0, width, height, 0 )
+ , mComposition( composition )
+ , mBoundingResizeRectangle( 0 )
+ , mFrame( true )
+ , mItemPositionLocked( false )
+ , mLastValidViewScaleFactor( -1 )
+ , mRotation( 0 )
{
setFlag( QGraphicsItem::ItemIsSelectable, true );
setAcceptsHoverEvents( true );
@@ -530,8 +543,8 @@
}
else //for composer items, we prefer setSceneRect as subclasses can implement custom behaviour (e.g. item group)
{
- changeComposerItem->setSceneRect( QRectF( originalItem->transform().dx() + moveRectX, \
- originalItem->transform().dy() + moveRectY, \
+ changeComposerItem->setSceneRect( QRectF( originalItem->transform().dx() + moveRectX,
+ originalItem->transform().dy() + moveRectY,
originalItem->rect().width(), originalItem->rect().height() ) );
}
}
@@ -550,7 +563,7 @@
}
else //for composer items, we prefer setSceneRect as subclasses can implement custom behaviour (e.g. item group)
{
- changeComposerItem->setSceneRect( QRectF( originalItem->transform().dx() + mx, originalItem->transform().dy() + my, \
+ changeComposerItem->setSceneRect( QRectF( originalItem->transform().dx() + mx, originalItem->transform().dy() + my,
originalItem->rect().width() + rx, originalItem->rect().height() + ry ) );
}
}
Modified: trunk/qgis/src/core/composer/qgscomposerlegend.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposerlegend.cpp 2010-09-09 14:46:42 UTC (rev 14215)
+++ trunk/qgis/src/core/composer/qgscomposerlegend.cpp 2010-09-10 14:40:53 UTC (rev 14216)
@@ -27,7 +27,13 @@
#include <QDomElement>
#include <QPainter>
-QgsComposerLegend::QgsComposerLegend( QgsComposition* composition ): QgsComposerItem( composition ), mTitle( tr( "Legend" ) ), mBoxSpace( 2 ), mLayerSpace( 3 ), mSymbolSpace( 2 ), mIconLabelSpace( 2 )
+QgsComposerLegend::QgsComposerLegend( QgsComposition* composition )
+ : QgsComposerItem( composition )
+ , mTitle( tr( "Legend" ) )
+ , mBoxSpace( 2 )
+ , mLayerSpace( 3 )
+ , mSymbolSpace( 2 )
+ , mIconLabelSpace( 2 )
{
//QStringList idList = layerIdList();
//mLegendModel.setLayerSet( idList );
@@ -326,6 +332,7 @@
symbolHeight = mSymbolHeight;
break;
case QGis::UnknownGeometry:
+ case QGis::NoGeometry:
// shouldn't occur
break;
}
Modified: trunk/qgis/src/core/composer/qgscomposerlegenditem.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposerlegenditem.cpp 2010-09-09 14:46:42 UTC (rev 14215)
+++ trunk/qgis/src/core/composer/qgscomposerlegenditem.cpp 2010-09-10 14:40:53 UTC (rev 14216)
@@ -22,6 +22,7 @@
#include "qgssymbolv2.h"
#include "qgssymbollayerv2utils.h"
#include "qgsvectorlayer.h"
+#include "qgsapplication.h"
#include <QDomDocument>
#include <QDomElement>
@@ -135,6 +136,9 @@
case QGis::Polygon:
setIcon( QIcon( QPixmap::fromImage( symbol->getPolygonSymbolAsImage() ) ) );
break;
+ case QGis::NoGeometry:
+ setIcon( QIcon( QgsApplication::activeThemePath() + "/mIconTableLayer.png" ) );
+ break;
case QGis::UnknownGeometry:
// should not occur
break;
Modified: trunk/qgis/src/core/qgsgeometry.cpp
===================================================================
--- trunk/qgis/src/core/qgsgeometry.cpp 2010-09-09 14:46:42 UTC (rev 14215)
+++ trunk/qgis/src/core/qgsgeometry.cpp 2010-09-10 14:40:53 UTC (rev 14216)
@@ -1796,6 +1796,7 @@
}
break;
}
+ case QGis::WKBNoGeometry:
case QGis::WKBUnknown:
break;
}
@@ -2099,6 +2100,7 @@
}
break;
}
+ case QGis::WKBNoGeometry:
case QGis::WKBUnknown:
break;
}
@@ -6588,6 +6590,7 @@
}
break;
+ case QGis::WKBNoGeometry:
case QGis::WKBUnknown:
QgsDebugMsg( QObject::tr( "Unknown geometry type" ) );
errors << Error( QObject::tr( "Unknown geometry type" ) );
Modified: trunk/qgis/src/mapserver/qgswmsserver.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgswmsserver.cpp 2010-09-09 14:46:42 UTC (rev 14215)
+++ trunk/qgis/src/mapserver/qgswmsserver.cpp 2010-09-10 14:40:53 UTC (rev 14216)
@@ -1171,6 +1171,7 @@
drawPolygonSymbol( p, symbol, boxSpace, currentY, symbolWidth, symbolHeight, layerOpacity, yDownShift );
break;
case QGis::UnknownGeometry:
+ case QGis::NoGeometry:
// shouldn't occur
break;
}
More information about the QGIS-commit
mailing list