1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
10
#ifndef QWT_PLOT_LAYOUT_H
11
#define QWT_PLOT_LAYOUT_H
13
#include "qwt_global.h"
17
\brief Layout class for QwtPlot.
19
Organizes the geometry for the different QwtPlot components.
22
class QWT_EXPORT QwtPlotLayout
34
explicit QwtPlotLayout();
35
virtual ~QwtPlotLayout();
40
void setCanvasMargin(int margin, int axis = -1);
41
int canvasMargin(int axis) const;
43
void setAlignCanvasToScales(bool);
44
bool alignCanvasToScales() const;
49
void setLegendPosition(QwtPlot::LegendPosition pos, double ratio);
50
void setLegendPosition(QwtPlot::LegendPosition pos);
51
QwtPlot::LegendPosition legendPosition() const;
53
void setLegendRatio(double ratio);
54
double legendRatio() const;
56
virtual QSize minimumSizeHint(const QwtPlot *) const;
58
virtual void activate(const QwtPlot *,
59
const QRect &rect, int options = 0);
61
virtual void invalidate();
63
const QRect &titleRect() const;
64
const QRect &legendRect() const;
65
const QRect &scaleRect(int axis) const;
66
const QRect &canvasRect() const;
72
QRect layoutLegend(int options, const QRect &) const;
73
QRect alignLegend(const QRect &canvasRect,
74
const QRect &legendRect) const;
76
void expandLineBreaks(int options, const QRect &rect,
77
int &dimTitle, int dimAxes[QwtPlot::axisCnt]) const;
79
void alignScales(int options, QRect &canvasRect,
80
QRect scaleRect[QwtPlot::axisCnt]) const;