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
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
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
122 void sendVisibleRectChanged();
123
124 private:
125 // methods
126 QList<double> getSelectedElements() const;
127
128 // member variables
129 Directory *m_directory;
130
131 QGraphicsScene *m_graphicsScene;
132 MatrixGraphicsView *m_graphicsView;
133
134 QGraphicsRectItem *m_outlineRect;
135
136 QAction *m_quickMapAction;
137
138 ProgressBar *m_progress;
139
140 MatrixOptions *m_matrixOptions;
141 };
142}
143
144#endif
145
This is a container for the correlation matrix that comes from a bundle adjust.
Definition CorrelationMatrix.h:61
Definition Directory.h:271
A graphics view that resizes in a more friendly way.
Definition MatrixGraphicsView.h:15
This class holds the matrix color and focus information.
Definition MatrixOptions.h:28
This widget encompasses the entire matrixDisplay scene.
Definition MatrixSceneWidget.h:49
MatrixSceneWidget(QStatusBar *status, bool showTools, bool internalizeToolBarsAndProgress, Directory *directory, QWidget *parent=0)
Constructor, creates a matrix scene widget.
Definition MatrixSceneWidget.cpp:51
void setUpOptions(CorrelationMatrix corrMat)
Change item colors when options are changed.
Definition MatrixSceneWidget.cpp:642
bool contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
This is called by MatrixGraphicsScene::contextMenuEvent.
Definition MatrixSceneWidget.cpp:183
Directory * directory() const
Accessor for the directory.
Definition MatrixSceneWidget.cpp:268
MatrixGraphicsView * getView() const
Accessor for the QGraphicsView.
Definition MatrixSceneWidget.cpp:161
void redrawItems()
Redraws all the items in the view.
Definition MatrixSceneWidget.cpp:386
void drawGrid(CorrelationMatrix corrMatrix)
Draw the lines that will show the columns and blocks for each image.
Definition MatrixSceneWidget.cpp:541
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.
Definition MatrixSceneWidget.cpp:278
void mouseMove(QPointF)
Emitted when mouse moves in widget.
QList< QAction * > supportedActions(DataType)
Return an empty list of actions for unknown data types.
Definition MatrixSceneWidget.h:90
QGraphicsScene * getScene() const
Accessor for the QGraphicsScene.
Definition MatrixSceneWidget.cpp:171
QProgressBar * getProgress()
Accessor for the widget's progress bar.
Definition MatrixSceneWidget.cpp:243
QList< QAction * > supportedActions(CorrelationMatrix *matrix)
Get a list of applicable actions for the elements in this scene.
Definition MatrixSceneWidget.cpp:296
void mouseButtonPress(QPointF, Qt::MouseButton s)
Emitted when mouse is pressed.
void redrawElements()
Redraw matrix when the focus is changed.
Definition MatrixSceneWidget.cpp:609
void mouseWheel(QPointF, int delta)
Emitted when mouse wheel is activated Emitted when rubber band selection is complete.
void fromPvl(const PvlObject &)
void mouseEnter()
Emitted when mouse enters widget focus.
virtual ~MatrixSceneWidget()
Default Destructor.
Definition MatrixSceneWidget.cpp:151
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.
Definition MatrixSceneWidget.cpp:351
void drawElements(CorrelationMatrix corrMatrix)
Draw elements.
Definition MatrixSceneWidget.cpp:406
void mouseLeave()
Emitted when mouse leaves widget focus.
void elementClicked(QString)
Emitted when an element of the widget is clicked.
PvlObject toPvl() const
QRectF elementsBoundingRect() const
Returns the bounding rectangle for the images.
Definition MatrixSceneWidget.cpp:253
void rubberBandComplete(QRectF r, Qt::MouseButton s)
Definition ProgressBar.h:15
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is free and unencumbered software released into the public domain.
Definition BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16