Layout class for QwtPlot.
Más...
#include <qwt_plot_layout.h>
Lista de todos los miembros.
Clases |
class | LayoutData |
class | PrivateData |
Tipos públicos |
enum | Options {
AlignScales = 1,
IgnoreScrollbars = 2,
IgnoreFrames = 4,
IgnoreMargin = 8,
IgnoreLegend = 16
} |
Métodos públicos |
| QwtPlotLayout () |
| Constructor.
|
virtual | ~QwtPlotLayout () |
| Destructor.
|
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::LegendPosition pos, double ratio) |
| Specify the position of the legend.
|
void | setLegendPosition (QwtPlot::LegendPosition pos) |
| Specify the position of the legend.
|
QwtPlot::LegendPosition | legendPosition () const |
void | setLegendRatio (double ratio) |
double | legendRatio () const |
virtual QSize | minimumSizeHint (const QwtPlot *) const |
| Return a minimum size hint.
|
virtual void | activate (const QwtPlot *, const QRect &rect, int options=0) |
| Recalculate the geometry of all components.
|
virtual void | invalidate () |
const QRect & | titleRect () const |
const QRect & | legendRect () const |
const QRect & | scaleRect (int axis) const |
const QRect & | canvasRect () const |
Métodos protegidos |
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 |
Descripción detallada
Layout class for QwtPlot.
Organizes the geometry for the different QwtPlot components.
Documentación de las enumeraciones miembro de la clase
- Valores de enumeraciones:
AlignScales |
|
IgnoreScrollbars |
|
IgnoreFrames |
|
IgnoreMargin |
|
IgnoreLegend |
|
Documentación del constructor y destructor
QwtPlotLayout::QwtPlotLayout |
( |
| ) |
[explicit] |
QwtPlotLayout::~QwtPlotLayout |
( |
| ) |
[virtual] |
Documentación de las funciones miembro
void QwtPlotLayout::activate |
( |
const QwtPlot * |
plot, |
|
|
const QRect & |
plotRect, |
|
|
int |
options = 0 |
|
) |
| [virtual] |
bool QwtPlotLayout::alignCanvasToScales |
( |
| ) |
const |
Return the align-canvas-to-axis-scales setting. The canvas may:
- extend beyond the axis scale ends to maximize its size
- align with the axis scale ends to control its size.
- Devuelve:
- align-canvas-to-axis-scales setting
- Ver también:
- setAlignCanvasToScales, setCanvasMargin()
- Nota:
- In this context the term 'scale' means the backbone of a scale.
QRect QwtPlotLayout::alignLegend |
( |
const QRect & |
canvasRect, |
|
|
const QRect & |
legendRect |
|
) |
| const [protected] |
Align the legend to the canvas
- Parámetros:
-
canvasRect | Geometry of the canvas |
legendRect | Maximum geometry for the legend |
- Devuelve:
- Geometry for the aligned legend
void QwtPlotLayout::alignScales |
( |
int |
options, |
|
|
QRect & |
canvasRect, |
|
|
QRect |
scaleRect[QwtPlot::axisCnt] |
|
) |
| const [protected] |
Align the ticks of the axis to the canvas borders using the empty corners.
int QwtPlotLayout::canvasMargin |
( |
int |
axis | ) |
const |
const QRect & QwtPlotLayout::canvasRect |
( |
| ) |
const |
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.
- Parámetros:
-
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.
- Ver también:
- activate()
QRect QwtPlotLayout::layoutLegend |
( |
int |
options, |
|
|
const QRect & |
rect |
|
) |
| const [protected] |
Find the geometry for the legend
- Parámetros:
-
options | Options how to layout the legend |
rect | Rectangle where to place the legend |
- Devuelve:
- Geometry for the legend
- Devuelve:
- Position of the legend
- Ver también:
- setLegendPosition(), QwtPlot::setLegendPosition(), QwtPlot::legendPosition()
double QwtPlotLayout::legendRatio |
( |
| ) |
const |
const QRect & QwtPlotLayout::legendRect |
( |
| ) |
const |
int QwtPlotLayout::margin |
( |
| ) |
const |
QSize QwtPlotLayout::minimumSizeHint |
( |
const QwtPlot * |
plot | ) |
const [virtual] |
const QRect & QwtPlotLayout::scaleRect |
( |
int |
axis | ) |
const |
void QwtPlotLayout::setAlignCanvasToScales |
( |
bool |
alignCanvasToScales | ) |
|
Change the align-canvas-to-axis-scales setting. The canvas may:
- extend beyond the axis scale ends to maximize its size,
- align with the axis scale ends to control its size.
- Parámetros:
-
alignCanvasToScales | New align-canvas-to-axis-scales setting |
- Ver también:
- setCanvasMargin()
- Nota:
- In this context the term 'scale' means the backbone of a scale.
- Atención:
- In case of alignCanvasToScales == true canvasMargin will have no effect
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.
- Parámetros:
-
margin | New margin |
axis | One of QwtPlot::Axis. Specifies where the position of the margin. -1 means margin at all borders. |
- Ver también:
- canvasMargin()
- Atención:
- The margin will have no effect when alignCanvasToScales is true
Specify the position of the legend.
- Parámetros:
-
pos | The legend's position. |
ratio | 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. |
- Ver también:
- QwtPlot::setLegendPosition()
Specify the position of the legend.
- Parámetros:
-
- Ver también:
- QwtPlot::setLegendPosition()
void QwtPlotLayout::setLegendRatio |
( |
double |
ratio | ) |
|
Specify the relative size of the legend in the plot
- Parámetros:
-
ratio | 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. |
void QwtPlotLayout::setMargin |
( |
int |
margin | ) |
|
void QwtPlotLayout::setSpacing |
( |
int |
spacing | ) |
|
Change the spacing of the plot. The spacing is the distance between the plot components.
- Parámetros:
-
- Ver también:
- setMargin(), spacing()
int QwtPlotLayout::spacing |
( |
| ) |
const |
const QRect & QwtPlotLayout::titleRect |
( |
| ) |
const |
La documentación para esta clase fue generada a partir de los siguientes ficheros: