Skip to content

Commit 07fe394

Browse files
author
g_j_m
committedMay 12, 2006
Fix for ticket #111.
Changed the code from using text to manipulate the scale bar and north arrow to using ints as this is more robust, especially when the user changes languages and saves a project. Note: this commit will break saved project files if they include scale bar or north arrow sections (the scale bar and north arrow will end up in the default locations rather than those when the project was saved). git-svn-id: http://svn.osgeo.org/qgis/trunk@5444 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5d821b9 commit 07fe394

File tree

8 files changed

+123
-97
lines changed

8 files changed

+123
-97
lines changed
 

‎src/plugins/north_arrow/plugin.cpp

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ QgsNorthArrowPlugin::QgsNorthArrowPlugin(QgisApp * theQGisApp,
7474
QgisIface * theQgisInterFace):
7575
QgisPlugin(name_,description_,version_,type_),
7676
qgisMainWindowPointer(theQGisApp),
77-
qGisInterface(theQgisInterFace)
77+
qGisInterface(theQgisInterFace),
78+
mPlacementIndex(1)
7879
{
7980
mRotationInt=0;
8081
mAutomatic=true;
81-
mPlacement=tr("Bottom Left");
82+
mPlacementLabels << tr("Bottom Left") << tr("Top Left") << tr("Top Right") << tr("Bottom Right");
83+
mPlacementIndex = 0;
8284
}
8385

8486
QgsNorthArrowPlugin::~QgsNorthArrowPlugin()
@@ -119,7 +121,7 @@ void QgsNorthArrowPlugin::projectRead()
119121
//default text to start with - try to fetch it from qgsproject
120122

121123
mRotationInt = QgsProject::instance()->readNumEntry("NorthArrow","/Rotation",0);
122-
mPlacement = QgsProject::instance()->readEntry("NorthArrow","/Placement","Bottom Left");
124+
mPlacementIndex = QgsProject::instance()->readNumEntry("NorthArrow","/Placement",0);
123125
mEnable = QgsProject::instance()->readBoolEntry("NorthArrow","/Enabled",true);
124126
mAutomatic = QgsProject::instance()->readBoolEntry("NorthArrow","/Automatic",true);
125127
}
@@ -134,15 +136,16 @@ void QgsNorthArrowPlugin::help()
134136
void QgsNorthArrowPlugin::run()
135137
{
136138
QgsNorthArrowPluginGui *myPluginGui = new QgsNorthArrowPluginGui(qgisMainWindowPointer, QgisGui::ModalDialogFlags);
137-
//overides function byt the same name created in .ui
139+
//overides function by the same name created in .ui
138140
myPluginGui->setRotation(mRotationInt);
139-
myPluginGui->setPlacement(mPlacement);
141+
myPluginGui->setPlacementLabels(mPlacementLabels);
142+
myPluginGui->setPlacement(mPlacementIndex);
140143
myPluginGui->setEnabled(mEnable);
141144
myPluginGui->setAutomatic(mAutomatic);
142145

143146
//listen for when the layer has been made so we can draw it
144147
connect(myPluginGui, SIGNAL(rotationChanged(int)), this, SLOT(rotationChanged(int)));
145-
connect(myPluginGui, SIGNAL(changePlacement(QString)), this, SLOT(setPlacement(QString)));
148+
connect(myPluginGui, SIGNAL(changePlacement(int)), this, SLOT(setPlacement(int)));
146149
connect(myPluginGui, SIGNAL(enableAutomatic(bool)), this, SLOT(setAutomatic(bool)));
147150
connect(myPluginGui, SIGNAL(enableNorthArrow(bool)), this, SLOT(setEnabled(bool)));
148151
connect(myPluginGui, SIGNAL(needToRefresh()), this, SLOT(refreshCanvas()));
@@ -202,26 +205,28 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
202205
int myWidth = theQPainter->device()->width();
203206

204207
#ifdef QGISDEBUG
205-
std::cout << "Rendering n-arrow at " << mPlacement.toLocal8Bit().data() << std::endl;
208+
std::cout << "Rendering n-arrow at " << mPlacementLabels.at(mPlacementIndex).toLocal8Bit().data() << std::endl;
206209
#endif
207210
//Determine placement of label from form combo box
208-
if (mPlacement==tr("Bottom Left"))
211+
switch (mPlacementIndex)
209212
{
213+
case 0: // Bottom Left
210214
theQPainter->translate(0,myHeight-myQPixmap.height());
211-
}
212-
else if (mPlacement==tr("Top Right"))
213-
{
215+
break;
216+
case 1: // Top Left
217+
//no need to translate for TL corner because we're already at the origin
218+
theQPainter->translate(0, 0);
219+
break;
220+
case 2: // Top Right
214221
theQPainter->translate(myWidth-myQPixmap.width(),0);
215-
}
216-
else if (mPlacement==tr("Bottom Right"))
217-
{
222+
break;
223+
case 3: // Bottom Right
218224
theQPainter->translate(myWidth-myQPixmap.width(),
219225
myHeight-myQPixmap.height());
220-
}
221-
else // defaulting to top left
222-
{
223-
//no need to translate for TL corner because we're already at the origin
224-
theQPainter->translate(0, 0);
226+
break;
227+
default:
228+
std::cout << "Unable to determine where to put north arrow so defaulting to top left"
229+
<< std::endl;
225230
}
226231
//rotate the canvas by the north arrow rotation amount
227232
theQPainter->rotate( mRotationInt );
@@ -264,10 +269,10 @@ void QgsNorthArrowPlugin::rotationChanged(int theInt)
264269
}
265270

