Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

QwtPlotLayout Class Reference

Layout class for QwtPlot. More...

#include <qwt_plot_layout.h>

List of all members.

Public Types

enum  Options { IgnoreScrollbars = 1, AlignScales = 2, IgnoreFrames = 4 }

Public Methods

 QwtPlotLayout ()
virtual ~QwtPlotLayout ()
void setMargin (int)
int margin () const
void setSpacing (int)
int spacing () const
void setLegendPos (int pos)
int legendPos () const
virtual QSize minimumSizeHint (const QLabel *, const QwtLegend *, const QwtScale *[QwtPlot::axisCnt], const QwtPlotCanvas *) const
virtual void activate (const QRect &rect, const QwtPlotPrintFilter &, const QLabel *, const QwtLegend *, const QwtScale *[QwtPlot::axisCnt], const QwtPlotCanvas *, int options=0)
virtual void invalidate ()
const QRect & titleRect () const
const QRect & legendRect () const
const QRect & scaleRect (int axis) const
const QRect & canvasRect () const

Protected Methods

QRect layoutLegend (int options, const QRect &) const
QRect alignLegend (int options, const QRect &canvasRect, const QRect &legendRect) const
void expandLineBreaks (int options, const QRect &rect, int &dimTitle, int dimAxes[QwtPlot::axisCnt]) const
void alignScales (int options, QRect scaleRect[QwtPlot::axisCnt]) const

Protected Attributes

QRect d_titleRect
QRect d_legendRect
QRect d_scaleRect [QwtPlot::axisCnt]
QRect d_canvasRect
QwtPlotLayoutData * d_layoutData


Detailed Description

Layout class for QwtPlot.

Organizes the geometry for the different QwtPlot components.


Constructor & Destructor Documentation

QwtPlotLayout::QwtPlotLayout  
 

Constructor.

QwtPlotLayout::~QwtPlotLayout   [virtual]
 

Destructor.


Member Function Documentation

void QwtPlotLayout::activate const QRect &    plotRect,
const QwtPlotPrintFilter   pfilter,
const QLabel *    title,
const QwtLegend   legend,
const QwtScale   scale[QwtPlot::axisCnt],
const QwtPlotCanvas   canvas,
int    options = 0
[virtual]
 

Recalculate the geometry of all components.

Parameters:
plotRect  Rect where to place the components
pfilter  Print filter
title  Title widget
legend  Legend widget
scale  Scale widget
canvas  Canvas widget
options  Options
See also:
QwtPlotLayout::invalidate(), QwtPlotLayout::titleRect(), QwtPlotLayout::legendRect(), QwtPlotLayout::scaleRect(), QwtPlotLayout::canvasRect()

QRect QwtPlotLayout::alignLegend int    options,
const QRect &    canvasRect,
const QRect &    legendRect
const [protected]
 

Align the legend to the canvas

Parameters:
options  Options how to layout the legend
canvasRect  Geometry of the canvas
legendRect  Maximum geometry for the legend
Returns:
Geometry for the aligned legend

void QwtPlotLayout::alignScales int    options,
QRect    scaleRect[QwtPlot::axisCnt]
const [protected]
 

Align the ticks of the axis to the canvas borders using the empty corners.

const QRect & QwtPlotLayout::canvasRect   const
 

Returns:
Geometry for the canvas
See also:
QwtPlotLayout::activate(), QwtPlotLayout::invalidate()

void QwtPlotLayout::expandLineBreaks int    options,
const QRect &    rect,
int &    dimTitle,
int    dimAxis[QwtPlot::axisCnt]
const [protected]
 

Expand all line breaks in text labels, and calculate the height of their widgets in orientation of the text.

Parameters:
options  Options how to layout the legend
rect  Bounding rect for title, axes and canvas.
dimTitle  Expanded height of the title widget
dimAxis  Expanded heights of the axis in axis orientation.

void QwtPlotLayout::invalidate   [virtual]
 

Invalidate the geometry of all components.

See also:
QwtPlotLayout::activate()

QRect QwtPlotLayout::layoutLegend int    options,
const QRect &    rect
const [protected]
 

Find the geometry for the legend

Parameters:
options  Options how to layout the legend
rect  Rectangle where to place the legend
Returns:
Geometry for the legend

int QwtPlotLayout::legendPos   const
 

Returns:
Position of the legend
See also:
QwtPlotLayout::setLegendPos(), QwtPlot::legendPos()

const QRect & QwtPlotLayout::legendRect   const
 

Returns:
Geometry for the legend
See also:
QwtPlotLayout::activate(), QwtPlotLayout::invalidate()

int QwtPlotLayout::margin   const
 

Returns:
margin
See also:
QwtPlotLayout::setMargin(), QwtPlotLayout::spacing(), QwtPlot::margin()

QSize QwtPlotLayout::minimumSizeHint const QLabel *    title,
const QwtLegend   legend,
const QwtScale   scale[QwtPlot::axisCnt],
const QwtPlotCanvas   canvas
const [virtual]
 

Return a minimum size hint.

See also:
QwtPlot::minimumSizeHint()

const QRect & QwtPlotLayout::scaleRect int    axis const
 

Parameters:
axis  Axis index
Returns:
Geometry for the scale
See also:
QwtPlotLayout::activate(), QwtPlotLayout::invalidate()

void QwtPlotLayout::setLegendPos int    pos
 

Specify the position of the legend.

Parameters:
pos  The legend's position. Valid values are Qwt::Left, Qwt::Right, Qwt::Top, QwtBottom.
See also:
QwtPlot::setLegendPos()

void QwtPlotLayout::setMargin int    margin
 

Change the margin of the plot. The margin is the space around all components.

Parameters:
margin  new margin
See also:
QwtPlotLayout::margin(), QwtPlotLayout::setSpacing(), QwtPlot::setMargin()

void QwtPlotLayout::setSpacing int    spacing
 

Change the spacing of the plot. The spacing is the distance between the plot components.

Parameters:
spacing  new spacing
See also:
QwtPlotLayout::setMargin(), QwtPlotLayout::spacing()

int QwtPlotLayout::spacing   const
 

Returns:
spacing
See also:
QwtPlotLayout::margin(), QwtPlotLayout::setSpacing()

const QRect & QwtPlotLayout::titleRect   const
 

Returns:
Geometry for the title
See also:
QwtPlotLayout::activate(), QwtPlotLayout::invalidate()


Generated on Sun Oct 13 17:10:39 2002 for Qwt User's Guide by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001