Isis Developer Reference
|
This widget encompasses the entire matrixDisplay scene. More...
#include <MatrixSceneWidget.h>
Public Slots | |
void | redrawElements () |
Redraw matrix when the focus is changed. | |
Signals | |
void | mouseEnter () |
Emitted when mouse enters widget focus. | |
void | mouseMove (QPointF) |
Emitted when mouse moves in widget. | |
void | mouseLeave () |
Emitted when mouse leaves widget focus. | |
void | mouseDoubleClick (QPointF) |
Emitted when handling a mouse double-click. | |
void | mouseButtonPress (QPointF, Qt::MouseButton s) |
Emitted when mouse is pressed. | |
void | mouseButtonRelease (QPointF, Qt::MouseButton s) |
Emitted when mouse button released. | |
void | mouseWheel (QPointF, int delta) |
Emitted when mouse wheel is activated Emitted when rubber band selection is complete. | |
void | rubberBandComplete (QRectF r, Qt::MouseButton s) |
void | visibleRectChanged (QRectF) |
Emitted when the visible rectangle is changed. | |
void | elementsChanged () |
Emitted when an element of the widget is changed. | |
void | queueSelectionChanged () |
Emitted when selection is changed. | |
void | elementClicked (QString) |
Emitted when an element of the widget is clicked. | |
Public Member Functions | |
MatrixSceneWidget (QStatusBar *status, bool showTools, bool internalizeToolBarsAndProgress, Directory *directory, QWidget *parent=0) | |
Constructor, creates a matrix scene widget. | |
virtual | ~MatrixSceneWidget () |
Default Destructor. | |
MatrixGraphicsView * | getView () const |
Accessor for the QGraphicsView. | |
QGraphicsScene * | getScene () const |
Accessor for the QGraphicsScene. | |
bool | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
This is called by MatrixGraphicsScene::contextMenuEvent. | |
void | drawGrid (CorrelationMatrix corrMatrix) |
Draw the lines that will show the columns and blocks for each image. | |
void | drawElements (CorrelationMatrix corrMatrix) |
Draw elements. | |
QProgressBar * | getProgress () |
Accessor for the widget's progress bar. | |
PvlObject | toPvl () const |
void | fromPvl (const PvlObject &) |
QRectF | elementsBoundingRect () const |
Returns the bounding rectangle for the images. | |
Directory * | directory () const |
Accessor for the directory. | |
QList< QAction * > | getViewActions () |
Accessor for the view actions. | |
QList< QAction * > | supportedActions (CorrelationMatrix *matrix) |
Get a list of applicable actions for the elements in this scene. | |
void | redrawItems () |
Redraws all the items in the view. | |
void | setUpOptions (CorrelationMatrix corrMat) |
Change item colors when options are changed. | |
template<typename DataType > | |
QList< QAction * > | supportedActions (DataType) |
Return an empty list of actions for unknown data types. | |
Protected Member Functions | |
virtual bool | eventFilter (QObject *obj, QEvent *ev) |
Pick the relevant actions given the type of event that occured in the scene. | |
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.
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 |
References directory(), Isis::MatrixGraphicsView::enableResizeZooming(), and getView().
|
virtual |
Default Destructor.
bool Isis::MatrixSceneWidget::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) |
This is called by MatrixGraphicsScene::contextMenuEvent.
event | The context menu event |
References getScene().
Directory * Isis::MatrixSceneWidget::directory | ( | ) | const |
void Isis::MatrixSceneWidget::drawElements | ( | CorrelationMatrix | corrMatrix | ) |
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. |
References Isis::MatrixOptions::badCorrelationColor(), Isis::MatrixOptions::colorScheme(), Isis::MatrixOptions::colorTolerance(), and Isis::MatrixOptions::goodCorrelationColor().
Referenced by redrawElements().
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 |
|
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.
|
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 |
References elementClicked(), and mouseDoubleClick().
void Isis::MatrixSceneWidget::fromPvl | ( | const PvlObject & | ) |
QProgressBar * Isis::MatrixSceneWidget::getProgress | ( | ) |
Accessor for the widget's progress bar.
QGraphicsScene * Isis::MatrixSceneWidget::getScene | ( | ) | const |
Accessor for the QGraphicsScene.
Referenced by contextMenuEvent().
MatrixGraphicsView * Isis::MatrixSceneWidget::getView | ( | ) | const |
Accessor for the QGraphicsView.
Referenced by MatrixSceneWidget().
Accessor for the view actions.
|
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.
References drawElements(), and Isis::MatrixOptions::parentMatrix().
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.
|
signal |
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 |
References redrawElements().
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 |
|
inline |
Return an empty list of actions for unknown data types.
DataType | The type of data we want to get actions for |
PvlObject Isis::MatrixSceneWidget::toPvl | ( | ) | const |
|
signal |
Emitted when the visible rectangle is changed.