QString REF_DATA_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO/HYDRO";
#endif
+int MAIN_W = 800, MAIN_H = 600;
int main( int argc, char* argv[] )
{
OCCViewer_ViewFrame* aWindow = TestViewer::viewWindow();
- int W = 800, H = 600;
- aWindow->setGeometry( 200, 200, W, H );
+ aWindow->setGeometry( 400, 100, MAIN_W, MAIN_H );
aWindow->show();
QTest::qWaitForWindowExposed( aWindow );
int dy = 34;
//std::cout << dx << "," << dy << std::endl;
- aWindow->resize( W, H+dy );
+ aWindow->resize( MAIN_W, MAIN_H+dy );
anApp.processEvents();
std::string testPath = (argc > 1) ? std::string(argv[1]) : "";
return res;
}
+extern int MAIN_W, MAIN_H;
+
void test_Overview::create()
{
TestViewer::eraseAll( true, true );
isCreated = true;
}
myOverview->setMainView( TestViewer::viewWindow() );
- TestViewer::viewWindow()->setGeometry( 400, 100, 800, 800 );
+ //TestViewer::viewWindow()->setGeometry( 400, 100, MAIN_W, MAIN_H );
TestViewer::viewWindow()->onTopView();
myOverview->setGeometry( 100, 100, 200, 200 );
}
CPPUNIT_ASSERT_OVERVIEW( "overview_selection" );
// 2. mouse wheel zoom
- QWheelEvent we( QPoint( 243, 416 ), 120*20, Qt::NoButton, Qt::NoModifier );
+ QWheelEvent we( QPoint( 243, 316 ), 120*20, Qt::NoButton, Qt::NoModifier );
qApp->sendEvent( vp, &we );
qApp->processEvents();
CPPUNIT_ASSERT_OVERVIEW( "overview_zoomed_1" );
// 3. zoom via mouse
const int d = 100;
- vp->zoom( 243, 416, 243+d, 416+d );
+ vp->zoom( 243, 316, 243+d, 316+d );
CPPUNIT_ASSERT_OVERVIEW( "overview_zoomed_2" );
// 4. panning via mouse
TestViewer::context()->Select( Standard_True );
qApp->processEvents();
- QWheelEvent we( QPoint( 243, 416 ), 120*20, Qt::NoButton, Qt::NoModifier );
+ QWheelEvent we( QPoint( 243, 316 ), 120*20, Qt::NoButton, Qt::NoModifier );
qApp->sendEvent( vp, &we );
qApp->processEvents();
CPPUNIT_ASSERT_OVERVIEW( "overview_zoomed_1" );