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


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

deprecated functions exchanged libs updated

File:
1 edited

Legend:

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

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1212
    1313#include "qwt_global.h"
     14
    1415#include <qpolygon.h>
     16#include <qpen.h>
     17#include <qbrush.h>
    1518
    1619class QPainter;
    17 class QRect;
    1820class QSize;
    1921class QBrush;
    … …  
    2123class QColor;
    2224class QPointF;
    23 class QPolygonF;
    2425class QPainterPath;
    2526class QPixmap;
    … …  
    3031class QWT_EXPORT QwtSymbol
    3132{
    32 public:
     33  public:
    3334    /*!
    34       Symbol Style
    35       \sa setStyle(), style()
     35       Symbol Style
     36       \sa setStyle(), style()
    3637     */
    3738    enum Style
    … …  
    8687
    8788        /*!
    88           The symbol is represented by a painter path, where the
    89           origin ( 0, 0 ) of the path coordinate system is mapped to
    90           the position of the symbol.
    91 
    92           \sa setPath(), path()
     89           The symbol is represented by a painter path, where the
     90           origin ( 0, 0 ) of the path coordinate system is mapped to
     91           the position of the symbol.
     92
     93           \sa setPath(), path()
    9394         */
    9495        Path,
    9596
    9697        /*!
    97           The symbol is represented by a pixmap. The pixmap is centered
    98           or aligned to its pin point.
    99 
    100           \sa setPinPoint()
     98           The symbol is represented by a pixmap. The pixmap is centered
     99           or aligned to its pin point.
     100
     101           \sa setPinPoint()
    101102         */
    102103        Pixmap,
    103104
    104105        /*!
    105           The symbol is represented by a graphic. The graphic is centered
    106           or aligned to its pin point.
    107 
    108           \sa setPinPoint()
     106           The symbol is represented by a graphic. The graphic is centered
     107           or aligned to its pin point.
     108
     109           \sa setPinPoint()
    109110         */
    110111        Graphic,
    111112
    112113        /*!
    113           The symbol is represented by a SVG graphic. The graphic is centered
    114           or aligned to its pin point.
    115 
    116           \sa setPinPoint()
     114           The symbol is represented by a SVG graphic. The graphic is centered
     115           or aligned to its pin point.
     116
     117           \sa setPinPoint()
    117118         */
    118119        SvgDocument,
    119120
    120121        /*!
    121          Styles >= QwtSymbol::UserSymbol are reserved for derived
    122          classes of QwtSymbol that overload drawSymbols() with
    123          additional application specific symbol types.
     122           Styles >= QwtSymbol::UserSymbol are reserved for derived
     123           classes of QwtSymbol that overload drawSymbols() with
     124           additional application specific symbol types.
    124125         */
    125126        UserStyle = 1000
    … …  
    127128
    128129    /*!
    129       Depending on the render engine and the complexity of the
    130       symbol shape it might be faster to render the symbol
    131       to a pixmap and to paint this pixmap.
    132 
    133       F.e. the raster paint engine is a pure software renderer
    134       where in cache mode a draw operation usually ends in
    135       raster operation with the the backing store, that are usually
    136       faster, than the algorithms for rendering polygons.
    137       But the opposite can be expected for graphic pipelines
    138       that can make use of hardware acceleration.
    139 
    140       The default setting is AutoCache
    141 
    142       \sa setCachePolicy(), cachePolicy()
    143 
    144       \note The policy has no effect, when the symbol is painted
     130       Depending on the render engine and the complexity of the
     131       symbol shape it might be faster to render the symbol
     132       to a pixmap and to paint this pixmap.
     133
     134       F.e. the raster paint engine is a pure software renderer
     135       where in cache mode a draw operation usually ends in
     136       raster operation with the the backing store, that are usually
     137       faster, than the algorithms for rendering polygons.
     138       But the opposite can be expected for graphic pipelines
     139       that can make use of hardware acceleration.
     140
     141       The default setting is AutoCache
     142
     143       \sa setCachePolicy(), cachePolicy()
     144
     145       \note The policy has no effect, when the symbol is painted
    145146            to a vector graphics format ( PDF, SVG ).
    146       \warning Since Qt 4.8 raster is the default backend on X11
     147       \warning Since Qt 4.8 raster is the default backend on X11
    147148     */
    148149
    … …  
    164165    };
    165166
    166 public:
    167     QwtSymbol( Style = NoSymbol );
    168     QwtSymbol( Style, const QBrush &, const QPen &, const QSize & );
    169     QwtSymbol( const QPainterPath &, const QBrush &, const QPen & );
     167  public:
     168    explicit QwtSymbol( Style = NoSymbol );
     169    QwtSymbol( Style, const QBrush&, const QPen&, const QSize& );
     170    QwtSymbol( const QPainterPath&, const QBrush&, const QPen& );
    170171
    171172    virtual ~QwtSymbol();
    … …  
    174175    CachePolicy cachePolicy() const;
    175176
    176     void setSize( const QSize & );
     177    void setSize( const QSize& );
    177178    void setSize( int width, int height = -1 );
    178     const QSize &size() const;
    179 
    180     void setPinPoint( const QPointF &pos, bool enable = true );
     179    const QSize& size() const;
     180
     181    void setPinPoint( const QPointF& pos, bool enable = true );
    181182    QPointF pinPoint() const;
    182183
    … …  
    184185    bool isPinPointEnabled() const;
    185186
    186     virtual void setColor( const QColor & );
    187 
    188     void setBrush( const QBrush & );
    189     const QBrush &brush() const;
    190 
    191     void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
    192     void setPen( const QPen & );
    193     const QPen &pen() const;
     187    virtual void setColor( const QColor& );
     188
     189    void setBrush( const QBrush& );
     190    const QBrush& brush() const;
     191
     192    void setPen( const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
     193    void setPen( const QPen& );
     194    const QPen& pen() const;
    194195
    195196    void setStyle( Style );
    196197    Style style() const;
    197198
    198     void setPath( const QPainterPath & );
    199     const QPainterPath &path() const;
    200 
    201     void setPixmap( const QPixmap & );
    202     const QPixmap &pixmap() const;
    203 
    204     void setGraphic( const QwtGraphic & );
    205     const QwtGraphic &graphic() const;
     199    void setPath( const QPainterPath& );
     200    const QPainterPath& path() const;
     201
     202    void setPixmap( const QPixmap& );
     203    const QPixmap& pixmap() const;
     204
     205    void setGraphic( const QwtGraphic& );
     206    const QwtGraphic& graphic() const;
    206207
    207208#ifndef QWT_NO_SVG
    208     void setSvgDocument( const QByteArray & );
     209    void setSvgDocument( const QByteArray& );
    209210#endif
    210211
    211     void drawSymbol( QPainter *, const QRectF & ) const;
    212     void drawSymbol( QPainter *, const QPointF & ) const;
    213     void drawSymbols( QPainter *, const QPolygonF & ) const;
    214     void drawSymbols( QPainter *,
    215         const QPointF *, int numPoints ) const;
     212    void drawSymbol( QPainter*, const QRectF& ) const;
     213    void drawSymbol( QPainter*, const QPointF& ) const;
     214    void drawSymbols( QPainter*, const QPolygonF& ) const;
     215    void drawSymbols( QPainter*,
     216        const QPointF*, int numPoints ) const;
    216217
    217218    virtual QRect boundingRect() const;
    218219    void invalidateCache();
    219220
    220 protected:
    221     virtual void renderSymbols( QPainter *,
    222         const QPointF *, int numPoints ) const;
    223 
    224 private:
    225     // Disabled copy constructor and operator=
    226     QwtSymbol( const QwtSymbol & );
    227     QwtSymbol &operator=( const QwtSymbol & );
     221  protected:
     222    virtual void renderSymbols( QPainter*,
     223        const QPointF*, int numPoints ) const;
     224
     225  private:
     226    Q_DISABLE_COPY(QwtSymbol)
    228227
    229228    class PrivateData;
    230     PrivateData *d_data;
     229    PrivateData* m_data;
    231230};
    232231
    233232/*!
    234   \brief Draw the symbol at a specified position
    235 
    236   \param painter Painter
    237   \param pos Position of the symbol in screen coordinates
    238 */
     233   \brief Draw the symbol at a specified position
     234
     235   \param painter Painter
     236   \param pos Position of the symbol in screen coordinates
     237 */
    239238inline void QwtSymbol::drawSymbol(
    240     QPainter *painter, const QPointF &pos ) const
     239    QPainter* painter, const QPointF& pos ) const
    241240{
    242241    drawSymbols( painter, &pos, 1 );
    … …  
    244243
    245244/*!
    246   \brief Draw symbols at the specified points
    247 
    248   \param painter Painter
    249   \param points Positions of the symbols in screen coordinates
    250 */
     245   \brief Draw symbols at the specified points
     246
     247   \param painter Painter
     248   \param points Positions of the symbols in screen coordinates
     249 */
    251250
    252251inline void QwtSymbol::drawSymbols(
    253     QPainter *painter, const QPolygonF &points ) const
     252    QPainter* painter, const QPolygonF& points ) const
    254253{
    255254    drawSymbols( painter, points.data(), points.size() );
Note: See TracChangeset for help on using the changeset viewer.