added earth-registration support
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "../mapview/model/MMFloorAccessPoint.h"
|
||||
#include "../mapview/model/MMFloorBeacon.h"
|
||||
#include "../mapview/model/MMFloorGroundTruthPoints.h"
|
||||
#include "../mapview/model/MMRegistration.h"
|
||||
|
||||
#include "../mapview/2D/tools/ToolMeasure.h"
|
||||
#include "../mapview/2D/tools/ToolSelector.h"
|
||||
@@ -133,6 +134,15 @@ ToolBoxWidget::ToolBoxWidget(MapView2D* view, QWidget *parent) : QWidget(parent)
|
||||
|
||||
|
||||
|
||||
|
||||
// EARTH REGISTRATION
|
||||
btnEarthReg = new QPushButton(UIHelper::getIcon("registration"), "");
|
||||
btnEarthReg->setMinimumSize(s,s);
|
||||
lay->addWidget(btnEarthReg, r++, 0, 1,1,Qt::AlignTop);
|
||||
connect(btnEarthReg, SIGNAL(clicked(bool)), this, SLOT(onNewEarthReg()));
|
||||
|
||||
|
||||
|
||||
// what to do when the main-tool is changed
|
||||
connect(&view->getTools(), SIGNAL(mainToolChanged()), this, SLOT(onMainToolChanged()));
|
||||
|
||||
@@ -187,6 +197,8 @@ void ToolBoxWidget::setSelectedLayer(MapLayer *ml) {
|
||||
|
||||
btnImage->setEnabled(ml && (ml->getLayerType() == MapLayerType::FLOOR_UNDERLAYS));
|
||||
|
||||
btnEarthReg->setEnabled(ml && (ml->getLayerType() == MapLayerType::REGISTRATION));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -340,6 +352,18 @@ void ToolBoxWidget::onNewGTP() {
|
||||
|
||||
}
|
||||
|
||||
void ToolBoxWidget::onNewEarthReg() {
|
||||
|
||||
const Point2 center = view->getScaler().getCenter();
|
||||
Floorplan::EarthPosMapPos* reg = new Floorplan::EarthPosMapPos(
|
||||
EarthPos(50, 10, 300), Point3(center.x, center.y, 0)
|
||||
);
|
||||
|
||||
MMRegistration* mmreg = (MMRegistration*) curLayer;
|
||||
mmreg->create(reg);
|
||||
|
||||
}
|
||||
|
||||
void ToolBoxWidget::onNewImage() {
|
||||
|
||||
const Point2 center = view->getScaler().getCenter();
|
||||
|
||||
Reference in New Issue
Block a user