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_legenditem.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 "qwt_legend_data.h"
    1615
    1716class QFont;
    1817
    1918/*!
    20   \brief A class which draws a legend inside the plot canvas
     19   \brief A class which draws a legend inside the plot canvas
    2120
    22   QwtPlotLegendItem can be used to draw a inside the plot canvas.
    23   It can be used together with a QwtLegend or instead of it
    24   to have more space for the plot canvas.
     21   QwtPlotLegendItem can be used to draw a inside the plot canvas.
     22   It can be used together with a QwtLegend or instead of it
     23   to have more space for the plot canvas.
    2524
    26   In opposite to QwtLegend the legend item is not interactive.
    27   To identify mouse clicks on a legend item an event filter
    28   needs to be installed catching mouse events ob the plot canvas.
    29   The geometries of the legend items are available using
    30   legendGeometries().
     25   In opposite to QwtLegend the legend item is not interactive.
     26   To identify mouse clicks on a legend item an event filter
     27   needs to be installed catching mouse events ob the plot canvas.
     28   The geometries of the legend items are available using
     29   legendGeometries().
    3130
    32   The legend item is aligned to plot canvas according to
    33   its alignment() flags. It might have a background for the
    34   complete legend ( usually semi transparent ) or for
    35   each legend item.
     31   The legend item is aligned to plot canvas according to
     32   its alignment() flags. It might have a background for the
     33   complete legend ( usually semi transparent ) or for
     34   each legend item.
    3635
    37   \note An external QwtLegend with a transparent background
     36   \note An external QwtLegend with a transparent background
    3837        on top the plot canvas might be another option
    3938        with a similar effect.
    40 */
     39 */
    4140
    42 class QWT_EXPORT QwtPlotLegendItem: public QwtPlotItem
     41class QWT_EXPORT QwtPlotLegendItem : public QwtPlotItem
    4342{
    44 public:
     43  public:
    4544    /*!
    46       \brief Background mode
     45       \brief Background mode
    4746
    48       Depending on the mode the complete legend or each item
    49       might have an background.
     47       Depending on the mode the complete legend or each item
     48       might have an background.
    5049
    51       The default setting is LegendBackground.
     50       The default setting is LegendBackground.
    5251
    5352       \sa setBackgroundMode(), setBackgroundBrush(), drawBackground()
    … …  
    6564    virtual ~QwtPlotLegendItem();
    6665
    67     virtual int rtti() const;
     66    virtual int rtti() const QWT_OVERRIDE;
    6867
    69     void setAlignment( Qt::Alignment );
    70     Qt::Alignment alignment() const;
     68    void setAlignmentInCanvas( Qt::Alignment );
     69    Qt::Alignment alignmentInCanvas() const;
     70
     71    void setOffsetInCanvas( Qt::Orientations, int numPixels );
     72    int offsetInCanvas( Qt::Orientation ) const;
    7173
    7274    void setMaxColumns( uint );
    … …  
    8890    QFont font() const;
    8991
    90     void setBorderDistance( int );
    91     int borderDistance() const;
    92 
    9392    void setBorderRadius( double );
    9493    double borderRadius() const;
    9594
    96     void setBorderPen( const QPen & );
     95    void setBorderPen( const QPen& );
    9796    QPen borderPen() const;
    9897
    99     void setBackgroundBrush( const QBrush & );
     98    void setBackgroundBrush( const QBrush& );
    10099    QBrush backgroundBrush() const;
    101100
    … …  
    103102    BackgroundMode backgroundMode() const;
    104103
    105     void setTextPen( const QPen & );
     104    void setTextPen( const QPen& );
    106105    QPen textPen() const;
    107106
    108     virtual void draw( QPainter *,
    109         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    110         const QRectF &canvasRect ) const;
     107    virtual void draw( QPainter*,
     108        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     109        const QRectF& canvasRect ) const QWT_OVERRIDE;
    111110
    112111    void clearLegend();
    113112
    114     virtual void updateLegend( const QwtPlotItem *,
    115         const QList<QwtLegendData> & );
     113    virtual void updateLegend( const QwtPlotItem*,
     114        const QList< QwtLegendData >& ) QWT_OVERRIDE;
    116115
    117     virtual QRect geometry( const QRectF &canvasRect ) const;
     116    virtual QRect geometry( const QRectF& canvasRect ) const;
    118117
    119     virtual QSize minimumSize( const QwtLegendData & ) const;
    120     virtual int heightForWidth( const QwtLegendData &, int width ) const;
     118    virtual QSize minimumSize( const QwtLegendData& ) const;
     119    virtual int heightForWidth( const QwtLegendData&, int width ) const;
    121120
    122     QList< const QwtPlotItem * > plotItems() const;
    123     QList< QRect > legendGeometries( const QwtPlotItem * ) const;
     121    QList< const QwtPlotItem* > plotItems() const;
     122    QList< QRect > legendGeometries( const QwtPlotItem* ) const;
    124123
    125 protected:
    126     virtual void drawLegendData( QPainter *painter,
    127         const QwtPlotItem *, const QwtLegendData &, const QRectF & ) const;
     124  protected:
     125    virtual void drawLegendData( QPainter*,
     126        const QwtPlotItem*, const QwtLegendData&, const QRectF& ) const;
    128127
    129     virtual void drawBackground( QPainter *, const QRectF &rect ) const;
     128    virtual void drawBackground( QPainter*, const QRectF& rect ) const;
    130129
    131 private:
     130  private:
    132131    class PrivateData;
    133     PrivateData *d_data;
     132    PrivateData* m_data;
    134133};
    135134
Note: See TracChangeset for help on using the changeset viewer.