casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
QtDrawer.qo.h
Go to the documentation of this file.
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 
00027 #ifndef TQPLOTTER_H
00028 #define TQPLOTTER_H
00029 
00030 #include <casa/aips.h>
00031 #include <casa/BasicSL/String.h>
00032 #include <casa/Containers/Record.h>
00033 #include <casa/Arrays/Array.h>
00034 #include <casa/Arrays/ArrayMath.h>
00035 #include <casa/Arrays/Vector.h>
00036 #include <casa/Arrays/Matrix.h>
00037 #include <casa/Inputs/Input.h>
00038 #include <casa/Arrays/IPosition.h>
00039 #include <display/QtPlotter/QtDrawCanvas.qo.h>
00040 
00041 
00042 #include <graphics/X11/X_enter.h>
00043 #include <QDir>
00044 #include <QColor>
00045 #include <QHash>
00046 #include <QWidget>
00047 #include <QMouseEvent>
00048 #include <QToolButton>
00049 #include <QDialog>
00050 #include <QPixmap>
00051 #include <QLineEdit>
00052 #include <QComboBox>
00053 #include <QGroupBox>
00054 #include <map>
00055 #include <vector>
00056 #include <graphics/X11/X_exit.h>
00057 
00058 inline void initQtDrawerResource() { Q_INIT_RESOURCE(QtDrawer); }
00059 
00060 namespace casa { 
00061 
00062 
00063 class QtDrawer : public QWidget
00064 {
00065     Q_OBJECT
00066 public:
00067     QtDrawer(QWidget *parent = 0, const char *name = 0,
00068             int nr = 1, int rc = 1);
00069     ~QtDrawer();
00070 
00071     QtDrawCanvas* canvas(int i = 0, int j = 0); 
00072 
00073 public slots:
00074     void zoomIn();
00075     void zoomOut();
00076     void print();
00077     void save();
00078     void printExp();
00079     void saveExp();
00080     void writeText();
00081     void openText();
00082     void up();
00083     void down();
00084     void left();
00085     void right();
00086     void updateZoomer();
00087     void focusChanged();
00088     //virtual void closeEvent ( QCloseEvent * event ); 
00089 
00090 signals:
00091 
00092 private:
00093 
00094     void printIt(QPrinter*);
00095     QToolButton *zoomInButton;
00096     QToolButton *zoomOutButton;
00097     QToolButton *leftButton;
00098     QToolButton *rightButton;
00099     QToolButton *upButton;
00100     QToolButton *downButton;
00101     
00102     QToolButton *printButton;
00103     QToolButton *saveButton;
00104     QToolButton *printExpButton;
00105     //QToolButton *saveExpButton;
00106     //QToolButton *writeButton;
00107     QToolButton *openButton;
00108     
00109     QtDrawCanvas *pc;
00110     
00111     QString fileName;
00112 
00113     QGridLayout *grid;
00114     QGroupBox *gridGroup;
00115     int numRow;
00116     int numCol;
00117 };
00118 
00119 
00120 }
00121 #endif
00122