Commit d82e0ee9 authored by Mike Kremer's avatar Mike Kremer

Added type iterator to global members and adapted view control plugin to...

Added type iterator to global members and adapted view control plugin to automatically fetch data types via this accessor rather than hardcoded.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12096 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e82ac2ad
......@@ -84,33 +84,11 @@ void ViewControlPlugin::pluginsInitialized() {
QIcon icon = QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"drawModes.png");
viewControlMenu_->setIcon(icon);
// Add it as context menu for trianlge and poly meshes
emit addContextMenuItem(viewControlMenu_->menuAction() , DATA_TRIANGLE_MESH , CONTEXTOBJECTMENU );
emit addContextMenuItem(viewControlMenu_->menuAction() , DATA_POLY_MESH , CONTEXTOBJECTMENU );
if ( typeExists("PolyVolMesh") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("PolyVolMesh") , CONTEXTOBJECTMENU );
if ( typeExists("TetMeshCGAL") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("TetMeshCGAL") , CONTEXTOBJECTMENU );
if ( typeExists("Volume") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("Volume") , CONTEXTOBJECTMENU );
if ( typeExists("BSplineSurface") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("BSplineSurface"), CONTEXTOBJECTMENU );
if ( typeExists("BSplineCurve") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("BSplineCurve") , CONTEXTOBJECTMENU );
if ( typeExists("TSplineMesh") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("TSplineMesh") , CONTEXTOBJECTMENU );
if ( typeExists("Skeleton") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("Skeleton") , CONTEXTOBJECTMENU );
if ( typeExists("PolyLine") )
emit addContextMenuItem(viewControlMenu_->menuAction() , typeId("PolyLine") , CONTEXTOBJECTMENU );
// Add it as context menu for all registered data types
for(std::vector<TypeInfo>::const_iterator it = typesBegin(); it != typesEnd(); ++it) {
if(it->name == "Unknown" || it->name == "Group" || it->name == "All") continue;
emit addContextMenuItem(viewControlMenu_->menuAction(), it->type, CONTEXTOBJECTMENU );
}
connect( viewControlMenu_, SIGNAL( triggered(QAction*) ), this, SLOT( contextMenuTriggered(QAction*) ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment