Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_marker.cpp
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_marker.cpp (modified) (36 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_marker.cpp
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 13 13 #include "qwt_symbol.h" 14 14 #include "qwt_text.h" 15 #include "qwt_graphic.h" 15 16 #include "qwt_math.h" 17 16 18 #include <qpainter.h> 17 19 18 20 class QwtPlotMarker::PrivateData 19 21 { 20 public: 21 PrivateData() :22 labelAlignment( Qt::AlignCenter ) ,23 labelOrientation( Qt::Horizontal ) ,24 spacing( 2 ) ,25 symbol( NULL ) ,26 style( QwtPlotMarker::NoLine ) ,27 xValue( 0.0 ) ,28 yValue( 0.0 ) 22 public: 23 PrivateData() 24 : labelAlignment( Qt::AlignCenter ) 25 , labelOrientation( Qt::Horizontal ) 26 , spacing( 2 ) 27 , symbol( NULL ) 28 , style( QwtPlotMarker::NoLine ) 29 , xValue( 0.0 ) 30 , yValue( 0.0 ) 29 31 { 30 32 } … … 41 43 42 44 QPen pen; 43 const QwtSymbol *symbol;45 const QwtSymbol* symbol; 44 46 LineStyle style; 45 47 … … 49 51 50 52 //! Sets alignment to Qt::AlignCenter, and style to QwtPlotMarker::NoLine 51 QwtPlotMarker::QwtPlotMarker( const QString &title ): 52 QwtPlotItem( QwtText( title ) ) 53 { 54 d_data = new PrivateData; 53 QwtPlotMarker::QwtPlotMarker() 54 { 55 m_data = new PrivateData; 55 56 setZ( 30.0 ); 56 57 } 57 58 58 59 //! Sets alignment to Qt::AlignCenter, and style to QwtPlotMarker::NoLine 59 QwtPlotMarker::QwtPlotMarker( const QwtText &title ): 60 QwtPlotItem( title ) 61 { 62 d_data = new PrivateData; 60 QwtPlotMarker::QwtPlotMarker( const QString& title ) 61 : QwtPlotItem( QwtText( title ) ) 62 { 63 m_data = new PrivateData; 64 setZ( 30.0 ); 65 } 66 67 //! Sets alignment to Qt::AlignCenter, and style to QwtPlotMarker::NoLine 68 QwtPlotMarker::QwtPlotMarker( const QwtText& title ) 69 : QwtPlotItem( title ) 70 { 71 m_data = new PrivateData; 63 72 setZ( 30.0 ); 64 73 } … … 67 76 QwtPlotMarker::~QwtPlotMarker() 68 77 { 69 delete d_data;78 delete m_data; 70 79 } 71 80 … … 79 88 QPointF QwtPlotMarker::value() const 80 89 { 81 return QPointF( d_data->xValue,d_data->yValue );90 return QPointF( m_data->xValue, m_data->yValue ); 82 91 } 83 92 … … 85 94 double QwtPlotMarker::xValue() const 86 95 { 87 return d_data->xValue;96 return m_data->xValue; 88 97 } 89 98 … … 91 100 double QwtPlotMarker::yValue() const 92 101 { 93 return d_data->yValue;102 return m_data->yValue; 94 103 } 95 104 … … 103 112 void QwtPlotMarker::setValue( double x, double y ) 104 113 { 105 if ( x != d_data->xValue || y !=d_data->yValue )106 { 107 d_data->xValue = x;108 d_data->yValue = y;114 if ( x != m_data->xValue || y != m_data->yValue ) 115 { 116 m_data->xValue = x; 117 m_data->yValue = y; 109 118 itemChanged(); 110 119 } … … 114 123 void QwtPlotMarker::setXValue( double x ) 115 124 { 116 setValue( x, d_data->yValue );125 setValue( x, m_data->yValue ); 117 126 } 118 127 … … 120 129 void QwtPlotMarker::setYValue( double y ) 121 130 { 122 setValue( d_data->xValue, y ); 123 } 124 125 /*! 126 Draw the marker 127 128 \param painter Painter 129 \param xMap x Scale Map 130 \param yMap y Scale Map 131 \param canvasRect Contents rectangle of the canvas in painter coordinates 132 */ 133 void QwtPlotMarker::draw( QPainter *painter, 134 const QwtScaleMap &xMap, const QwtScaleMap &yMap, 135 const QRectF &canvasRect ) const 136 { 137 const QPointF pos( xMap.transform( d_data->xValue ), 138 yMap.transform( d_data->yValue ) ); 139 140 // draw lines 131 setValue( m_data->xValue, y ); 132 } 133 134 /*! 135 Draw the marker 136 137 \param painter Painter 138 \param xMap x Scale Map 139 \param yMap y Scale Map 140 \param canvasRect Contents rectangle of the canvas in painter coordinates 141 */ 142 void QwtPlotMarker::draw( QPainter* painter, 143 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 144 const QRectF& canvasRect ) const 145 { 146 const QPointF pos( xMap.transform( m_data->xValue ), 147 yMap.transform( m_data->yValue ) ); 141 148 142 149 drawLines( painter, canvasRect, pos ); 143 144 // draw symbol 145 if ( d_data->symbol && 146 ( d_data->symbol->style() != QwtSymbol::NoSymbol ) ) 147 { 148 const QSizeF sz = d_data->symbol->size(); 149 150 const QRectF clipRect = canvasRect.adjusted( 151 -sz.width(), -sz.height(), sz.width(), sz.height() ); 152 153 if ( clipRect.contains( pos ) ) 154 d_data->symbol->drawSymbol( painter, pos ); 155 } 156 150 drawSymbol( painter, canvasRect, pos ); 157 151 drawLabel( painter, canvasRect, pos ); 158 152 } 159 153 160 154 /*! 161 Draw the lines marker 162 163 \param painter Painter 164 \param canvasRect Contents rectangle of the canvas in painter coordinates 165 \param pos Position of the marker, translated into widget coordinates 166 167 \sa drawLabel(), QwtSymbol::drawSymbol()168 */ 169 void QwtPlotMarker::drawLines( QPainter *painter,170 const QRectF &canvasRect, const QPointF&pos ) const171 { 172 if ( d_data->style == NoLine )155 Draw the lines marker 156 157 \param painter Painter 158 \param canvasRect Contents rectangle of the canvas in painter coordinates 159 \param pos Position of the marker, translated into widget coordinates 160 161 \sa drawLabel(), drawSymbol() 162 */ 163 void QwtPlotMarker::drawLines( QPainter* painter, 164 const QRectF& canvasRect, const QPointF& pos ) const 165 { 166 if ( m_data->style == NoLine ) 173 167 return; 174 168 175 169 const bool doAlign = QwtPainter::roundingAlignment( painter ); 176 170 177 painter->setPen( d_data->pen );178 if ( d_data->style == QwtPlotMarker::HLine ||179 d_data->style == QwtPlotMarker::Cross )171 painter->setPen( m_data->pen ); 172 if ( m_data->style == QwtPlotMarker::HLine || 173 m_data->style == QwtPlotMarker::Cross ) 180 174 { 181 175 double y = pos.y(); … … 186 180 y, canvasRect.right() - 1.0, y ); 187 181 } 188 if ( d_data->style == QwtPlotMarker::VLine ||189 d_data->style == QwtPlotMarker::Cross )182 if ( m_data->style == QwtPlotMarker::VLine || 183 m_data->style == QwtPlotMarker::Cross ) 190 184 { 191 185 double x = pos.x(); … … 199 193 200 194 /*! 201 Align and draw thetext label of the marker202 203 \param painter Painter 204 \param canvasRect Contents rectangle of the canvas in painter coordinates 205 \param pos Position of the marker, translated into widget coordinates 206 207 \sa drawLabel(), QwtSymbol::drawSymbol() 208 */ 209 void QwtPlotMarker::draw Label( QPainter*painter,210 const QRectF &canvasRect, const QPointF&pos ) const211 { 212 if ( d_data->label.isEmpty())195 Draw the symbol of the marker 196 197 \param painter Painter 198 \param canvasRect Contents rectangle of the canvas in painter coordinates 199 \param pos Position of the marker, translated into widget coordinates 200 201 \sa drawLabel(), QwtSymbol::drawSymbol() 202 */ 203 void QwtPlotMarker::drawSymbol( QPainter* painter, 204 const QRectF& canvasRect, const QPointF& pos ) const 205 { 206 if ( m_data->symbol == NULL ) 213 207 return; 214 208 215 Qt::Alignment align = d_data->labelAlignment; 209 const QwtSymbol& symbol = *m_data->symbol; 210 211 if ( symbol.style() != QwtSymbol::NoSymbol ) 212 { 213 const QSizeF sz = symbol.size(); 214 215 const QRectF clipRect = canvasRect.adjusted( 216 -sz.width(), -sz.height(), sz.width(), sz.height() ); 217 218 if ( clipRect.contains( pos ) ) 219 symbol.drawSymbol( painter, pos ); 220 } 221 } 222 223 /*! 224 Align and draw the text label of the marker 225 226 \param painter Painter 227 \param canvasRect Contents rectangle of the canvas in painter coordinates 228 \param pos Position of the marker, translated into widget coordinates 229 230 \sa drawLabel(), drawSymbol() 231 */ 232 void QwtPlotMarker::drawLabel( QPainter* painter, 233 const QRectF& canvasRect, const QPointF& pos ) const 234 { 235 if ( m_data->label.isEmpty() ) 236 return; 237 238 Qt::Alignment align = m_data->labelAlignment; 216 239 QPointF alignPos = pos; 217 240 218 241 QSizeF symbolOff( 0, 0 ); 219 242 220 switch ( d_data->style )243 switch ( m_data->style ) 221 244 { 222 245 case QwtPlotMarker::VLine: … … 225 248 // the alignment flags are relative to the canvas 226 249 227 if ( d_data->labelAlignment & Qt::AlignTop )250 if ( m_data->labelAlignment & Qt::AlignTop ) 228 251 { 229 252 alignPos.setY( canvasRect.top() ); … … 231 254 align |= Qt::AlignBottom; 232 255 } 233 else if ( d_data->labelAlignment & Qt::AlignBottom )256 else if ( m_data->labelAlignment & Qt::AlignBottom ) 234 257 { 235 258 // In HLine-style the x-position is pointless and … … 248 271 case QwtPlotMarker::HLine: 249 272 { 250 if ( d_data->labelAlignment & Qt::AlignLeft )273 if ( m_data->labelAlignment & Qt::AlignLeft ) 251 274 { 252 275 alignPos.setX( canvasRect.left() ); … … 254 277 align |= Qt::AlignRight; 255 278 } 256 else if ( d_data->labelAlignment & Qt::AlignRight )279 else if ( m_data->labelAlignment & Qt::AlignRight ) 257 280 { 258 281 alignPos.setX( canvasRect.right() - 1 ); … … 268 291 default: 269 292 { 270 if ( d_data->symbol &&271 ( d_data->symbol->style() != QwtSymbol::NoSymbol ) )293 if ( m_data->symbol && 294 ( m_data->symbol->style() != QwtSymbol::NoSymbol ) ) 272 295 { 273 symbolOff = d_data->symbol->size() + QSizeF( 1, 1 );296 symbolOff = m_data->symbol->size() + QSizeF( 1, 1 ); 274 297 symbolOff /= 2; 275 298 } … … 277 300 } 278 301 279 qreal pw2 = d_data->pen.widthF() / 2.0;302 qreal pw2 = m_data->pen.widthF() / 2.0; 280 303 if ( pw2 == 0.0 ) 281 304 pw2 = 0.5; 282 305 283 const int spacing = d_data->spacing;284 285 const qreal xOff = q Max( pw2, symbolOff.width() );286 const qreal yOff = q Max( pw2, symbolOff.height() );287 288 const QSizeF textSize = d_data->label.textSize( painter->font() );306 const int spacing = m_data->spacing; 307 308 const qreal xOff = qwtMaxF( pw2, symbolOff.width() ); 309 const qreal yOff = qwtMaxF( pw2, symbolOff.height() ); 310 311 const QSizeF textSize = m_data->label.textSize( painter->font() ); 289 312 290 313 if ( align & Qt::AlignLeft ) 291 314 { 292 315 alignPos.rx() -= xOff + spacing; 293 if ( d_data->labelOrientation == Qt::Vertical )316 if ( m_data->labelOrientation == Qt::Vertical ) 294 317 alignPos.rx() -= textSize.height(); 295 318 else … … 302 325 else 303 326 { 304 if ( d_data->labelOrientation == Qt::Vertical )327 if ( m_data->labelOrientation == Qt::Vertical ) 305 328 alignPos.rx() -= textSize.height() / 2; 306 329 else … … 311 334 { 312 335 alignPos.ry() -= yOff + spacing; 313 if ( d_data->labelOrientation != Qt::Vertical )336 if ( m_data->labelOrientation != Qt::Vertical ) 314 337 alignPos.ry() -= textSize.height(); 315 338 } … … 317 340 { 318 341 alignPos.ry() += yOff + spacing; 319 if ( d_data->labelOrientation == Qt::Vertical )342 if ( m_data->labelOrientation == Qt::Vertical ) 320 343 alignPos.ry() += textSize.width(); 321 344 } 322 345 else 323 346 { 324 if ( d_data->labelOrientation == Qt::Vertical )347 if ( m_data->labelOrientation == Qt::Vertical ) 325 348 alignPos.ry() += textSize.width() / 2; 326 349 else … … 329 352 330 353 painter->translate( alignPos.x(), alignPos.y() ); 331 if ( d_data->labelOrientation == Qt::Vertical )354 if ( m_data->labelOrientation == Qt::Vertical ) 332 355 painter->rotate( -90.0 ); 333 356 334 357 const QRectF textRect( 0, 0, textSize.width(), textSize.height() ); 335 d_data->label.draw( painter, textRect );336 } 337 338 /*! 339 \brief Set the line style 340 \param style Line style. 341 \sa lineStyle() 342 */ 358 m_data->label.draw( painter, textRect ); 359 } 360 361 /*! 362 \brief Set the line style 363 \param style Line style. 364 \sa lineStyle() 365 */ 343 366 void QwtPlotMarker::setLineStyle( LineStyle style ) 344 367 { 345 if ( style != d_data->style )346 { 347 d_data->style = style;368 if ( style != m_data->style ) 369 { 370 m_data->style = style; 348 371 349 372 legendChanged(); … … 353 376 354 377 /*! 355 \return the line style 356 \sa setLineStyle() 357 */ 378 \return the line style 379 \sa setLineStyle() 380 */ 358 381 QwtPlotMarker::LineStyle QwtPlotMarker::lineStyle() const 359 382 { 360 return d_data->style;361 } 362 363 /*! 364 \brief Assign a symbol 365 \param symbol New symbol 366 \sa symbol() 367 */ 368 void QwtPlotMarker::setSymbol( const QwtSymbol *symbol )369 { 370 if ( symbol != d_data->symbol )371 { 372 delete d_data->symbol;373 d_data->symbol = symbol;383 return m_data->style; 384 } 385 386 /*! 387 \brief Assign a symbol 388 \param symbol New symbol 389 \sa symbol() 390 */ 391 void QwtPlotMarker::setSymbol( const QwtSymbol* symbol ) 392 { 393 if ( symbol != m_data->symbol ) 394 { 395 delete m_data->symbol; 396 m_data->symbol = symbol; 374 397 375 398 if ( symbol ) … … 382 405 383 406 /*! 384 \return the symbol 385 \sa setSymbol(), QwtSymbol 386 */ 387 const QwtSymbol *QwtPlotMarker::symbol() const388 { 389 return d_data->symbol;390 } 391 392 /*! 393 \brief Set the label 394 \param label Label text 395 \sa label() 396 */ 407 \return the symbol 408 \sa setSymbol(), QwtSymbol 409 */ 410 const QwtSymbol* QwtPlotMarker::symbol() const 411 { 412 return m_data->symbol; 413 } 414 415 /*! 416 \brief Set the label 417 \param label Label text 418 \sa label() 419 */ 397 420 void QwtPlotMarker::setLabel( const QwtText& label ) 398 421 { 399 if ( label != d_data->label )400 { 401 d_data->label = label;422 if ( label != m_data->label ) 423 { 424 m_data->label = label; 402 425 itemChanged(); 403 426 } … … 405 428 406 429 /*! 407 \return the label 408 \sa setLabel() 409 */ 430 \return the label 431 \sa setLabel() 432 */ 410 433 QwtText QwtPlotMarker::label() const 411 434 { 412 return d_data->label;413 } 414 415 /*! 416 \brief Set the alignment of the label 417 418 In case of QwtPlotMarker::HLine the alignment is relative to the 419 y position of the marker, but the horizontal flags correspond to the 420 canvas rectangle. In case of QwtPlotMarker::VLine the alignment is 421 relative to the x position of the marker, but the vertical flags 422 correspond to the canvas rectangle. 423 424 In all other styles the alignment is relative to the marker's position. 425 426 \param align Alignment. 427 \sa labelAlignment(), labelOrientation() 428 */ 435 return m_data->label; 436 } 437 438 /*! 439 \brief Set the alignment of the label 440 441 In case of QwtPlotMarker::HLine the alignment is relative to the 442 y position of the marker, but the horizontal flags correspond to the 443 canvas rectangle. In case of QwtPlotMarker::VLine the alignment is 444 relative to the x position of the marker, but the vertical flags 445 correspond to the canvas rectangle. 446 447 In all other styles the alignment is relative to the marker's position. 448 449 \param align Alignment. 450 \sa labelAlignment(), labelOrientation() 451 */ 429 452 void QwtPlotMarker::setLabelAlignment( Qt::Alignment align ) 430 453 { 431 if ( align != d_data->labelAlignment )432 { 433 d_data->labelAlignment = align;454 if ( align != m_data->labelAlignment ) 455 { 456 m_data->labelAlignment = align; 434 457 itemChanged(); 435 458 } … … 437 460 438 461 /*! 439 \return the label alignment 440 \sa setLabelAlignment(), setLabelOrientation() 441 */ 462 \return the label alignment 463 \sa setLabelAlignment(), setLabelOrientation() 464 */ 442 465 Qt::Alignment QwtPlotMarker::labelAlignment() const 443 466 { 444 return d_data->labelAlignment;445 } 446 447 /*! 448 \brief Set the orientation of the label 449 450 When orientation is Qt::Vertical the label is rotated by 90.0 degrees 451 ( from bottom to top ). 452 453 \param orientation Orientation of the label 454 455 \sa labelOrientation(), setLabelAlignment() 456 */ 467 return m_data->labelAlignment; 468 } 469 470 /*! 471 \brief Set the orientation of the label 472 473 When orientation is Qt::Vertical the label is rotated by 90.0 degrees 474 ( from bottom to top ). 475 476 \param orientation Orientation of the label 477 478 \sa labelOrientation(), setLabelAlignment() 479 */ 457 480 void QwtPlotMarker::setLabelOrientation( Qt::Orientation orientation ) 458 481 { 459 if ( orientation != d_data->labelOrientation )460 { 461 d_data->labelOrientation = orientation;482 if ( orientation != m_data->labelOrientation ) 483 { 484 m_data->labelOrientation = orientation; 462 485 itemChanged(); 463 486 } … … 465 488 466 489 /*! 467 \return the label orientation 468 \sa setLabelOrientation(), labelAlignment() 469 */ 490 \return the label orientation 491 \sa setLabelOrientation(), labelAlignment() 492 */ 470 493 Qt::Orientation QwtPlotMarker::labelOrientation() const 471 494 { 472 return d_data->labelOrientation;473 } 474 475 /*! 476 \brief Set the spacing 477 478 When the label is not centered on the marker position, the spacing 479 is the distance between the position and the label. 480 481 \param spacing Spacing 482 \sa spacing(), setLabelAlignment() 483 */ 495 return m_data->labelOrientation; 496 } 497 498 /*! 499 \brief Set the spacing 500 501 When the label is not centered on the marker position, the spacing 502 is the distance between the position and the label. 503 504 \param spacing Spacing 505 \sa spacing(), setLabelAlignment() 506 */ 484 507 void QwtPlotMarker::setSpacing( int spacing ) 485 508 { … … 487 510 spacing = 0; 488 511 489 if ( spacing == d_data->spacing )512 if ( spacing == m_data->spacing ) 490 513 return; 491 514 492 d_data->spacing = spacing;515 m_data->spacing = spacing; 493 516 itemChanged(); 494 517 } 495 518 496 519 /*! 497 \return the spacing 498 \sa setSpacing() 499 */ 520 \return the spacing 521 \sa setSpacing() 522 */ 500 523 int QwtPlotMarker::spacing() const 501 524 { 502 return d_data->spacing;503 } 504 505 /*! 506 Build and assign a line pen 507 508 In Qt5 the default pen width is 1.0 ( 0.0 in Qt4 ) what makes it 509 non cosmetic ( see QPen::isCosmetic() ). This method has been introduced 510 to hide this incompatibility. 511 512 \param color Pen color 513 \param width Pen width 514 \param style Pen style 515 516 \sa pen(), brush() 517 */ 518 void QwtPlotMarker::setLinePen( const QColor &color, qreal width, Qt::PenStyle style )525 return m_data->spacing; 526 } 527 528 /*! 529 Build and assign a line pen 530 531 In Qt5 the default pen width is 1.0 ( 0.0 in Qt4 ) what makes it 532 non cosmetic ( see QPen::isCosmetic() ). This method has been introduced 533 to hide this incompatibility. 534 535 \param color Pen color 536 \param width Pen width 537 \param style Pen style 538 539 \sa pen(), brush() 540 */ 541 void QwtPlotMarker::setLinePen( const QColor& color, qreal width, Qt::PenStyle style ) 519 542 { 520 543 setLinePen( QPen( color, width, style ) ); … … 522 545 523 546 /*! 524 Specify a pen for the line. 525 526 \param pen New pen 527 \sa linePen() 528 */ 529 void QwtPlotMarker::setLinePen( const QPen &pen )530 { 531 if ( pen != d_data->pen )532 { 533 d_data->pen = pen;547 Specify a pen for the line. 548 549 \param pen New pen 550 \sa linePen() 551 */ 552 void QwtPlotMarker::setLinePen( const QPen& pen ) 553 { 554 if ( pen != m_data->pen ) 555 { 556 m_data->pen = pen; 534 557 535 558 legendChanged(); … … 539 562 540 563 /*! 541 \return the line pen 542 \sa setLinePen() 543 */ 544 const QPen &QwtPlotMarker::linePen() const545 { 546 return d_data->pen;564 \return the line pen 565 \sa setLinePen() 566 */ 567 const QPen& QwtPlotMarker::linePen() const 568 { 569 return m_data->pen; 547 570 } 548 571 … … 551 574 // width/height of -1 does not affect the autoscale calculation 552 575 553 switch ( d_data->style)576 switch (m_data->style) 554 577 { 555 578 case QwtPlotMarker::HLine: 556 return QRectF( d_data->xValue,d_data->yValue, -1.0, 0.0 );579 return QRectF( m_data->xValue, m_data->yValue, -1.0, 0.0 ); 557 580 558 581 case QwtPlotMarker::VLine: 559 return QRectF( d_data->xValue,d_data->yValue, 0.0, -1.0 );560 561 default :562 return QRectF( d_data->xValue,d_data->yValue, 0.0, 0.0 );582 return QRectF( m_data->xValue, m_data->yValue, 0.0, -1.0 ); 583 584 default: 585 return QRectF( m_data->xValue, m_data->yValue, 0.0, 0.0 ); 563 586 } 564 587 } … … 572 595 573 596 \sa setLegendIconSize(), legendData() 574 */ 575 QwtGraphic QwtPlotMarker::legendIcon( int index, 576 const QSizeF &size ) const 597 */ 598 QwtGraphic QwtPlotMarker::legendIcon( int index, const QSizeF& size ) const 577 599 { 578 600 Q_UNUSED( index ); … … 589 611 testRenderHint( QwtPlotItem::RenderAntialiased ) ); 590 612 591 if ( d_data->style != QwtPlotMarker::NoLine )592 { 593 painter.setPen( d_data->pen );594 595 if ( d_data->style == QwtPlotMarker::HLine ||596 d_data->style == QwtPlotMarker::Cross )613 if ( m_data->style != QwtPlotMarker::NoLine ) 614 { 615 painter.setPen( m_data->pen ); 616 617 if ( m_data->style == QwtPlotMarker::HLine || 618 m_data->style == QwtPlotMarker::Cross ) 597 619 { 598 620 const double y = 0.5 * size.height(); … … 602 624 } 603 625 604 if ( d_data->style == QwtPlotMarker::VLine ||605 d_data->style == QwtPlotMarker::Cross )626 if ( m_data->style == QwtPlotMarker::VLine || 627 m_data->style == QwtPlotMarker::Cross ) 606 628 { 607 629 const double x = 0.5 * size.width(); … … 612 634 } 613 635 614 if ( d_data->symbol )636 if ( m_data->symbol ) 615 637 { 616 638 const QRect r( 0.0, 0.0, size.width(), size.height() ); 617 d_data->symbol->drawSymbol( &painter, r );639 m_data->symbol->drawSymbol( &painter, r ); 618 640 } 619 641
Note:
See TracChangeset
for help on using the changeset viewer.
