Layout engine for QwtPlot.
More...
#include <qwt_plot_layout.h>
Layout engine for QwtPlot.
It is used by the QwtPlot widget to organize its internal widgets or by QwtPlot::print() to render its content to a QPaintDevice like a QPrinter, QPixmap/QImage or QSvgRenderer.
- See also
- QwtPlot::setPlotLayout()
Definition at line 26 of file qwt_plot_layout.h.
Options to configure the plot layout engine
- See also
- activate(), QwtPlotRenderer
Enumerator |
---|
AlignScales |
Unused.
|
IgnoreScrollbars |
Ignore the dimension of the scrollbars. There are no scrollbars, when the plot is not rendered to widgets.
|
IgnoreFrames |
Ignore all frames.
|
IgnoreLegend |
Ignore the legend.
|
IgnoreTitle |
Ignore the title.
|
IgnoreFooter |
Ignore the footer.
|
Definition at line 33 of file qwt_plot_layout.h.
QwtPlotLayout::QwtPlotLayout |
( |
| ) |
|
|
explicit |
QwtPlotLayout::~QwtPlotLayout |
( |
| ) |
|
|
virtual |
void QwtPlotLayout::activate |
( |
const QwtPlot * |
plot, |
|
|
const QRectF & |
plotRect, |
|
|
Options |
options = 0x00 |
|
) |
| |
|
virtual |
bool QwtPlotLayout::alignCanvasToScale |
( |
int |
axisId | ) |
const |
QRectF QwtPlotLayout::alignLegend |
( |
const QRectF & |
canvasRect, |
|
|
const QRectF & |
legendRect |
|
) |
| const |
|
protected |
Align the legend to the canvas
- Parameters
-
canvasRect | Geometry of the canvas |
legendRect | Maximum geometry for the legend |
- Returns
- Geometry for the aligned legend
Definition at line 813 of file qwt_plot_layout.cpp.
void QwtPlotLayout::alignScales |
( |
Options |
options, |
|
|
QRectF & |
canvasRect, |
|
|
QRectF |
scaleRect[QwtPlot::axisCnt] |
|
) |
| const |
|
protected |
Align the ticks of the axis to the canvas borders using the empty corners.
- Parameters
-
options | Layout options |
canvasRect | Geometry of the canvas ( IN/OUT ) |
scaleRect | Geometries of the scales ( IN/OUT ) |
- See also
- Options
Definition at line 1007 of file qwt_plot_layout.cpp.
int QwtPlotLayout::canvasMargin |
( |
int |
axisId | ) |
const |
QRectF QwtPlotLayout::canvasRect |
( |
| ) |
const |
void QwtPlotLayout::expandLineBreaks |
( |
Options |
options, |
|
|
const QRectF & |
rect, |
|
|
int & |
dimTitle, |
|
|
int & |
dimFooter, |
|
|
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 rectangle for title, footer, axes and canvas. |
dimTitle | Expanded height of the title widget |
dimFooter | Expanded height of the footer widget |
dimAxis | Expanded heights of the axis in axis orientation. |
- See also
- Options
Definition at line 851 of file qwt_plot_layout.cpp.
QRectF QwtPlotLayout::footerRect |
( |
| ) |
const |
void QwtPlotLayout::invalidate |
( |
| ) |
|
|
virtual |
QRectF QwtPlotLayout::layoutLegend |
( |
Options |
options, |
|
|
const QRectF & |
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
- See also
- Options
Definition at line 752 of file qwt_plot_layout.cpp.
double QwtPlotLayout::legendRatio |
( |
| ) |
const |
QRectF QwtPlotLayout::legendRect |
( |
| ) |
const |
QSize QwtPlotLayout::minimumSizeHint |
( |
const QwtPlot * |
plot | ) |
const |
|
virtual |
QRectF QwtPlotLayout::scaleRect |
( |
int |
axis | ) |
const |
void QwtPlotLayout::setAlignCanvasToScale |
( |
int |
axisId, |
|
|
bool |
on |
|
) |
| |
void QwtPlotLayout::setAlignCanvasToScales |
( |
bool |
on | ) |
|
void QwtPlotLayout::setCanvasMargin |
( |
int |
margin, |
|
|
int |
axis = -1 |
|
) |
| |
Change a margin of the canvas. The margin is the space above/below the scale ticks. A negative margin will be set to -1, excluding the borders of the scales.
- Parameters
-
margin | New margin |
axis | One of QwtPlot::Axis. Specifies where the position of the margin. -1 means margin at all borders. |
- See also
- canvasMargin()
- Warning
- The margin will have no effect when alignCanvasToScale() is true
Definition at line 230 of file qwt_plot_layout.cpp.
void QwtPlotLayout::setCanvasRect |
( |
const QRectF & |
rect | ) |
|
|
protected |
void QwtPlotLayout::setFooterRect |
( |
const QRectF & |
rect | ) |
|
|
protected |
Specify the position of the legend.
- Parameters
-
pos | The legend's position. |
ratio | Ratio between legend and the bounding rectangle of title, footer, canvas and axes. The legend will be shrunk 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. |
- See also
- QwtPlot::setLegendPosition()
Definition at line 343 of file qwt_plot_layout.cpp.
Specify the position of the legend.
- Parameters
-
- See also
- QwtPlot::setLegendPosition()
Definition at line 377 of file qwt_plot_layout.cpp.
void QwtPlotLayout::setLegendRatio |
( |
double |
ratio | ) |
|
Specify the relative size of the legend in the plot
- Parameters
-
ratio | Ratio between legend and the bounding rectangle of title, footer, canvas and axes. The legend will be shrunk 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. |
Definition at line 401 of file qwt_plot_layout.cpp.
void QwtPlotLayout::setLegendRect |
( |
const QRectF & |
rect | ) |
|
|
protected |
void QwtPlotLayout::setScaleRect |
( |
int |
axis, |
|
|
const QRectF & |
rect |
|
) |
| |
|
protected |
void QwtPlotLayout::setSpacing |
( |
int |
spacing | ) |
|
void QwtPlotLayout::setTitleRect |
( |
const QRectF & |
rect | ) |
|
|
protected |
int QwtPlotLayout::spacing |
( |
| ) |
const |
QRectF QwtPlotLayout::titleRect |
( |
| ) |
const |
The documentation for this class was generated from the following files: