Isis 3 Programmer Reference
MatrixSceneWidget.h
1#ifndef MatrixSceneWidget_H
2#define MatrixSceneWidget_H
3
4#include <QWidget>
5
6template <typename A> class QList;
7class QGraphicsPolygonItem;
10class QGraphicsSceneContextMenuEvent;
11class QMenu;
12class QProgressBar;
13class QRubberBand;
14class QStatusBar;
15class QToolBar;
16class QToolButton;
17
18namespace Isis {
19 class CorrelationMatrix;
20 class Directory;
21 class DisplayProperties;
22 class FileName;
23 class MatrixDisplayTool;
24 class MatrixGraphicsView;
25 class MatrixOptions;
26 class ProgressBar;
27 class Project;
28 class PvlGroup;
29 class PvlObject;
30 class ToolPad;
31
49 class MatrixSceneWidget : public QWidget {
50 Q_OBJECT
51
52 public:
53 MatrixSceneWidget(QStatusBar *status,
54 bool showTools,
55 bool internalizeToolBarsAndProgress,
57 QWidget *parent = 0);
58 virtual ~MatrixSceneWidget();
59
61 QGraphicsScene *getScene() const;
62
63 bool contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
64
65 void drawGrid(CorrelationMatrix corrMatrix);
66 void drawElements(CorrelationMatrix corrMatrix);
67
69 PvlObject toPvl() const;
70 void fromPvl(const PvlObject &);
71
72 QRectF elementsBoundingRect() const;
73 Directory *directory() const;
74 QList<QAction *> getViewActions();
75 QList<QAction *> supportedActions(CorrelationMatrix *matrix);
76 void redrawItems();
77// void refit();
78
79// void repaintItems(bool colorScheme);
80 void setUpOptions(CorrelationMatrix corrMat);
81
89 template <typename DataType>
90 QList<QAction *> supportedActions(DataType) {
91 return QList<QAction *>();
92 }
93
94 signals:
95// add roll over?
96 // Not all these signals are used, descriptions show possible intended use
97 void mouseEnter();
98 void mouseMove(QPointF);
99 void mouseLeave();
100 void mouseDoubleClick(QPointF);
101 void mouseButtonPress(QPointF, Qt::MouseButton s);
102 void mouseButtonRelease(QPointF, Qt::MouseButton s);
103 void mouseWheel(QPointF, int delta);
105 void rubberBandComplete(QRectF r, Qt::MouseButton s);
106 void visibleRectChanged(QRectF);
109
110 void elementClicked(QString);
111
112 public slots:
113 void redrawElements();
114
115 protected:
116 virtual bool eventFilter(QObject *obj, QEvent *ev);
117
118 private slots:
119
120// void fitInView();
121
123
124 private:
125 // methods
126 QList<double> getSelectedElements() const;
127
128 // member variables
130
133
135
137
139
141 };
142}
143
144#endif
145
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