1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
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
*****************************************************************************/
10
#include "qwt_plot_seriesitem.h"
12
class QwtPlotAbstractSeriesItem::PrivateData
16
orientation( Qt::Vertical )
20
Qt::Orientation orientation;
25
\param title Title of the curve
27
QwtPlotAbstractSeriesItem::QwtPlotAbstractSeriesItem( const QwtText &title ):
30
d_data = new PrivateData();
35
\param title Title of the curve
37
QwtPlotAbstractSeriesItem::QwtPlotAbstractSeriesItem( const QString &title ):
38
QwtPlotItem( QwtText( title ) )
40
d_data = new PrivateData();
44
QwtPlotAbstractSeriesItem::~QwtPlotAbstractSeriesItem()
50
Set the orientation of the item.
52
The orientation() might be used in specific way by a plot item.
53
F.e. a QwtPlotCurve uses it to identify how to display the curve
54
int QwtPlotCurve::Steps or QwtPlotCurve::Sticks style.
58
void QwtPlotAbstractSeriesItem::setOrientation( Qt::Orientation orientation )
60
if ( d_data->orientation != orientation )
62
d_data->orientation = orientation;
68
\return Orientation of the plot item
71
Qt::Orientation QwtPlotAbstractSeriesItem::orientation() const
73
return d_data->orientation;
77
\brief Draw the complete series
79
\param painter Painter
80
\param xMap Maps x-values into pixel coordinates.
81
\param yMap Maps y-values into pixel coordinates.
82
\param canvasRect Contents rect of the canvas
84
void QwtPlotAbstractSeriesItem::draw( QPainter *painter,
85
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
86
const QRectF &canvasRect ) const
88
drawSeries( painter, xMap, yMap, canvasRect, 0, -1 );