Documentation


X3DTK::Qt::X3DTreeQt Class Reference

#include <X3DTreeQt.h>

Inheritance diagram for X3DTK::Qt::X3DTreeQt:

X3DTreeDesigner List of all members.

Detailed Description

This class handles the control of the X3D tree in the GUI.

Definition at line 24 of file X3DTreeQt.h.

Public Slots

void ExpandItemInSceneView (QListViewItem *item)
void CollapseItemInSceneView (QListViewItem *item)
 Collapse the children of the collapsed item.

void DoubleClickeItemInSceneView (QListViewItem *item)
void SelectItemInSceneView (QListViewItem *item)
void insertDeletePopupMenu (QListViewItem *item, const QPoint &point)
void insertNode ()
void insertTransform ()
void deleteNode ()
void addNode (X3DTK::X3D::X3DNode *node)

Public Member Functions

 X3DTreeQt (QWidget *parent=0, const char *name=0, WFlags fl=0)
 Constructor.

 ~X3DTreeQt ()
 Destructor.

void setSceneGraphRoot (X3DTK::X3D::Scene *scene)
 Set the root node of an X3D scene graph.

void setMainController (::MainController *mainController)
 Set the mainController.


Protected Member Functions

void pastNode ()
 Past a node.

void cutNode ()
 Cut a node.

void copyNode ()
 Copy a node.

void releaseBufferNode ()
 Delete bufferNode if there is no more parent links.

void updateGL ()
 Update the viewer, show it and compute the BBox.

void keyPressEvent (QKeyEvent *k)
 This event handler, for event e, can be reimplemented in a subclass to receive key press events for the widget.

QListViewItem * AddSceneNodeItemInListView (QListViewItem *parent, X3DTK::X3D::X3DNode *node)
 Add an item corresponding to the X3D node in the list view from the item parent.

void ExpandChildItemInSceneView (QListViewItem *item)
 Create all the child of an item.

void eraseItemX3DMap (QListViewItem *item)
 Erase the item and all its descendants in the itemX3DMap.


Private Types

typedef std::map< QListViewItem *,
X3DTK::X3D::X3DNode * > 
ItemX3DMap
 A map which links an item to its x3d node.


Private Member Functions

void displayWidget (X3D::X3DNode *node)
 Create or display the QWidget (i.e. QDialog) corresponding to a X3D::Node.


Private Attributes

::MainControllermainController
 Main controller.

QListViewItem * selectedItem
 The selected item.

X3DTK::X3D::X3DNode * bufferNode
 The cut node.

ItemX3DMap itemX3DMap
 The map which links an item to its x3d node.

QListViewItem * scene_item
 The item root.

QPopupMenu * insertDeletePopup
 The insert/delete popup menu to insert/delete x3d nodes.


Member Typedef Documentation

typedef std::map<QListViewItem *, X3DTK::X3D::X3DNode *> X3DTK::Qt::X3DTreeQt::ItemX3DMap [private]
 

A map which links an item to its x3d node.

Definition at line 100 of file X3DTreeQt.h.


Constructor & Destructor Documentation

X3DTK::Qt::X3DTreeQt::X3DTreeQt QWidget parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

Constructor.

Definition at line 15 of file X3DTreeQt.cpp.

References CollapseItemInSceneView(), deleteNode(), DoubleClickeItemInSceneView(), ExpandItemInSceneView(), insertDeletePopup, insertDeletePopupMenu(), insertNode(), insertTransform(), scene_item, and SelectItemInSceneView().

X3DTK::Qt::X3DTreeQt::~X3DTreeQt  ) 
 

Destructor.

Definition at line 44 of file X3DTreeQt.cpp.


Member Function Documentation

void X3DTK::Qt::X3DTreeQt::addNode X3DTK::X3D::X3DNode *  node  )  [slot]
 

Definition at line 323 of file X3DTreeQt.cpp.

References ExpandChildItemInSceneView(), ExpandItemInSceneView(), MainController::getMainScene(), itemX3DMap, scene_item, selectedItem, and updateGL().

QListViewItem * X3DTK::Qt::X3DTreeQt::AddSceneNodeItemInListView QListViewItem *  parent,
X3DTK::X3D::X3DNode *  node
[protected]
 

Add an item corresponding to the X3D node in the list view from the item parent.

