From 0558eae3ce980703a8fc477c40b472ca5e37209e Mon Sep 17 00:00:00 2001 From: mhugent Date: Mon, 29 Mar 2010 13:27:56 +0000 Subject: [PATCH] Enable annotation items in composer. Remove gui export from classes that have been moved to app git-svn-id: http://svn.osgeo.org/qgis/trunk@13191 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/app/qgsannotationwidget.h | 2 +- src/app/qgsformannotationdialog.h | 2 +- src/app/qgstextannotationdialog.h | 2 +- src/core/composer/qgscomposermap.cpp | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/qgsannotationwidget.h b/src/app/qgsannotationwidget.h index 1db76fdeef2..9c8bc253012 100755 --- a/src/app/qgsannotationwidget.h +++ b/src/app/qgsannotationwidget.h @@ -25,7 +25,7 @@ class QgsMarkerSymbolV2; /**A configuration widget to configure the annotation item properties. Usually embedded by QgsAnnotationItem subclass configuration dialogs*/ -class GUI_EXPORT QgsAnnotationWidget: public QWidget, private Ui::QgsAnnotationWidgetBase +class QgsAnnotationWidget: public QWidget, private Ui::QgsAnnotationWidgetBase { Q_OBJECT public: diff --git a/src/app/qgsformannotationdialog.h b/src/app/qgsformannotationdialog.h index e79ce369262..c3cd46afd49 100644 --- a/src/app/qgsformannotationdialog.h +++ b/src/app/qgsformannotationdialog.h @@ -6,7 +6,7 @@ class QgsAnnotationWidget; -class GUI_EXPORT QgsFormAnnotationDialog: public QDialog, private Ui::QgsFormAnnotationDialogBase +class QgsFormAnnotationDialog: public QDialog, private Ui::QgsFormAnnotationDialogBase { Q_OBJECT public: diff --git a/src/app/qgstextannotationdialog.h b/src/app/qgstextannotationdialog.h index f16cb120f69..5bfd2a04d2b 100755 --- a/src/app/qgstextannotationdialog.h +++ b/src/app/qgstextannotationdialog.h @@ -23,7 +23,7 @@ class QgsAnnotationWidget; class QgsTextAnnotationItem; -class GUI_EXPORT QgsTextAnnotationDialog: public QDialog, private Ui::QgsTextAnnotationDialogBase +class QgsTextAnnotationDialog: public QDialog, private Ui::QgsTextAnnotationDialogBase { Q_OBJECT public: diff --git a/src/core/composer/qgscomposermap.cpp b/src/core/composer/qgscomposermap.cpp index 645347d41ad..a3af44f93aa 100644 --- a/src/core/composer/qgscomposermap.cpp +++ b/src/core/composer/qgscomposermap.cpp @@ -270,7 +270,7 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i painter->restore(); //draw canvas items - //drawCanvasItems( painter, itemStyle ); + drawCanvasItems( painter, itemStyle ); } else if ( mComposition->plotStyle() == QgsComposition::Print || mComposition->plotStyle() == QgsComposition::Postscript ) @@ -311,7 +311,7 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i painter->restore(); //draw canvas items - //drawCanvasItems( painter, itemStyle ); + drawCanvasItems( painter, itemStyle ); mDrawing = false; } @@ -1478,7 +1478,7 @@ QPointF QgsComposerMap::composerMapPosForItem( const QGraphicsItem* item ) const double mapX = item->scenePos().x() / mMapCanvas->width() * mMapRenderer->extent().width() + mMapRenderer->extent().xMinimum(); double mapY = mMapRenderer->extent().yMaximum() - item->scenePos().y() / mMapCanvas->height() * mMapRenderer->extent().height(); - double itemX = rect().width() * ( mapX - mExtent.xMinimum() ) / mExtent.width(); - double itemY = rect().height() * ( mExtent.yMaximum() - mapY ) / mExtent.height(); + double itemX = rect().width() * ( mapX - mExtent.xMinimum() ) / mExtent.width() + mXOffset; + double itemY = rect().height() * ( mExtent.yMaximum() - mapY ) / mExtent.height() + mYOffset; return QPointF( itemX, itemY ); }