X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOCCViewer%2FOCCViewer_Utilities.h;h=125c0c4587970fc6ba0ac870fae741ec5d8c9dcc;hb=a6c6f1e04c7c1a22e856db2d6538bf5197f86c6c;hp=c745da015e7c95e24b40150bb2ab2a641cb6d932;hpb=aa60cd50671f8d244df922059c512bdf1e4d6419;p=modules%2Fgui.git diff --git a/src/OCCViewer/OCCViewer_Utilities.h b/src/OCCViewer/OCCViewer_Utilities.h index c745da015..125c0c458 100755 --- a/src/OCCViewer/OCCViewer_Utilities.h +++ b/src/OCCViewer/OCCViewer_Utilities.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2014-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -22,15 +22,39 @@ // internal includes #include "OCCViewer.h" +#include "OCCViewer_ViewWindow.h" // OCC includes -#include +#include 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