casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QtOldMWCTools.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 QTOLDMWCTOOLS_H
28 #define QTOLDMWCTOOLS_H
29 
30 #include <casa/aips.h>
31 //#include <casa/BasicSL/String.h>
32 //#include <display/DisplayEvents/MWCRTRegion.h>
34 
38 
39 #include <graphics/X11/X_enter.h>
40 #include <QObject>
41 #include <QtGui>
42 #include <graphics/X11/X_exit.h>
43 
44 namespace casa {
45 
46  class QtOldMWCTool {
47 
48  public:
49  QtOldMWCTool(): coordType("world") {}
50  virtual ~QtOldMWCTool() {}
51  protected:
53 
54  public:
55  virtual void setCoordType(const casacore::String& t) {
56  if (t == "world") coordType = t;
57  else coordType = "pixel";
58  // cout << "Object=" << objectName().toStdString()
59  // << " setCoordType: coordType=" << coordType
60  // << " t=" << t << endl;
61  }
62  //casacore::String getCoordType() {return coordType;}
63 
64  };
65 
66  class QtOldPolyTool: public QtOldPTRegion, public QtOldMWCTool {
67  Q_OBJECT
68 
69  public:
71  virtual ~QtOldPolyTool() {}
72 
73  public slots:
74  void setCoordType(const casacore::String& t);
75 
76  signals:
77  void wcNotify( const casacore::String c,
80  const ProfileType ptype);
81 
82  protected:
83  virtual void updateRegion();
84 
85  };
86 
87 
89  Q_OBJECT
90 
91  public:
93  virtual ~QtOldEllipseTool() {}
94 
95  public slots:
96  void setCoordType(const casacore::String& t);
97 
98  signals:
99  void wcNotify( const casacore::String c,
102  const ProfileType ptype);
103 
104  protected:
105  virtual void updateRegion();
106  };
107 
108 
109  class QtOldRectTool: public QtOldRTRegion, public QtOldMWCTool {
110  Q_OBJECT
111 
112  public:
114  virtual ~QtOldRectTool() {}
115 
116  public slots:
117  void setCoordType(const casacore::String& t);
118 
119  signals:
120  void wcNotify( const casacore::String c,
123  const ProfileType ptype);
124 
125  protected:
126  virtual void updateRegion();
127  };
128 
129  class QtOldCrossTool: public QObject, public QtOldMWCTool, public MWCCrosshairTool {
130  Q_OBJECT
131 
132  public:
133  QtOldCrossTool();
134  virtual ~QtOldCrossTool() {}
135  virtual void crosshairReady(const casacore::String& evtype);
136 
137  public slots:
138  void setCoordType(const casacore::String& t);
139 
140  signals:
141  void wcNotify( const casacore::String c,
144  const ProfileType ptype);
145 
146 
147  };
148 
149 
150 }
151 
152 #endif
153 
QtOldEllipseTool(PanelDisplay *pd)
virtual void setCoordType(const casacore::String &t)
void setCoordType(const casacore::String &t)
void setCoordType(const casacore::String &t)
casacore::String coordType
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)
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)
virtual void updateRegion()
virtual void updateRegion()
void setCoordType(const casacore::String &t)
QtOldPolyTool(PanelDisplay *pd)
virtual void updateRegion()
const Double c
Fundamental physical constants (SI units):
A class which creates and manages &quot;panelled&quot; displays.
Definition: PanelDisplay.h:79
String: the storage and methods of handling collections of characters.
Definition: String.h:223
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)
QtOldRectTool(PanelDisplay *pd)
virtual void crosshairReady(const casacore::String &evtype)
Called when the crosshair position has been chosen.
Base class for MultiWorldCanvas event-based crosshair tools.