00001
00011
00012
00013 #ifndef IMEDGINEIMEDGINE_VIEWER_H
00014 #define IMEDGINEIMEDGINE_VIEWER_H
00015
00016 #include "../global/global_definitions.h"
00017
00018 #include <Inventor/Qt/SoQt.h>
00019 #include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
00020 #include <Inventor/Qt/widgets/SoQtPopupMenu.h>
00021 #include <Inventor/events/SoMouseButtonEvent.h>
00022 #include <Inventor/events/SoLocation2Event.h>
00023
00024 namespace imedgine
00025 {
00026
00037
00038
00039 class ImedgineViewer : public SoQtExaminerViewer
00040 {
00041 public:
00042
00043
00046
00047 ImedgineViewer(QWidget* parent, const char* name = NULL);
00048
00049
00052
00053 virtual ~ImedgineViewer();
00054
00055
00059
00060 virtual SbBool processSoEvent(const SoEvent * const ev);
00061
00062
00063 protected:
00064
00065
00070
00071 virtual void buildPopupMenu() {};
00072
00073
00078
00079 virtual void menuSelection(int menu_item_id) {};
00080
00081
00088
00089 static void menuSelectionCallback(int menu_item_id, void* userdata);
00090
00091
00096
00097 void openPopupMenu(const SbVec2s position);
00098 };
00099
00100 }
00101
00102 #endif
00103
00104
00105