#include <qwt_plot_layout.h>
Public Types | |
| enum | Options { AlignScales = 1, IgnoreScrollbars = 2, IgnoreFrames = 4, IgnoreMargin = 8, IgnoreLegend = 16 } |
Public Member Functions | |
| QwtPlotLayout () | |
| virtual | ~QwtPlotLayout () |
| void | setMargin (int) |
| int | margin () const |
| void | setSpacing (int) |
| int | spacing () const |
| void | setLegendPos (int pos, double ratio=0.0) |
| int | legendPos () const |
| double | legendRatio () const |
| virtual QSize | minimumSizeHint (const QwtPlot *) const |
| virtual void | activate (const QwtPlot *, const QRect &rect, 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 Member Functions | |
| QRect | layoutLegend (int options, const QRect &) const |
| QRect | alignLegend (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 |
Private Attributes | |
| int | d_options |
| int | d_legendPos |
| double | d_legendRatio |
| unsigned int | d_margin |
| unsigned int | d_spacing |
| unsigned int | d_canvasMargin |
Organizes the geometry for the different QwtPlot components.
Definition at line 25 of file qwt_plot_layout.h.
|
|
Definition at line 28 of file qwt_plot_layout.h. |
|
|
Constructor.
Definition at line 66 of file qwt_plot_layout.cpp. References Qwt::Bottom, d_layoutData, invalidate(), and setLegendPos(). |
|
|
Destructor.
Definition at line 78 of file qwt_plot_layout.cpp. References d_layoutData. |
|
||||||||||||||||
|
Recalculate the geometry of all components.
Definition at line 701 of file qwt_plot_layout.cpp. References alignLegend(), alignScales(), Qwt::Bottom, d_canvasRect, d_layoutData, d_legendPos, d_legendRect, d_margin, d_scaleRect, d_spacing, d_titleRect, expandLineBreaks(), QwtPlotLayoutData::t_legendData::frameWidth, IgnoreFrames, IgnoreLegend, IgnoreMargin, QwtPlotLayoutData::init(), invalidate(), QwtLegend::isEmpty(), layoutLegend(), Qwt::Left, QwtPlotLayoutData::legend, QwtPlot::legend(), Qwt::Right, scaleRect(), and Qwt::Top. Referenced by QwtPlot::print(), and QwtPlot::updateLayout(). |
|
||||||||||||
|
Align the legend to the canvas
Definition at line 485 of file qwt_plot_layout.cpp. References Qwt::Bottom, d_layoutData, d_legendPos, QwtPlotLayoutData::t_legendData::hint, QwtPlotLayoutData::legend, and Qwt::Top. Referenced by activate(). |
|
||||||||||||
|
Align the ticks of the axis to the canvas borders using the empty corners. Definition at line 631 of file qwt_plot_layout.cpp. References QwtPlotLayoutData::canvas, d_canvasMargin, d_layoutData, QwtPlotLayoutData::t_canvasData::frameWidth, IgnoreFrames, and scaleRect(). Referenced by activate(). |
|
|
Definition at line 234 of file qwt_plot_layout.cpp. References d_canvasRect. Referenced by QwtPlot::print(), and QwtPlot::updateLayout(). |
|
||||||||||||||||||||
|
Expand all line breaks in text labels, and calculate the height of their widgets in orientation of the text.
Definition at line 519 of file qwt_plot_layout.cpp. References QwtPlotLayoutData::t_titleData::align, AlignScales, QwtPlotLayoutData::t_scaleData::baseLineOffset, d_layoutData, d_spacing, QwtPlotLayoutData::t_scaleData::dimWithoutTitle, QwtPlotLayoutData::t_scaleData::end, QwtPlotLayoutData::t_titleData::font, QwtPlotLayoutData::t_titleData::frameWidth, IgnoreFrames, QwtPlotLayoutData::t_scaleData::isEnabled, QwtPlotLayoutData::t_scaleData::start, QwtPlotLayoutData::t_titleData::text, QwtPlotLayoutData::t_scaleData::title, QwtPlotLayoutData::title, QwtPlotLayoutData::t_scaleData::titleAlign, and QwtPlotLayoutData::t_scaleData::titleFont. Referenced by activate(). |
|
|
Invalidate the geometry of all components.
Definition at line 243 of file qwt_plot_layout.cpp. References d_canvasRect, d_legendRect, d_scaleRect, and d_titleRect. Referenced by activate(), QwtPlot::print(), and QwtPlotLayout(). |
|
||||||||||||
|
Find the geometry for the legend
Definition at line 427 of file qwt_plot_layout.cpp. References Qwt::Bottom, d_layoutData, d_legendPos, d_legendRatio, QwtPlotLayoutData::t_legendData::hint, QwtPlotLayoutData::t_legendData::hScrollBarHeight, IgnoreScrollbars, Qwt::Left, QwtPlotLayoutData::legend, legendRect(), Qwt::Right, Qwt::Top, and QwtPlotLayoutData::t_legendData::vScrollBarWidth. Referenced by activate(). |
|
|
Definition at line 178 of file qwt_plot_layout.cpp. References d_legendPos. Referenced by QwtPlot::legendPos(), QwtPlot::setLegendPos(), and QwtPlot::updateTabOrder(). |
|
|
Definition at line 188 of file qwt_plot_layout.cpp. References d_legendRatio. |
|
|
Definition at line 208 of file qwt_plot_layout.cpp. References d_legendRect. Referenced by layoutLegend(), QwtPlot::print(), and QwtPlot::updateLayout(). |
|
|
Definition at line 105 of file qwt_plot_layout.cpp. References d_margin. Referenced by QwtPlot::margin(), and QwtPlot::setMargin(). |
|
|
Return a minimum size hint.
Definition at line 255 of file qwt_plot_layout.cpp. References QwtPlot::axis(), QwtScale::baseLineDist(), QwtPlot::canvas(), d_canvasMargin, d_legendPos, d_legendRatio, d_margin, d_spacing, QwtLegend::heightForWidth(), QwtLegend::isEmpty(), Qwt::Left, QwtPlot::legend(), QwtScaleDraw::majTickLength(), QwtScale::minBorderDist(), QwtScale::minimumSizeHint(), Qwt::Right, QwtScale::scaleDraw(), QwtLegend::sizeHint(), and QwtPlot::titleLabel(). Referenced by QwtPlot::minimumSizeHint(). |
|
|
Definition at line 219 of file qwt_plot_layout.cpp. References d_scaleRect. Referenced by activate(), alignScales(), QwtPlot::print(), and QwtPlot::updateLayout(). |
|
||||||||||||
|
Specify the position of the legend.
Definition at line 146 of file qwt_plot_layout.cpp. References Qwt::Bottom, d_legendPos, d_legendRatio, Qwt::Left, Qwt::Right, and Qwt::Top. Referenced by QwtPlotLayout(), and QwtPlot::setLegendPos(). |
|
|
Change the margin of the plot. The margin is the space around all components.
Definition at line 92 of file qwt_plot_layout.cpp. References d_margin. Referenced by QwtPlot::setMargin(). |
|
|
Change the spacing of the plot. The spacing is the distance between the plot components.
Definition at line 118 of file qwt_plot_layout.cpp. References d_spacing. |
|
|
Definition at line 127 of file qwt_plot_layout.cpp. References d_spacing. |
|
|
Definition at line 198 of file qwt_plot_layout.cpp. References d_titleRect. Referenced by QwtPlot::print(), and QwtPlot::updateLayout(). |
|
|
Definition at line 88 of file qwt_plot_layout.h. Referenced by alignScales(), and minimumSizeHint(). |
|
|
Definition at line 77 of file qwt_plot_layout.h. Referenced by activate(), canvasRect(), and invalidate(). |
|
|
Definition at line 79 of file qwt_plot_layout.h. Referenced by activate(), alignLegend(), alignScales(), expandLineBreaks(), layoutLegend(), QwtPlotLayout(), and ~QwtPlotLayout(). |
|
|
Definition at line 84 of file qwt_plot_layout.h. Referenced by activate(), alignLegend(), layoutLegend(), legendPos(), minimumSizeHint(), and setLegendPos(). |
|
|
Definition at line 85 of file qwt_plot_layout.h. Referenced by layoutLegend(), legendRatio(), minimumSizeHint(), and setLegendPos(). |
|
|
Definition at line 75 of file qwt_plot_layout.h. Referenced by activate(), invalidate(), and legendRect(). |
|
|
Definition at line 86 of file qwt_plot_layout.h. Referenced by activate(), margin(), minimumSizeHint(), and setMargin(). |
|
|
Definition at line 82 of file qwt_plot_layout.h. |
|
|
Definition at line 76 of file qwt_plot_layout.h. Referenced by activate(), invalidate(), and scaleRect(). |
|
|
Definition at line 87 of file qwt_plot_layout.h. Referenced by activate(), expandLineBreaks(), minimumSizeHint(), setSpacing(), and spacing(). |
|
|
Definition at line 74 of file qwt_plot_layout.h. Referenced by activate(), invalidate(), and titleRect(). |
1.3.2