source: ntrip/branches/BNC_2.12/qwt/qwt_legend_itemmanager.h@ 8724

Last change on this file since 8724 was 4271, checked in by mervart, 13 years ago
File size: 1.5 KB
Line 
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
15class QwtLegend;
16class QWidget;
17class QRectF;
18class QPainter;
19
20/*!
21 \brief Abstract API to bind plot items to the legend
22*/
23
24class QWT_EXPORT QwtLegendItemManager
25{
26public:
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.