USGS

Isis 3.0 Application Source Code Reference

Home

AbstractPointItem.h

Go to the documentation of this file.
00001 #ifndef AbstractPointItem_H
00002 #define AbstractPointItem_H
00003 
00004 #include "AbstractTreeItem.h"
00005 
00006 
00007 class QString;
00008 class QVariant;
00009 
00010 
00011 namespace Isis
00012 {
00013   class ControlPoint;
00014   class Distance;
00015   class Latitude;
00016   class Longitude;
00017   class SurfacePoint;
00018 
00019   namespace CnetViz
00020   {
00021     class TableColumnList;
00022     
00023     /**
00024      * @brief Base class for a point item in the tree
00025      *
00026      * This class represents a point item in the tree. This is generally
00027      * visualized as a point id. This has columns for compatibility with the
00028      * table models.
00029      *
00030      * @author ????-??-?? Eric Hyer
00031      *
00032      * @internal
00033      */
00034     class AbstractPointItem : public virtual AbstractTreeItem
00035     {
00036         Q_OBJECT
00037 
00038       public:
00039         // If a column is added or removed then make sure you also update
00040         // the COLS constant that immediately follows this enum.
00041         enum Column
00042         {
00043           Id = 0,
00044           PointType = 1,
00045           ChooserName = 2,
00046           DateTime = 3,
00047           EditLock = 4,
00048           Ignored = 5,
00049           Reference = 6,
00050           AdjustedSPLat = 7,
00051           AdjustedSPLon = 8,
00052           AdjustedSPRadius = 9,
00053           AdjustedSPLatSigma = 10,
00054           AdjustedSPLonSigma = 11,
00055           AdjustedSPRadiusSigma = 12,
00056           APrioriSPLat = 13,
00057           APrioriSPLon = 14,
00058           APrioriSPRadius = 15,
00059           APrioriSPLatSigma = 16,
00060           APrioriSPLonSigma = 17,
00061           APrioriSPRadiusSigma = 18,
00062           APrioriSPSource = 19,
00063           APrioriSPSourceFile = 20,
00064           APrioriRadiusSource = 21,
00065           APrioriRadiusSourceFile = 22,
00066           JigsawRejected = 23
00067         };
00068         static const int COLS = 24;
00069 
00070         static QString getColumnName(Column);
00071         static Column getColumn(QString);
00072         static TableColumnList * createColumns();
00073 
00074 
00075       public:
00076         AbstractPointItem(ControlPoint * cp, int avgCharWidth,
00077             AbstractTreeItem * parent = 0);
00078         virtual ~AbstractPointItem();
00079 
00080         QVariant getData() const;
00081         QVariant getData(QString columnTitle) const;
00082         void setData(QString const & columnTitle, QString const & newData);
00083         void deleteSource();
00084         InternalPointerType getPointerType() const;
00085         void * getPointer() const;
00086         bool hasPoint(ControlPoint *) const;
00087 
00088 
00089       private slots:
00090         void sourceDeleted();
00091 
00092 
00093       private:
00094         AbstractPointItem(const AbstractPointItem & other);
00095         const AbstractPointItem & operator=(const AbstractPointItem & other);
00096 
00097         SurfacePoint prepareSigmas(Distance, SurfacePoint);
00098         SurfacePoint prepareSurfacePoint(Latitude, SurfacePoint);
00099         SurfacePoint prepareSurfacePoint(Longitude, SurfacePoint);
00100         SurfacePoint prepareSurfacePoint(Distance, SurfacePoint);
00101         SurfacePoint prepareSurfacePoint(SurfacePoint);
00102 
00103 
00104       private:
00105         ControlPoint * point;
00106     };
00107   }
00108 }
00109 
00110 #endif