Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_legend.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_legend.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_abstract_legend.h"
     15#include "qwt_legend_data.h"
     16
    1517#include <qvariant.h>
    1618
    … …  
    1820
    1921/*!
    20   \brief The legend widget
     22   \brief The legend widget
    2123
    22   The QwtLegend widget is a tabular arrangement of legend items. Legend
    23   items might be any type of widget, but in general they will be
    24   a QwtLegendLabel.
     24   The QwtLegend widget is a tabular arrangement of legend items. Legend
     25   items might be any type of widget, but in general they will be
     26   a QwtLegendLabel.
    2527
    26   \sa QwtLegendLabel, QwtPlotItem, QwtPlot
    27 */
     28   \sa QwtLegendLabel, QwtPlotItem, QwtPlot
     29 */
    2830
    2931class QWT_EXPORT QwtLegend : public QwtAbstractLegend
    … …  
    3133    Q_OBJECT
    3234
    33 public:
    34     explicit QwtLegend( QWidget *parent = NULL );
     35  public:
     36    explicit QwtLegend( QWidget* parent = NULL );
    3537    virtual ~QwtLegend();
    3638
    … …  
    4143    QwtLegendData::Mode defaultItemMode() const;
    4244
    43     QWidget *contentsWidget();
    44     const QWidget *contentsWidget() const;
     45    QWidget* contentsWidget();
     46    const QWidget* contentsWidget() const;
    4547
    46     QWidget *legendWidget( const QVariant &  ) const;
    47     QList<QWidget *> legendWidgets( const QVariant & ) const;
     48    QWidget* legendWidget( const QVariant&  ) const;
     49    QList< QWidget* > legendWidgets( const QVariant& ) const;
    4850
    49     QVariant itemInfo( const QWidget * ) const;
     51    QVariant itemInfo( const QWidget* ) const;
    5052
    51     virtual bool eventFilter( QObject *, QEvent * );
     53    virtual bool eventFilter( QObject*, QEvent* ) QWT_OVERRIDE;
    5254
    53     virtual QSize sizeHint() const;
    54     virtual int heightForWidth( int width ) const;
     55    virtual QSize sizeHint() const QWT_OVERRIDE;
     56    virtual int heightForWidth( int w ) const QWT_OVERRIDE;
    5557
    56     QScrollBar *horizontalScrollBar() const;
    57     QScrollBar *verticalScrollBar() const;
     58    QScrollBar* horizontalScrollBar() const;
     59    QScrollBar* verticalScrollBar() const;
    5860
    59     virtual void renderLegend( QPainter *,
    60         const QRectF &, bool fillBackground ) const;
     61    virtual void renderLegend( QPainter*,
     62        const QRectF&, bool fillBackground ) const QWT_OVERRIDE;
    6163
    62     virtual void renderItem( QPainter *,
    63         const QWidget *, const QRectF &, bool fillBackground ) const;
     64    virtual void renderItem( QPainter*,
     65        const QWidget*, const QRectF&, bool fillBackground ) const;
    6466
    65     virtual bool isEmpty() const;
    66     virtual int scrollExtent( Qt::Orientation ) const;
     67    virtual bool isEmpty() const QWT_OVERRIDE;
     68    virtual int scrollExtent( Qt::Orientation ) const QWT_OVERRIDE;
    6769
    68 Q_SIGNALS:
     70  Q_SIGNALS:
    6971    /*!
    70       A signal which is emitted when the user has clicked on
    71       a legend label, which is in QwtLegendData::Clickable mode.
     72       A signal which is emitted when the user has clicked on
     73       a legend label, which is in QwtLegendData::Clickable mode.
    7274
    73       \param itemInfo Info for the item item of the
     75       \param itemInfo Info for the item item of the
    7476                      selected legend item
    75       \param index Index of the legend label in the list of widgets
     77       \param index Index of the legend label in the list of widgets
    7678                   that are associated with the plot item
    7779
    78       \note clicks are disabled as default
    79       \sa setDefaultItemMode(), defaultItemMode(), QwtPlot::itemToInfo()
     80       \note clicks are disabled as default
     81       \sa setDefaultItemMode(), defaultItemMode(), QwtPlot::itemToInfo()
    8082     */
    81     void clicked( const QVariant &itemInfo, int index );
     83    void clicked( const QVariant& itemInfo, int index );
    8284
    8385    /*!
    84       A signal which is emitted when the user has clicked on
    85       a legend label, which is in QwtLegendData::Checkable mode
     86       A signal which is emitted when the user has clicked on
     87       a legend label, which is in QwtLegendData::Checkable mode
    8688
    87       \param itemInfo Info for the item of the
     89       \param itemInfo Info for the item of the
    8890                      selected legend label
    89       \param index Index of the legend label in the list of widgets
     91       \param index Index of the legend label in the list of widgets
    9092                   that are associated with the plot item
    91       \param on True when the legend label is checked
     93       \param on True when the legend label is checked
    9294
    93       \note clicks are disabled as default
    94       \sa setDefaultItemMode(), defaultItemMode(), QwtPlot::itemToInfo()
     95       \note clicks are disabled as default
     96       \sa setDefaultItemMode(), defaultItemMode(), QwtPlot::itemToInfo()
    9597     */
    96     void checked( const QVariant &itemInfo, bool on, int index );
     98    void checked( const QVariant& itemInfo, bool on, int index );
    9799
    98 public Q_SLOTS:
    99     virtual void updateLegend( const QVariant &,
    100         const QList<QwtLegendData> & );
     100  public Q_SLOTS:
     101    virtual void updateLegend( const QVariant&,
     102        const QList< QwtLegendData >& ) QWT_OVERRIDE;
    101103
    102 protected Q_SLOTS:
     104  protected Q_SLOTS:
    103105    void itemClicked();
    104106    void itemChecked( bool );
    105107
    106 protected:
    107     virtual QWidget *createWidget( const QwtLegendData & ) const;
    108     virtual void updateWidget( QWidget *widget, const QwtLegendData & );
     108  protected:
     109    virtual QWidget* createWidget( const QwtLegendData& ) const;
     110    virtual void updateWidget( QWidget*, const QwtLegendData& );
    109111
    110 private:
     112  private:
    111113    void updateTabOrder();
    112114
    113115    class PrivateData;
    114     PrivateData *d_data;
     116    PrivateData* m_data;
    115117};
    116118
Note: See TracChangeset for help on using the changeset viewer.