Skip to content

Commit dc2bc75

Browse files
author
mhugent
committed
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/qgis@13191 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9f357ab commit dc2bc75

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/app/qgsannotationwidget.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class QgsMarkerSymbolV2;
2525

2626
/**A configuration widget to configure the annotation item properties. Usually embedded by QgsAnnotationItem
2727
subclass configuration dialogs*/
28-
class GUI_EXPORT QgsAnnotationWidget: public QWidget, private Ui::QgsAnnotationWidgetBase
28+
class QgsAnnotationWidget: public QWidget, private Ui::QgsAnnotationWidgetBase
2929
{
3030
Q_OBJECT
3131
public:

src/app/qgsformannotationdialog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class QgsAnnotationWidget;
88

9-
class GUI_EXPORT QgsFormAnnotationDialog: public QDialog, private Ui::QgsFormAnnotationDialogBase
9+
class QgsFormAnnotationDialog: public QDialog, private Ui::QgsFormAnnotationDialogBase
1010
{
1111
Q_OBJECT
1212
public:

src/app/qgstextannotationdialog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class QgsAnnotationWidget;
2424
class QgsTextAnnotationItem;
2525

26-
class GUI_EXPORT QgsTextAnnotationDialog: public QDialog, private Ui::QgsTextAnnotationDialogBase
26+
class QgsTextAnnotationDialog: public QDialog, private Ui::QgsTextAnnotationDialogBase
2727
{
2828
Q_OBJECT
2929
public:

src/core/composer/qgscomposermap.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
270270
painter->restore();
271271

272272
//draw canvas items
273-
//drawCanvasItems( painter, itemStyle );
273+
drawCanvasItems( painter, itemStyle );
274274
}
275275
else if ( mComposition->plotStyle() == QgsComposition::Print ||
276276
mComposition->plotStyle() == QgsComposition::Postscript )
@@ -311,7 +311,7 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
311311
painter->restore();
312312

313313
//draw canvas items
314-
//drawCanvasItems( painter, itemStyle );
314+
drawCanvasItems( painter, itemStyle );
315315

316316
mDrawing = false;
317317
}
@@ -1478,7 +1478,7 @@ QPointF QgsComposerMap::composerMapPosForItem( const QGraphicsItem* item ) const
14781478
double mapX = item->scenePos().x() / mMapCanvas->width() * mMapRenderer->extent().width() + mMapRenderer->extent().xMinimum();
14791479
double mapY = mMapRenderer->extent().yMaximum() - item->scenePos().y() / mMapCanvas->height() * mMapRenderer->extent().height();
14801480

1481-
double itemX = rect().width() * ( mapX - mExtent.xMinimum() ) / mExtent.width();
1482-
double itemY = rect().height() * ( mExtent.yMaximum() - mapY ) / mExtent.height();
1481+
double itemX = rect().width() * ( mapX - mExtent.xMinimum() ) / mExtent.width() + mXOffset;
1482+
double itemY = rect().height() * ( mExtent.yMaximum() - mapY ) / mExtent.height() + mYOffset;
14831483
return QPointF( itemX, itemY );
14841484
}

0 commit comments

Comments
 (0)