X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Viewer.h;h=d85a160cf9edbf96c33e98cdce185eb2e4aec4be;hb=a398103d11950df8cb50eeea49942237eb16edcf;hp=4031430a3dc36b11c830143f06bcb918f4a7ccc6;hpb=ff4aad301cd1f42683573988f65334f0db074655;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Viewer.h b/src/XGUI/XGUI_Viewer.h index 4031430a3..d85a160cf 100644 --- a/src/XGUI/XGUI_Viewer.h +++ b/src/XGUI/XGUI_Viewer.h @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include #include @@ -14,7 +16,6 @@ #include #include -#include class XGUI_MainWindow; class QMdiSubWindow; @@ -123,6 +124,10 @@ public: //! Compute trihedron size dependent on 3d scene size bool computeTrihedronSize(double& theNewSize, double& theSize); + //! Add action to the viewer + void addAction(QAction* theAction) { myActions.append(theAction); } + + static void setHotButton(XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper, Qt::KeyboardModifiers theState, Qt::MouseButtons theButton); static void getHotButton(XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper, @@ -160,6 +165,7 @@ private slots: void onMouseMove(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent); void onMouseReleased(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent); void onMousePressed(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent); + void onContextMenuRequested(QContextMenuEvent* theEvent); private: void addView(QMdiSubWindow* theView); @@ -191,6 +197,12 @@ private: /// Points used for selection management QPoint myStartPnt, myEndPnt, myCurPnt; + + /// A counter of created windows + int myWndIdCount; + + /// List of Viewer actions + QList myActions; }; #endif