WorldAxesDD.h

Go to the documentation of this file.
00001 //# WorldAxesDD.h: world axis labelling DisplayData
00002 //# Copyright (C) 2000,2001,2003,2004
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef TRIALDISPLAY_WORLDAXESDD_H
00029 #define TRIALDISPLAY_WORLDAXESDD_H
00030 
00031 #include <casa/aips.h>
00032 #include <display/DisplayDatas/AxesDisplayData.h>
00033 
00034 namespace casa { //# NAMESPACE CASA - BEGIN
00035 
00036         class DParameterChoice;
00037 
00038 // <summary>
00039 // A DisplayData to setup a World coordinate plot
00040 // </summary>
00041 //
00042 // <use visibility=export>
00043 //
00044 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00045 // </reviewed>
00046 //
00047 // <prerequisite>
00048 //   <li> DisplayData
00049 //   <li> AxesDisplayData
00050 // </prerequisite>
00051 //
00052 // <etymology>
00053 // </etymology>
00054 // <synopsis>
00055 //
00056 // </synopsis>
00057 
00058         class WorldAxesDD : public AxesDisplayData {
00059 
00060         public:
00061 
00062                 // Constructor.
00063                 WorldAxesDD();
00064 
00065                 // Destructor.
00066                 virtual ~WorldAxesDD();
00067 
00068                 // Install the default options for this DisplayData.
00069                 virtual void setDefaultOptions();
00070 
00071                 // Apply options stored in <src>rec</src> to the DisplayData.  A
00072                 // return value of <src>True</src> means a refresh is needed.
00073                 // <src>recOut</src> contains any fields which were implicitly
00074                 // changed as a result of the call to this function.
00075                 virtual Bool setOptions(Record& rec, Record& recOut);
00076 
00077                 // Retrieve the current and default options and parameter types.
00078                 virtual Record getOptions( bool scrub=false ) const;
00079 
00080                 // Create a new AxesDisplayMethod for drawing on the given
00081                 // WorldCanvas when the AttributeBuffers are suitably matched to the
00082                 // current state of this DisplayData and of the WorldCanvas/Holder.
00083                 // The tag is a unique number used to identify the age of the newly
00084                 // constructed CachingDisplayMethod.
00085                 virtual CachingDisplayMethod* newDisplayMethod(WorldCanvas* worldCanvas,
00086                         AttributeBuffer* wchAttributes,
00087                         AttributeBuffer* ddAttributes,
00088                         CachingDisplayData* dd);
00089 
00090                 // Return the current options of this DisplayData as an
00091                 // AttributeBuffer.
00092                 virtual AttributeBuffer optionsAsAttributes();
00093 
00094                 virtual String spectralUnit() const {
00095                         return itsParamSpectralUnit->value();
00096                 }
00097 
00098                 virtual String velocityType() const {
00099                         return itsParamVelocityType->value();
00100                 }
00101 
00102                 virtual String axisText(const WorldCanvas* wc, const uInt axisNo) const;
00103                 virtual String xAxisText(const WorldCanvas* wc=0) const;
00104                 virtual String yAxisText(const WorldCanvas* wc=0) const;
00105 
00106                 // Pure virtual function from DisplayData...
00107                 String dataType() const {
00108                         return "label";
00109                 }
00110 
00111                 std::string errorMessage( ) const { return ""; }
00112 
00113         protected:
00114 
00115                 // (Required) copy constructor.
00116                 WorldAxesDD(const WorldAxesDD& other);
00117 
00118                 // (Required) copy assignment.
00119                 void operator=(const WorldAxesDD& other);
00120 
00121         private:
00122 
00123                 // Install the default options for this DisplayData.
00124                 void installDefaultOptions();
00125 
00126                 // Set Spectral preference (options)
00127                 DParameterChoice* itsParamSpectralUnit;
00128                 DParameterChoice* itsParamVelocityType;
00129 
00130         };
00131 
00132 
00133 } //# NAMESPACE CASA - END
00134 
00135 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1