3rdparty
qwt
src
qwt_plot_shapeitem.h
Go to the documentation of this file.
1
/******************************************************************************
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
61
Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
62
63
64
enum
LegendMode
65
{
67
LegendShape
,
68
70
LegendColor
71
};
72
73
explicit
QwtPlotShapeItem
(
const
QString& title = QString() );
74
explicit
QwtPlotShapeItem
(
const
QwtText
& title );
75
76
virtual
~
QwtPlotShapeItem
();
77
78
void
setPaintAttribute( PaintAttribute,
bool
on =
true
);
79
bool
testPaintAttribute( PaintAttribute )
const
;
80
81
void
setLegendMode( LegendMode );
82
LegendMode legendMode()
const
;
83
84
void
setRect(
const
QRectF& );
85
void
setPolygon(
const
QPolygonF& );
86
87
void
setShape(
const
QPainterPath& );
88
QPainterPath shape()
const
;
89
90
void
setPen(
const
QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
91
void
setPen(
const
QPen& );
92
QPen pen()
const
;
93
94
void
setBrush(
const
QBrush& );
95
QBrush brush()
const
;
96
97
void
setRenderTolerance(
double
);
98
double
renderTolerance()
const
;
99
100
virtual
QRectF
boundingRect
() const
QWT_OVERRIDE
;
101
102
virtual
void
draw( QPainter*,
103
const
QwtScaleMap
& xMap, const
QwtScaleMap
& yMap,
104
const QRectF& canvasRect ) const
QWT_OVERRIDE
;
105
106
virtual
QwtGraphic
legendIcon(
107
int
index, const QSizeF& ) const
QWT_OVERRIDE
;
108
109
virtual
int
rtti() const
QWT_OVERRIDE
;
110
111
private:
112
void
init();
113
114
class
PrivateData
;
115
PrivateData
* m_data;
116
};
117
118
#endif
QwtPlotShapeItem
A plot item, which displays any graphical shape, that can be defined by a QPainterPath.
Definition:
qwt_plot_shapeitem.h:38
QwtPlotShapeItem::LegendShape
@ LegendShape
Display a scaled down version of the shape.
Definition:
qwt_plot_shapeitem.h:67
QwtPlotShapeItem::PrivateData
Definition:
qwt_plot_shapeitem.cpp:83
QwtGraphic
A paint device for scalable graphics.
Definition:
qwt_graphic.h:75
qwt_global.h
QwtPlotItem::boundingRect
virtual QRectF boundingRect() const
Definition:
qwt_plot_item.cpp:568
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtPlotItem
Base class for items on the plot canvas.
Definition:
qwt_plot_item.h:66
QwtScaleMap
A scale map.
Definition:
qwt_scale_map.h:26
QwtPlotShapeItem::LegendMode
LegendMode
Mode how to display the item on the legend.
Definition:
qwt_plot_shapeitem.h:64
QwtPlotShapeItem::PaintAttribute
PaintAttribute
Definition:
qwt_plot_shapeitem.h:47
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition:
qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition:
qwt_global.h:38
qwt_plot_item.h
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46