X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDRO_tests%2FTestViewer.h;h=d5bd15d6aed14ff9f39c237f3f1792843dc4dcba;hb=9c947f35615e69e9e54a8c4b074dd1f2be13689c;hp=f184b5da7d6ebf95eebd8dc1b3c8c56a34bcb2f6;hpb=6e821f3c2b6ef1e29bd597c90a70c2b47472775d;p=modules%2Fhydro.git diff --git a/src/HYDRO_tests/TestViewer.h b/src/HYDRO_tests/TestViewer.h index f184b5da..d5bd15d6 100644 --- a/src/HYDRO_tests/TestViewer.h +++ b/src/HYDRO_tests/TestViewer.h @@ -6,6 +6,9 @@ class OCCViewer_Viewer; class OCCViewer_ViewWindow; class TopoDS_Shape; class QString; +class QColor; +class Handle_AIS_InteractiveObject; +class Handle_Aspect_ColorScale; class TestViewer { @@ -14,10 +17,30 @@ public: static OCCViewer_Viewer* viewer(); static OCCViewer_ViewWindow* viewWindow(); - static void show( const TopoDS_Shape& theShape, bool isFitAll = true ); - static void dump( const TopoDS_Shape& theShape, const QString& theName ); + static void show( const Handle_AIS_InteractiveObject& theObject, + int theMode, int theSelelctionMode, bool isFitAll, const char* theKey ); + static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor ); + static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey ); + static bool AssertImages( QString& theMessage ); + static QColor GetColor(int i); + + static Handle_Aspect_ColorScale showColorScale( bool ); + + static void select( int theViewX, int theViewY ); private: static OCCViewer_ViewManager* myViewManager; static OCCViewer_ViewWindow* myViewWindow; + static QString myKey; }; + +#define CPPUNIT_ASSERT_IMAGES \ + { \ + QString aMessage; \ + if( !TestViewer::AssertImages( aMessage ) ) \ + { \ + std::string aMessageStl = aMessage.toStdString(); \ + CPPUNIT_FAIL( aMessageStl.c_str() ); \ + } \ + } \ +