Salome HOME
Merge remote-tracking branch 'origin/pre/IMPS_2016' into BR_HYDRO_IMPS_2016
[modules/hydro.git] / src / HYDRO_tests / TestViewer.cxx
index a8599d348b432d1b0085d1e534d7d3a51984170d..64155ea69743222e7e0838adb6bdb85f728a3beb 100644 (file)
@@ -257,9 +257,16 @@ bool AreImagesEqual( const QImage& theImage1, const QImage& theImage2, double th
   return true;
 }
 
-bool TestViewer::AssertImages( QString& theMessage )
+bool TestViewer::AssertImages( QString& theMessage, const QImage* theImage, const char* theCase )
 {
-  QImage anActualImage = viewWindow()->dumpView();
+  QImage anActualImage;
+  if( theImage )
+    anActualImage = *theImage;
+  else
+    anActualImage = viewWindow()->dumpView();
+
+  if( theCase )
+    myKey = theCase;
 
   QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
   anExpectedRefFilePath += "/" + myKey + ".png";
@@ -339,6 +346,14 @@ void TestViewer::showColorScale( bool isShow )
   }
 }
 
+bool TestViewer::ColorScaleIsDisplayed()
+{
+  Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
+  if( aView.IsNull() )
+    return false;
+  return aView->ColorScaleIsDisplayed();
+}
+
 void TestViewer::select( int theViewX, int theViewY )
 {
   Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();