5 #include "XGUI_Constants.h"
10 #include <V3d_Viewer.hxx>
11 #include <AIS_InteractiveContext.hxx>
12 #include <AIS_Trihedron.hxx>
14 class XGUI_MainWindow;
17 class XGUI_Viewer : public QObject
21 XGUI_Viewer(XGUI_MainWindow* theParent, bool DisplayTrihedron = true);
24 QMdiSubWindow* createView(V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
26 XGUI_MainWindow* mainWindow() const { return myMainWindow; }
28 Handle(V3d_Viewer) v3dViewer() const { return myV3dViewer; }
30 Handle(AIS_InteractiveContext) AISContext() const { return myAISContext; }
32 Handle(AIS_Trihedron) trihedron() const { return myTrihedron; }
34 void toggleTrihedron();
35 bool isTrihedronVisible() const;
36 void setTrihedronShown( const bool on );
37 double trihedronSize() const;
38 void setTrihedronSize( const double sz, bool isRelative );
39 bool trihedronRelative() const { return myIsRelative; }
40 void updateTrihedron();
41 bool computeTrihedronSize( double& theNewSize, double& theSize );
45 static void setHotButton( XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
46 Qt::KeyboardModifiers theState, Qt::MouseButtons theButton );
47 static void getHotButton( XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
48 Qt::KeyboardModifiers& theState, Qt::MouseButtons& theButton );
50 typedef QMap<XGUI::HotOperation, Qt::KeyboardModifiers> StatesMap;
51 typedef QMap<XGUI::HotOperation, Qt::MouseButtons> ButtonsMap;
53 typedef QMap<XGUI::InteractionStyle, StatesMap> InteractionStyle2StatesMap;
54 typedef QMap<XGUI::InteractionStyle, ButtonsMap> InteractionStyle2ButtonsMap;
56 static InteractionStyle2StatesMap myStateMap;
57 static InteractionStyle2ButtonsMap myButtonMap;
64 XGUI_MainWindow* myMainWindow;
66 Handle(V3d_Viewer) myV3dViewer;
67 Handle(AIS_Trihedron) myTrihedron;
68 Handle(AIS_InteractiveContext) myAISContext;
70 XGUI::InteractionStyle myInteractionStyle;
72 bool myPreselectionEnabled;
73 bool mySelectionEnabled;
74 bool myMultiSelectionEnabled;
77 double myTrihedronSize;