USGS

Isis 3.0 Object Programmers' Reference

Home

AbstractPointItem.h
1 #ifndef AbstractPointItem_H
2 #define AbstractPointItem_H
3 
4 #include "AbstractTreeItem.h"
5 
6 
7 class QString;
8 class QVariant;
9 
10 
11 namespace Isis {
12  class ControlPoint;
13  class Distance;
14  class Latitude;
15  class Longitude;
16  class SurfacePoint;
17 
18  namespace CnetViz {
19  class TableColumnList;
20 
33  class AbstractPointItem : public virtual AbstractTreeItem {
34  public:
35  // If a column is added or removed then make sure you also update
36  // the COLS constant that immediately follows this enum.
37  enum Column {
38  Id = 0,
39  PointType = 1,
40  ChooserName = 2,
41  DateTime = 3,
42  EditLock = 4,
43  Ignored = 5,
44  Reference = 6,
45  AdjustedSPLat = 7,
46  AdjustedSPLon = 8,
47  AdjustedSPRadius = 9,
48  AdjustedSPLatSigma = 10,
49  AdjustedSPLonSigma = 11,
50  AdjustedSPRadiusSigma = 12,
51  APrioriSPLat = 13,
52  APrioriSPLon = 14,
53  APrioriSPRadius = 15,
54  APrioriSPLatSigma = 16,
55  APrioriSPLonSigma = 17,
56  APrioriSPRadiusSigma = 18,
57  APrioriSPSource = 19,
58  APrioriSPSourceFile = 20,
59  APrioriRadiusSource = 21,
60  APrioriRadiusSourceFile = 22,
61  JigsawRejected = 23
62  };
63  static const int COLS = 24;
64 
65  static QString getColumnName(Column);
66  static Column getColumn(QString);
67  static TableColumnList *createColumns();
68 
69 
70  public:
71  AbstractPointItem(ControlPoint *cp, int avgCharWidth,
72  AbstractTreeItem *parent = 0);
73  virtual ~AbstractPointItem();
74 
75  QVariant getData() const;
76  QVariant getData(QString columnTitle) const;
77  void setData(QString const &columnTitle, QString const &newData);
78  bool isDataEditable(QString columnTitle) const;
79  void deleteSource();
80  InternalPointerType getPointerType() const;
81  void *getPointer() const;
82  bool hasPoint(ControlPoint *) const;
83 
84 
85  protected:
86  virtual void sourceDeleted();
87 
88 
89  private:
91  const AbstractPointItem &operator=(const AbstractPointItem &other);
92 
93  SurfacePoint prepareSigmas(Distance, SurfacePoint);
94  SurfacePoint prepareSurfacePoint(Latitude, SurfacePoint);
95  SurfacePoint prepareSurfacePoint(Longitude, SurfacePoint);
96  SurfacePoint prepareSurfacePoint(Distance, SurfacePoint);
97  SurfacePoint prepareSurfacePoint(SurfacePoint);
98 
99 
100  private:
101  ControlPoint *m_point;
102  };
103  }
104 }
105 
106 #endif