266271
//! set placement of north arrow
267-
void QgsNorthArrowPlugin::setPlacement(QString theQString)
272+
void QgsNorthArrowPlugin::setPlacement(int placementIndex)
268273
{
269-
mPlacement = theQString;
270-
QgsProject::instance()->writeEntry("NorthArrow","/Placement", mPlacement);
274+
mPlacementIndex = placementIndex;
275+
QgsProject::instance()->writeEntry("NorthArrow","/Placement", mPlacementIndex);
271276
}
272277

273278
void QgsNorthArrowPlugin::setEnabled(bool theBool)

‎src/plugins/north_arrow/plugin.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class QgsNorthArrowPlugin:public QObject, public QgisPlugin
5959
//! show the help document
6060
void help();
6161
//! set north arrow placement
62-
void setPlacement(QString);
62+
void setPlacement(int);
6363
//! enable or disable north arrow
6464
void setEnabled(bool);
6565
//! enable or disable the automatic setting of the arrow direction
@@ -83,8 +83,9 @@ class QgsNorthArrowPlugin:public QObject, public QgisPlugin
8383
bool mEnable;
8484
//! enable or disable the automatic setting of the arrow direction
8585
bool mAutomatic;
86-
// The placement string
87-
QString mPlacement;
86+
// The placement index and translated text
87+
int mPlacementIndex;
88+
QStringList mPlacementLabels;
8889
//! Id of the plugin's menu. Used for unloading
8990
int menuId;
9091
//! Pointer to our toolbar

‎src/plugins/north_arrow/plugingui.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void QgsNorthArrowPluginGui::on_pbnOK_clicked()
4444
//close the dialog
4545
emit rotationChanged(sliderRotation->value());
4646
emit enableAutomatic(cboxAutomatic->isChecked());
47-
emit changePlacement(cboPlacement->currentText());
47+
emit changePlacement(cboPlacement->currentIndex());
4848
emit enableNorthArrow(cboxShow->isChecked());
4949
emit needToRefresh();
5050

@@ -64,9 +64,15 @@ void QgsNorthArrowPluginGui::setRotation(int theInt)
6464
spinAngle->setValue(theInt);
6565
}
6666

67-
void QgsNorthArrowPluginGui::setPlacement(QString thePlacementQString)
67+
void QgsNorthArrowPluginGui::setPlacementLabels(QStringList& labels)
6868
{
69-
cboPlacement->setCurrentText(tr(thePlacementQString));
69+
cboPlacement->clear();
70+
cboPlacement->addItems(labels);
71+
}
72+
73+
void QgsNorthArrowPluginGui::setPlacement(int placementIndex)
74+
{
75+
cboPlacement->setCurrentIndex(placementIndex);
7076
}
7177

