Isis Developer Reference
MatrixSceneWidget.h
Go to the documentation of this file.
1 #ifndef MatrixSceneWidget_H
2 #define MatrixSceneWidget_H
3 
4 #include <QWidget>
5 
6 #include "XmlStackedHandler.h"
7 
8 template <typename A> class QList;
9 class QGraphicsPolygonItem;
10 class QGraphicsRectItem;
11 class QGraphicsScene;
12 class QGraphicsSceneContextMenuEvent;
13 class QMenu;
14 class QProgressBar;
15 class QRubberBand;
16 class QStatusBar;
17 class QToolBar;
18 class QToolButton;
19 
20 namespace Isis {
21  class CorrelationMatrix;
22  class Directory;
23  class DisplayProperties;
24  class FileName;
25  class MatrixDisplayTool;
26  class MatrixGraphicsView;
27  class MatrixOptions;
28  class ProgressBar;
29  class Project;
30  class PvlGroup;
31  class PvlObject;
32  class ToolPad;
33 
51  class MatrixSceneWidget : public QWidget {
52  Q_OBJECT
53 
54  public:
55  MatrixSceneWidget(QStatusBar *status,
56  bool showTools,
57  bool internalizeToolBarsAndProgress,
59  QWidget *parent = 0);
60  virtual ~MatrixSceneWidget();
61 
62  MatrixGraphicsView *getView() const;
63  QGraphicsScene *getScene() const;
64 
65  bool contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
66 
67  void drawGrid(CorrelationMatrix corrMatrix);
68  void drawElements(CorrelationMatrix corrMatrix);
69 
71  PvlObject toPvl() const;
72  void fromPvl(const PvlObject &);
73 // void load(XmlStackedHandlerReader *xmlReader);
74 
75  QRectF elementsBoundingRect() const;
76  Directory *directory() const;
79  void redrawItems();
80 // void refit();
81 
82 // void repaintItems(bool colorScheme);
83  void setUpOptions(CorrelationMatrix corrMat);
84 
92  template <typename DataType>
94  return QList<QAction *>();
95  }
96 
97  signals:
98 // add roll over?
99  // Not all these signals are used, descriptions show possible intended use
100  void mouseEnter();
101  void mouseMove(QPointF);
102  void mouseLeave();
103  void mouseDoubleClick(QPointF);
104  void mouseButtonPress(QPointF, Qt::MouseButton s);
105  void mouseButtonRelease(QPointF, Qt::MouseButton s);
106  void mouseWheel(QPointF, int delta);
107  void rubberBandComplete(QRectF r, Qt::MouseButton s);
109  void visibleRectChanged(QRectF);
112 
113  void elementClicked(QString);
114 
115  public slots:
116  void redrawElements();
117 
118  protected:
119  virtual bool eventFilter(QObject *obj, QEvent *ev);
120 
121  private slots:
122 
123 // void fitInView();
124 
125  void sendVisibleRectChanged();
126 
127  private:
128  // methods
129  QList<double> getSelectedElements() const;
130 
131  // member variables
132  Directory *m_directory;
133 
134  QGraphicsScene *m_graphicsScene;
135  MatrixGraphicsView *m_graphicsView;
136 
137  QGraphicsRectItem *m_outlineRect;
138 
139  QAction *m_quickMapAction;
140 
141  ProgressBar *m_progress;
142 
143  MatrixOptions *m_matrixOptions;
144  };
145 }
146 
147 #endif
148 
GraphicsView.h
Isis::MatrixSceneWidget::drawElements
void drawElements(CorrelationMatrix corrMatrix)
Draw elements.
Definition: MatrixSceneWidget.cpp:415
Isis::MatrixSceneWidget::mouseLeave
void mouseLeave()
Emitted when mouse leaves widget focus.
FileName.h
QWidget
QProgressBar
Isis::MatrixSceneWidget::getProgress
QProgressBar * getProgress()
Accessor for the widget's progress bar.
Definition: MatrixSceneWidget.cpp:246
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::Directory
Definition: Directory.h:271
Isis::SparseBlockColumnMatrix
SparseBlockColumnMatrix.
Definition: SparseBlockMatrix.h:58
Isis::MatrixOptions::colorScheme
bool colorScheme()
Use the green-red gradient if false.
Definition: MatrixOptions.cpp:116
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::MatrixSceneWidget::~MatrixSceneWidget
virtual ~MatrixSceneWidget()
Default Destructor.
Definition: MatrixSceneWidget.cpp:154
Isis::ProgressBar
Definition: ProgressBar.h:15
Project.h
Isis::MatrixSceneWidget::toPvl
PvlObject toPvl() const
QMenu
CorrelationMatrix.h
Isis::MatrixOptions::goodCorrelationColor
QColor goodCorrelationColor()
The color selected for the correlation values that are below the given threshold.
Definition: MatrixOptions.cpp:82
Directory.h
Target.h
Isis::MatrixSceneWidget::MatrixSceneWidget
MatrixSceneWidget(QStatusBar *status, bool showTools, bool internalizeToolBarsAndProgress, Directory *directory, QWidget *parent=0)
Constructor, creates a matrix scene widget.
Definition: MatrixSceneWidget.cpp:54
Isis::MatrixOptions::colorTolerance
double colorTolerance()
Threshold for what is considered a bad correlation.
Definition: MatrixOptions.cpp:104
Isis::MatrixSceneWidget::elementsBoundingRect
QRectF elementsBoundingRect() const
Returns the bounding rectangle for the images.
Definition: MatrixSceneWidget.cpp:262
Isis::MatrixSceneWidget::eventFilter
virtual bool eventFilter(QObject *obj, QEvent *ev)
Pick the relevant actions given the type of event that occured in the scene.
Definition: MatrixSceneWidget.cpp:360
Isis::MatrixSceneWidget::mouseMove
void mouseMove(QPointF)
Emitted when mouse moves in widget.
MatrixGraphicsScene.h
SparseBlockMatrix.h
Isis::MatrixGraphicsView::enableResizeZooming
void enableResizeZooming(bool enabled)
Definition: MatrixGraphicsView.h:22
Isis::MatrixOptions
This class holds the matrix color and focus information.
Definition: MatrixOptions.h:28
ToolPad.h
QToolBar
Isis::CorrelationMatrix
This is a container for the correlation matrix that comes from a bundle adjust.
Definition: CorrelationMatrix.h:61
IString.h
Isis::MatrixSceneWidget::contextMenuEvent
bool contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
This is called by MatrixGraphicsScene::contextMenuEvent.
Definition: MatrixSceneWidget.cpp:186
Isis::MatrixSceneWidget::mouseButtonRelease
void mouseButtonRelease(QPointF, Qt::MouseButton s)
Emitted when mouse button released.
Isis::MatrixSceneWidget::rubberBandComplete
void rubberBandComplete(QRectF r, Qt::MouseButton s)
Isis::MatrixSceneWidget::supportedActions
QList< QAction * > supportedActions(DataType)
Return an empty list of actions for unknown data types.
Definition: MatrixSceneWidget.h:93
Pvl.h
Isis::MatrixSceneWidget::queueSelectionChanged
void queueSelectionChanged()
Emitted when selection is changed.
Isis::MatrixSceneWidget::getViewActions
QList< QAction * > getViewActions()
Accessor for the view actions.
Definition: MatrixSceneWidget.cpp:287
TextFile.h
Isis::MatrixSceneWidget::visibleRectChanged
void visibleRectChanged(QRectF)
Emitted when the visible rectangle is changed.
Isis::MatrixSceneWidget::drawGrid
void drawGrid(CorrelationMatrix corrMatrix)
Draw the lines that will show the columns and blocks for each image.
Definition: MatrixSceneWidget.cpp:550
Isis::MatrixSceneWidget::setUpOptions
void setUpOptions(CorrelationMatrix corrMat)
Change item colors when options are changed.
Definition: MatrixSceneWidget.cpp:651
QGraphicsScene
Isis::MatrixSceneWidget::elementClicked
void elementClicked(QString)
Emitted when an element of the widget is clicked.
Isis::MatrixGraphicsView
A graphics view that resizes in a more friendly way.
Definition: MatrixGraphicsView.h:15
Isis::MatrixSceneWidget
This widget encompasses the entire matrixDisplay scene.
Definition: MatrixSceneWidget.h:51
Isis::MatrixSceneWidget::elementsChanged
void elementsChanged()
Emitted when an element of the widget is changed.
Isis::MatrixSceneWidget::redrawElements
void redrawElements()
Redraw matrix when the focus is changed.
Definition: MatrixSceneWidget.cpp:618
ProgressBar.h
IException.h
MatrixSceneWidget.h
Isis::MatrixSceneWidget::getView
MatrixGraphicsView * getView() const
Accessor for the QGraphicsView.
Definition: MatrixSceneWidget.cpp:164
Isis::MatrixSceneWidget::mouseWheel
void mouseWheel(QPointF, int delta)
Emitted when mouse wheel is activated Emitted when rubber band selection is complete.
Isis::MatrixSceneWidget::fromPvl
void fromPvl(const PvlObject &)
MatrixGraphicsView.h
PvlObject.h
Isis::MatrixOptions::parentMatrix
CorrelationMatrix * parentMatrix()
Definition: MatrixOptions.cpp:393
Isis::MatrixOptions::badCorrelationColor
QColor badCorrelationColor()
The color selected for the correlation values that are above the given threshold.
Definition: MatrixOptions.cpp:93
Isis::MatrixSceneWidget::supportedActions
QList< QAction * > supportedActions(CorrelationMatrix *matrix)
Get a list of applicable actions for the elements in this scene.
Definition: MatrixSceneWidget.cpp:305
Isis::CorrelationMatrix::visibleBlocks
QList< SparseBlockColumnMatrix > * visibleBlocks()
Get the visible part of the matrix.
Definition: CorrelationMatrix.cpp:454
QObject
Distance.h
Isis::MatrixSceneWidget::redrawItems
void redrawItems()
Redraws all the items in the view.
Definition: MatrixSceneWidget.cpp:395
MatrixOptions.h
Isis::MatrixSceneWidget::mouseButtonPress
void mouseButtonPress(QPointF, Qt::MouseButton s)
Emitted when mouse is pressed.
IsisDebug.h
Isis::MatrixGraphicsScene
A graphics scene with improved user-interaction for use with the MatrixSceneWidget.
Definition: MatrixGraphicsScene.h:21
QAction
Isis::MatrixSceneWidget::getScene
QGraphicsScene * getScene() const
Accessor for the QGraphicsScene.
Definition: MatrixSceneWidget.cpp:174
Isis::MatrixSceneWidget::mouseEnter
void mouseEnter()
Emitted when mouse enters widget focus.
Isis::CorrelationMatrix::imagesAndParameters
QMap< QString, QStringList > * imagesAndParameters()
Public access for the qmap of images and parameters.
Definition: CorrelationMatrix.cpp:417
XmlStackedHandlerReader.h
XmlStackedHandler.h
QGraphicsRectItem
Isis::MatrixSceneWidget::directory
Directory * directory() const
Accessor for the directory.
Definition: MatrixSceneWidget.cpp:277
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::MatrixSceneWidget::mouseDoubleClick
void mouseDoubleClick(QPointF)
Emitted when handling a mouse double-click.