demo/viewer - fix currentIndexChanged
signal signature
This commit is contained in:
parent
a3f65197dd
commit
779c04af06
3 changed files with 8 additions and 8 deletions
|
@ -107,9 +107,9 @@ MainWindow::MainWindow()
|
|||
connect(slider_, SIGNAL(valueChanged(int)), mapWidget_, SLOT(zoomToLevel(int)));
|
||||
// renderer selector
|
||||
connect(renderer_selector_,
|
||||
SIGNAL(currentIndexChanged(QString const&)),
|
||||
SIGNAL(currentIndexChanged(int)),
|
||||
mapWidget_,
|
||||
SLOT(updateRenderer(QString const&)));
|
||||
SLOT(updateRenderer(int)));
|
||||
|
||||
// scale factor
|
||||
connect(scale_factor_, SIGNAL(valueChanged(double)), mapWidget_, SLOT(updateScaleFactor(double)));
|
||||
|
|
|
@ -545,15 +545,15 @@ void render_cairo(mapnik::Map const& map, double scaling_factor, QPixmap& pix)
|
|||
#endif
|
||||
}
|
||||
|
||||
void MapWidget::updateRenderer(QString const& txt)
|
||||
void MapWidget::updateRenderer(int index)
|
||||
{
|
||||
if (txt == "AGG")
|
||||
std::cerr << "updateRenderer:" << index << std::endl;
|
||||
if (index == 0)
|
||||
cur_renderer_ = AGG;
|
||||
else if (txt == "Cairo")
|
||||
else if (index == 1)
|
||||
cur_renderer_ = Cairo;
|
||||
else if (txt == "Grid")
|
||||
else if (index == 2)
|
||||
cur_renderer_ = Grid;
|
||||
std::cerr << "Update renderer called" << std::endl;
|
||||
updateMap();
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class MapWidget : public QWidget
|
|||
void zoomToLevel(int level);
|
||||
void updateMap();
|
||||
void layerSelected(int);
|
||||
void updateRenderer(QString const& txt);
|
||||
void updateRenderer(int);
|
||||
void updateScaleFactor(double scale_factor);
|
||||
signals:
|
||||
void mapViewChanged();
|
||||
|
|
Loading…
Reference in a new issue