Skip to content

Commit aa4cc3d

Browse files
author
wonder
committed
Finally applied all changes from Mapcanvas branch to trunk.
Bug hunting season begins! git-svn-id: http://svn.osgeo.org/qgis/trunk@4949 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent bbaddc9 commit aa4cc3d

File tree

105 files changed

+5164
-5893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+5164
-5893
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Version 0.8 'Joesephine' .... development version
55
** Dropped use of qpicture and resampling for point markers in favour of
66
qt4.1 qsvgrenderer new goodies
77
2006-01-09 [timlinux] 0.7.9.8
8+
** Started Mapcanvas branch for Martin
9+
2006-01-09 [timlinux] 0.7.9.8
810
** Moved plugins into src/plugins
911
2006-01-08 [timlinux] 0.7.9.8
1012
** moved all sources for gui lib into src/gui

src/composer/qgscomposermap.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,15 @@ void QgsComposerMap::init ()
9494
Q3CanvasRectangle::setZ(20);
9595
setActive(true);
9696

97-
connect ( mMapCanvas, SIGNAL(addedLayer(QgsMapLayer *)), this, SLOT(mapCanvasChanged()) );
98-
connect ( mMapCanvas, SIGNAL(removedLayer(QString)), this, SLOT(mapCanvasChanged()) );
99-
connect ( mMapCanvas, SIGNAL(removedAll()), this, SLOT(mapCanvasChanged()) );
97+
connect ( mMapCanvas, SIGNAL(layersChanged()), this, SLOT(mapCanvasChanged()) );
10098
}
10199

102100
QgsComposerMap::~QgsComposerMap()
103101
{
104102
std::cerr << "QgsComposerMap::~QgsComposerMap" << std::endl;
105103
}
106104

107-
void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *transform, QPaintDevice *device )
105+
void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *transform)
108106
{
109107
mMapCanvas->freeze(true); // necessary ?
110108
int nlayers = mMapCanvas->layerCount();
@@ -122,7 +120,7 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *t
122120
widthScale *= mComposition->viewScale();
123121
}
124122
double symbolScale = mSymbolScale * mComposition->scale();
125-
vector->draw( painter, extent, transform, device, widthScale, symbolScale);
123+
vector->draw( painter, extent, transform, widthScale, symbolScale);
126124

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

142-
layer->draw( painter, extent, &trans, device );
140+
layer->draw( painter, extent, &trans);
143141

144142
painter->restore();
145143
}
146144
else
147145
{
148-
layer->draw( painter, extent, transform, device );
146+
layer->draw( painter, extent, transform);
149147
}
150148
}
151149
}
@@ -164,7 +162,7 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *t
164162
if ( plotStyle() == QgsComposition::Postscript ) {
165163
fontScale = QgsComposition::psFontScaleFactor() * 72.0 / mComposition->resolution();
166164
}
167-
vector->drawLabels ( painter, extent, transform, device, fontScale );
165+
vector->drawLabels ( painter, extent, transform, fontScale );
168166
}
169167

170168
}
@@ -214,7 +212,7 @@ void QgsComposerMap::cache ( void )
214212

215213
QPainter p(&mCachePixmap);
216214

217-
draw( &p, &mCacheExtent, &transform, &mCachePixmap );
215+
draw( &p, &mCacheExtent, &transform);
218216
p.end();
219217

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

274-
draw( &painter, &mExtent, &transform, painter.device() );
272+
draw( &painter, &mExtent, &transform);
275273
painter.restore();
276274
}
277275

src/composer/qgscomposermap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class QgsComposerMap : public QWidget, private Ui::QgsComposerMapBase, public Q3
7272
bool readXML( QDomNode & node );
7373

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

7777
/** \brief Reimplementation of QCanvasItem::draw - draw on canvas */
7878
void draw ( QPainter & painter );

src/core/Makefile.am

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ lib_LTLIBRARIES = libqgis_core.la
4343

4444
libqgis_coreHEADERS = \
4545
qgis.h \
46-
qgsacetatelines.h \
47-
qgsacetateobject.h \
48-
qgsacetaterectangle.h \
4946
qgsapplication.h \
5047
qgsbookmarkitem.h \
5148
qgsclipper.h \
@@ -102,9 +99,7 @@ libqgis_core_la_MOC = \
10299
qgsrasterdataprovider.moc.cpp
103100