Definition at line 96 of file X3DTreeQt.cpp.

References itemX3DMap.

Referenced by ExpandChildItemInSceneView().

void X3DTK::Qt::X3DTreeQt::CollapseItemInSceneView QListViewItem *  item  )  [slot]
 

Collapse the children of the collapsed item.

Definition at line 123 of file X3DTreeQt.cpp.

Referenced by X3DTreeQt().

void X3DTK::Qt::X3DTreeQt::copyNode  )  [protected]
 

Copy a node.

Definition at line 378 of file X3DTreeQt.cpp.

References bufferNode, itemX3DMap, releaseBufferNode(), and selectedItem.

Referenced by cutNode(), and keyPressEvent().

void X3DTK::Qt::X3DTreeQt::cutNode  )  [protected]
 

Cut a node.

Definition at line 344 of file X3DTreeQt.cpp.

References bufferNode, copyNode(), ExpandChildItemInSceneView(), ExpandItemInSceneView(), MainController::getMainScene(), itemX3DMap, scene_item, selectedItem, and updateGL().

Referenced by keyPressEvent().

void X3DTK::Qt::X3DTreeQt::deleteNode  )  [slot]
 

Definition at line 392 of file X3DTreeQt.cpp.

References bufferNode, ExpandChildItemInSceneView(), ExpandItemInSceneView(), MainController::getMainScene(), itemX3DMap, scene_item, selectedItem, and updateGL().

Referenced by X3DTreeQt().

void X3DTK::Qt::X3DTreeQt::displayWidget X3D::X3DNode *  node  )  [private]
 

Create or display the QWidget (i.e. QDialog) corresponding to a X3D::Node.

Definition at line 189 of file X3DTreeQt.cpp.

References MainController::createQWidgetController(), and MainController::getX3DQtMap().

Referenced by DoubleClickeItemInSceneView().

void X3DTK::Qt::X3DTreeQt::DoubleClickeItemInSceneView QListViewItem *  item  )  [slot]
 

Definition at line 176 of file X3DTreeQt.cpp.

References displayWidget(), and itemX3DMap.

Referenced by X3DTreeQt().

void X3DTK::Qt::X3DTreeQt::eraseItemX3DMap QListViewItem *  item  )  [protected]
 

Erase the item and all its descendants in the itemX3DMap.

Definition at line 488 of file X3DTreeQt.cpp.

References itemX3DMap.

Referenced by ExpandChildItemInSceneView(), and setSceneGraphRoot().

void X3DTK::Qt::X3DTreeQt::ExpandChildItemInSceneView QListViewItem *  item  )  [protected]
 

Create all the child of an item.

Definition at line 136 of file X3DTreeQt.cpp.

References AddSceneNodeItemInListView(), eraseItemX3DMap(), and itemX3DMap.

Referenced by addNode(), cutNode(), deleteNode(), ExpandItemInSceneView(), insertNode(), insertTransform(), pastNode(), and setSceneGraphRoot().

void X3DTK::Qt::X3DTreeQt::ExpandItemInSceneView QListViewItem *  item  )  [slot]
 

Definition at line 169 of file X3DTreeQt.cpp.

References ExpandChildItemInSceneView().

Referenced by addNode(), cutNode(), deleteNode(), insertNode(), insertTransform(), pastNode(), setSceneGraphRoot(), and X3DTreeQt().

void X3DTK::Qt::X3DTreeQt::insertDeletePopupMenu QListViewItem *  item,
const QPoint &  point
[slot]
 

Definition at line 228 of file X3DTreeQt.cpp.

References insertDeletePopup.

Referenced by X3DTreeQt().

void X3DTK::Qt::X3DTreeQt::insertNode  )  [slot]
 

Definition at line 237 of file X3DTreeQt.cpp.

References ExpandChildItemInSceneView(), ExpandItemInSceneView(), MainController::fileInsert(), itemX3DMap, scene_item, and selectedItem.

Referenced by X3DTreeQt().

void X3DTK::Qt::X3DTreeQt::insertTransform  )  [slot]
 

Definition at line 257 of file X3DTreeQt.cpp.

References ExpandChildItemInSceneView(), ExpandItemInSceneView(), MainController::getMainScene(), itemX3DMap, scene_item, and selectedItem.

Referenced by X3DTreeQt().

