Qwt Polar User's Guide
1.0.1
|
#include <qwt_polar_layout.h>
Public Types | |
enum | Option { IgnoreScrollbars = 0x01, IgnoreFrames = 0x02, IgnoreTitle = 0x04, IgnoreLegend = 0x08 } |
typedef QFlags< Option > | Options |
Public Member Functions | |
QwtPolarLayout () | |
virtual | ~QwtPolarLayout () |
void | setLegendPosition (QwtPolarPlot::LegendPosition pos, double ratio) |
void | setLegendPosition (QwtPolarPlot::LegendPosition pos) |
QwtPolarPlot::LegendPosition | legendPosition () const |
void | setLegendRatio (double ratio) |
double | legendRatio () const |
virtual void | activate (const QwtPolarPlot *, const QRectF &rect, Options options=0) |
virtual void | invalidate () |
const QRectF & | titleRect () const |
const QRectF & | legendRect () const |
const QRectF & | canvasRect () const |
Protected Member Functions | |
QRectF | layoutLegend (Options options, QRectF &) const |
Layout class for QwtPolarPlot.
Organizes the geometry for the different QwtPolarPlot components. It is used by the QwtPolar widget to organize its internal widgets or by QwtPolarRnderer to render its content to a QPaintDevice like a QPrinter, QPixmap/QImage or QSvgRenderer.
typedef QFlags<Option> QwtPolarLayout::Options |
Options to configure the plot layout engine.
QwtPolarLayout::QwtPolarLayout | ( | ) | [explicit] |
Constructor.
QwtPolarLayout::~QwtPolarLayout | ( | ) | [virtual] |
Destructor.
void QwtPolarLayout::activate | ( | const QwtPolarPlot * | plot, |
const QRectF & | boundingRect, | ||
Options | options = 0 |
||
) | [virtual] |
Recalculate the geometry of all components.
plot | Plot to be layout |
boundingRect | Rect where to place the components |
options | Options |
const QRectF & QwtPolarLayout::canvasRect | ( | ) | const |
void QwtPolarLayout::invalidate | ( | ) | [virtual] |
Invalidate the geometry of all components.
QRectF QwtPolarLayout::layoutLegend | ( | Options | options, |
QRectF & | rect | ||
) | const [protected] |
Find the geometry for the legend
options | Options how to layout the legend |
rect | Rectangle where to place the legend |
QwtPolarPlot::LegendPosition QwtPolarLayout::legendPosition | ( | ) | const |
double QwtPolarLayout::legendRatio | ( | ) | const |
const QRectF & QwtPolarLayout::legendRect | ( | ) | const |
void QwtPolarLayout::setLegendPosition | ( | QwtPolarPlot::LegendPosition | pos, |
double | ratio | ||
) |
Specify the position of the legend.
pos | The legend's position. |
ratio | Ratio between legend and the bounding rect of title, canvas and axes. The legend will be shrinked if it would need more space than the given ratio. The ratio is limited to ]0.0 .. 1.0]. In case of <= 0.0 it will be reset to the default ratio. The default vertical/horizontal ratio is 0.33/0.5. |
void QwtPolarLayout::setLegendPosition | ( | QwtPolarPlot::LegendPosition | pos | ) |
Specify the position of the legend.
pos | The legend's position. Valid values are QwtPolarPlot::LeftLegend , QwtPolarPlot::RightLegend , QwtPolarPlot::TopLegend , QwtPolarPlot::BottomLegend . |
void QwtPolarLayout::setLegendRatio | ( | double | ratio | ) |
Specify the relative size of the legend in the plot
ratio | Ratio between legend and the bounding rect of title, canvas and axes. The legend will be shrinked if it would need more space than the given ratio. The ratio is limited to ]0.0 .. 1.0]. In case of <= 0.0 it will be reset to the default ratio. The default vertical/horizontal ratio is 0.33/0.5. |
const QRectF & QwtPolarLayout::titleRect | ( | ) | const |