VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSceneGraphTreeLogic.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 #pragma once
9 
10 #include <vrvOsgQt/vrvOsgQt.h>
11 
13 
14 #include <osg/observer_ptr>
15 #include <osg/Node>
16 
17 #include <QtWidgets/QAction>
18 #include <osg/ShapeDrawable>
19 
20 
21 namespace osg
22 {
23  class Node;
24  class Drawable;
25 }
26 
27 class QTreeWidgetItem;
28 class QIcon;
29 class QMenu;
30 
31 namespace makVrv
32 {
33 
34  class DtDe;
35  class DtSceneGraphTreeWidgetInterface;
36 
37  //custom actions for context menu
39  {
40  Q_OBJECT
41  public:
42  DtDrawBoundsAction(QObject *parent, const osg::Node* node);
43  virtual ~DtDrawBoundsAction();
44  virtual void setNode(const osg::Node* node);
45  public slots:
46  void slot_triggered(bool);
47 
48  private:
49  osg::observer_ptr<const osg::Node> myNode;
50  osg::observer_ptr<osg::ShapeDrawable> myBoundingVolumeDrawable;
51 
52  };
53 
57  {
58  public:
62 
64  virtual ~DtSceneGraphTreeLogic();
65 
67  {
77  ModelSet3
78  };
79 
81  virtual void clearAndTraverse();
82 
83  virtual void clearAndTraverse(int domain);
84 
86  virtual bool iterateNode(QTreeWidgetItem* pParent, const osg::Node* pNode, bool bDrawIcon = true);
87 
88  virtual void buildContextMenu(QMenu* menu, QTreeWidgetItem * item);
89  protected:
90 
93 
94  private:
95 
97  QIcon getNodeIcon(const osg::Node* pNode);
98  QIcon getDrawableIcon(const osg::Drawable* drawable);
99 
100  protected:
101 
104 
105  typedef osg::observer_ptr<const osg::Node> NodeObsPtr;
106  typedef std::map<QTreeWidgetItem*, NodeObsPtr> WidgetToNodeMap;
109  };
110 
111 
112 
113 
114 }
115 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)