[QGIS Commit] r13191 - in trunk/qgis/src: app core/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Mar 29 09:27:57 EDT 2010


Author: mhugent
Date: 2010-03-29 09:27:56 -0400 (Mon, 29 Mar 2010)
New Revision: 13191

Modified:
   trunk/qgis/src/app/qgsannotationwidget.h
   trunk/qgis/src/app/qgsformannotationdialog.h
   trunk/qgis/src/app/qgstextannotationdialog.h
   trunk/qgis/src/core/composer/qgscomposermap.cpp
Log:
Enable annotation items in composer. Remove gui export from classes that have been moved to app

Modified: trunk/qgis/src/app/qgsannotationwidget.h
===================================================================
--- trunk/qgis/src/app/qgsannotationwidget.h	2010-03-29 13:16:08 UTC (rev 13190)
+++ trunk/qgis/src/app/qgsannotationwidget.h	2010-03-29 13:27:56 UTC (rev 13191)
@@ -25,7 +25,7 @@
 
 /**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:

Modified: trunk/qgis/src/app/qgsformannotationdialog.h
===================================================================
--- trunk/qgis/src/app/qgsformannotationdialog.h	2010-03-29 13:16:08 UTC (rev 13190)
+++ trunk/qgis/src/app/qgsformannotationdialog.h	2010-03-29 13:27:56 UTC (rev 13191)
@@ -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:

Modified: trunk/qgis/src/app/qgstextannotationdialog.h
===================================================================
--- trunk/qgis/src/app/qgstextannotationdialog.h	2010-03-29 13:16:08 UTC (rev 13190)
+++ trunk/qgis/src/app/qgstextannotationdialog.h	2010-03-29 13:27:56 UTC (rev 13191)
@@ -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:

Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp	2010-03-29 13:16:08 UTC (rev 13190)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp	2010-03-29 13:27:56 UTC (rev 13191)
@@ -270,7 +270,7 @@
     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 @@
     painter->restore();
 
     //draw canvas items
-    //drawCanvasItems( painter, itemStyle );
+    drawCanvasItems( painter, itemStyle );
 
     mDrawing = false;
   }
@@ -1478,7 +1478,7 @@
   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 );
 }



More information about the QGIS-commit mailing list