Skip to content

Commit

Permalink
Finally applied all changes from Mapcanvas branch to trunk.
Browse files Browse the repository at this point in the history
Bug hunting season begins!


git-svn-id: http://svn.osgeo.org/qgis/trunk@4949 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Mar 3, 2006
1 parent bbaddc9 commit aa4cc3d
Show file tree
Hide file tree
Showing 105 changed files with 5,164 additions and 5,893 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Expand Up @@ -5,6 +5,8 @@ Version 0.8 'Joesephine' .... development version
** Dropped use of qpicture and resampling for point markers in favour of
qt4.1 qsvgrenderer new goodies
2006-01-09 [timlinux] 0.7.9.8
** Started Mapcanvas branch for Martin
2006-01-09 [timlinux] 0.7.9.8
** Moved plugins into src/plugins
2006-01-08 [timlinux] 0.7.9.8
** moved all sources for gui lib into src/gui
Expand Down
18 changes: 8 additions & 10 deletions src/composer/qgscomposermap.cpp
Expand Up @@ -94,17 +94,15 @@ void QgsComposerMap::init ()
Q3CanvasRectangle::setZ(20);
setActive(true);

connect ( mMapCanvas, SIGNAL(addedLayer(QgsMapLayer *)), this, SLOT(mapCanvasChanged()) );
connect ( mMapCanvas, SIGNAL(removedLayer(QString)), this, SLOT(mapCanvasChanged()) );
connect ( mMapCanvas, SIGNAL(removedAll()), this, SLOT(mapCanvasChanged()) );
connect ( mMapCanvas, SIGNAL(layersChanged()), this, SLOT(mapCanvasChanged()) );
}

QgsComposerMap::~QgsComposerMap()
{
std::cerr << "QgsComposerMap::~QgsComposerMap" << std::endl;
}

void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *transform, QPaintDevice *device )
void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *transform)
{
mMapCanvas->freeze(true); // necessary ?
int nlayers = mMapCanvas->layerCount();
Expand All @@ -122,7 +120,7 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *t
widthScale *= mComposition->viewScale();
}
double symbolScale = mSymbolScale * mComposition->scale();
vector->draw( painter, extent, transform, device, widthScale, symbolScale);
vector->draw( painter, extent, transform, widthScale, symbolScale);

} else {
// raster
Expand All @@ -139,13 +137,13 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *t
painter->save();
painter->scale( 1./multip, 1./multip);

layer->draw( painter, extent, &trans, device );
layer->draw( painter, extent, &trans);

painter->restore();
}
else
{
layer->draw( painter, extent, transform, device );
layer->draw( painter, extent, transform);
}
}
}
Expand All @@ -164,7 +162,7 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *t
if ( plotStyle() == QgsComposition::Postscript ) {
fontScale = QgsComposition::psFontScaleFactor() * 72.0 / mComposition->resolution();
}
vector->drawLabels ( painter, extent, transform, device, fontScale );
vector->drawLabels ( painter, extent, transform, fontScale );
}

}
Expand Down Expand Up @@ -214,7 +212,7 @@ void QgsComposerMap::cache ( void )

QPainter p(&mCachePixmap);

draw( &p, &mCacheExtent, &transform, &mCachePixmap );
draw( &p, &mCacheExtent, &transform);
p.end();

mNumCachedLayers = mMapCanvas->layerCount();
Expand Down Expand Up @@ -271,7 +269,7 @@ void QgsComposerMap::draw ( QPainter & painter )
painter.setClipRect ( 0, 0, Q3CanvasRectangle::width(), Q3CanvasRectangle::height() );
#endif

draw( &painter, &mExtent, &transform, painter.device() );
draw( &painter, &mExtent, &transform);
painter.restore();
}

Expand Down
2 changes: 1 addition & 1 deletion src/composer/qgscomposermap.h
Expand Up @@ -72,7 +72,7 @@ class QgsComposerMap : public QWidget, private Ui::QgsComposerMapBase, public Q3
bool readXML( QDomNode & node );

/** \brief Draw to paint device */
void draw(QPainter *painter, QgsRect *extent, QgsMapToPixel *transform, QPaintDevice *device);
void draw(QPainter *painter, QgsRect *extent, QgsMapToPixel *transform);

