QtOldMWCTools.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 QTOLDMWCTOOLS_H
00028 #define QTOLDMWCTOOLS_H
00029 
00030 #include <casa/aips.h>
00031 //#include <casa/BasicSL/String.h>
00032 //#include <display/DisplayEvents/MWCRTRegion.h>
00033 #include <display/DisplayEvents/MWCCrosshairTool.h>
00034 
00035 #include <display/Display/PanelDisplay.h>
00036 #include <display/QtViewer/QtOldMouseTools.qo.h>
00037 #include <display/QtPlotter/QtMWCTools.qo.h>
00038 
00039 #include <graphics/X11/X_enter.h>
00040 #include <QObject>
00041 #include <QtGui>
00042 #include <graphics/X11/X_exit.h>
00043 
00044 namespace casa {
00045 
00046         class QtOldMWCTool {
00047 
00048         public:
00049                 QtOldMWCTool(): coordType("world") {}
00050                 virtual ~QtOldMWCTool() {}
00051         protected:
00052                 String coordType;
00053 
00054         public:
00055                 virtual void setCoordType(const String& t) {
00056                         if (t == "world") coordType = t;
00057                         else coordType = "pixel";
00058                         // cout << "Object=" << objectName().toStdString()
00059                         //      << " setCoordType: coordType=" << coordType
00060                         //      << " t=" << t << endl;
00061                 }
00062                 //String getCoordType() {return coordType;}
00063 
00064         };
00065 
00066         class QtOldPolyTool: public QtOldPTRegion,  public QtOldMWCTool {
00067                 Q_OBJECT
00068 
00069         public:
00070                 QtOldPolyTool(PanelDisplay* pd);
00071                 virtual ~QtOldPolyTool() {}
00072 
00073         public slots:
00074                 void setCoordType(const String& t);
00075 
00076         signals:
00077                 void wcNotify( const String c,
00078                                const Vector<Double> px, const Vector<Double> py,
00079                                const Vector<Double> wx, const Vector<Double> wy,
00080                                const ProfileType ptype);
00081 
00082         protected:
00083                 virtual void updateRegion();
00084 
00085         };
00086 
00087 
00088         class QtOldEllipseTool: public QtOldELRegion,  public QtOldMWCTool {
00089                 Q_OBJECT
00090 
00091         public:
00092                 QtOldEllipseTool(PanelDisplay* pd);
00093                 virtual ~QtOldEllipseTool() {}
00094 
00095         public slots:
00096                 void setCoordType(const String& t);
00097 
00098         signals:
00099                 void wcNotify( const String c,
00100                                const Vector<Double> px, const Vector<Double> py,
00101                                const Vector<Double> wx, const Vector<Double> wy,
00102                                const ProfileType ptype);
00103 
00104         protected:
00105                 virtual void updateRegion();
00106         };
00107 
00108 
00109         class QtOldRectTool: public QtOldRTRegion,  public QtOldMWCTool {
00110                 Q_OBJECT
00111 
00112         public:
00113                 QtOldRectTool(PanelDisplay* pd);
00114                 virtual ~QtOldRectTool() {}
00115 
00116         public slots:
00117                 void setCoordType(const String& t);
00118 
00119         signals:
00120                 void wcNotify( const String c,
00121                                const Vector<Double> px, const Vector<Double> py,
00122                                const Vector<Double> wx, const Vector<Double> wy,
00123                                const ProfileType ptype);
00124 
00125         protected:
00126                 virtual void updateRegion();
00127         };
00128 
00129         class QtOldCrossTool: public QObject, public QtOldMWCTool, public MWCCrosshairTool {
00130                 Q_OBJECT
00131 
00132         public:
00133                 QtOldCrossTool();
00134                 virtual ~QtOldCrossTool() {}
00135                 virtual void crosshairReady(const String& evtype);
00136 
00137         public slots:
00138                 void setCoordType(const String& t);
00139 
00140         signals:
00141                 void wcNotify( const String c,
00142                                const Vector<Double> px, const Vector<Double> py,
00143                                const Vector<Double> wx, const Vector<Double> wy,
00144                                const ProfileType ptype);
00145 
00146 
00147         };
00148 
00149 
00150 }
00151 
00152 #endif
00153 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1