Qwt Polar User's Guide  0.1.0
qwt_polar_layout.h
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * QwtPolar Widget Library
00003  * Copyright (C) 2008   Uwe Rathmann
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the Qwt License, Version 1.0
00007  *****************************************************************************/
00008 
00009 #ifndef QWT_POLAR_LAYOUT_H
00010 #define QWT_POLAR_LAYOUT_H
00011 
00012 #include "qwt_global.h"
00013 #include "qwt_polar_plot.h"
00014 
00024 class QWT_POLAR_EXPORT QwtPolarLayout
00025 {
00026 public:
00042     enum Options
00043     {
00044         IgnoreScrollbars = 1,
00045         IgnoreFrames = 2,
00046         IgnoreTitle = 4,
00047         IgnoreLegend = 8
00048     };
00049 
00050     explicit QwtPolarLayout();
00051     virtual ~QwtPolarLayout();
00052 
00053     void setLegendPosition(QwtPolarPlot::LegendPosition pos, double ratio);
00054     void setLegendPosition(QwtPolarPlot::LegendPosition pos);
00055     QwtPolarPlot::LegendPosition legendPosition() const;
00056 
00057     void setLegendRatio(double ratio);
00058     double legendRatio() const;
00059 
00060     virtual QSize minimumSizeHint(const QwtPolarPlot *) const;    
00061 
00062     virtual void activate(const QwtPolarPlot *, 
00063         const QRect &rect, int options = 0);
00064 
00065     virtual void invalidate();
00066 
00067     const QRect &titleRect() const;
00068     const QRect &legendRect() const;
00069     const QRect &canvasRect() const;
00070 
00071     class LayoutData;
00072 
00073 protected:
00074     QRect layoutLegend(int options, const QRect &) const;
00075 
00076 private:
00077     class PrivateData;
00078     PrivateData *d_data;
00079 };
00080 
00081 #endif