104101
libqgis_core_la_SOURCES =\
105-
qgsacetatelines.cpp \
106-
qgsacetateobject.cpp \
107-
qgsacetaterectangle.cpp \
102+
qgis.cpp \
108103
qgsapplication.cpp \
109104
qgsbookmarkitem.cpp \
110105
qgsclipper.cpp \

src/core/qgis.cpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
#include "qgis.h"
3+
4+
// Version constants
5+
//
6+
7+
// Version string
8+
const char* QGis::qgisVersion = VERSION;
9+
10+
// Version number used for comparing versions using the "Check QGIS Version" function
11+
const int QGis::qgisVersionInt =703;
12+
13+
// Release name
14+
const char* QGis::qgisReleaseName = "Seamus";
15+
16+
const char* QGis::qgisVectorGeometryType[] =
17+
{
18+
"Point",
19+
"Line",
20+
"Polygon"
21+
};
22+
23+
// description strings for feature types
24+
const char* QGis::qgisFeatureTypes[] =
25+
{
26+
"Null",
27+
"WKBPoint",
28+
"WKBLineString",
29+
"WKBPolygon",
30+
"WKBMultiPoint",
31+
"WKBMultiLineString",
32+
"WKBMultiPolygon"
33+
};
34+
35+
const int QGis::DEFAULT_IDENTIFY_RADIUS=5;
36+

src/core/qgis.h

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -31,42 +31,23 @@
3131

3232
#include <qevent.h>
3333

34-
namespace QGis
34+
class QGis
3535
{
36+
public:
3637
// Version constants
3738
//
3839
// Version string
39-
static const char *qgisVersion = VERSION;
40+
static const char* qgisVersion;
4041
// Version number used for comparing versions using the "Check QGIS Version" function
41-
static const int qgisVersionInt =703;
42+
static const int qgisVersionInt;
4243
// Release name
43-
static const char *qgisReleaseName = "Seamus";
44+
static const char* qgisReleaseName;
4445

4546
// Enumerations
4647
//
47-
// Maptool enumeration
48-
enum MapTools
49-
{
50-
NoTool,
51-
ZoomIn,
52-
ZoomOut,
53-
Pan,
54-
Distance,
55-
Identify,
56-
Table,
57-
Select,
58-
CapturePoint,
59-
CaptureLine,
60-
CapturePolygon,
61-
EmitPoint,
62-
MeasureDist,
63-
MeasureArea,
64-
AddVertex,
65-
MoveVertex,
66-
DeleteVertex
67-
};
48+
6849
//! Used for symbology operations
69-
// Featuure types
50+
// Feature types
7051
enum WKBTYPE
7152
{
7253
WKBPoint = 1,
@@ -83,23 +64,10 @@ namespace QGis
8364
Line,
8465
Polygon
8566
};
86-
static const char *qgisVectorGeometryType[] =
87-
{
88-
"Point",
89-
"Line",
90-
"Polygon"
91-
};
92-
//! description strings for feature types
93-
static const char *qgisFeatureTypes[] =
94-
{
95-
"Null",
96-
"WKBPoint",
97-
"WKBLineString",
98-
"WKBPolygon",
99-
"WKBMultiPoint",
100-
"WKBMultiLineString",
101-
"WKBMultiPolygon"
102-
};
67+
static const char *qgisVectorGeometryType[];
68+
69+
//! description strings for feature types
70+
static const char *qgisFeatureTypes[];
10371

10472
//! map units that qgis supports
10573
typedef enum
@@ -122,8 +90,8 @@ namespace QGis
12290
ProviderCountCalcEvent
12391
};
12492

125-
const int DEFAULT_IDENTIFY_RADIUS=5;
126-
}
93+
static const int DEFAULT_IDENTIFY_RADIUS;
94+
};
12795
/** WKT string that represents a geographic coord sys */
12896
const QString GEOWKT =
12997
"GEOGCS[\"WGS 84\", "

src/core/qgsacetatelines.cpp

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/core/qgsacetatelines.h

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)