USGS

Isis 3.0 Developer's Reference (API)

Home

MosaicSceneItem.h
Go to the documentation of this file.
1 #ifndef MosaicItem_H
2 #define MosaicItem_H
3 
4 #include <QAbstractGraphicsShapeItem>
5 
6 class QGraphicsPolygonItem;
7 
8 namespace geos {
9  namespace geom {
10  class MultiPolygon;
11  }
12 }
13 
14 namespace Isis {
15  class Camera;
16  class Image;
17  class MosaicSceneWidget;
18  class Projection;
19  class PvlGroup;
20  class Stretch;
21  class UniversalGroundMap;
22 
44  Q_OBJECT
45  public:
48 
49  virtual QRectF boundingRect() const;
50  virtual void paint(QPainter *painter,
51  const QStyleOptionGraphicsItem *option,
52  QWidget *widget = 0);
53 
54  QColor color() const;
55  Image *image() { return m_image; }
56  QGraphicsSimpleTextItem *getLabel() const { return m_label; }
57 
58  void reproject();
59  bool contains(const QPointF &) const;
60  void updateSelection(bool);
61 
63  updateChildren();
64  }
65 
66  signals:
67  void colorChanged();
68  void changed(const QList<QRectF> &);
69 
70  public slots:
71  void cubeDisplayChanged();
72 
73  protected:
74  virtual bool sceneEvent(QEvent *event);
75 
76  protected:
77  virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
78 
79  private slots:
80  void lostCubeDisplay();
81 
82  private:
84  MosaicSceneItem & operator=(const MosaicSceneItem &);
85 
86  void updateChildren();
87  Stretch *getStretch();
88 
89  MosaicSceneWidget *m_scene;
90 
91  geos::geom::MultiPolygon *m_mp;
92  geos::geom::MultiPolygon *m_180mp;
94  UniversalGroundMap *groundMap;
95 
96  void setupFootprint();
97  void drawImage(QPainter *painter, const QStyleOptionGraphicsItem *option);
98 
99  double getPixelValue(int sample, int line);
100  void setupStretch();
101 
102  Image *m_image;
103  Stretch *m_cubeDnStretch;
104 
105  bool m_showingLabel;
106  bool m_ignoreCubeDisplayChanged;
107 
108  QGraphicsSimpleTextItem *m_label;
109  };
110 };
111 
112 #endif
113