Skip to content

Commit

Permalink
Enable annotation items in composer. Remove gui export from classes t…
Browse files Browse the repository at this point in the history
…hat have been moved to app

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13191 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 29, 2010
1 parent 9f357ab commit dc2bc75
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsannotationwidget.h
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsformannotationdialog.h
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgstextannotationdialog.h
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 );
}

0 comments on commit dc2bc75

Please sign in to comment.