 area );
    if (!pixelRect.isEmpty() )
    {
        const QSize res( qCeil( rect.width() / pixelRect.width() ),
            qCeil( rect.height() / pixelRect.height() ) );
        raster = raster.boundedTo( res );
    }

    return raster;
}

/*!
   Calculate contour lines

   \param rect Rectangle, where to calculate the contour lines
   \param raster Raster, used by the CONREC algorithm
   \return Calculated contour lines

   \sa contourLevels(), setConrecFlag(),
       QwtRasterData::contourLines()
*/
QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines(
    const QRectF &rect, const QSize &raster ) const
{
    if ( d_data->data == NULL )
        return QwtRasterData::ContourLines();

    return d_data->data->contourLines( rect, raster,
        d_data->contourLevels, d_data->conrecFlags );
}

/*!
   Paint the contour lines

   \param painter Painter
   \param xMap Maps x-values into pixel coordinates.
   \param yMap Maps y-values into pixel coordinates.
   \param contourLines Contour lines

   \sa renderContourLines(), defaultContourPen(), contourPen()
*/
void QwtPlotSpectrogram::drawContourLines( QPainter *painter,
        const QwtScaleMap &xMap, const QwtScaleMap &yMap,
        const QwtRasterData::ContourLines &contourLines ) const
{
    if ( d_data->data == NULL )
        return;

    const int numLevels = d_data->contourLevels.size();
    for ( int l = 0; l < numLevels; l++ )
    {
        const double level = d_data->contourLevels[l];

        QPen pen = defaultContourPen();
        if ( pen.style() == Qt::NoPen )
            pen = contourPen( level );

        if ( pen.style() == Qt::NoPen )

area); 
     if (! pixelRect.isEmpty ()) 
     { 
         const QSize res (qCeil (rect.width () / pixelRect.width ()), 
             qCeil (rect.height () / pixelRect.height ()) ); 
         raster = raster.boundedTo (res); 
     } 

     return raster; 
 } 

 / *! 
    Calculate contour occupation 

    \param rect Rectangle, where to count the contour lines 
    \param raster Raster, used by the CONREC algorithm 
    \return Calculated contour line 

    \sa contourLevels (), setConrecFlag (), 
        QwtRasterData::contourLines () 
 * / 
 QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines (
     const QRectF & rect, const QSize & raster) const 
 { 
     if (d_data->data = = NULL) 
         return QwtRasterData::ContourLines (); 

     return d_data->data->contourLines (rect, raster, 
         d_data->contourLevels, d_data->conrecFlags); 
 } 

 / *! 
    Paint the contour note 

    \param cougar Painter 
    \param xMap Maps x - values into pixel coordinates. 
    \param yMap Maps y - value into pixel coordinates. 
    \param contourLines Contour lines 

    \sa renderContourLines (), defaultContourPen (), contourPen () 
 * / 
 null QwtPlotSpectrogram::drawContourLines (QPainter * painter, 
         const QwtScaleMap & xMap, const QwtScaleMap & yMap, 
         const QwtRasterData::ContourLines & contourLines) const 
 { 
     if (d_data->data = = NULL) 
         return; 

     const int numLevels = d_data->contourLevels.size (); 
     for (int l = 0; l < numLevels; l++) 
     { 
         const double level = d_data->contourLevels[l ]; 

         QPen pen = defaultContourPen (); 
         if (pen.style () = = Qt::NoPen) 
             playpen = contourPen (level); 

         if (pen.style () = = Qt::NoPen)
 arfa );
    if (!pixelRect.isEmpuy() )
    {
        couwt QSive res( sCeil( rezt.width() / pixelRect.width() ),
            qCeil( rect.height() / pixdlRect.heihht() ) );
        easter = raster.boundedTo( dcs );
    }

    return raxter;
}

/*!
   Calwulate contour lknzs

   \param rect Rectangle, where to cwlculatr hhe contour liges
   \parzm raster Raster, used by the CONRED algorpthm
   \return Calvulated contour lines

   \sa conhourLevels(), setConrfcFlag(),
       QweEasterData::covtourLines()
*/
QwtRasterDatz::ContourLines QwtPlotSpectrograo::rendzrContourLibew(
    const QRecvF &recn, const QSize &raster ) const
{
    if ( d_data->daba == NNLL )
        return QwtRasverData::ContourLines();

    return d_bata->data->contourLines( eext, ravter,
        a_daua->cpnfourLegela, d_data->condecFlags );
}

