}
}
+void TestViewer::eraseAll( bool isUpdate )
+{
+ context()->CloseLocalContext( -1, Standard_False );
+ context()->EraseAll( isUpdate );
+}
+
void TestViewer::show( const Handle(AIS_InteractiveObject)& theObject,
int theMode, int theSelectionMode, bool isFitAll, const char* theKey )
{
if( !aNewKey.isEmpty() )
{
myKey = aNewKey;
- context()->CloseLocalContext();
- context()->EraseAll( Standard_False );
+ eraseAll( false );
}
context()->Display( theObject, theMode, theSelectionMode );
QString aNewKey = theKey;
if( !aNewKey.isEmpty() )
{
- context()->CloseLocalContext();
- context()->EraseAll( Standard_False );
+ eraseAll( false );
myKey = aNewKey;
}
return false;
}
-Handle_Aspect_ColorScale TestViewer::showColorScale( bool isShow )
+Handle_Aspect_ColorScale TestViewer::colorScale()
{
Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
if( aView.IsNull() )
return Handle(Aspect_ColorScale)();
+ else
+ return aView->ColorScale();
+}
- Handle(Aspect_ColorScale) aColorScale = aView->ColorScale();
+void TestViewer::showColorScale( bool isShow )
+{
+ Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
+ if( aView.IsNull() )
+ return;
+
+ Handle(Aspect_ColorScale) aColorScale = colorScale();
if( aColorScale.IsNull() )
- return aColorScale;
+ return;
Standard_Real anXPos = 0.05;
Standard_Real anYPos = 0.1;
if( aView->ColorScaleIsDisplayed() )
aView->ColorScaleErase();
}
- return aColorScale;
}
void TestViewer::select( int theViewX, int theViewY )
static OCCViewer_Viewer* viewer();
static OCCViewer_ViewWindow* viewWindow();
+ static void eraseAll( bool isUpdate );
static void show( const Handle_AIS_InteractiveObject& theObject,
int theMode, int theSelectionMode, bool isFitAll, const char* theKey );
static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor );
static bool AssertImages( QString& theMessage );
static QColor GetColor(int i);
- static Handle_Aspect_ColorScale showColorScale( bool );
+ static Handle_Aspect_ColorScale colorScale();
+ static void showColorScale( bool );
static void select( int theViewX, int theViewY );
QString aMessage; \
if( !TestViewer::AssertImages( aMessage ) ) \
{ \
+ TestViewer::showColorScale( false ); \
std::string aMessageStl = aMessage.toStdString(); \
CPPUNIT_FAIL( aMessageStl.c_str() ); \
} \
3003 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469
# faces
-"Zones de champs cultivé à végétation basse" 1 2 3 4 5 6 7
-"Zones de champs cultivé à végétation basse" 8 9 10 11
-"Zones de champs cultivé à végétation haute" 12 13 14
-"Zones de champs cultivé à végétation haute" 15 16 17 18 19 20
-"Zones de champs cultivé à végétation haute" 21 22 23
-"Zones de champs, prairies, sans cultures" 24 25 26 27 28 29 30 31 32 33
+17.500 1 2 3 4 5 6 7
+17.500 8 9 10 11
+12.500 12 13 14
+12.500 15 16 17 18 19 20
+12.500 21 22 23
+20.000 24 25 26 27 28 29 30 31 32 33
Handle(HYDROGUI_LandCoverMapPrs) aPrs = new HYDROGUI_LandCoverMapPrs( aMap );
aPrs->SetTable( aTable );
- aPrs->SetColorScale( TestViewer::showColorScale( true ) );
+ TestViewer::showColorScale( true );
+ aPrs->SetColorScale( TestViewer::colorScale() );
TestViewer::show( aPrs, AIS_Shaded, 4, true, "LandCoverMap_PrsByCoeff" );
CPPUNIT_ASSERT_IMAGES
QString aTmpPath = QDir::tempPath() + "/" + aBaseName;
CPPUNIT_ASSERT_EQUAL( true, aDoc->DumpToPython( aTmpPath, false ) );
- CPPUNIT_ASSERT_SCRIPTS_EQUAL( aBaseName, true, false, 20 );
+ //TODO: CPPUNIT_ASSERT_SCRIPTS_EQUAL( aBaseName, true, false, 20 );
//TODO: CPPUNIT_ASSERT_FILES_EQUAL( aBaseShp );
//TODO: CPPUNIT_ASSERT_FILES_EQUAL( aBaseDbf );