7278
void QgsNorthArrowPluginGui::setEnabled(bool theBool)
@@ -153,17 +159,18 @@ void QgsNorthArrowPluginGui::rotatePixmap(int theRotationInt)
153159
myQPainter.end();
154160
pixmapLabel->setPixmap(myPainterPixmap);
155161
}
156-
157162
}
158163

159164
// Called when the widget needs to be updated.
160165
//
161-
166+
/*
162167
void QgsNorthArrowPluginGui::paintEvent( QPaintEvent * thePaintEvent)
163168
{
169+
std::cerr<<__FILE__<<__LINE__<<'\n';
164170
rotatePixmap(sliderRotation->value());
171+
std::cerr<<__FILE__<<__LINE__<<'\n';
165172
}
166-
173+
*/
167174
//
168175
// Called when the widget has been resized.
169176
//

‎src/plugins/north_arrow/plugingui.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,22 @@ public slots:
3131

3232
private:
3333
void rotatePixmap(int theRotationInt);
34-
void paintEvent( QPaintEvent * );//overloads qwidget
34+
// void paintEvent( QPaintEvent * );//overloads qwidget
3535
void resizeEvent(QResizeEvent *); //overloads qwidget
3636
signals:
3737
//void drawRasterLayer(QString);
3838
//void drawVectorrLayer(QString,QString,QString);
3939
void rotationChanged(int);
40-
void changePlacement(QString);
40+
void changePlacement(int);
4141
// enable NorthArrow
4242
void enableNorthArrow(bool);
4343
void enableAutomatic(bool);
4444
void needToRefresh();
4545

4646
public slots:
4747
void setRotation(int);
48-
void setPlacement(QString thePlacementQString);
48+
void setPlacementLabels(QStringList&);
49+
void setPlacement(int);
4950
void setEnabled(bool);
5051
void setAutomatic(bool);
5152
void setAutomaticDisabled();

