#define OCCVIEWER_VIEWWIDGET_H
#include "CurveCreator_Macro.hxx"
+#include <Basics_OCCTVersion.hxx>
#include <OCCViewer_ViewWindow.h>
#include <QtxAction.h>
class QToolBar;
class Handle(V3d_Viewer);
+class Handle(AIS_InteractiveContext);
#ifdef WIN32
#pragma warning ( disable:4251 )
Q_OBJECT
public:
- OCCViewer_ViewWidget(QWidget* parent);
+ typedef enum { FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, RotationId, TrihId,
+ FrontId, BackId, TopId, BottomId, LeftId, RightId, None } ButtonsType;
+
+ OCCViewer_ViewWidget(QWidget* parent, const bool isUseMultiAction = true);
~OCCViewer_ViewWidget();
+ OCCViewer_ViewPort3d* getViewPort();
+ Handle(AIS_InteractiveContext) getAISContext() { return myAISContext; }
+
bool eventFilter(QObject* watched, QEvent* e);
void reset();
void Display(const TopoDS_Shape shape, const bool theShaded,
const QColor& shapeColor);
-private slots:
+ enum Mode2dType { No2dMode, XYPlane, XZPlane, YZPlane};
+
+ void set2dMode( Mode2dType );
+ Mode2dType get2dMode() const { return my2dMode; }
+
+ QAction* action( const ButtonsType& theId );
+
+public slots:
void onActivated();
void onTrihChanged();
void onFrontView();
void onLeftView();
void onRightView();
+signals:
+ void mouseMoving( QMouseEvent* theEvent );
+ void mousePressed( QMouseEvent* theEvent );
+ void mouseReleased( QMouseEvent* theEvent );
+
private:
enum OperationType{ NOTHING, FITALLVIEW, WINDOWFIT, ZOOMVIEW, PANVIEW, PANGLOBAL,
ROTATE };
bool setTransformRequested (OperationType op);
void clearViewer(const bool theUpdate = true);
- typedef enum { FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, RotationId, TrihId,
- FrontId, BackId, TopId, BottomId, LeftId, RightId, None } ButtonsType;
typedef QMap<ButtonsType, QtxAction*> ActionsMap;
private:
OCCViewer_ViewWindow::RotationPointType myCurrPointType;
gp_Pnt mySelectedPoint;
bool myShowTrihedron;
+
+ Mode2dType my2dMode;
+ bool myUseMultiAction;
};
#endif