From cb3a3102218c7a072a7ff7042941e51565a81a9b Mon Sep 17 00:00:00 2001 From: cbwu Date: Tue, 4 Jul 2023 17:18:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E4=B8=89=E7=BB=B4?= =?UTF-8?q?=E5=87=A0=E4=BD=95=E5=AF=B9=E8=B1=A1=E7=BC=96=E8=BE=91=E7=9A=84?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E5=85=89=E6=A0=87=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- geofeatureoperator.cpp | 7 +++++-- sceneview.cpp | 39 ++++++++++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/geofeatureoperator.cpp b/geofeatureoperator.cpp index 8e53e269..147584fe 100644 --- a/geofeatureoperator.cpp +++ b/geofeatureoperator.cpp @@ -445,13 +445,16 @@ void GeoFeatureOperator::drawLine3D(SceneView *pSceneView, UGString dataName) // pSceneControl->GetSceneEditWnd()->SetUserAction(UGSceneUserAction::suaEdit,UGEditType3D::ET3D_PolyLine); // pSceneControl->GetSceneEditWnd()->SetUserAction(UGSceneUserAction::suaCreatePolyline); + pSceneControl->GetSceneEditWnd()->m_SceneWindow.m_n3DCursorShape = UG3DCursorShape::ecDrawPolyLine; +// qDebug()<<"*******************Cursor0:"<GetSceneEditWnd()->Get3DCursorShape(); +// qDebug()<<"*******************Cursor1:"<GetSceneEditWnd()->m_SceneWindow.Get3DCursorShape(); +// qDebug()<<"*******************Cursor2:"<GetSceneEditWnd()->m_SceneWindow.m_n3DCursorShape; pSceneView->isEditStateFlag = true; //显示对话框 emit pSceneView->showSettingFlightPointDialg(); -// qDebug()<<"*******************Cursor:"<GetSceneEditWnd()->Get3DCursorShape(); -// qDebug()<<"*******************Cursor:"<GetSceneEditWnd()->m_SceneWindow.m_n3DCursorShape; + // dv = NULL; lineLayer3D = NULL; diff --git a/sceneview.cpp b/sceneview.cpp index fe3af609..be123fb1 100644 --- a/sceneview.cpp +++ b/sceneview.cpp @@ -3,7 +3,7 @@ void UGSTDCALL Action3DChangedCallBack(UGlong pWnd, UGSceneUserAction oldAction,UGSceneUserAction newAction) { - qDebug()<<"****************oldAction:"<GetSceneEditWnd()->m_SceneWindow.Get3DCursorShape()) + + switch(CursorShape) { case UG3DCursorShape::ecBusy: { @@ -248,7 +253,7 @@ void SceneView::ReviseCursor(int SceneUserAction) case UG3DCursorShape::ecDrawPolyGon: case UG3DCursorShape::ecDrawPolyLine: { - setCursor(QCursor(QPixmap(":/Resources/cross.png"), 9, 9)); + setCursor(QCursor(Qt::CrossCursor)); break; } case UG3DCursorShape::ecDrawText: @@ -256,10 +261,19 @@ void SceneView::ReviseCursor(int SceneUserAction) setCursor(QCursor(Qt::IBeamCursor)); break; } + case UG3DCursorShape::ecAddPoint: + setCursor(QCursor(Qt::CrossCursor)); + break; + case UG3DCursorShape::ecMovePoint: + setCursor(QCursor(Qt::SizeAllCursor)); + break; + case UG3DCursorShape::ecMoveZPoint: + setCursor(QCursor(Qt::SizeVerCursor)); + break; default: break; } - */ + } void SceneView::paintEvent(QPaintEvent* event) @@ -341,7 +355,10 @@ void SceneView::mouseMoveEvent(QMouseEvent* event) { m_pSceneControl->OnMouseMove(getMouseOrKeyFlag(event), event->x(), event->y()); } - ReviseCursor(m_pSceneControl->GetSceneEditWnd()->GetUserAction()); +// qDebug()<<"******************UserAction:"<GetSceneEditWnd()->GetUserAction(); +// if(m_pSceneControl->GetSceneEditWnd()->GetUserAction()==108) +// qDebug()<<"*******************Cursor0:"<GetSceneEditWnd()->Get3DCursorShape(); + ReviseCursor(m_pSceneControl->GetSceneEditWnd()->Get3DCursorShape()); } void SceneView::resizeEvent(QResizeEvent* event)