Salome HOME
Merge branch 'BR_LAND_COVER_MAP' of ssh://git.salome-platform.org/modules/hydro into...
[modules/hydro.git] / src / HYDRO_tests / TestViewer.h
index e825208bd147763461d40ebfa20e2a2db636a7c4..d5bd15d6aed14ff9f39c237f3f1792843dc4dcba 100644 (file)
@@ -7,6 +7,8 @@ class OCCViewer_ViewWindow;
 class TopoDS_Shape;
 class QString;
 class QColor;
+class Handle_AIS_InteractiveObject;
+class Handle_Aspect_ColorScale;
 
 class TestViewer
 {
@@ -15,11 +17,30 @@ public:
   static OCCViewer_Viewer* viewer();
   static OCCViewer_ViewWindow* viewWindow();
 
-  static void show( const TopoDS_Shape& theShape, const QColor& theColor, int theMode );
-  static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll = true );
-  static bool AssertEqual( const QString& theUseCaseName );
+  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() );                 \
+    }                                                      \
+  }                                                        \
+