QtPlotFrame.qo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef CASAQT_QTPLOTFRAME_H
00030 #define CASAQT_QTPLOTFRAME_H
00031
00032 #include <map>
00033 #include <string>
00034 #include <qwt_symbol.h>
00035 #include <qwt_legend.h>
00036 #include <qwt_plot.h>
00037
00038 namespace casa {
00039
00040 class QtPlotFrame : public QwtPlot {
00041 Q_OBJECT
00042 public:
00043 QtPlotFrame( QWidget *parent=NULL ) : QwtPlot(parent), legend(0) { }
00044 QtPlotFrame( const QwtText &title, const QSize &s, QwtPlot::LegendPosition pos=QwtPlot::BottomLegend, QWidget *parent=NULL );
00045
00046 void addLegend( QwtPlot::LegendPosition pos );
00047 void removeLegend( );
00048
00049 static QStringList colors( );
00050 static QStringList symbols( );
00051 QwtSymbol* symbol(const QString &s);
00052
00053 QSize minimumSizeHint( ) const;
00054 QSize sizeHint( ) const;
00055
00056 private:
00057 QSize size_;
00058 typedef std::map<QString,QwtSymbol*> symbol_map_type;
00059 static symbol_map_type symbol_map;
00060 static void initialize_symbol_map( );
00061 QwtLegend *legend;
00062 };
00063 }
00064 #endif