Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
3rdparty
qwt
src
qwt_plot_shapeitem.h
Go to the documentation of this file.
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_PLOT_SHAPE_ITEM_H
11
#define QWT_PLOT_SHAPE_ITEM_H
12
13
#include "
qwt_global.h
"
14
#include "
qwt_plot_item.h
"
15
16
#include <qstring.h>
17
18
class
QPainterPath;
19
class
QPolygonF;
20
38
class
QWT_EXPORT
QwtPlotShapeItem
:
public
QwtPlotItem
39
{
40
public
:
47
enum
PaintAttribute
48
{
58
ClipPolygons = 0x01,
59
};
60
62
typedef
QFlags<PaintAttribute>
PaintAttributes
;
63
65
enum
LegendMode
66
{
68
LegendShape
,
69
71
LegendColor
72
};
73
74
explicit
QwtPlotShapeItem
(
const
QString &title = QString() );
75
explicit
QwtPlotShapeItem
(
const
QwtText
&title );
76
77
virtual
~
QwtPlotShapeItem
();
78
79
void
setPaintAttribute(
PaintAttribute
,
bool
on =
true
);
80
bool
testPaintAttribute(
PaintAttribute
)
const
;
81
82
void
setLegendMode(
LegendMode
);
83
LegendMode
legendMode()
const
;
84
85
void
setRect(
const
QRectF & );
86
void
setPolygon(
const
QPolygonF & );
87
88
void
setShape(
const
QPainterPath & );
89
QPainterPath shape()
const
;
90
91
void
setPen(
const
QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
92
void
setPen(
const
QPen & );
93
QPen pen()
const
;
94
95
void
setBrush(
const
QBrush & );
96
QBrush brush()
const
;
97
98
void
setRenderTolerance(
double
);
99
double
renderTolerance()
const
;
100
101
virtual
QRectF
boundingRect
() const
QWT_OVERRIDE
;
102
103
virtual
void
draw( QPainter *,
104
const
QwtScaleMap
&xMap, const
QwtScaleMap
&yMap,
105
const QRectF &canvasRect ) const
QWT_OVERRIDE
;
106
107
virtual
QwtGraphic
legendIcon(
108
int
index, const QSizeF & ) const QWT_OVERRIDE;
109
110
virtual
int
rtti() const QWT_OVERRIDE;
111
112
private:
113
void
init();
114
115
class
PrivateData
;
116
PrivateData *d_data;
117
};
118
119
#endif
QwtPlotShapeItem::LegendShape
Display a scaled down version of the shape.
Definition:
qwt_plot_shapeitem.h:68
qwt_plot_item.h
QWT_EXPORT
#define QWT_EXPORT
Definition:
qwt_global.h:38
QwtPlotShapeItem::PrivateData
Definition:
qwt_plot_shapeitem.cpp:83
QwtPlotShapeItem::PaintAttribute
PaintAttribute
Definition:
qwt_plot_shapeitem.h:47
QwtPlotShapeItem::LegendMode
LegendMode
Mode how to display the item on the legend.
Definition:
qwt_plot_shapeitem.h:65
qwt_global.h
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtGraphic
A paint device for scalable graphics.
Definition:
qwt_graphic.h:75
QwtScaleMap
A scale map.
Definition:
qwt_scale_map.h:26
QwtPlotShapeItem::PaintAttributes
QFlags< PaintAttribute > PaintAttributes
Paint attributes.
Definition:
qwt_plot_shapeitem.h:62
QwtPlotShapeItem
A plot item, which displays any graphical shape, that can be defined by a QPainterPath.
Definition:
qwt_plot_shapeitem.h:38
QwtPlotItem
Base class for items on the plot canvas.
Definition:
qwt_plot_item.h:65
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition:
qwt_global.h:53
QwtPlotItem::boundingRect
virtual QRectF boundingRect() const
Definition:
qwt_plot_item.cpp:568
plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10