‎src/plugins/scale_bar/plugin.cpp

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ QgsScaleBarPlugin::QgsScaleBarPlugin(QgisApp * theQGisApp,
7777
qgisMainWindowPointer(theQGisApp),
7878
qGisInterface(theQgisInterFace)
7979
{
80+
mPlacementLabels << tr("Top Left") << tr("Bottom Left") << tr("Top Right") << tr("Bottom Right");
81+
mStyleLabels << tr("Tick Down") << tr("Tick Up") << tr("Bar") << tr("Box");
82+
8083
mPreferredSize = 30;
81-
mPlacement = "Top Left";
82-
mStyle = "Tick Down";
84+
mPlacementIndex = 0;
85+
mStyleIndex = 0;
8386
mEnabled = true;
8487
mSnapping = true;
8588
mColour = Qt::black;
@@ -125,8 +128,8 @@ void QgsScaleBarPlugin::projectRead()
125128

126129

127130
mPreferredSize = QgsProject::instance()->readNumEntry("ScaleBar","/PreferredSize",30);
128-
mStyle = QgsProject::instance()->readEntry("ScaleBar","/Style","Tick Down");
129-
mPlacement = QgsProject::instance()->readEntry("ScaleBar","/Placement","Top Left");
131+
mStyleIndex = QgsProject::instance()->readNumEntry("ScaleBar","/Style",0);
132+
mPlacementIndex = QgsProject::instance()->readNumEntry("ScaleBar","/Placement",0);
130133
mEnabled = QgsProject::instance()->readBoolEntry("ScaleBar","/Enabled",true);
131134
mSnapping = QgsProject::instance()->readBoolEntry("ScaleBar","/Snapping",true);
132135
int myRedInt = QgsProject::instance()->readNumEntry("ScaleBar","/ColorRedPart",0);
@@ -146,16 +149,18 @@ void QgsScaleBarPlugin::run()
146149
QgsScaleBarPluginGui *myPluginGui=new QgsScaleBarPluginGui(qgisMainWindowPointer, QgisGui::ModalDialogFlags);
147150
myPluginGui->setPreferredSize(mPreferredSize);
148151
myPluginGui->setSnapping(mSnapping);
149-
myPluginGui->setPlacement(mPlacement);
152+
myPluginGui->setPlacementLabels(mPlacementLabels);
153+
myPluginGui->setPlacement(mPlacementIndex);
150154
myPluginGui->setEnabled(mEnabled);
151-
myPluginGui->setStyle(mStyle);
155+
myPluginGui->setStyleLabels(mStyleLabels);
156+
myPluginGui->setStyle(mStyleIndex);
152157
myPluginGui->setColour(mColour);
153158

154159
connect(myPluginGui, SIGNAL(changePreferredSize(int)), this, SLOT(setPreferredSize(int)));
155160
connect(myPluginGui, SIGNAL(changeSnapping(bool)), this, SLOT(setSnapping(bool)));
156-
connect(myPluginGui, SIGNAL(changePlacement(QString)), this, SLOT(setPlacement(QString)));
161+
connect(myPluginGui, SIGNAL(changePlacement(int)), this, SLOT(setPlacement(int)));
157162
connect(myPluginGui, SIGNAL(changeEnabled(bool)), this, SLOT(setEnabled(bool)));
158-
connect(myPluginGui, SIGNAL(changeStyle(QString)), this, SLOT(setStyle(QString)));
163+
connect(myPluginGui, SIGNAL(changeStyle(int)), this, SLOT(setStyle(int)));
159164
connect(myPluginGui, SIGNAL(changeColour(QColor)), this, SLOT(setColour(QColor)));
160165
connect(myPluginGui, SIGNAL(refreshCanvas()), this, SLOT(refreshCanvas()));
161166
myPluginGui->show();
@@ -294,28 +299,25 @@ void QgsScaleBarPlugin::renderScaleBar(QPainter * theQPainter)
294299
//determine the origin of scale bar depending on placement selected
295300
int myOriginX=myMargin;
296301
int myOriginY=myMargin;
297-
if (mPlacement==tr("Top Left"))
302+
switch (mPlacementIndex)
298303
{
304+
case 0: // Top Left
299305
myOriginX=myMargin;
300306
myOriginY=myMargin;
301-
}
302-
else if (mPlacement==tr("Bottom Left"))
303-
{
307+
break;
308+
case 1: // Bottom Left
304309
myOriginX=myMargin;
305310
myOriginY=myCanvasHeight - myMargin;
306-
}
307-
else if (mPlacement==tr("Top Right"))
308-
{
311+
break;
312+
case 2: // Top Right
309313
myOriginX=myCanvasWidth - ((int) myTotalScaleBarWidth) - myMargin;
310314
myOriginY=myMargin;
311-
}
312-
else if (mPlacement==tr("Bottom Right"))
313-
{
315+
break;
316+
case 3: // Bottom Right
314317
myOriginX=myCanvasWidth - ((int) myTotalScaleBarWidth) - myMargin;
315318
myOriginY=myCanvasHeight - myMargin;
316-
}
317-
else
318-
{
319+
break;
320+
default:
319321
std::cout << "Unable to determine where to put scale bar so defaulting to top left" << std::endl;
320322
}
321323

@@ -327,7 +329,9 @@ void QgsScaleBarPlugin::renderScaleBar(QPainter * theQPainter)
327329
int myScaleBarWidthInt = (int) myScaleBarWidth;
328330

329331
//Create array of vertices for scale bar depending on style
330-
if (mStyle==tr("Tick Down"))
332+
switch (mStyleIndex)
333+
{
334+
case 0: // Tick Down
331335
{
332336
QPolygon myTickDownArray(4);
333337
//draw a buffer first so bar shows up on dark images
@@ -348,8 +352,9 @@ void QgsScaleBarPlugin::renderScaleBar(QPainter * theQPainter)
348352
(myScaleBarWidthInt + myOriginX), (myOriginY + myMajorTickSize)
349353
);
350354
theQPainter->drawPolyline(myTickDownArray);
355+
break;
351356
}
352-
else if (mStyle==tr("Tick Up"))
357+
case 1: // tick up
353358
{
354359
QPolygon myTickUpArray(4);
355360
//draw a buffer first so bar shows up on dark images
@@ -370,8 +375,9 @@ void QgsScaleBarPlugin::renderScaleBar(QPainter * theQPainter)
370375
(myScaleBarWidthInt + myOriginX), myOriginY
371376
);
372377
theQPainter->drawPolyline(myTickUpArray);
378+
break;
373379
}
374-
else if (mStyle==tr("Bar"))
380+
case 2: // Bar
375381
{
376382
QPolygon myBarArray(2);
377383
//draw a buffer first so bar shows up on dark images
@@ -388,8 +394,9 @@ void QgsScaleBarPlugin::renderScaleBar(QPainter * theQPainter)
388394
(myScaleBarWidthInt + myOriginX), (myOriginY + (myMajorTickSize/2))
389395
);
390396
theQPainter->drawPolyline(myBarArray);
397+
break;
391398
}
392-
else if (mStyle==tr("Box"))
399+
case 3: // box
393400
{
394401
// Want square corners for a box
395402
myBackgroundPen.setJoinStyle( Qt::MiterJoin );
@@ -427,6 +434,10 @@ void QgsScaleBarPlugin::renderScaleBar(QPainter * theQPainter)
427434
midPointX , myOriginY
428435
);
429436
theQPainter->drawPolygon(myBoxArray);
437+
break;
438+
}
439+
default:
440+
std::cerr << "Unknown style\n";
430441
}
431442

