提交 8afbc5ff 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

1. Initial OK message "MAP_INITED" should be only emitted when all plugins is loades correctly.

2. DIsplay mouse action positions in grid view
上级 d627dfab
...@@ -78,8 +78,11 @@ osm_frame_widget::osm_frame_widget(QWidget *parent) : ...@@ -78,8 +78,11 @@ osm_frame_widget::osm_frame_widget(QWidget *parent) :
ui->tab_map->installEventFilter(this); ui->tab_map->installEventFilter(this);
//adjust layers, make exclusive layrs being de-activated. //adjust layers, make exclusive layrs being de-activated.
ui->widget_QTV_mainMap->adjust_layers(pOSMTile); ui->widget_QTV_mainMap->adjust_layers(pOSMTile);
EnumPlugins();
UpdateLayerTable();
//Dock is closable
ui->dockWidget_QTV_side->installEventFilter(this);
m_mutex_proteced.unlock();
//! 2. source=MAIN_MAP, destin = ALL, msg = MAP_INITED //! 2. source=MAIN_MAP, destin = ALL, msg = MAP_INITED
if ( this->isEnabled()) if ( this->isEnabled())
{ {
...@@ -91,11 +94,7 @@ osm_frame_widget::osm_frame_widget(QWidget *parent) : ...@@ -91,11 +94,7 @@ osm_frame_widget::osm_frame_widget(QWidget *parent) :
ui->widget_QTV_mainMap->post_event(map_evt); ui->widget_QTV_mainMap->post_event(map_evt);
} }
QTVOSM_DEBUG("The osm_frame_widget class constructed."); QTVOSM_DEBUG("The osm_frame_widget class constructed.");
EnumPlugins();
UpdateLayerTable();
//Dock is closable
ui->dockWidget_QTV_side->installEventFilter(this);
m_mutex_proteced.unlock();
} }
void osm_frame_widget::UpdateLayerTable() void osm_frame_widget::UpdateLayerTable()
{ {
......
...@@ -233,6 +233,17 @@ void qtvplugin_grid::cb_paintEvent( QPainter * pImage ) ...@@ -233,6 +233,17 @@ void qtvplugin_grid::cb_paintEvent( QPainter * pImage )
} }
//draw
{
double clat,clon;
char buftmp[256];
m_pVi->CV_DP2LLA(m_mousePos.x(),m_mousePos.y(),&clat,&clon);
sprintf (buftmp,"Mouse LAT=%14.9lf, LON=%14.9lf\n",clat,clon);
QString strMsg = buftmp;
pImage->drawText(0,16,strMsg);
}
int x1,y1,x2,y2; int x1,y1,x2,y2;
...@@ -264,6 +275,7 @@ void qtvplugin_grid::cb_paintEvent( QPainter * pImage ) ...@@ -264,6 +275,7 @@ void qtvplugin_grid::cb_paintEvent( QPainter * pImage )
QPointF pos = QLineF(x1,y1,x2,y2).pointAt(1*0.8 / sz+0.1); QPointF pos = QLineF(x1,y1,x2,y2).pointAt(1*0.8 / sz+0.1);
pImage->drawText(pos,str); pImage->drawText(pos,str);
} }
pImage->setPen(oldpen); pImage->setPen(oldpen);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册