updateCurve( clist.at( i ), false );
}
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
Removes all curves from the view
myPlot->clear();
myPlot->getCurves().clear();
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
Redraws viewframe contents
setXGrid( myXGridMajorEnabled, myXGridMaxMajor, myXGridMinorEnabled, myXGridMaxMinor, true );
setYGrid( myYGridMajorEnabled, myYGridMaxMajor, myYGridMinorEnabled, myYGridMaxMinor,
myY2GridMajorEnabled, myY2GridMaxMajor, myY2GridMinorEnabled, myY2GridMaxMinor, true );
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
// erase all curves from presentation
curveList aCurves = prs->getCurves();
eraseCurves( aCurves );
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
bool Plot2d_ViewFrame::eventFilter( QObject* watched, QEvent* e )
myPlot->updateYAxisIdentifiers();
if ( update )
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
if ( update )
myPlot->replot();
}
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
// fitAll();
if ( update )
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
if ( !curve )
return;
if ( hasPlotCurve( curve ) ) {
- QwtPlotCurve* aPCurve = getPlotCurve( curve );
+ QwtPlotCurve* aPCurve = getPlotCurve( curve );
if ( !curve->isAutoAssign() ) {
Qt::PenStyle ps = Plot2d::plot2qwtLine( curve->getLine() );
QwtSymbol::Style ms = Plot2d::plot2qwtMarker( curve->getMarker() );
aPCurve->setVisible( true );
if ( update )
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
}
myPlot->setAxisScale( QwtPlot::yRight, y2min, y2max );
}
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
myPlot->invTransform( QwtPlot::xBottom, rect.left() ),
myPlot->invTransform( QwtPlot::xBottom, rect.right() ) );
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
if ( mode == 0 || mode == 1 )
myPlot->setAxisScale( QwtPlot::xBottom, xMin, xMax );
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
}
/*!
myPlot->setAxisScale( QwtPlot::yRight, y2Map.s1(), y2Map.s1() + aScale*(y2Map.s2() - y2Map.s1()) );
}
myPlot->replot();
+ if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase();
myPnt = event->pos();
}
: QwtPlot( parent ),
myIsPolished( false )
{
+ // Create alternative scales
+ setAxisScaleDraw( QwtPlot::yLeft, new Plot2d_ScaleDraw() );
+ setAxisScaleDraw( QwtPlot::xBottom, new Plot2d_ScaleDraw() );
+ setAxisScaleDraw( QwtPlot::yRight, new Plot2d_ScaleDraw() );
+
myPlotZoomer = new Plot2d_QwtPlotZoomer( QwtPlot::xBottom, QwtPlot::yLeft, canvas() );
myPlotZoomer->setSelectionFlags( QwtPicker::DragSelection | QwtPicker::CornerToCorner );
myPlotZoomer->setTrackerMode( QwtPicker::AlwaysOff );
defaultPicker();
- // Create alternative scales
- setAxisScaleDraw( QwtPlot::yLeft, new Plot2d_ScaleDraw() );
- setAxisScaleDraw( QwtPlot::xBottom, new Plot2d_ScaleDraw() );
- setAxisScaleDraw( QwtPlot::yRight, new Plot2d_ScaleDraw() );
-
// auto scaling by default
setAxisAutoScale( QwtPlot::yLeft );
setAxisAutoScale( QwtPlot::yRight );
canvas()->setMouseTracking( true );
myPlotZoomer->setEnabled( true );
+ myPlotZoomer->setZoomBase();
}
/*!
current_plugins_manager=None
def initialize(module,name,basemenuname,menuname):
- if plugins.has_key(name):return
- plugins[name]=PluginsManager(module,name,basemenuname,menuname)
+ if not plugins.has_key(name):
+ if module:
+ plugins[name]={}
+ else:
+ plugins[name]=[]
+ if module:
+ studyId=sg.getActiveStudyId()
+ if plugins[name].has_key(studyId):return
+ plugins[name][studyId]=PluginsManager(module,name,basemenuname,menuname)
+ else:
+ plugins[name].append(PluginsManager(module,name,basemenuname,menuname))
class Context:
- def __init__(self,sg):
- self.sg=sg
+ def __init__(self,sgpyqt):
+ self.sg=sgpyqt
self.studyId=salome.sg.getActiveStudyId()
self.study= salome.myStudyManager.GetStudyByID(self.studyId)