casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QtMWCTools.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 
27 #ifndef QTMWCTOOLS_H
28 #define QTMWCTOOLS_H
29 
30 #include <casa/aips.h>
31 
35 
36 #include <graphics/X11/X_enter.h>
37 #include <QObject>
38 #include <QtGui>
39 #include <graphics/X11/X_exit.h>
40 
41 namespace casa {
42 
43  enum ProfileType {
51  };
52 
53  class QtMWCTool {
54 
55  public:
56  QtMWCTool(): coordType("world") {}
57  virtual ~QtMWCTool() {}
58  protected:
60 
61  public:
62  virtual void setCoordType(const casacore::String& t) {
63  if (t == "world") coordType = t;
64  else coordType = "pixel";
65  // cout << "Object=" << objectName().toStdString()
66  // << " setCoordType: coordType=" << coordType
67  // << " t=" << t << endl;
68  }
69  //casacore::String getCoordType() {return coordType;}
70 
71  };
72 
73  class QtPolyTool: public QtPTRegion, public QtMWCTool {
74  Q_OBJECT
75 
76  public:
78  virtual ~QtPolyTool() {}
79 
80  public slots:
81  void setCoordType(const casacore::String& t);
82 
83  signals:
84  void wcNotify( const casacore::String c,
87  const ProfileType ptype);
88 
89  protected:
90  virtual void updateRegion();
91 
92  };
93 
95  Q_OBJECT
96 
97  public:
99  virtual ~QtPolylineTool() {}
100 
101  public slots:
102  void setCoordType(const casacore::String& t);
103 
104  signals:
105  void wcNotify( const casacore::String c,
108  const ProfileType ptype);
109 
110  protected:
111  virtual void updateRegion();
112 
113  };
114 
115  class QtEllipseTool: public QtELRegion, public QtMWCTool {
116  Q_OBJECT
117 
118  public:
120  virtual ~QtEllipseTool() {}
121 
122  public slots:
123  void setCoordType(const casacore::String& t);
124 
125  signals:
126  void wcNotify( const casacore::String c,
129  const ProfileType ptype);
130 
131  protected:
132  virtual void updateRegion();
133  };
134 
135 
136  class QtRectTool: public QtRTRegion, public QtMWCTool {
137  Q_OBJECT
138 
139  public:
141  virtual ~QtRectTool() {}
142 
143  public slots:
144  void setCoordType(const casacore::String& t);
145 
146  signals:
147  void wcNotify( const casacore::String c,
150  const ProfileType ptype);
151 
152  protected:
153  virtual void updateRegion();
154  };
155 
156  class QtCrossTool: public QtPointRegion, public QtMWCTool {
157  Q_OBJECT
158 
159  public:
161  virtual ~QtCrossTool() {}
162  /* virtual void crosshairReady(const casacore::String& evtype); */
163 
164  public slots:
165  void setCoordType(const casacore::String& t);
166 
167  signals:
168  void wcNotify( const casacore::String c,
171  const ProfileType ptype);
172 
173  protected:
174  virtual void updateRegion();
175  };
176 
177  class QtPVTool: public QtPVToolRegion, public QtMWCTool {
178  Q_OBJECT
179 
180  public:
182  virtual ~QtPVTool() {}
183 
184  public slots:
185  void setCoordType(const casacore::String& t);
186 
187  signals:
188  void wcNotify( const casacore::String c,
191  const ProfileType ptype);
192 
193  protected:
194  virtual void updateRegion();
195 
196  };
197 
198 }
199 
200 #endif
201 
virtual void setCoordType(const casacore::String &t)
Definition: QtMWCTools.qo.h:62
virtual ~QtMWCTool()
Definition: QtMWCTools.qo.h:57
virtual ~QtEllipseTool()
void setCoordType(const casacore::String &t)
virtual ~QtPolyTool()
Definition: QtMWCTools.qo.h:78
void wcNotify(const casacore::String c, const casacore::Vector< double > px, const casacore::Vector< double > py, const casacore::Vector< double > wx, const casacore::Vector< double > wy, const ProfileType ptype)
QtPolylineTool(viewer::RegionSourceFactory *rf, PanelDisplay *pd)
QtPolyTool(viewer::RegionSourceFactory *rf, PanelDisplay *pd)
void setCoordType(const casacore::String &t)
casacore::String coordType
Definition: QtMWCTools.qo.h:59
virtual void updateRegion()
virtual void updateRegion()
QtPVTool(viewer::RegionSourceFactory *rf, PanelDisplay *pd)
void setCoordType(const casacore::String &t)
virtual ~QtCrossTool()
virtual ~QtPolylineTool()
Definition: QtMWCTools.qo.h:99
virtual ~QtRectTool()
void wcNotify(const casacore::String c, const casacore::Vector< double > px, const casacore::Vector< double > py, const casacore::Vector< double > wx, const casacore::Vector< double > wy, const ProfileType ptype)
virtual ~QtPVTool()
void setCoordType(const casacore::String &t)
QtRectTool(viewer::RegionSourceFactory *rf, PanelDisplay *pd)
virtual void updateRegion()
void wcNotify(const casacore::String c, const casacore::Vector< double > px, const casacore::Vector< double > py, const casacore::Vector< double > wx, const casacore::Vector< double > wy, const ProfileType ptype)
void wcNotify(const casacore::String c, const casacore::Vector< double > px, const casacore::Vector< double > py, const casacore::Vector< double > wx, const casacore::Vector< double > wy, const ProfileType ptype)
virtual void updateRegion()
virtual void updateRegion()
virtual void updateRegion()
void wcNotify(const casacore::String c, const casacore::Vector< double > px, const casacore::Vector< double > py, const casacore::Vector< double > wx, const casacore::Vector< double > wy, const ProfileType ptype)
const Double c
Fundamental physical constants (SI units):
A class which creates and manages &quot;panelled&quot; displays.
Definition: PanelDisplay.h:79
QtCrossTool(viewer::RegionSourceFactory *rf, PanelDisplay *pd)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
QtEllipseTool(viewer::RegionSourceFactory *rf, PanelDisplay *pd)
void wcNotify(const casacore::String c, const casacore::Vector< double > px, const casacore::Vector< double > py, const casacore::Vector< double > wx, const casacore::Vector< double > wy, const ProfileType ptype)
void setCoordType(const casacore::String &t)
void setCoordType(const casacore::String &t)