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 static QString backgroundData( QStringList&, QIntList&, QIntList& );
23 XGUI_Viewer(XGUI_MainWindow* theParent, bool DisplayTrihedron = true);
26 QMdiSubWindow* createView(V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
28 XGUI_MainWindow* mainWindow() const { return myMainWindow; }
30 Handle(V3d_Viewer) v3dViewer() const { return myV3dViewer; }
32 Handle(AIS_InteractiveContext) AISContext() const { return myAISContext; }
34 Handle(AIS_Trihedron) trihedron() const { return myTrihedron; }
36 void toggleTrihedron();
37 bool isTrihedronVisible() const;
38 void setTrihedronShown( const bool on );
39 double trihedronSize() const;
40 void setTrihedronSize( const double sz, bool isRelative );
41 bool trihedronRelative() const { return myIsRelative; }
42 void updateTrihedron();
43 bool computeTrihedronSize( double& theNewSize, double& theSize );
47 static void setHotButton( XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
48 Qt::KeyboardModifiers theState, Qt::MouseButtons theButton );
49 static void getHotButton( XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
50 Qt::KeyboardModifiers& theState, Qt::MouseButtons& theButton );
52 typedef QMap<XGUI::HotOperation, Qt::KeyboardModifiers> StatesMap;
53 typedef QMap<XGUI::HotOperation, Qt::MouseButtons> ButtonsMap;
55 typedef QMap<XGUI::InteractionStyle, StatesMap> InteractionStyle2StatesMap;
56 typedef QMap<XGUI::InteractionStyle, ButtonsMap> InteractionStyle2ButtonsMap;
58 static InteractionStyle2StatesMap myStateMap;
59 static InteractionStyle2ButtonsMap myButtonMap;
66 XGUI_MainWindow* myMainWindow;
68 Handle(V3d_Viewer) myV3dViewer;
69 Handle(AIS_Trihedron) myTrihedron;
70 Handle(AIS_InteractiveContext) myAISContext;
72 XGUI::InteractionStyle myInteractionStyle;
74 bool myPreselectionEnabled;
75 bool mySelectionEnabled;
76 bool myMultiSelectionEnabled;
79 double myTrihedronSize;