casa
$Rev:20696$
|
00001 //# Copyright (C) 2005 00002 //# Associated Universities, Inc. Washington DC, USA. 00003 //# 00004 //# This library is free software; you can redistribute it and/or modify it 00005 //# under the terms of the GNU Library General Public License as published by 00006 //# the Free Software Foundation; either version 2 of the License, or (at your 00007 //# option) any later version. 00008 //# 00009 //# This library is distributed in the hope that it will be useful, but WITHOUT 00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 //# License for more details. 00013 //# 00014 //# You should have received a copy of the GNU Library General Public License 00015 //# along with this library; if not, write to the Free Software Foundation, 00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00017 //# 00018 //# Correspondence concerning AIPS++ should be addressed as follows: 00019 //# Internet email: aips2-request@nrao.edu. 00020 //# Postal address: AIPS++ Project Office 00021 //# National Radio Astronomy Observatory 00022 //# 520 Edgemont Road 00023 //# Charlottesville, VA 22903-2475 USA 00024 //# 00025 00026 #ifndef QTPLOTTER_H 00027 #define QTPLOTTER_H 00028 00029 #include <casa/aips.h> 00030 #include <casa/BasicSL/String.h> 00031 #include <casa/Containers/Record.h> 00032 #include <casa/Arrays/Array.h> 00033 #include <casa/Arrays/ArrayMath.h> 00034 #include <casa/Arrays/Vector.h> 00035 #include <casa/Arrays/Matrix.h> 00036 #include <casa/Inputs/Input.h> 00037 #include <casa/Arrays/IPosition.h> 00038 #include <display/QtPlotter/QtCanvas.qo.h> 00039 00040 00041 #include <graphics/X11/X_enter.h> 00042 #include <QDir> 00043 #include <QColor> 00044 #include <QHash> 00045 #include <QWidget> 00046 #include <QMouseEvent> 00047 #include <QToolButton> 00048 #include <QDialog> 00049 #include <QPixmap> 00050 #include <QLineEdit> 00051 #include <QComboBox> 00052 #include <map> 00053 #include <vector> 00054 #include <graphics/X11/X_exit.h> 00055 00056 inline void initPlotterResource() { Q_INIT_RESOURCE(QtPlotter); } 00057 00058 namespace casa { 00059 00060 00061 class QtPlotter : public QWidget 00062 { 00063 Q_OBJECT 00064 public: 00065 QtPlotter(QWidget *parent = 0, const char *name = 0); 00066 ~QtPlotter(); 00067 00068 QtCanvas* canvas() {return pc;} 00069 00070 public slots: 00071 void zoomIn(); 00072 void zoomOut(); 00073 void print(); 00074 void save(); 00075 void printExp(); 00076 void saveExp(); 00077 void writeText(); 00078 void openText(); 00079 void up(); 00080 void down(); 00081 void left(); 00082 void right(); 00083 void updateZoomer(); 00084 00085 00086 signals: 00087 00088 private: 00089 00090 void printIt(QPrinter*); 00091 QToolButton *zoomInButton; 00092 QToolButton *zoomOutButton; 00093 QToolButton *leftButton; 00094 QToolButton *rightButton; 00095 QToolButton *upButton; 00096 QToolButton *downButton; 00097 00098 QToolButton *printButton; 00099 QToolButton *saveButton; 00100 QToolButton *printExpButton; 00101 //QToolButton *saveExpButton; 00102 //QToolButton *writeButton; 00103 QToolButton *openButton; 00104 00105 QtCanvas *pc; 00106 00107 QString fileName; 00108 }; 00109 00110 00111 } 00112 #endif 00113