~showard314/ubuntu/natty/qtiplot/Python2.7_fix

« back to all changes in this revision

Viewing changes to 3rdparty/qwt/playground/polarplot/src/qwt_radial_plot_item.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-04-04 15:11:55 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080404151155-rjp12ziov4tryj0o
Tags: 0.9.4-1
* New upstream release.
* Refresh patches.
* Remove 04_homepage_url patch. Merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_RADIAL_PLOT_ITEM_H
 
11
#define QWT_RADIAL_PLOT_ITEM_H
 
12
 
 
13
#include "qwt_global.h"
 
14
#include "qwt_text.h"
 
15
#include "qwt_double_rect.h"
 
16
 
 
17
class QString;
 
18
class QRect;
 
19
class QPainter;
 
20
class QwtRadialPlot;
 
21
class QwtScaleMap;
 
22
class QwtScaleDiv;
 
23
 
 
24
/*!
 
25
  \brief Base class for items on the plot canvas
 
26
*/
 
27
 
 
28
class QWT_EXPORT QwtRadialPlotItem
 
29
{
 
30
public:
 
31
    enum RttiValues
 
32
    { 
 
33
        Rtti_RadialPlotItem = 0,
 
34
 
 
35
        Rtti_RadialPlotGrid,
 
36
        Rtti_RadialPlotScale,
 
37
        Rtti_RadialPlotMarker,
 
38
        Rtti_RadialPlotCurve,
 
39
 
 
40
        Rtti_RadialPlotUserItem = 1000
 
41
    };
 
42
 
 
43
    enum ItemAttribute
 
44
    {
 
45
        AutoScale = 1
 
46
    };
 
47
 
 
48
#if QT_VERSION >= 0x040000
 
49
    enum RenderHint
 
50
    {
 
51
        RenderAntialiased = 1
 
52
    };
 
53
#endif
 
54
 
 
55
    explicit QwtRadialPlotItem(const QwtText &title = QwtText());
 
56
    virtual ~QwtRadialPlotItem();
 
57
 
 
58
    void attach(QwtRadialPlot *plot);
 
59
 
 
60
    /*!
 
61
       \brief This method detaches a QwtRadialPlotItem from any QwtRadialPlot is has been
 
62
              associated with.
 
63
 
 
64
       detach() is equivalent to calling attach( NULL )
 
65
       \sa attach( QwtRadialPlot* plot )
 
66
    */
 
67
    void detach() { attach(NULL); }
 
68
 
 
69
    QwtRadialPlot *plot() const;
 
70
    
 
71
    void setTitle(const QString &title);
 
72
    void setTitle(const QwtText &title);
 
73
    const QwtText &title() const;
 
74
 
 
75
    virtual int rtti() const;
 
76
 
 
77
    void setItemAttribute(ItemAttribute, bool on = true);
 
78
    bool testItemAttribute(ItemAttribute) const;
 
79
 
 
80
#if QT_VERSION >= 0x040000
 
81
    void setRenderHint(RenderHint, bool on = true);
 
82
    bool testRenderHint(RenderHint) const;
 
83
#endif
 
84
 
 
85
    double z() const; 
 
86
    void setZ(double z);
 
87
 
 
88
    void show();
 
89
    void hide();
 
90
    virtual void setVisible(bool);
 
91
    bool isVisible () const;
 
92
 
 
93
    virtual void itemChanged();
 
94
 
 
95
    /*!
 
96
      \brief Draw the item
 
97
 
 
98
      \param painter Painter
 
99
      \param distanceMap Maps distance values into pixel coordinates.
 
100
      \param angleMap Maps angle values into pixel coordinates.
 
101
      \param canvasRect Contents rect of the canvas in painter coordinates
 
102
    */
 
103
    virtual void draw(QPainter *painter, 
 
104
        const QwtScaleMap &distanceMap, const QwtScaleMap &angleMap,
 
105
        const QRect &canvasRect) const = 0;
 
106
 
 
107
    virtual QwtDoubleRect boundingRect() const;
 
108
 
 
109
    virtual void updateScaleDiv(const QwtScaleDiv&,
 
110
        const QwtScaleDiv&);
 
111
 
 
112
private:
 
113
    // Disabled copy constructor and operator=
 
114
    QwtRadialPlotItem( const QwtRadialPlotItem & );
 
115
    QwtRadialPlotItem &operator=( const QwtRadialPlotItem & );
 
116
 
 
117
    class PrivateData;
 
118
    PrivateData *d_data;
 
119
};
 
120
            
 
121
#endif