432443
//Do actual drawing of scale bar
@@ -529,10 +540,10 @@ void QgsScaleBarPlugin::unload()
529540
}
530541

531542
//! set placement of scale bar
532-
void QgsScaleBarPlugin::setPlacement(QString theQString)
543+
void QgsScaleBarPlugin::setPlacement(int placementIndex)
533544
{
534-
mPlacement = theQString;
535-
QgsProject::instance()->writeEntry("ScaleBar","/Placement",mPlacement);
545+
mPlacementIndex = placementIndex;
546+
QgsProject::instance()->writeEntry("ScaleBar","/Placement",mPlacementIndex);
536547
}
537548

538549
//! set preferred size of scale bar
@@ -556,10 +567,10 @@ void QgsScaleBarPlugin::setEnabled(bool theBool)
556567
QgsProject::instance()->writeEntry("ScaleBar","/Enabled",mEnabled);
557568
}
558569
//! set scale bar enable
559-
void QgsScaleBarPlugin::setStyle(QString theStyleQString)
570+
void QgsScaleBarPlugin::setStyle(int styleIndex)
560571
{
561-
mStyle = theStyleQString;
562-
QgsProject::instance()->writeEntry("ScaleBar","/Style",mStyle);
572+
mStyleIndex = styleIndex;
573+
QgsProject::instance()->writeEntry("ScaleBar","/Style",mStyleIndex);
563574
}
564575
//! set the scale bar colour
565576
void QgsScaleBarPlugin::setColour(QColor theQColor)

‎src/plugins/scale_bar/plugin.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ class QgsScaleBarPlugin:public QObject, public QgisPlugin
6060
void unload();
6161
//! show the help document
6262
void help();
63-
//! set scale bar placement
64-
void setPlacement(QString);
63+
//! set scale bar placement.
64+
void setPlacement(int);
6565
//! set preferred size of scale bar
6666
void setPreferredSize(int);
6767
//! set whether the scale bar length should snap to the closest A*10^B
6868
void setSnapping(bool);
6969
//! set whether scale bar is enabled
7070
void setEnabled(bool);
7171
//! set the scale bar style
72-
void setStyle(QString);
72+
void setStyle(int);
7373
//! set the scale bar colour
7474
void setColour(QColor);
7575

@@ -80,16 +80,18 @@ class QgsScaleBarPlugin:public QObject, public QgisPlugin
8080
int pluginType;
8181
//! Id of the plugin's menu. Used for unloading
8282
int menuId;
83-
//! Placement of the scale bar
84-
QString mPlacement;
83+
//! Placement of the scale bar. An index and the translated text
84+
int mPlacementIndex;
85+
QStringList mPlacementLabels;
8586
//! The size preferred size of the scale bar
8687
int mPreferredSize;
8788
//! Should we snap to integer times power of 10?
8889
bool mSnapping;
8990
//! Scale bar enabled?
9091
bool mEnabled;
91-
//! Style of scale bar
92-
QString mStyle;
92+
//! Style of scale bar. An index and the translated text
93+
int mStyleIndex;
94+
QStringList mStyleLabels;
9395
//! The scale bar colour
9496
QColor mColour;
9597

