Rev | Line | |
---|
[4271] | 1 | /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
|
---|
| 2 | * Qwt Widget Library
|
---|
| 3 | * Copyright (C) 1997 Josef Wilgen
|
---|
| 4 | * Copyright (C) 2002 Uwe Rathmann
|
---|
| 5 | *
|
---|
| 6 | * This library is free software; you can redistribute it and/or
|
---|
| 7 | * modify it under the terms of the Qwt License, Version 1.0
|
---|
| 8 | *****************************************************************************/
|
---|
| 9 |
|
---|
| 10 | #ifndef QWT_LEGEND_ITEM_MANAGER_H
|
---|
| 11 | #define QWT_LEGEND_ITEM_MANAGER_H
|
---|
| 12 |
|
---|
| 13 | #include "qwt_global.h"
|
---|
| 14 |
|
---|
| 15 | class QwtLegend;
|
---|
| 16 | class QWidget;
|
---|
| 17 | class QRectF;
|
---|
| 18 | class QPainter;
|
---|
| 19 |
|
---|
| 20 | /*!
|
---|
| 21 | \brief Abstract API to bind plot items to the legend
|
---|
| 22 | */
|
---|
| 23 |
|
---|
| 24 | class QWT_EXPORT QwtLegendItemManager
|
---|
| 25 | {
|
---|
| 26 | public:
|
---|
| 27 | //! Constructor
|
---|
| 28 | QwtLegendItemManager()
|
---|
| 29 | {
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | //! Destructor
|
---|
| 33 | virtual ~QwtLegendItemManager()
|
---|
| 34 | {
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | /*!
|
---|
| 38 | Update the widget that represents the item on the legend
|
---|
| 39 | \param legend Legend
|
---|
| 40 | \sa legendItem()
|
---|
| 41 | */
|
---|
| 42 | virtual void updateLegend( QwtLegend *legend ) const = 0;
|
---|
| 43 |
|
---|
| 44 | /*!
|
---|
| 45 | Allocate the widget that represents the item on the legend
|
---|
| 46 | \return Allocated widget
|
---|
| 47 | \sa updateLegend() QwtLegend()
|
---|
| 48 | */
|
---|
| 49 |
|
---|
| 50 | virtual QWidget *legendItem() const = 0;
|
---|
| 51 |
|
---|
| 52 | /*!
|
---|
| 53 | QwtLegendItem can display an icon-identifier followed
|
---|
| 54 | by a text. The icon helps to identify a plot item on
|
---|
| 55 | the plot canvas and depends on the type of information,
|
---|
| 56 | that is displayed.
|
---|
| 57 |
|
---|
| 58 | The default implementation paints nothing.
|
---|
| 59 | */
|
---|
| 60 | virtual void drawLegendIdentifier( QPainter *, const QRectF & ) const
|
---|
| 61 | {
|
---|
| 62 | }
|
---|
| 63 | };
|
---|
| 64 |
|
---|
| 65 | #endif
|
---|
| 66 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.