"................................",
"................................",
"................................"};
-
-
-QPixmap zoomPixmap(imageZoomCursor);
-QPixmap rotatePixmap(imageRotateCursor);
-QPixmap globalPanPixmap(imageCrossCursor);
-
-QCursor defCursor(Qt::ArrowCursor);
-QCursor handCursor(Qt::PointingHandCursor);
-QCursor panCursor(Qt::SizeAllCursor);
-QCursor zoomCursor(zoomPixmap);
-QCursor rotCursor(rotatePixmap);
-QCursor glPanCursor(globalPanPixmap);
-
//////////////////////////////////////////////////////////////////////
myCursor = cursor(); /* save old cursor */
if ( myOperation != ZOOMVIEW ) {
+ QPixmap zoomPixmap (imageZoomCursor);
+ QCursor zoomCursor (zoomPixmap);
setTransformRequested ( ZOOMVIEW );
setCursor( zoomCursor );
}
myCursor = cursor(); // save old cursor
if ( myOperation != PANVIEW ) {
+ QCursor panCursor (Qt::SizeAllCursor);
setTransformRequested ( PANVIEW );
setCursor( panCursor );
}
myCursor = cursor(); // save old cursor
if ( myOperation != ROTATE ) {
+ QPixmap rotatePixmap (imageRotateCursor);
+ QCursor rotCursor (rotatePixmap);
setTransformRequested ( ROTATE );
setCursor( rotCursor );
}
{
Handle(V3d_View) aView3d = myViewPort->getView();
if ( !aView3d.IsNull() ) {
+ QPixmap globalPanPixmap (imageCrossCursor);
+ QCursor glPanCursor (globalPanPixmap);
myCurScale = aView3d->Scale();
aView3d->FitAll(0.01, false);
myCursor = cursor(); // save old cursor
myCursor = cursor(); /* save old cursor */
if ( myOperation != WINDOWFIT ) {
+ QCursor handCursor (Qt::PointingHandCursor);
setTransformRequested ( WINDOWFIT );
setCursor ( handCursor );
myCursorIsHand = true;
if ( myDrawRect ) {
drawRect();
if ( !myCursorIsHand ) { // we are going to sketch a rectangle
+ QCursor handCursor (Qt::PointingHandCursor);
myCursorIsHand = true;
myCursor = cursor();
setCursor( handCursor );
"................................"};
-QPixmap zoomPixmap(imageZoomCursor);
-QPixmap globalPanPixmap(imageCrossCursor);
-
-QCursor panCursor(Qt::SizeAllCursor);
-QCursor zoomCursor(zoomPixmap);
-QCursor glPanCursor(globalPanPixmap);
-
//=================================================================================
// Plot2d_ViewFrame implementation
//=================================================================================
switch (btn)
{
case zoomBtn:
- myPlot->canvas()->setCursor( zoomCursor );
- return ZoomId;
+ {
+ QPixmap zoomPixmap (imageZoomCursor);
+ QCursor zoomCursor (zoomPixmap);
+ myPlot->canvas()->setCursor( zoomCursor );
+ return ZoomId;
+ }
case panBtn:
myPlot->canvas()->setCursor( QCursor( Qt::SizeAllCursor ) );
return PanId;
*/
void Plot2d_ViewFrame::onViewPan()
{
+ QCursor panCursor (Qt::SizeAllCursor);
myPlot->canvas()->setCursor( panCursor );
myOperation = PanId;
qApp->installEventFilter( this );
*/
void Plot2d_ViewFrame::onViewZoom()
{
+ QPixmap zoomPixmap (imageZoomCursor);
+ QCursor zoomCursor (zoomPixmap);
myPlot->canvas()->setCursor( zoomCursor );
myOperation = ZoomId;
qApp->installEventFilter( this );
*/
void Plot2d_ViewFrame::onViewGlobalPan()
{
+ QPixmap globalPanPixmap (imageCrossCursor);
+ QCursor glPanCursor (globalPanPixmap);
myPlot->canvas()->setCursor( glPanCursor );
myPlot->changeAxisOptions( QwtPlot::xBottom, QwtAutoScale::Logarithmic, false );
myPlot->changeAxisOptions( QwtPlot::yLeft, QwtAutoScale::Logarithmic, false );