1
.TH "QwtPlotLayout" 3 "1 May 2008" "Version 5.1.0" "Qwt User's Guide" \" -*- nroff -*-
9
.SH "Detailed Description"
11
Layout class for \fBQwtPlot\fP.
13
Organizes the geometry for the different \fBQwtPlot\fP components.
15
Definition at line 22 of file qwt_plot_layout.h.
20
.RI "enum \fBOptions\fP { \fBAlignScales\fP = 1, \fBIgnoreScrollbars\fP = 2, \fBIgnoreFrames\fP = 4, \fBIgnoreMargin\fP = 8, \fBIgnoreLegend\fP = 16, \fBPrintMargin\fP = 1, \fBPrintTitle\fP = 2, \fBPrintLegend\fP = 4, \fBPrintGrid\fP = 8, \fBPrintBackground\fP = 16, \fBPrintFrameWithScales\fP = 32, \fBPrintAll\fP = ~PrintFrameWithScales }"
23
.SS "Public Member Functions"
27
.RI "\fBQwtPlotLayout\fP ()"
30
.RI "virtual \fB~QwtPlotLayout\fP ()"
33
.RI "void \fBsetMargin\fP (int)"
36
.RI "int \fBmargin\fP () const"
39
.RI "void \fBsetCanvasMargin\fP (int margin, int axis=-1)"
42
.RI "int \fBcanvasMargin\fP (int axis) const"
45
.RI "void \fBsetAlignCanvasToScales\fP (bool)"
48
.RI "bool \fBalignCanvasToScales\fP () const"
51
.RI "void \fBsetSpacing\fP (int)"
54
.RI "int \fBspacing\fP () const"
57
.RI "void \fBsetLegendPosition\fP (\fBQwtPlot::LegendPosition\fP pos, double ratio)"
60
.RI "void \fBsetLegendPosition\fP (\fBQwtPlot::LegendPosition\fP pos)"
63
.RI "\fBQwtPlot::LegendPosition\fP \fBlegendPosition\fP () const"
66
.RI "void \fBsetLegendRatio\fP (double ratio)"
69
.RI "double \fBlegendRatio\fP () const"
72
.RI "virtual QSize \fBminimumSizeHint\fP (const \fBQwtPlot\fP *) const"
75
.RI "virtual void \fBactivate\fP (const \fBQwtPlot\fP *, const QRect &rect, int options=0)"
78
.RI "virtual void \fBinvalidate\fP ()"
81
.RI "const QRect & \fBtitleRect\fP () const"
84
.RI "const QRect & \fBlegendRect\fP () const"
87
.RI "const QRect & \fBscaleRect\fP (int axis) const"
90
.RI "const QRect & \fBcanvasRect\fP () const"
93
.SS "Protected Member Functions"
97
.RI "QRect \fBlayoutLegend\fP (int options, const QRect &) const"
100
.RI "QRect \fBalignLegend\fP (const QRect &canvasRect, const QRect &legendRect) const"
103
.RI "void \fBexpandLineBreaks\fP (int options, const QRect &rect, int &dimTitle, int dimAxes[QwtPlot::axisCnt]) const"
106
.RI "void \fBalignScales\fP (int options, QRect &canvasRect, QRect scaleRect[QwtPlot::axisCnt]) const"
109
.SH "Constructor & Destructor Documentation"
111
.SS "QwtPlotLayout::QwtPlotLayout ()\fC [explicit]\fP"
115
Definition at line 182 of file qwt_plot_layout.cpp.
117
References invalidate(), setCanvasMargin(), and setLegendPosition().
118
.SS "QwtPlotLayout::~QwtPlotLayout ()\fC [virtual]\fP"
122
Definition at line 193 of file qwt_plot_layout.cpp.
123
.SH "Member Function Documentation"
125
.SS "void QwtPlotLayout::setMargin (int margin)"
127
Change the margin of the plot. The margin is the space around all components.
131
\fImargin\fP new margin
136
\fBmargin()\fP, \fBsetSpacing()\fP, \fBQwtPlot::setMargin()\fP
141
Definition at line 206 of file qwt_plot_layout.cpp.
142
.SS "int QwtPlotLayout::margin () const"
151
\fBsetMargin()\fP, \fBspacing()\fP, \fBQwtPlot::margin()\fP
156
Definition at line 217 of file qwt_plot_layout.cpp.
157
.SS "void QwtPlotLayout::setCanvasMargin (int margin, int axis = \fC-1\fP)"
159
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.
163
\fImargin\fP New margin
165
\fIaxis\fP One of \fBQwtPlot::Axis\fP. Specifies where the position of the margin. -1 means margin at all borders.
175
The margin will have no effect when alignCanvasToScales is true
180
Definition at line 235 of file qwt_plot_layout.cpp.
182
Referenced by QwtPlotLayout().
183
.SS "int QwtPlotLayout::canvasMargin (int axis) const"
187
Margin around the scale tick borders
192
\fBsetCanvasMargin()\fP
197
Definition at line 253 of file qwt_plot_layout.cpp.
199
Referenced by QwtPlot::canvasMap(), and QwtPlot::print().
200
.SS "void QwtPlotLayout::setAlignCanvasToScales (bool alignCanvasToScales)"
202
Change the align-canvas-to-axis-scales setting. The canvas may:
204
extend beyond the axis scale ends to maximize its size,
206
align with the axis scale ends to control its size.
211
\fIalignCanvasToScales\fP New align-canvas-to-axis-scales setting
216
\fBsetCanvasMargin()\fP
221
In this context the term 'scale' means the backbone of a scale.
226
In case of alignCanvasToScales == true canvasMargin will have no effect
231
Definition at line 273 of file qwt_plot_layout.cpp.
232
.SS "bool QwtPlotLayout::alignCanvasToScales () const"
234
Return the align-canvas-to-axis-scales setting. The canvas may:
236
extend beyond the axis scale ends to maximize its size
238
align with the axis scale ends to control its size.
243
align-canvas-to-axis-scales setting
248
\fBsetAlignCanvasToScales\fP, \fBsetCanvasMargin()\fP
253
In this context the term 'scale' means the backbone of a scale.
258
Definition at line 287 of file qwt_plot_layout.cpp.
259
.SS "void QwtPlotLayout::setSpacing (int spacing)"
261
Change the spacing of the plot. The spacing is the distance between the plot components.
265
\fIspacing\fP new spacing
270
\fBsetMargin()\fP, \fBspacing()\fP
275
Definition at line 299 of file qwt_plot_layout.cpp.
276
.SS "int QwtPlotLayout::spacing () const"
285
\fBmargin()\fP, \fBsetSpacing()\fP
290
Definition at line 308 of file qwt_plot_layout.cpp.
291
.SS "void QwtPlotLayout::setLegendPosition (\fBQwtPlot::LegendPosition\fP pos, double ratio)"
293
Specify the position of the legend.
297
\fIpos\fP The legend's position.
299
\fIratio\fP 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.
304
QwtPlot::setLegendPosition()
309
Definition at line 326 of file qwt_plot_layout.cpp.
311
Referenced by QwtPlotLayout(), setLegendPosition(), and setLegendRatio().
312
.SS "void QwtPlotLayout::setLegendPosition (\fBQwtPlot::LegendPosition\fP pos)"
314
Specify the position of the legend.
318
\fIpos\fP The legend's position. Valid values are \fCQwtPlot::LeftLegend\fP, \fCQwtPlot::RightLegend\fP, \fCQwtPlot::TopLegend\fP, \fCQwtPlot::BottomLegend\fP.
323
QwtPlot::setLegendPosition()
328
Definition at line 363 of file qwt_plot_layout.cpp.
330
References setLegendPosition().
331
.SS "\fBQwtPlot::LegendPosition\fP QwtPlotLayout::legendPosition () const"
335
Position of the legend
340
\fBsetLegendPosition()\fP, QwtPlot::setLegendPosition(), QwtPlot::legendPosition()
345
Definition at line 373 of file qwt_plot_layout.cpp.
347
Referenced by setLegendRatio().
348
.SS "void QwtPlotLayout::setLegendRatio (double ratio)"
350
Specify the relative size of the legend in the plot
354
\fIratio\fP 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.
359
Definition at line 387 of file qwt_plot_layout.cpp.
361
References legendPosition(), and setLegendPosition().
362
.SS "double QwtPlotLayout::legendRatio () const"
366
The relative size of the legend in the plot.
371
\fBsetLegendPosition()\fP
376
Definition at line 396 of file qwt_plot_layout.cpp.
377
.SS "QSize QwtPlotLayout::minimumSizeHint (const \fBQwtPlot\fP * plot) const\fC [virtual]\fP"
379
Return a minimum size hint.
383
\fBQwtPlot::minimumSizeHint()\fP
388
Definition at line 463 of file qwt_plot_layout.cpp.
390
References QwtPlot::axisEnabled(), QwtPlot::axisWidget(), QwtPlot::canvas(), and QwtScaleWidget::minimumSizeHint().
391
.SS "void QwtPlotLayout::activate (const \fBQwtPlot\fP * plot, const QRect & plotRect, int options = \fC0\fP)\fC [virtual]\fP"
393
Recalculate the geometry of all components.
397
\fIplot\fP Plot to be layout
399
\fIplotRect\fP Rect where to place the components
401
\fIoptions\fP Options
406
\fBinvalidate()\fP, \fBtitleRect()\fP, \fBlegendRect()\fP, \fBscaleRect()\fP, \fBcanvasRect()\fP
411
Definition at line 1022 of file qwt_plot_layout.cpp.
413
References alignLegend(), alignScales(), expandLineBreaks(), invalidate(), QwtLegend::isEmpty(), layoutLegend(), QwtPlot::legend(), and scaleRect().
414
.SS "void QwtPlotLayout::invalidate ()\fC [virtual]\fP"
416
Invalidate the geometry of all components.
425
Definition at line 451 of file qwt_plot_layout.cpp.
427
Referenced by activate(), and QwtPlotLayout().
428
.SS "const QRect & QwtPlotLayout::titleRect () const"
432
Geometry for the title
437
\fBactivate()\fP, \fBinvalidate()\fP
442
Definition at line 406 of file qwt_plot_layout.cpp.
443
.SS "const QRect & QwtPlotLayout::legendRect () const"
447
Geometry for the legend
452
\fBactivate()\fP, \fBinvalidate()\fP
457
Definition at line 416 of file qwt_plot_layout.cpp.
459
Referenced by layoutLegend().
460
.SS "const QRect & QwtPlotLayout::scaleRect (int axis) const"
464
\fIaxis\fP Axis index
469
Geometry for the scale
474
\fBactivate()\fP, \fBinvalidate()\fP
479
Definition at line 427 of file qwt_plot_layout.cpp.
481
Referenced by activate(), alignScales(), and QwtPlot::print().
482
.SS "const QRect & QwtPlotLayout::canvasRect () const"
486
Geometry for the canvas
491
\fBactivate()\fP, \fBinvalidate()\fP
496
Definition at line 442 of file qwt_plot_layout.cpp.
498
Referenced by QwtPlot::print().
499
.SS "QRect QwtPlotLayout::layoutLegend (int options, const QRect & rect) const\fC [protected]\fP"
501
Find the geometry for the legend
505
\fIoptions\fP Options how to layout the legend
507
\fIrect\fP Rectangle where to place the legend
512
Geometry for the legend
517
Definition at line 647 of file qwt_plot_layout.cpp.
519
References legendRect().
521
Referenced by activate().
522
.SS "QRect QwtPlotLayout::alignLegend (const QRect & canvasRect, const QRect & legendRect) const\fC [protected]\fP"
524
Align the legend to the canvas
528
\fIcanvasRect\fP Geometry of the canvas
530
\fIlegendRect\fP Maximum geometry for the legend
535
Geometry for the aligned legend
540
Definition at line 708 of file qwt_plot_layout.cpp.
542
Referenced by activate().
543
.SS "void QwtPlotLayout::expandLineBreaks (int options, const QRect & rect, int & dimTitle, int dimAxis[QwtPlot::axisCnt]) const\fC [protected]\fP"
545
Expand all line breaks in text labels, and calculate the height of their widgets in orientation of the text.
549
\fIoptions\fP Options how to layout the legend
551
\fIrect\fP Bounding rect for title, axes and canvas.
553
\fIdimTitle\fP Expanded height of the title widget
555
\fIdimAxis\fP Expanded heights of the axis in axis orientation.
560
Definition at line 743 of file qwt_plot_layout.cpp.
562
Referenced by activate().
563
.SS "void QwtPlotLayout::alignScales (int options, QRect & canvasRect, QRect scaleRect[QwtPlot::axisCnt]) const\fC [protected]\fP"
565
Align the ticks of the axis to the canvas borders using the empty corners.
567
Definition at line 849 of file qwt_plot_layout.cpp.
569
References scaleRect().
571
Referenced by activate().
575
Generated automatically by Doxygen for Qwt User's Guide from the source code.