*/
void Plot2d_ViewFrame::EraseAll()
{
- CurveDict::iterator it = myPlot->getCurves().begin();
+ CurveDict::Iterator it = myPlot->getCurves().begin();
for ( ; it != myPlot->getCurves().end(); it++ )
emit curveErased( it.value() );
{
clist.clear();
- CurveDict::iterator it = myPlot->getCurves().begin();
+ CurveDict::Iterator it = myPlot->getCurves().begin();
for ( ; it != myPlot->getCurves().end(); it++ )
clist.append( it.value() );
return clist.count();
QList< Plot2d_Curve* > aCurves;
- CurveDict::iterator it = myPlot->getCurves().begin();
+ CurveDict::Iterator it = myPlot->getCurves().begin();
int i = 0;
for ( i = 0; it != myPlot->getCurves().end(); it++, i++ )
{
void Plot2d_ViewFrame::setCurveType( int curveType, bool update )
{
myCurveType = curveType;
- CurveDict::iterator it = myPlot->getCurves().begin();
+ CurveDict::Iterator it = myPlot->getCurves().begin();
for ( ; it != myPlot->getCurves().end(); it++ ) {
QwtPlotCurve* crv = it.key();
if ( crv )
if ( myMarkerSize != size )
{
myMarkerSize = size;
- CurveDict::iterator it = myPlot->getCurves().begin();
+ CurveDict::Iterator it = myPlot->getCurves().begin();
for ( ; it != myPlot->getCurves().end(); it++ ) {
QwtPlotCurve* crv = it.key();
if ( crv )
*/
QwtPlotCurve* Plot2d_ViewFrame::getPlotCurve( Plot2d_Curve* curve )
{
- CurveDict::iterator it = myPlot->getCurves().begin();
+ CurveDict::Iterator it = myPlot->getCurves().begin();
for ( ; it != myPlot->getCurves().end(); it++ ) {
if ( it.value() == curve )
return it.key();
*/
bool Plot2d_ViewFrame::hasPlotCurve( Plot2d_Curve* curve )
{
- CurveDict::iterator it = myPlot->getCurves().begin();
+ CurveDict::Iterator it = myPlot->getCurves().begin();
for ( ; it != myPlot->getCurves().end(); it++ ) {
if ( it.value() == curve )
return true;
bool Plot2d_ViewFrame::isXLogEnabled() const
{
bool allPositive = true;
- CurveDict::const_iterator it = myPlot->getCurves().begin();
+ CurveDict::ConstIterator it = myPlot->getCurves().begin();
for ( ; allPositive && it != myPlot->getCurves().end(); it++ )
allPositive = ( it.value()->getMinX() > 0. );
return allPositive;
bool Plot2d_ViewFrame::isYLogEnabled() const
{
bool allPositive = true;
- CurveDict::const_iterator it = myPlot->getCurves().begin();
+ CurveDict::ConstIterator it = myPlot->getCurves().begin();
for ( ; allPositive && it != myPlot->getCurves().end(); it++ )
allPositive = ( it.value()->getMinY() > 0. );
return allPositive;
int aMarker = (int)( 9.0 * rand() / RAND_MAX) + 1; // 9 markers types ( not including empty )
int aLine = (int)( 5.0 * rand() / RAND_MAX) + 1; // 5 line types ( not including empty )
- typeMarker = ( QwtSymbol::Style )aMarker;
+
+ typeMarker = Plot2d::plot2qwtMarker( (Plot2d::MarkerType)aMarker );
color = QColor( aRed, aGreen, aBlue );
typeLine = ( Qt::PenStyle )aLine;
*/
Plot2d_Curve* Plot2d_Plot2d::getClosestCurve( QPoint p, double& distance, int& index )
{
- CurveDict::iterator it = getCurves().begin();
+ CurveDict::Iterator it = getCurves().begin();
QwtPlotCurve* aCurve;
for ( ; it != getCurves().end(); it++ ) {
aCurve = it.key();
bool Plot2d_Plot2d::setCurveNbMarkers( Plot2d_Curve* curve, const int nb )
{
Plot2d_PlotCurve* aPlotCurve =
- dynamic_cast<Plot2d_PlotCurve*>( myCurves.key( curve, 0 ) );
+ dynamic_cast<Plot2d_PlotCurve*>( myCurves.findKey( curve ) );
if ( aPlotCurve )
{
aPlotCurve->setNbMarkers( nb );
int Plot2d_Plot2d::curveNbMarkers( Plot2d_Curve* curve ) const
{
Plot2d_PlotCurve* aPlotCurve =
- dynamic_cast<Plot2d_PlotCurve*>( myCurves.key( curve, 0 ) );
+ dynamic_cast<Plot2d_PlotCurve*>( myCurves.findKey( curve ) );
return aPlotCurve ? aPlotCurve->nbMarkers() : 0;
}
if ( closeColors( color, aColor ) )
return true;
- CurveDict::iterator it = myCurves.begin();
+ CurveDict::Iterator it = myCurves.begin();
for ( ; it != myCurves.end(); it++ ) {
QwtPlotCurve* crv = it.key();
if ( crv ) {
#define BRACKETIZE(x) QString( "[ " ) + x + QString( " ]" )
void Plot2d_ViewFrame::updateTitles()
{
- CurveDict::iterator it = myPlot->getCurves().begin();
+ CurveDict::Iterator it = myPlot->getCurves().begin();
//QIntDictIterator<Plot2d_Curve> it( myCurves );
QStringList aXTitles;
QStringList aYTitles;