Isis Developer Reference
MosaicSceneItem.h
Go to the documentation of this file.
1#ifndef MosaicItem_H
2#define MosaicItem_H
3
4#include <QAbstractGraphicsShapeItem>
5
6class QGraphicsPolygonItem;
7
8namespace geos {
9 namespace geom {
10 class MultiPolygon;
11 }
12}
13
14namespace 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:
72 void changed(const QList<QRectF> &);
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
This represents a cube in a project-based GUI interface.
Definition Image.h:105
A single cube in the mosaic scene.
Definition MosaicSceneItem.h:47
void mosaicCubeClosed(Image *)
virtual QRectF boundingRect() const
Definition MosaicSceneItem.cpp:113
~MosaicSceneItem()
Mosaic Item destructor.
Definition MosaicSceneItem.cpp:103
void cubeDisplayChanged()
Someone changed something in the cube display properties, re-read the whole thing.
Definition MosaicSceneItem.cpp:423
void scenePropertiesChanged()
Definition MosaicSceneItem.h:66
Image * image()
Definition MosaicSceneItem.h:59
QColor color() const
Definition MosaicSceneItem.cpp:413
void updateSelection(bool)
Update the selected state.
Definition MosaicSceneItem.cpp:516
void changed(const QList< QRectF > &)
QGraphicsSimpleTextItem * getLabel() const
Definition MosaicSceneItem.h:60
virtual bool sceneEvent(QEvent *event)
This filters out events that happen within our polygons.
Definition MosaicSceneItem.cpp:451
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
The user right clicked on us (or otherwise requested a context menu).
Definition MosaicSceneItem.cpp:556
MosaicSceneItem(Image *image, MosaicSceneWidget *parent)
MosaicSceneItem constructor.
Definition MosaicSceneItem.cpp:47
void reproject()
Called anytime the user reprojects the cube.
Definition MosaicSceneItem.cpp:189
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Re-paints the item.
Definition MosaicSceneItem.cpp:140
bool contains(const QPointF &) const
Test if we contain the point.
Definition MosaicSceneItem.cpp:494
This widget encompasses the entire mosaic scene.
Definition MosaicSceneWidget.h:153
Pixel value mapper.
Definition Stretch.h:58
Universal Ground Map.
Definition UniversalGroundMap.h:69
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
Definition Image.h:42