Loading [MathJax]/jax/output/NativeMML/config.js
Isis 3 Developer Reference
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 
48  Q_OBJECT
49  public:
52 
53  virtual QRectF boundingRect() const;
54  virtual void paint(QPainter *painter,
55  const QStyleOptionGraphicsItem *option,
56  QWidget *widget = 0);
57 
58  QColor color() const;
59  Image *image() { return m_image; }
60  QGraphicsSimpleTextItem *getLabel() const { return m_label; }
61 
62  void reproject();
63  bool contains(const QPointF &) const;
64  void updateSelection(bool);
65 
67  updateChildren();
68  }
69 
70  signals:
71  void colorChanged();
72  void changed(const QList<QRectF> &);
73  void mosaicCubeClosed(Image *);
74 
75  public slots:
76  void cubeDisplayChanged();
77 
78  protected:
79  virtual bool sceneEvent(QEvent *event);
80 
81  protected:
82  virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
83 
84  private slots:
85  void lostCubeDisplay();
86  void onCloseCube();
87 
88  private:
90  MosaicSceneItem & operator=(const MosaicSceneItem &);
91 
92  void updateChildren();
93  Stretch *getStretch();
94 
95  MosaicSceneWidget *m_scene;
96 
97  geos::geom::MultiPolygon *m_mp;
98  geos::geom::MultiPolygon *m_180mp;
100  UniversalGroundMap *groundMap;
101 
102  void setupFootprint();
103  void drawImage(QPainter *painter, const QStyleOptionGraphicsItem *option);
104 
105  double getPixelValue(int sample, int line);
106  void setupStretch();
107 
108  Image *m_image;
109  Stretch *m_cubeDnStretch;
110 
111  bool m_showingLabel;
112  bool m_ignoreCubeDisplayChanged;
113 
114  QGraphicsSimpleTextItem *m_label;
115  };
116 };
117 
118 #endif
119 
MosaicSceneItem(Image *image, MosaicSceneWidget *parent)
MosaicSceneItem constructor.
Definition: MosaicSceneItem.cpp:47
void updateSelection(bool)
Update the selected state.
Definition: MosaicSceneItem.cpp:516
void reproject()
Called anytime the user reprojects the cube.
Definition: MosaicSceneItem.cpp:189
Universal Ground Map.
Definition: UniversalGroundMap.h:85
void scenePropertiesChanged()
Definition: MosaicSceneItem.h:66
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:153
void changed(const QList< QRectF > &)
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
The user right clicked on us (or otherwise requested a context menu).
Definition: MosaicSceneItem.cpp:556
void mosaicCubeClosed(Image *)
Pixel value mapper.
Definition: Stretch.h:72
Image * image()
Definition: MosaicSceneItem.h:59
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Definition: Image.h:43
bool contains(const QPointF &) const
Test if we contain the point.
Definition: MosaicSceneItem.cpp:494
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
virtual bool sceneEvent(QEvent *event)
This filters out events that happen within our polygons.
Definition: MosaicSceneItem.cpp:451
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Re-paints the item.
Definition: MosaicSceneItem.cpp:140
~MosaicSceneItem()
Mosaic Item destructor.
Definition: MosaicSceneItem.cpp:103
virtual QRectF boundingRect() const
Definition: MosaicSceneItem.cpp:113
QColor color() const
Definition: MosaicSceneItem.cpp:413
void cubeDisplayChanged()
Someone changed something in the cube display properties, re-read the whole thing.
Definition: MosaicSceneItem.cpp:423
QGraphicsSimpleTextItem * getLabel() const
Definition: MosaicSceneItem.h:60
A single cube in the mosaic scene.
Definition: MosaicSceneItem.h:47

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/12/2023 23:24:43