/** \brief Reimplementation of QCanvasItem::draw - draw on canvas */
void draw ( QPainter & painter );
Expand Down
7 changes: 1 addition & 6 deletions src/core/Makefile.am
Expand Up @@ -43,9 +43,6 @@ lib_LTLIBRARIES = libqgis_core.la

libqgis_coreHEADERS = \
qgis.h \
qgsacetatelines.h \
qgsacetateobject.h \
qgsacetaterectangle.h \
qgsapplication.h \
qgsbookmarkitem.h \
qgsclipper.h \
Expand Down Expand Up @@ -102,9 +99,7 @@ libqgis_core_la_MOC = \
qgsrasterdataprovider.moc.cpp

libqgis_core_la_SOURCES =\
qgsacetatelines.cpp \
qgsacetateobject.cpp \
qgsacetaterectangle.cpp \
qgis.cpp \
qgsapplication.cpp \
qgsbookmarkitem.cpp \
qgsclipper.cpp \
Expand Down
36 changes: 36 additions & 0 deletions src/core/qgis.cpp
@@ -0,0 +1,36 @@

#include "qgis.h"

// Version constants
//

// Version string
const char* QGis::qgisVersion = VERSION;

// Version number used for comparing versions using the "Check QGIS Version" function
const int QGis::qgisVersionInt =703;

// Release name
const char* QGis::qgisReleaseName = "Seamus";

const char* QGis::qgisVectorGeometryType[] =
{
"Point",
"Line",
"Polygon"
};

// description strings for feature types
const char* QGis::qgisFeatureTypes[] =
{
"Null",
"WKBPoint",
"WKBLineString",
"WKBPolygon",
"WKBMultiPoint",
"WKBMultiLineString",
"WKBMultiPolygon"
};

const int QGis::DEFAULT_IDENTIFY_RADIUS=5;

58 changes: 13 additions & 45 deletions src/core/qgis.h
Expand Up @@ -31,42 +31,23 @@

#include <qevent.h>

namespace QGis
class QGis
{
public:
// Version constants
//
// Version string
static const char *qgisVersion = VERSION;
static const char* qgisVersion;
// Version number used for comparing versions using the "Check QGIS Version" function
static const int qgisVersionInt =703;
static const int qgisVersionInt;
// Release name
static const char *qgisReleaseName = "Seamus";
static const char* qgisReleaseName;

// Enumerations
//
// Maptool enumeration
enum MapTools
{
NoTool,
ZoomIn,
ZoomOut,
Pan,
Distance,
Identify,
Table,
Select,
CapturePoint,
CaptureLine,
CapturePolygon,
EmitPoint,
MeasureDist,
MeasureArea,
AddVertex,
MoveVertex,
DeleteVertex
};

//! Used for symbology operations
// Featuure types
// Feature types
enum WKBTYPE
{
WKBPoint = 1,
Expand All @@ -83,23 +64,10 @@ namespace QGis
Line,
Polygon
};
static const char *qgisVectorGeometryType[] =
{
"Point",
"Line",
"Polygon"
};
//! description strings for feature types
static const char *qgisFeatureTypes[] =
{
"Null",
"WKBPoint",
"WKBLineString",
"WKBPolygon",
"WKBMultiPoint",
"WKBMultiLineString",
"WKBMultiPolygon"
};
static const char *qgisVectorGeometryType[];

//! description strings for feature types
static const char *qgisFeatureTypes[];

//! map units that qgis supports
typedef enum
Expand All @@ -122,8 +90,8 @@ namespace QGis
ProviderCountCalcEvent
};

const int DEFAULT_IDENTIFY_RADIUS=5;
}
static const int DEFAULT_IDENTIFY_RADIUS;
};
/** WKT string that represents a geographic coord sys */
const QString GEOWKT =
"GEOGCS[\"WGS 84\", "
Expand Down
66 changes: 0 additions & 66 deletions src/core/qgsacetatelines.cpp

This file was deleted.

90 changes: 0 additions & 90 deletions src/core/qgsacetatelines.h

This file was deleted.

0 comments on commit aa4cc3d

Please sign in to comment.