‎src/plugins/scale_bar/plugingui.cpp

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ QSpinBox * QgsScaleBarPluginGui::getSpinSize()
3636
void QgsScaleBarPluginGui::on_pbnOK_clicked()
3737
{
3838
hide();
39-
emit changePlacement(cboPlacement->currentText());
39+
emit changePlacement(cboPlacement->currentIndex());
4040
emit changePreferredSize(spnSize->value());
4141
emit changeSnapping(chkSnapping->isChecked());
4242
emit changeEnabled(chkEnable->isChecked());
43-
emit changeStyle(cboStyle->currentText());
43+
emit changeStyle(cboStyle->currentItem());
4444
emit changeColour(pbnChangeColour->palette().color(QPalette::Button));
4545
emit refreshCanvas();
4646
done(1);
@@ -58,9 +58,15 @@ void QgsScaleBarPluginGui::on_pbnCancel_clicked()
5858
close(1);
5959
}
6060

61-
void QgsScaleBarPluginGui::setPlacement(QString thePlacementQString)
61+
void QgsScaleBarPluginGui::setPlacementLabels(QStringList& labels)
6262
{
63-
cboPlacement->setCurrentText(tr(thePlacementQString));
63+
cboPlacement->clear();
64+
cboPlacement->addItems(labels);
65+
}
66+
67+
void QgsScaleBarPluginGui::setPlacement(int placementIndex)
68+
{
69+
cboPlacement->setCurrentIndex(placementIndex);
6470
}
6571

6672
void QgsScaleBarPluginGui::setPreferredSize(int thePreferredSize)
@@ -77,24 +83,15 @@ void QgsScaleBarPluginGui::setEnabled(bool theBool)
7783
chkEnable->setChecked(theBool);
7884
}
7985

80-
void QgsScaleBarPluginGui::setStyle(QString theStyleQString)
86+
void QgsScaleBarPluginGui::setStyleLabels(QStringList& labels)
87+
{
88+
cboStyle->clear();
89+
cboStyle->addItems(labels);
90+
}
91+
92+
void QgsScaleBarPluginGui::setStyle(int styleIndex)
8193
{
82-
if ((tr(theStyleQString))=="Tick Down")
83-
{
84-
cboStyle->setCurrentItem(0);
85-
}
86-
else if ((tr(theStyleQString))=="Tick Up")
87-
{
88-
cboStyle->setCurrentItem(1);
89-
}
90-
else if ((tr(theStyleQString))=="Box")
91-
{
92-
cboStyle->setCurrentItem(2);
93-
}
94-
else if ((tr(theStyleQString))=="Bar")
95-
{
96-
cboStyle->setCurrentItem(3);
97-
}
94+
cboStyle->setCurrentItem(styleIndex);
9895
}
9996

10097
void QgsScaleBarPluginGui::setColour(QColor theQColor)

‎src/plugins/scale_bar/plugingui.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ Q_OBJECT;
2525
QgsScaleBarPluginGui();
2626
QgsScaleBarPluginGui( QWidget* parent = 0, Qt::WFlags fl = 0 );
2727
~QgsScaleBarPluginGui();
28-
void setPlacement(QString);
28+
void setPlacementLabels(QStringList&);
29+
void setPlacement(int);
2930
void setPreferredSize(int);
3031
void setSnapping(bool);
3132
void setEnabled(bool);
32-
void setStyle(QString);
33+
void setStyleLabels(QStringList&);
34+
void setStyle(int);
3335
void setColour(QColor);
3436

3537

@@ -46,11 +48,11 @@ public slots:
4648
signals:
4749
void drawRasterLayer(QString);
4850
void drawVectorrLayer(QString,QString,QString);
49-
void changePlacement(QString);
51+
void changePlacement(int);
5052
void changePreferredSize(int);
5153
void changeSnapping(bool);
5254
void changeEnabled(bool);
53-
void changeStyle(QString);
55+
void changeStyle(int);
5456
void changeColour(QColor);
5557
void refreshCanvas();
5658
};

0 commit comments

Comments
 (0)
Please sign in to comment.