4 #include "XGUI_Constants.h"
9 #include <V3d_Viewer.hxx>
10 #include <AIS_InteractiveContext.hxx>
11 #include <AIS_Trihedron.hxx>
13 class XGUI_MainWindow;
16 class XGUI_Viewer: public QObject
20 static QString backgroundData(QStringList&, QIntList&, QIntList&);
22 XGUI_Viewer(XGUI_MainWindow* theParent, bool DisplayTrihedron = true);
25 QMdiSubWindow* createView(V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
27 XGUI_MainWindow* mainWindow() const
32 Handle(V3d_Viewer) v3dViewer() const
37 Handle(AIS_InteractiveContext) AISContext() const
42 Handle(AIS_Trihedron) trihedron() const
47 void toggleTrihedron();
48 bool isTrihedronVisible() const;
49 void setTrihedronShown(const bool on);
50 double trihedronSize() const;
51 void setTrihedronSize(const double sz, bool isRelative);
52 bool trihedronRelative() const
56 void updateTrihedron();
57 bool computeTrihedronSize(double& theNewSize, double& theSize);
59 static void setHotButton(XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
60 Qt::KeyboardModifiers theState, Qt::MouseButtons theButton);
61 static void getHotButton(XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
62 Qt::KeyboardModifiers& theState, Qt::MouseButtons& theButton);
64 typedef QMap<XGUI::HotOperation, Qt::KeyboardModifiers> StatesMap;
65 typedef QMap<XGUI::HotOperation, Qt::MouseButtons> ButtonsMap;
67 typedef QMap<XGUI::InteractionStyle, StatesMap> InteractionStyle2StatesMap;
68 typedef QMap<XGUI::InteractionStyle, ButtonsMap> InteractionStyle2ButtonsMap;
70 static InteractionStyle2StatesMap myStateMap;
71 static InteractionStyle2ButtonsMap myButtonMap;
78 XGUI_MainWindow* myMainWindow;
80 Handle(V3d_Viewer) myV3dViewer;Handle(AIS_Trihedron) myTrihedron;Handle(AIS_InteractiveContext) myAISContext;
82 XGUI::InteractionStyle myInteractionStyle;
84 bool myPreselectionEnabled;
85 bool mySelectionEnabled;
86 bool myMultiSelectionEnabled;
89 double myTrihedronSize;