source: ntrip/trunk/BNC/qwtpolar/qwt_polar_layout.h@ 7781

Last change on this file since 7781 was 4272, checked in by mervart, 12 years ago
File size: 2.0 KB
Line 
1/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * QwtPolar Widget Library
3 * Copyright (C) 2008 Uwe Rathmann
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the Qwt License, Version 1.0
7 *****************************************************************************/
8
9#ifndef QWT_POLAR_LAYOUT_H
10#define QWT_POLAR_LAYOUT_H
11
12#include "qwt_polar_global.h"
13#include "qwt_polar_plot.h"
14
15/*!
16 \brief Layout class for QwtPolarPlot.
17
18 Organizes the geometry for the different QwtPolarPlot components.
19 It is used by the QwtPolar widget to organize its internal widgets
20 or by QwtPolarRnderer to render its content to a QPaintDevice like
21 a QPrinter, QPixmap/QImage or QSvgRenderer.
22*/
23
24class QWT_POLAR_EXPORT QwtPolarLayout
25{
26public:
27
28 //! \brief Options to configure the plot layout engine
29 enum Option
30 {
31 //! Ignore the dimension of the scrollbars.
32 IgnoreScrollbars = 0x01,
33
34 //! Ignore all frames.
35 IgnoreFrames = 0x02,
36
37 //! Ignore the title.
38 IgnoreTitle = 0x04,
39
40 //! Ignore the legend.
41 IgnoreLegend = 0x08
42 };
43
44 //! Options to configure the plot layout engine
45 typedef QFlags<Option> Options;
46
47 explicit QwtPolarLayout();
48 virtual ~QwtPolarLayout();
49
50 void setLegendPosition( QwtPolarPlot::LegendPosition pos, double ratio );
51 void setLegendPosition( QwtPolarPlot::LegendPosition pos );
52 QwtPolarPlot::LegendPosition legendPosition() const;
53
54 void setLegendRatio( double ratio );
55 double legendRatio() const;
56
57 virtual void activate( const QwtPolarPlot *,
58 const QRectF &rect, Options options = 0 );
59
60 virtual void invalidate();
61
62 const QRectF &titleRect() const;
63 const QRectF &legendRect() const;
64 const QRectF &canvasRect() const;
65
66 class LayoutData;
67
68protected:
69 QRectF layoutLegend( Options options, QRectF & ) const;
70
71private:
72 class PrivateData;
73 PrivateData *d_data;
74};
75
76Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarLayout::Options )
77
78#endif
Note: See TracBrowser for help on using the repository browser.