Isis 3 Programmer Reference
|
This widget encompasses the entire matrixDisplay scene. More...
#include <MatrixSceneWidget.h>
Public Slots | |
void | redrawElements () |
Redraw matrix when the focus is changed. More... | |
Signals | |
void | mouseEnter () |
Emitted when mouse enters widget focus. More... | |
void | mouseMove (QPointF) |
Emitted when mouse moves in widget. More... | |
void | mouseLeave () |
Emitted when mouse leaves widget focus. More... | |
void | mouseDoubleClick (QPointF) |
Emitted when handling a mouse double-click. More... | |
void | mouseButtonPress (QPointF, Qt::MouseButton s) |
Emitted when mouse is pressed. More... | |
void | mouseButtonRelease (QPointF, Qt::MouseButton s) |
Emitted when mouse button released. More... | |
void | mouseWheel (QPointF, int delta) |
Emitted when mouse wheel is activated Emitted when rubber band selection is complete. More... | |
void | rubberBandComplete (QRectF r, Qt::MouseButton s) |
void | visibleRectChanged (QRectF) |
Emitted when the visible rectangle is changed. More... | |
void | elementsChanged () |
Emitted when an element of the widget is changed. More... | |
void | queueSelectionChanged () |
Emitted when selection is changed. More... | |
void | elementClicked (QString) |
Emitted when an element of the widget is clicked. More... | |
Public Member Functions | |
MatrixSceneWidget (QStatusBar *status, bool showTools, bool internalizeToolBarsAndProgress, Directory *directory, QWidget *parent=0) | |
Constructor, creates a matrix scene widget. More... | |
virtual | ~MatrixSceneWidget () |
Default Destructor. More... | |
MatrixGraphicsView * | getView () const |
Accessor for the QGraphicsView. More... | |
QGraphicsScene * | getScene () const |
Accessor for the QGraphicsScene. More... | |
bool | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
This is called by MatrixGraphicsScene::contextMenuEvent. More... | |
void | drawGrid (CorrelationMatrix corrMatrix) |
Draw the lines that will show the columns and blocks for each image. More... | |
void | drawElements (CorrelationMatrix corrMatrix) |
Refit scene and items when the widget size changes. More... | |
QProgressBar * | getProgress () |
Accessor for the widget's progress bar. More... | |
PvlObject | toPvl () const |
void | fromPvl (const PvlObject &) |
QRectF | elementsBoundingRect () const |
Returns the bounding rectangle for the images. More... | |
Directory * | directory () const |
Accessor for the directory. More... | |
QList< QAction * > | getViewActions () |
Accessor for the view actions. More... | |
QList< QAction * > | supportedActions (CorrelationMatrix *matrix) |
Get a list of applicable actions for the elements in this scene. More... | |
void | redrawItems () |
Redraws all the items in the view. More... | |
void | setUpOptions (CorrelationMatrix corrMat) |
Change item colors when options are changed. More... | |
template<typename DataType > | |
QList< QAction * > | supportedActions (DataType) |
Return an empty list of actions for unknown data types. More... | |
Protected Member Functions | |
virtual bool | eventFilter (QObject *obj, QEvent *ev) |
Pick the relevant actions given the type of event that occured in the scene. More... | |
Private Slots | |
void | sendVisibleRectChanged () |
This method refits the items in the graphics view. More... | |
Private Member Functions | |
QList< double > | getSelectedElements () const |
Private Attributes | |
Directory * | m_directory |
The directory of the project. More... | |
QGraphicsScene * | m_graphicsScene |
The graphics scene holds the scene items. More... | |
MatrixGraphicsView * | m_graphicsView |
The graphics view that displays the scene. More... | |
QGraphicsRectItem * | m_outlineRect |
Rectangle outlining the area where the images go. More... | |
QAction * | m_quickMapAction |
??? (always NULL) More... | |
ProgressBar * | m_progress |
Progress bar. More... | |
MatrixOptions * | m_matrixOptions |
Options for the correlation matrix. More... | |
This widget encompasses the entire matrixDisplay scene.
This widget is a self-contained view of the correlation matrix resulting from a bundle adjust. It uses Qt's graphics scene/view framework. This widget holds the graphics scene, view, and items. It will also hold the options dialog for the matrix.
2014-07-14 Kimberly Oyama - Original Version
2014-07-21 Kimberly Oyama - Added matrix options dialog. Color options are functional.
2016-06-27 Ian Humphrey - Updated documentation and coding standards. Fixes #4006.
Definition at line 51 of file MatrixSceneWidget.h.
Isis::MatrixSceneWidget::MatrixSceneWidget | ( | QStatusBar * | status, |
bool | showTools, | ||
bool | internalizeToolBarsAndProgress, | ||
Directory * | directory, | ||
QWidget * | parent = 0 |
||
) |
Constructor, creates a matrix scene widget.
status | Pointer to an existing status bar |
showTools | Whether or not create a matrix scene or matrix world view |
internalizeToolBarsAndProgress | Whether or not to show progress and status |
directory | The directory of the current project |
parent | QPointer to the parent widget |
Definition at line 54 of file MatrixSceneWidget.cpp.
References directory(), getView(), m_directory, m_graphicsScene, m_graphicsView, m_outlineRect, m_progress, m_quickMapAction, and sendVisibleRectChanged().
|
virtual |
bool Isis::MatrixSceneWidget::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) |
This is called by MatrixGraphicsScene::contextMenuEvent.
event | The context menu event |
Definition at line 186 of file MatrixSceneWidget.cpp.
References getScene().
Directory * Isis::MatrixSceneWidget::directory | ( | ) | const |
Accessor for the directory.
Definition at line 277 of file MatrixSceneWidget.cpp.
References m_directory.
Referenced by MatrixSceneWidget().
void Isis::MatrixSceneWidget::drawElements | ( | CorrelationMatrix | corrMatrix | ) |
Refit scene and items when the widget size changes.
Draw elements
If element is drawn in black, something is wrong. The correlation value is out of range.
Need separate redraw method because we will already have the list of MatrixSceneItems.
corrMatrix | The matrix that belongs to the project. |
Definition at line 415 of file MatrixSceneWidget.cpp.
References Isis::MatrixOptions::badCorrelationColor(), Isis::MatrixOptions::colorScheme(), Isis::MatrixOptions::colorTolerance(), Isis::MatrixOptions::goodCorrelationColor(), Isis::CorrelationMatrix::imagesAndParameters(), m_graphicsScene, m_matrixOptions, and Isis::CorrelationMatrix::visibleBlocks().
Referenced by Isis::MatrixViewWorkOrder::execute(), redrawElements(), and Isis::MatrixViewWorkOrder::setupExecution().
void Isis::MatrixSceneWidget::drawGrid | ( | CorrelationMatrix | corrMatrix | ) |
Draw the lines that will show the columns and blocks for each image.
corrMatrix | The matrix that belongs to the project |
Definition at line 550 of file MatrixSceneWidget.cpp.
References Isis::CorrelationMatrix::imagesAndParameters(), and m_graphicsScene.
Referenced by Isis::MatrixViewWorkOrder::execute(), and Isis::MatrixViewWorkOrder::setupExecution().
|
signal |
Emitted when an element of the widget is clicked.
Referenced by eventFilter().
QRectF Isis::MatrixSceneWidget::elementsBoundingRect | ( | ) | const |
Returns the bounding rectangle for the images.
Definition at line 262 of file MatrixSceneWidget.cpp.
References m_outlineRect.
|
signal |
Emitted when an element of the widget is changed.
|
protectedvirtual |
Pick the relevant actions given the type of event that occured in the scene.
Mouse Events:
Press - Emit elementClicked signal to update the options dialog Release - nolowerColorValue? Double-Click - same as press Move - nolowerColorValue Enter - change label to match current item. Leave - clear label
obj | Pointer to the target QObject to watch events on |
event | The event to inspect |
Definition at line 360 of file MatrixSceneWidget.cpp.
References elementClicked(), m_graphicsScene, m_graphicsView, and mouseDoubleClick().
QProgressBar * Isis::MatrixSceneWidget::getProgress | ( | ) |
Accessor for the widget's progress bar.
Definition at line 246 of file MatrixSceneWidget.cpp.
References m_progress.
QGraphicsScene * Isis::MatrixSceneWidget::getScene | ( | ) | const |
Accessor for the QGraphicsScene.
Definition at line 174 of file MatrixSceneWidget.cpp.
References m_graphicsScene.
Referenced by contextMenuEvent().
MatrixGraphicsView * Isis::MatrixSceneWidget::getView | ( | ) | const |
Accessor for the QGraphicsView.
Definition at line 164 of file MatrixSceneWidget.cpp.
References m_graphicsView.
Referenced by MatrixSceneWidget(), and sendVisibleRectChanged().
Accessor for the view actions.
Definition at line 287 of file MatrixSceneWidget.cpp.
|
signal |
Emitted when mouse is pressed.
|
signal |
Emitted when mouse button released.
|
signal |
Emitted when handling a mouse double-click.
Referenced by eventFilter().
|
signal |
Emitted when mouse enters widget focus.
|
signal |
Emitted when mouse leaves widget focus.
|
signal |
Emitted when mouse moves in widget.
|
signal |
Emitted when mouse wheel is activated Emitted when rubber band selection is complete.
|
signal |
Emitted when selection is changed.
|
slot |
Redraw matrix when the focus is changed.
Definition at line 618 of file MatrixSceneWidget.cpp.
References drawElements(), and m_matrixOptions.
Referenced by setUpOptions().
void Isis::MatrixSceneWidget::redrawItems | ( | ) |
Redraws all the items in the view.
Also makes sure to resize the view rectangle to fit the newly drawn items.
Definition at line 395 of file MatrixSceneWidget.cpp.
|
privateslot |
This method refits the items in the graphics view.
Update the visible bounding rectangle
Definition at line 333 of file MatrixSceneWidget.cpp.
References getView(), and visibleRectChanged().
Referenced by MatrixSceneWidget().
void Isis::MatrixSceneWidget::setUpOptions | ( | CorrelationMatrix | corrMat | ) |
Change item colors when options are changed.
colorScheme | True if using tolerance. False if using gradient. Allows for changing the options on a CorrelationMatrix |
corrMat | The matrix to set up options for |
Definition at line 651 of file MatrixSceneWidget.cpp.
References m_matrixOptions, and redrawElements().
Referenced by Isis::MatrixViewWorkOrder::execute(), and Isis::MatrixViewWorkOrder::setupExecution().
QList< QAction * > Isis::MatrixSceneWidget::supportedActions | ( | CorrelationMatrix * | matrix | ) |
Get a list of applicable actions for the elements in this scene.
matrix | Pointer to the CorrelationMatrix that belongs to the project |
Definition at line 305 of file MatrixSceneWidget.cpp.
|
inline |
Return an empty list of actions for unknown data types.
DataType | The type of data we want to get actions for |
Definition at line 93 of file MatrixSceneWidget.h.
|
signal |
Emitted when the visible rectangle is changed.
Referenced by sendVisibleRectChanged().
|
private |
The directory of the project.
Definition at line 132 of file MatrixSceneWidget.h.
Referenced by directory(), and MatrixSceneWidget().
|
private |
The graphics scene holds the scene items.
Definition at line 134 of file MatrixSceneWidget.h.
Referenced by drawElements(), drawGrid(), eventFilter(), getScene(), and MatrixSceneWidget().
|
private |
The graphics view that displays the scene.
Definition at line 135 of file MatrixSceneWidget.h.
Referenced by eventFilter(), getView(), and MatrixSceneWidget().
|
private |
Options for the correlation matrix.
Definition at line 143 of file MatrixSceneWidget.h.
Referenced by drawElements(), redrawElements(), and setUpOptions().
|
private |
Rectangle outlining the area where the images go.
Definition at line 137 of file MatrixSceneWidget.h.
Referenced by elementsBoundingRect(), MatrixSceneWidget(), and ~MatrixSceneWidget().
|
private |
Progress bar.
Definition at line 141 of file MatrixSceneWidget.h.
Referenced by getProgress(), and MatrixSceneWidget().
|
private |
??? (always NULL)
Definition at line 139 of file MatrixSceneWidget.h.
Referenced by MatrixSceneWidget().