Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_shapeitem.h


Ignore:
Timestamp:
Nov 3, 2026, 10:53:35 AM (3 weeks ago)
Author:
stuerze
Message:

deprecated functions exchanged libs updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_plot_shapeitem.h

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1313#include "qwt_global.h"
    1414#include "qwt_plot_item.h"
    15 #include <qpainterpath.h>
     15
     16#include <qstring.h>
     17
     18class QPainterPath;
     19class QPolygonF;
    1620
    1721/*!
    18   \brief A plot item, which displays any graphical shape,
     22   \brief A plot item, which displays any graphical shape,
    1923         that can be defined by a QPainterPath
    2024
    21   A QPainterPath is a shape composed from intersecting and uniting
    22   regions, rectangles, ellipses or irregular areas defined by lines, and curves.
    23   QwtPlotShapeItem displays a shape with a pen and brush.
     25   A QPainterPath is a shape composed from intersecting and uniting
     26   regions, rectangles, ellipses or irregular areas defined by lines, and curves.
     27   QwtPlotShapeItem displays a shape with a pen and brush.
    2428
    25   QwtPlotShapeItem offers a couple of optimizations like clipping or weeding.
    26   These algorithms need to convert the painter path into polygons that might be
    27   less performant for paths built from curves and ellipses.
     29   QwtPlotShapeItem offers a couple of optimizations like clipping or weeding.
     30   These algorithms need to convert the painter path into polygons that might be
     31   less performant for paths built from curves and ellipses.
    2832
    29   \sa QwtPlotZone
    30 */
    31 class QWT_EXPORT QwtPlotShapeItem: public QwtPlotItem
     33   More complex shapes, that can't be expressed by a QPainterPath can be displayed
     34   using QwtPlotGraphicItem.
     35
     36   \sa QwtPlotZone, QwtPlotGraphicItem
     37 */
     38class QWT_EXPORT QwtPlotShapeItem : public QwtPlotItem
    3239{
    33 public:
     40  public:
    3441    /*!
    3542        Attributes to modify the drawing algorithm.
    … …  
    3744
    3845        \sa setPaintAttribute(), testPaintAttribute()
    39     */
     46     */
    4047    enum PaintAttribute
    4148    {
    4249        /*!
    43           Clip polygons before painting them. In situations, where points
    44           are far outside the visible area (f.e when zooming deep) this
    45           might be a substantial improvement for the painting performance
     50           Clip polygons before painting them. In situations, where points
     51           are far outside the visible area (f.e when zooming deep) this
     52           might be a substantial improvement for the painting performance
    4653
    47           But polygon clipping will convert the painter path into
    48           polygons what might introduce a negative impact on the
    49           performance of paths composed from curves or ellipses.
     54           But polygon clipping will convert the painter path into
     55           polygons what might introduce a negative impact on the
     56           performance of paths composed from curves or ellipses.
    5057         */
    5158        ClipPolygons = 0x01,
    5259    };
    5360
    54     //! Paint attributes
    55     typedef QFlags<PaintAttribute> PaintAttributes;
     61    Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
    5662
    5763    //! Mode how to display the item on the legend
    … …  
    6571    };
    6672
    67     explicit QwtPlotShapeItem( const QString &title = QString() );
    68     explicit QwtPlotShapeItem( const QwtText &title );
     73    explicit QwtPlotShapeItem( const QString& title = QString() );
     74    explicit QwtPlotShapeItem( const QwtText& title );
    6975
    7076    virtual ~QwtPlotShapeItem();
    … …  
    7682    LegendMode legendMode() const;
    7783
    78     void setRect( const QRectF & );
    79     void setPolygon( const QPolygonF & );
     84    void setRect( const QRectF& );
     85    void setPolygon( const QPolygonF& );
    8086
    81     void setShape( const QPainterPath & );
     87    void setShape( const QPainterPath& );
    8288    QPainterPath shape() const;
    8389
    84     void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
    85     void setPen( const QPen & );
     90    void setPen( const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
     91    void setPen( const QPen& );
    8692    QPen pen() const;
    8793
    88     void setBrush( const QBrush & );
     94    void setBrush( const QBrush& );
    8995    QBrush brush() const;
    9096
    … …  
    9298    double renderTolerance() const;
    9399
    94     virtual QRectF boundingRect() const;
     100    virtual QRectF boundingRect() const QWT_OVERRIDE;
    95101
    96     virtual void draw( QPainter *,
    97         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    98         const QRectF &canvasRect ) const;
     102    virtual void draw( QPainter*,
     103        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     104        const QRectF& canvasRect ) const QWT_OVERRIDE;
    99105
    100     virtual QwtGraphic legendIcon( int index, const QSizeF & ) const;
     106    virtual QwtGraphic legendIcon(
     107        int index, const QSizeF& ) const QWT_OVERRIDE;
    101108
    102     virtual int rtti() const;
     109    virtual int rtti() const QWT_OVERRIDE;
    103110
    104 private:
     111  private:
    105112    void init();
    106113
    107114    class PrivateData;
    108     PrivateData *d_data;
     115    PrivateData* m_data;
    109116};
    110117
Note: See TracChangeset for help on using the changeset viewer.