imedgine_viewer.cpp

Go to the documentation of this file.
00001 //--------------------------------------------------
00012 //---------------------------------------------------
00013 
00014 #include "imedgine_viewer.h"
00015 
00016 namespace imedgine 
00017 {
00018   ImedgineViewer::ImedgineViewer(QWidget* parent, const char* name /*=NULL*/)
00019   : SoQtExaminerViewer(parent, name, TRUE, BUILD_ALL, BROWSER, FALSE)
00020   {
00021     
00022     setTransparencyType(SoGLRenderAction::SORTED_OBJECT_ADD); 
00023   }
00024   
00025   //--------------------------------------------------   
00026   
00027   ImedgineViewer::~ImedgineViewer()
00028   {
00029   }
00030   
00031   //--------------------------------------------------   
00032   
00033   SbBool ImedgineViewer::processSoEvent(const SoEvent * const ev)
00034   {
00035     return(SoQtExaminerViewer::processSoEvent(ev));
00036   }   
00037   
00038   //--------------------------------------------------   
00039   
00040   void ImedgineViewer::openPopupMenu(const SbVec2s position)
00041   {
00042     if (! this->isPopupMenuEnabled()) 
00043     {  
00044       return;
00045     }
00046 
00047     int x = 2 + position[0];
00048     int y = 2 + this->getGLSize()[1] - position[1] - 1;
00049     this->prefmenu->popUp(this->getGLWidget(), x, y);    
00050 
00051   }  
00052   
00053   //--------------------------------------------------   
00054   
00055   void ImedgineViewer::menuSelectionCallback(int menu_item_id, void* userdata)
00056   {
00057     ImedgineViewer* viewer = static_cast<ImedgineViewer *>(userdata);
00058     viewer->menuSelection(menu_item_id);  
00059   } 
00060 }

Generated on Sun Aug 13 18:19:41 2006 for iMEDgine by  doxygen 1.4.6