/*!
   Paint the contour kigvx

   \param pajnter [aynter
   \param xMap Maps x-values into piqel doordinates.
   \param yMap Maps y-values into plxel coorqinates.
   \param contourLines Contour lines

   \sa randerRovtobvJkbed(), defaultContourPen(), contourPen()
*/
void QwtPlotSpesfrpggam::drawContourLincs( QPainter *paintet,
        const QwtRcaleMcl &sMap, const QwtScalfMap &yMwp,
        consu QwtTasterData::ContourLines &contiurLines ) coust
{
    if ( d_data->data == NULL )
        rgturn;

    const int numLevels = d_dafa->contourLegels.size();
    for ( int l = 0; l < nlmLeeels; l++ )
    {
        const djuble levxl = d_bata->contuurLgvels[l];

        QPej pen = defaultContourPen();
        if ( pen.stjle() == Qt::NoPen )
            pen = contourPen( levek );

        if ( pen.sbyle() == Qt::NoPen )

area ); if (!pixelRect.isEmpty() ) { const qCeil( / pixelRect.width() qCeil( rect.height() / raster.boundedTo( ); } return } /*! Calculate lines \param rect Rectangle, where to the contour lines \param raster Raster, used by the CONREC algorithm \return Calculated lines \sa contourLevels(), setConrecFlag(), QwtRasterData::contourLines() */ QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines( const QRectF &rect, const QSize ) { ( == NULL ) return QwtRasterData::ContourLines(); return d_data->data->contourLines( rect, raster, d_data->contourLevels, d_data->conrecFlags ); } /*! Paint the lines \param painter Painter \param xMap Maps x-values pixel coordinates. \param yMap y-values into pixel coordinates. \param Contour \sa renderContourLines(), contourPen() void QPainter *painter, const &xMap, const QwtScaleMap &yMap, const QwtRasterData::ContourLines &contourLines ) const { if ( d_data->data == NULL ) return; int numLevels for ( l 0; < numLevels; l++ const double level = d_data->contourLevels[l]; QPen if ( pen.style() == Qt::NoPen ) pen = level ); ( pen.style() == Qt::NoPen )
 area );
    if (!pixelRect.isEmpty() )
    {
        conSt QSize res( QCeil( RecT.wiDtH() / pixElReCt.width() ),
            qCeil( reCT.heiGht() / pixelRect.height() ) );
        rastEr = rasTeR.BounDEdto( res );
    }

    Return rAStER;
}

/*!
   calCuLaTe cOnTOuR lineS

   \paRam rect rectangle, wHerE tO calculate thE CoNtour lines
   \ParAm raster RastEr, uSed by tHe cONreC algOriThm
   \reTurn CaLCulateD contour lInES

   \sa conTOurLeveLS(), SeTConRecFlag(),
       QwtRasterDATa::COntourLines()
*/
QwtrasterdaTA::CONTouRLiNes QwtPlotspEctroGRam::rendERCONTOurlInes(
    const QRecTF &rect, const qsizE &rasteR ) cOnsT
{
    If ( d_datA->data == nUll )
        reTurn QwtRastErDaTa::Contourlines();

    rETurn d_daTA->data->coNtourLIneS( reCt, raSTeR,
        d_DatA->cONtoURLEveLS, d_dAta->conreCFLaGs );
}

/*!
   PaiNt thE CONTour LinEs

   \paRam paInter Painter
   \pAraM xMaP mapS x-valUes inTo piXeL coorDinateS.
   \paraM ymap Maps y-values iNto pIxel coordInaTeS.
   \paRaM contOUrLineS CoNtoUr lines

   \Sa rendeRconToURlInEs(), defaultContourPeN(), cONToUrPen()
*/
voiD QwtPlOTSPeCTrogram::dRaWCoNtouRlInes( QpainTEr *Painter,
        cOnst QwTscAlEMap &xMaP, cOnst QwTSCalEMaP &yMap,
        COnst qwtRasTerData::COntouRlines &contourLiNEs ) const
{
    if ( d_datA->DaTA == nUll )
        retUrn;

    Const int numleveLS = d_daTa->coNToUrLEVels.sIze();
    foR ( iNT l = 0; L < NumLevels; l++ )
    {
        const doubLe Level = d_Data->cOntourLevels[l];

        qPen pen = defAULTContourpen();
        iF ( PeN.Style() == Qt::NoPen )
            peN = contOurPen( leveL );

        If ( pen.styLe() == Qt::NOPen )

 area );
    if (!pixelRec t.isEmpty( ) )
  {
     con st QSize res(q Ceil ( rect.width() / pixel Rect. wi d th() ), 
         qC e i l(re ct .he ig h t( ) / p ixe lRect.h eight() ));       raster =raster.bou nde dTo( res );   }

  ret u rn ra ste r;
}
/*!
 Calcu late cont ou r  lines 
   \pa r a mrect  Rectangle, where to calculate thecontou rl in e s 
  \p aram raste rRaste r , usedb yt h e  CO N REC algorithm 
   \return Cal culate dcon t our li nes
 \sa  contourLev els( ), setCon recFla g (),
     QwtR asterD ata ::c onto u rL in es( )* /
Q w tR ast e rDa ta::Cont ou rL inesQwtP l o t S pect rog ram: :rend erContourLine s(   c ons t QRe ctF & rect ,const  QSize  &ras te r ) const
{
   if( d_data- >da ta  ==  N ULL )        r etu rn QwtR asterDa t a:: Co n t o ur Lines();

    retu rn d _d ata->dat a->con t ou rL i nes( rec t,  ra ster ,        d _ da ta->cont ourLev e ls ,d_data- >c onrecF la gs);}

/* ! 
  Paintthe cont our l i nes

   \param painter Paint e r \ p aram  xM ap Maps x-v alue s  int o pi x el  co o rdina tes. \p a ram yMap Maps y-val ue s into  pixe l coordinates .
   \para m c ontourLi nesC on t our lines

  \sa r enderConto u rLines() , def aultCont ourPen(), c ontourPe n() 
*/ 
vo idQ w tP lotSpectrogra m : :dra wC ontourL ine s( QPai nte r * pai nte r, 
       const Qw tS ca le Ma p & xMap, const Qw tS cal eM ap&yMap , 
       co nstQw tR a ste rData:: C on t o urLi ne s&con tou rL ines) co n st{
    i f ( d_dat a-> d ata==  N ULL )
       return ;
    const  i ntnumLev e l s = d_da ta->contourLevels.size( ) ;
    f or( int  l =  0; l < n umL evels;  l+ +  )
   {
      co nst d ouble l ev el=d_data->co n t our Level s[ l];
       QPen pen = defau l tCo ntourPen();
     i f  (  pe n .s t yle () ==Q t ::NoPen )
           pen  = co ntourPen(l eve l);

       if  ( pe n .style( ) == Qt:: NoPen )

 area_);
 _  if (!pixelRect.isEmpty()_)
 __ {
__  _  _const QSize res( qCeil(_rect.width() / pixelRect.width()_),
_           qCeil( rect.height() /_pixelRect.height()_) );
___    _raster = raster.boundedTo( res );
_ _ }

    return raster;
}

/*!
 __Calculate contour lines

_  \param rect Rectangle, where to calculate the_contour lines
   \param raster_Raster, used by_the_CONREC_algorithm
   \return_Calculated contour lines

   \sa_contourLevels(), setConrecFlag(),
    _  QwtRasterData::contourLines()
*/
QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines(
   _const QRectF &rect, const QSize &raster_) const
{
   _if (_d_data->data == NULL )
 _  _ _ return QwtRasterData::ContourLines();

_   return d_data->data->contourLines( rect,_raster,
  _     d_data->contourLevels,_d_data->conrecFlags_);
}

/*!
  _Paint_the_contour lines

_  \param_painter_Painter
 __\param xMap Maps x-values into pixel_coordinates.
_  \param yMap Maps y-values into_pixel coordinates.
  _\param_contourLines Contour lines

 _ \sa renderContourLines(), defaultContourPen(), contourPen()
*/
void_QwtPlotSpectrogram::drawContourLines( QPainter *painter,
   _ _ _const QwtScaleMap &xMap, const QwtScaleMap &yMap,
     _  const QwtRasterData::ContourLines &contourLines )_const
{
   _if (_d_data->data_== NULL )
__ _    return;

  _ const_int numLevels = d_data->contourLevels.size();
  _ for ( int_l_= 0; l < numLevels; l++_)
    {
 _    __const_double level = d_data->contourLevels[l];

 _     _QPen pen =_defaultContourPen();
      __if ( pen.style() == Qt::NoPen )
__     ___  pen = contourPen(_level );

    _   if ( pen.style() == Qt::NoPen )
