USGS

Isis 3.0 Object Programmers' Reference

Home

IndependentCubeViewport.h
Go to the documentation of this file.
1 #ifndef IndependentCubeViewport_h
2 #define IndependentCubeViewport_h
3 
26 // parent class
27 #include "CubeViewport.h"
28 
29 
30 class QEvent;
31 class QObject;
32 class QPaintEvent;
33 class QPoint;
34 class QRect;
35 class QWidget;
36 
37 
38 template < class T > class QList;
39 
40 namespace Isis
41 {
42  class Brick;
43  class Cube;
44  class CubeDataThread;
45  class ViewportBuffer;
46 
60  {
61  Q_OBJECT
62 
63  public:
65  QWidget * parent = 0);
67 
68  bool eventFilter(QObject * o, QEvent * e);
69  void paintEvent(QPaintEvent * e);
70  void restretch(ViewportBuffer *);
71  virtual void showEvent(QShowEvent * e);
72 
73 
74  public slots:
75  void resetKnownGlobal();
76 
77 
78  protected slots:
79  virtual void cubeDataChanged(int cubeId, const Brick *);
80 
81 
82  signals:
83  void synchronize(IndependentCubeViewport *);
84  void trackingChanged(double sample, double line, double lat, double lon,
85  double dn, IndependentCubeViewport *);
86  void trackingChanged(double samp, double line, double dn,
88  void cantTrack(QString, IndependentCubeViewport *);
89 
90 
91 
92  private slots:
93  void handleMouseMove(QPoint);
94  void handleMousePress(QPoint, Qt::MouseButton b);
95  void handleMouseRelease(QPoint);
96  void handleSynchronization(IndependentCubeViewport *);
97 
98 
99  private: // methods
100  QRect bandingRect();
101  void stretch();
102  void track(const QPoint &);
103  void zoom();
104  bool trackBuffer(ViewportBuffer *, const QPoint &, double &);
105 
106 
107  private:
108  bool banding;
109  bool panning;
110  bool stretching;
111  bool zooming;
112  bool leftClick;
113  QPoint * bandingPoint1;
114  QPoint * bandingPoint2;
115  QPoint * panningPrevPoint;
116  };
117 }
118 
119 #endif