void X3DTK::Qt::X3DTreeQt::keyPressEvent QKeyEvent *  k  )  [protected]
 

This event handler, for event e, can be reimplemented in a subclass to receive key press events for the widget.

Definition at line 444 of file X3DTreeQt.cpp.

References copyNode(), cutNode(), and pastNode().

void X3DTK::Qt::X3DTreeQt::pastNode  )  [protected]
 

Past a node.

Definition at line 289 of file X3DTreeQt.cpp.

References bufferNode, ExpandChildItemInSceneView(), ExpandItemInSceneView(), MainController::getMainScene(), itemX3DMap, scene_item, selectedItem, and updateGL().

Referenced by keyPressEvent().

void X3DTK::Qt::X3DTreeQt::releaseBufferNode  )  [protected]
 

Delete bufferNode if there is no more parent links.

Definition at line 468 of file X3DTreeQt.cpp.

References bufferNode, MainController::getMainScene(), and itemX3DMap.

Referenced by copyNode().

void X3DTK::Qt::X3DTreeQt::SelectItemInSceneView QListViewItem *  item  )  [slot]
 

Definition at line 207 of file X3DTreeQt.cpp.

References MainController::getMainScene(), itemX3DMap, selectedItem, and updateGL().

Referenced by X3DTreeQt().

void X3DTK::Qt::X3DTreeQt::setMainController ::MainController mainController  ) 
 

Set the mainController.

Definition at line 88 of file X3DTreeQt.cpp.

References setSceneGraphRoot().

void X3DTK::Qt::X3DTreeQt::setSceneGraphRoot X3DTK::X3D::Scene *  scene  ) 
 

Set the root node of an X3D scene graph.

Definition at line 47 of file X3DTreeQt.cpp.

References bufferNode, eraseItemX3DMap(), ExpandChildItemInSceneView(), ExpandItemInSceneView(), itemX3DMap, and scene_item.

Referenced by setMainController().

void X3DTK::Qt::X3DTreeQt::updateGL  )  [protected]
 

Update the viewer, show it and compute the BBox.

Definition at line 461 of file X3DTreeQt.cpp.

References MainController::display().

Referenced by addNode(), cutNode(), deleteNode(), pastNode(), and SelectItemInSceneView().


Member Data Documentation

X3DTK::X3D::X3DNode* X3DTK::Qt::X3DTreeQt::bufferNode [private]
 

The cut node.

Definition at line 97 of file X3DTreeQt.h.

Referenced by copyNode(), cutNode(), deleteNode(), pastNode(), releaseBufferNode(), and setSceneGraphRoot().

QPopupMenu* X3DTK::Qt::X3DTreeQt::insertDeletePopup [private]
 

The insert/delete popup menu to insert/delete x3d nodes.

Definition at line 108 of file X3DTreeQt.h.

Referenced by insertDeletePopupMenu(), and X3DTreeQt().

ItemX3DMap X3DTK::Qt::X3DTreeQt::itemX3DMap [private]
 

The map which links an item to its x3d node.

Definition at line 102 of file X3DTreeQt.h.

Referenced by addNode(), AddSceneNodeItemInListView(), copyNode(), cutNode(), deleteNode(), DoubleClickeItemInSceneView(), eraseItemX3DMap(), ExpandChildItemInSceneView(), insertNode(), insertTransform(), pastNode(), releaseBufferNode(), SelectItemInSceneView(), and setSceneGraphRoot().

::MainController* X3DTK::Qt::X3DTreeQt::mainController [private]
 

Main controller.

Definition at line 88 of file X3DTreeQt.h.

QListViewItem* X3DTK::Qt::X3DTreeQt::scene_item [private]
 

The item root.

Definition at line 105 of file X3DTreeQt.h.

Referenced by addNode(), cutNode(), deleteNode(), insertNode(), insertTransform(), pastNode(), setSceneGraphRoot(), and X3DTreeQt().

QListViewItem* X3DTK::Qt::X3DTreeQt::selectedItem [private]
 

The selected item.

Definition at line 91 of file X3DTreeQt.h.

Referenced by addNode(), copyNode(), cutNode(), deleteNode(), insertNode(), insertTransform(), pastNode(), and SelectItemInSceneView().


The documentation for this class was generated from the following files:
Generated on Thu Dec 23 13:52:35 2004 by doxygen 1.3.6