mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-01 18:29:16 +01:00
Minor cleaning
This commit is contained in:
parent
c95eeb92bb
commit
74d96d0073
@ -40,6 +40,7 @@ namespace mapcontrol
|
|||||||
core->SetCurrentRegion(internals::Rectangle(0, 0, maprect.width(), maprect.height()));
|
core->SetCurrentRegion(internals::Rectangle(0, 0, maprect.width(), maprect.height()));
|
||||||
core->SetMapType(MapType::GoogleHybrid);
|
core->SetMapType(MapType::GoogleHybrid);
|
||||||
this->SetZoom(2);
|
this->SetZoom(2);
|
||||||
|
this->setFlag(ItemIsFocusable);
|
||||||
connect(core,SIGNAL(OnNeedInvalidation()),this,SLOT(Core_OnNeedInvalidation()));
|
connect(core,SIGNAL(OnNeedInvalidation()),this,SLOT(Core_OnNeedInvalidation()));
|
||||||
connect(core,SIGNAL(OnMapDrag()),this,SLOT(ChildPosRefresh()));
|
connect(core,SIGNAL(OnMapDrag()),this,SLOT(ChildPosRefresh()));
|
||||||
connect(core,SIGNAL(OnMapZoomChanged()),this,SLOT(ChildPosRefresh()));
|
connect(core,SIGNAL(OnMapZoomChanged()),this,SLOT(ChildPosRefresh()));
|
||||||
@ -238,7 +239,6 @@ namespace mapcontrol
|
|||||||
selectionStart = FromLocalToLatLng(event->pos().x(), event->pos().y());
|
selectionStart = FromLocalToLatLng(event->pos().x(), event->pos().y());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
void MapGraphicItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
void MapGraphicItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
@ -272,6 +272,16 @@ namespace mapcontrol
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void MapGraphicItem::keyPressEvent(QKeyEvent *event)
|
||||||
|
{
|
||||||
|
if(event->modifiers()&(Qt::ShiftModifier|Qt::ControlModifier))
|
||||||
|
this->setCursor(Qt::CrossCursor);
|
||||||
|
}
|
||||||
|
void MapGraphicItem::keyReleaseEvent(QKeyEvent *event)
|
||||||
|
{
|
||||||
|
if((event->modifiers()&(Qt::ShiftModifier|Qt::ControlModifier))==0)
|
||||||
|
this->setCursor(Qt::ArrowCursor);
|
||||||
|
}
|
||||||
bool MapGraphicItem::SetZoomToFitRect(internals::RectLatLng const& rect)
|
bool MapGraphicItem::SetZoomToFitRect(internals::RectLatLng const& rect)
|
||||||
{
|
{
|
||||||
int maxZoom = core->GetMaxZoomToFitRect(rect);
|
int maxZoom = core->GetMaxZoomToFitRect(rect);
|
||||||
|
@ -107,6 +107,8 @@ namespace mapcontrol
|
|||||||
void wheelEvent ( QGraphicsSceneWheelEvent * event );
|
void wheelEvent ( QGraphicsSceneWheelEvent * event );
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||||
bool IsMouseOverMarker()const{return isMouseOverMarker;}
|
bool IsMouseOverMarker()const{return isMouseOverMarker;}
|
||||||
|
void keyPressEvent ( QKeyEvent * event );
|
||||||
|
void keyReleaseEvent ( QKeyEvent * event );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns current map zoom
|
* @brief Returns current map zoom
|
||||||
|
Loading…
x
Reference in New Issue
Block a user