casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QtPlotFrame.qo.h
Go to the documentation of this file.
1 //# QtPlotFrame.qo.h: derived class from QwtPlot to give us access to protected data & virtual functions
2 //# with surrounding Gui functionality
3 //# Copyright (C) 2005
4 //# Associated Universities, Inc. Washington DC, USA.
5 //#
6 //# This library is free software; you can redistribute it and/or modify it
7 //# under the terms of the GNU Library General Public License as published by
8 //# the Free Software Foundation; either version 2 of the License, or (at your
9 //# option) any later version.
10 //#
11 //# This library is distributed in the hope that it will be useful, but WITHOUT
12 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 //# License for more details.
15 //#
16 //# You should have received a copy of the GNU Library General Public License
17 //# along with this library; if not, write to the Free Software Foundation,
18 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 //#
20 //# Correspondence concerning AIPS++ should be addressed as follows:
21 //# Internet email: aips2-request@nrao.edu.
22 //# Postal address: AIPS++ Project Office
23 //# National Radio Astronomy Observatory
24 //# 520 Edgemont Road
25 //# Charlottesville, VA 22903-2475 USA
26 //#
27 //# $Id: QtDisplayPanelGui.qo.h,v 1.7 2006/10/10 21:42:05 dking Exp $
28 
29 #ifndef CASAQT_QTPLOTFRAME_H
30 #define CASAQT_QTPLOTFRAME_H
31 
32 #include <map>
33 #include <string>
34 #include <qwt_symbol.h>
35 #include <qwt_legend.h>
36 #include <qwt_plot.h>
37 
38 namespace casa {
39 
40  class QtPlotFrame : public QwtPlot {
41  Q_OBJECT
42  public:
43  QtPlotFrame( QWidget *parent=NULL ) : QwtPlot(parent), legend(0) { }
44  QtPlotFrame( const QwtText &title, const QSize &s, QwtPlot::LegendPosition pos=QwtPlot::BottomLegend, QWidget *parent=NULL );
45 
46  void addLegend( QwtPlot::LegendPosition pos );
47  void removeLegend( );
48 
49  static QStringList colors( );
50  static QStringList symbols( );
51  QwtSymbol* symbol(const QString &s);
52 
53  QSize minimumSizeHint( ) const;
54  QSize sizeHint( ) const;
55 
56  private:
57  QSize size_;
58  typedef std::map<QString,QwtSymbol*> symbol_map_type;
60  static void initialize_symbol_map( );
61  QwtLegend *legend;
62  };
63 }
64 #endif
static symbol_map_type symbol_map
QSize sizeHint() const
std::map< QString, QwtSymbol * > symbol_map_type
QwtSymbol * symbol(const QString &s)
static QStringList colors()
static QStringList symbols()
QtPlotFrame(QWidget *parent=NULL)
void addLegend(QwtPlot::LegendPosition pos)
static void initialize_symbol_map()
QSize minimumSizeHint() const
QwtLegend * legend