Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. ...
  2. void ViewshedGeoElement::graphic3dMouseClicked()
  3. {
  4. qDebug()<<"m_graphic3d";
  5. }
  6.  
  7. bool ViewshedGeoElement::eventFilter(QObject *obj, QEvent *event)
  8. {
  9. qDebug()<<obj<<event;
  10. if (event->type() == QEvent::MouseButtonPress)
  11. {
  12. graphic3dMouseClicked();
  13. return true;
  14. }
  15. return false;
  16. }
  17. ...
  18.  
  19. Esri::ArcGISRuntime::Graphic* m_graphic3d = nullptr;
  20. m_model3d = new ModelSceneSymbol(QUrl(dataPath + PathModel), 1.0f, this);
  21. m_model3d->setAnchorPosition(SceneSymbolAnchorPosition::Bottom);
  22. m_model3d->setHeading(180.0f);
  23. m_graphic3d = new Graphic(dp.m_pos, m_model3d, this);
  24.  
  25. m_graphic3d->attributes()->insertAttribute(HEADING, dp.m_heading);
  26. m_graphic3d->attributes()->insertAttribute(PITCH, dp.m_pitch);
  27. m_graphic3d->attributes()->insertAttribute(ROLL, dp.m_roll);
  28.  
  29. m_sceneView->graphicsOverlays()->at(0)->graphics()->installEventFilter(m_graphic3d);
  30. ...
  31.  
  32. ...
  33. void ViewshedGeoElement::graphic3dMouseClicked()
  34. {
  35. qDebug()<<"m_graphic3d";
  36. }
  37. ...
  38. QObject::connect(m_graphic3d,SIGNAL(mousePressEvent()),this,SLOT(graphic3dMouseClicked()));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement