Salome HOME
A revision of documentation changes in the new version. Very minor corrections.
[modules/gui.git] / src / OCCViewer / OCCViewer_Utilities.h
index c745da015e7c95e24b40150bb2ab2a641cb6d932..fee76863f4f44c140d755b243956e2ab7d521e4e 100755 (executable)
 
 // internal includes
 #include "OCCViewer.h"
+#include "OCCViewer_ViewWindow.h"
 
 // OCC includes
-#include <Image_PixMap_Handle.hxx>
+#include <Image_PixMap.hxx>
 
 class QImage;
+class OCCViewer_Viewer;
 
-OCCVIEWER_EXPORT
-extern
-Handle(Image_PixMap)
-imageToPixmap( const QImage& anImage );
-
+#ifdef WIN32
+#pragma warning ( disable:4251 )
 #endif
+
+class OCCVIEWER_EXPORT OCCViewer_Utilities
+{
+public:
+
+  /*!
+   * Convert Qt image to OCCT pixmap
+   * \param theImage Qt source image
+   * \return resulting OCCT pixmap
+   */
+  static Handle(Image_PixMap) imageToPixmap( const QImage& theImage );
+
+  /*!
+   * Set 2D mode for the viewer. Hide or show 3D actions.
+   * \param theViewer an OCC viewer
+   * \param theMode OCC view window mode
+   * \return the old 2d mode.
+   */
+  static OCCViewer_ViewWindow::Mode2dType
+              setViewer2DMode( OCCViewer_Viewer* theViewer,
+                               const OCCViewer_ViewWindow::Mode2dType& theMode );
+
+};
+
+#endif // OCCVIEWER_UTILITIES_H