Organizes the geometry for the different QwtPlot components.
Definition at line 25 of file 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 | setCanvasMargin (int margin, int axis=-1) |
int | canvasMargin (int axis) const |
void | setAlignCanvasToScales (bool) |
bool | alignCanvasToScales () const |
void | setSpacing (int) |
int | spacing () const |
void | setLegendPosition (QwtPlot::Position pos, double ratio) |
void | setLegendPosition (QwtPlot::Position pos) |
QwtPlot::Position | legendPosition () const |
void | setLegendRatio (double ratio) |
double | legendRatio () const |
void | setLegendPos (int pos, double ratio=0.0) |
int | legendPos () 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 &canvasRect, QRect scaleRect[QwtPlot::axisCnt]) const |
Protected Attributes | |
QRect | d_titleRect |
QRect | d_legendRect |
QRect | d_scaleRect [QwtPlot::axisCnt] |
QRect | d_canvasRect |
QwtPlotLayoutData * | d_layoutData |
|
Constructor. Definition at line 66 of file qwt_plot_layout.cpp. References invalidate(), setCanvasMargin(), and setLegendPosition(). |
|
Destructor. Definition at line 79 of file qwt_plot_layout.cpp. |
|
Recalculate the geometry of all components.
References alignLegend(), alignScales(), expandLineBreaks(), invalidate(), QwtLegend::isEmpty(), layoutLegend(), QwtPlot::legend(), and scaleRect(). Referenced by QwtPlot::print(), and QwtPlot::updateLayout(). |
|
Return the align-canvas-to-axis-scales setting. The canvas may:
|
|
Align the legend to the canvas
Referenced by activate(). |
|
Align the ticks of the axis to the canvas borders using the empty corners. Definition at line 773 of file qwt_plot_layout.cpp. References scaleRect(). Referenced by activate(). |
|
Referenced by QwtPlot::canvasMap(), and QwtPlot::print(). |
|
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.
Referenced by activate(). |
|
Invalidate the geometry of all components.
Referenced by activate(), QwtPlot::print(), and QwtPlotLayout(). |
|
Find the geometry for the legend
References legendRect(). Referenced by activate(). |
|
|
|
Referenced by QwtPlot::legendPos(), QwtPlot::legendPosition(), QwtPlot::setLegendPosition(), setLegendRatio(), and QwtPlot::updateTabOrder(). |
|
|
|
Referenced by layoutLegend(), QwtPlot::print(), and QwtPlot::updateLayout(). |
|
Referenced by QwtPlot::margin(), and QwtPlot::setMargin(). |
|
Return a minimum size hint.
References QwtPlot::axis(), QwtScale::baseLineDist(), QwtPlot::canvas(), QwtLegend::heightForWidth(), QwtLegend::isEmpty(), QwtPlot::legend(), QwtScaleDraw::majTickLength(), QwtScale::minBorderDist(), QwtScale::minimumSizeHint(), QwtScale::scaleDraw(), QwtLegend::sizeHint(), and QwtPlot::titleLabel(). Referenced by QwtPlot::minimumSizeHint(). |
|
Referenced by activate(), alignScales(), QwtPlot::print(), and QwtPlot::updateLayout(). |
|
Change the align-canvas-to-axis-scales setting. The canvas may:
|
|
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.
Referenced by QwtPlotLayout(). |
|
Specify the position of the legend.
References setLegendPosition(). |
|
Specify the position of the legend.
References setLegendPosition(). |
|
Specify the position of the legend.
Referenced by QwtPlotLayout(), setLegendPos(), setLegendPosition(), QwtPlot::setLegendPosition(), and setLegendRatio(). |
|
Specify the relative size of the legend in the plot
References legendPosition(), and setLegendPosition(). |
|
Change the margin of the plot. The margin is the space around all components.
Referenced by QwtPlot::setMargin(). |
|
Change the spacing of the plot. The spacing is the distance between the plot components.
|
|
|
|
Referenced by QwtPlot::print(), and QwtPlot::updateLayout(). |