Isis 3 Programmer Reference
MatrixSceneWidget.h
1#ifndef MatrixSceneWidget_H
2#define MatrixSceneWidget_H
3
4#include <QWidget>
5
6#include "XmlStackedHandler.h"
7
8template <typename A> class QList;
9class QGraphicsPolygonItem;
11class QGraphicsScene;
12class QGraphicsSceneContextMenuEvent;
13class QMenu;
14class QProgressBar;
15class QRubberBand;
16class QStatusBar;
17class QToolBar;
18class QToolButton;
19
20namespace 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
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;
77 QList<QAction *> getViewActions();
78 QList<QAction *> supportedActions(CorrelationMatrix *matrix);
79 void redrawItems();
80// void refit();
81
82// void repaintItems(bool colorScheme);
83 void setUpOptions(CorrelationMatrix corrMat);
84
92 template <typename DataType>
93 QList<QAction *> supportedActions(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);
108 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
126
127 private:
128 // methods
129 QList<double> getSelectedElements() const;
130
131 // member variables
133
136
138
140
142
144 };
145}
146
147#endif
148
This is a container for the correlation matrix that comes from a bundle adjust.
A graphics view that resizes in a more friendly way.
This class holds the matrix color and focus information.
This widget encompasses the entire matrixDisplay scene.
MatrixSceneWidget(QStatusBar *status, bool showTools, bool internalizeToolBarsAndProgress, Directory *directory, QWidget *parent=0)
Constructor, creates a matrix scene widget.
void sendVisibleRectChanged()
This method refits the items in the graphics view.
MatrixGraphicsView * m_graphicsView
The graphics view that displays the scene.
void setUpOptions(CorrelationMatrix corrMat)
Change item colors when options are changed.
bool contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
This is called by MatrixGraphicsScene::contextMenuEvent.
Directory * directory() const
Accessor for the directory.
MatrixGraphicsView * getView() const
Accessor for the QGraphicsView.
MatrixOptions * m_matrixOptions
Options for the correlation matrix.
void redrawItems()
Redraws all the items in the view.
void drawGrid(CorrelationMatrix corrMatrix)
Draw the lines that will show the columns and blocks for each image.
ProgressBar * m_progress
Progress bar.
void mouseButtonRelease(QPointF, Qt::MouseButton s)
Emitted when mouse button released.
void mouseDoubleClick(QPointF)
Emitted when handling a mouse double-click.
QList< QAction * > getViewActions()
Accessor for the view actions.
void mouseMove(QPointF)
Emitted when mouse moves in widget.
Directory * m_directory
The directory of the project.
QList< QAction * > supportedActions(DataType)
Return an empty list of actions for unknown data types.
QGraphicsScene * getScene() const
Accessor for the QGraphicsScene.
QProgressBar * getProgress()
Accessor for the widget's progress bar.
QAction * m_quickMapAction
??? (always NULL)
QList< QAction * > supportedActions(CorrelationMatrix *matrix)
Get a list of applicable actions for the elements in this scene.
void mouseButtonPress(QPointF, Qt::MouseButton s)
Emitted when mouse is pressed.
void redrawElements()
Redraw matrix when the focus is changed.
void mouseWheel(QPointF, int delta)
Emitted when mouse wheel is activated Emitted when rubber band selection is complete.
void mouseEnter()
Emitted when mouse enters widget focus.
virtual ~MatrixSceneWidget()
Default Destructor.
void queueSelectionChanged()
Emitted when selection is changed.
void visibleRectChanged(QRectF)
Emitted when the visible rectangle is changed.
void elementsChanged()
Emitted when an element of the widget is changed.
virtual bool eventFilter(QObject *obj, QEvent *ev)
Pick the relevant actions given the type of event that occured in the scene.
QGraphicsScene * m_graphicsScene
The graphics scene holds the scene items.
QGraphicsRectItem * m_outlineRect
Rectangle outlining the area where the images go.
void drawElements(CorrelationMatrix corrMatrix)
Draw elements.
void mouseLeave()
Emitted when mouse leaves widget focus.
void elementClicked(QString)
Emitted when an element of the widget is clicked.
QRectF elementsBoundingRect() const
Returns the bounding rectangle for the images.
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16