26 #include <QFileDialog>
27 #include <QInputDialog>
28 #include <QMessageBox>
33 #include "MatrixSceneWidget.h"
46 QAction::setText( tr(
"View Correlation &Matrix...") );
56 qDebug() <<
"matrix good?";
102 if ( existingViews.count() ) {
103 for (
int i = 0; i < existingViews.count(); i++) {
104 viewOptions.append( existingViews[i]->windowTitle() );
108 viewOptions.append( tr(
"New Matrix View") );
110 if (viewOptions.count() > 1) {
111 QString selected = QInputDialog::getItem(NULL, tr(
"View to see matrix in"),
112 tr(
"Which view would you like your\nmatrix to be put into?"),
113 viewOptions, viewOptions.count() - 1,
false, &success);
115 viewToUse = viewOptions.indexOf(selected);
118 viewToUse = viewOptions.count() - 1;
121 bool newView =
false;
122 if (viewToUse == viewOptions.count() - 1) {
125 QUndoCommand::setText( tr(
"View matrix in new matrix view") );
128 else if (viewToUse != -1) {
140 internalData.append( QString::number(viewToUse) );
141 internalData.append(newView?
"new view" :
"existing view");
177 if (matrixViewToUse == NULL) {
178 QString msg =
"The Correlation Matrix for this bundle could not be displayed";
QList< MatrixSceneWidget * > matrixViews()
Accessor for the list of MatrixSceneWidgets currently available.
The main project for cnetsuite.
virtual MatrixViewWorkOrder * clone() const
This method clones the MatrixViewWorkOrder.
This is a container for the correlation matrix that comes from a bundle adjust.
virtual bool isExecutable(CorrelationMatrix matrix)
This check is used by Directory::supportedActions(DataType data).
Project * project() const
Returns the Project this WorkOrder is attached to.
MatrixSceneWidget * addMatrixView()
Add the matrix view widget to the window.
void computeCorrelationMatrix()
This method reads the covariance matrix in from a file, one SparseBlockColumnMatrix at a time...
void syncRedo()
This method computes and displays the correlation matrix.
bool dependsOn(WorkOrder *other) const
This method returns true if other depends on a MatrixViewWorkOrder.
QStringList internalData() const
Gets the internal data for this WorkOrder.
This error is for when a programmer made an API call that was illegal.
This work order will open a MatrixSceneWidget and display the correlation matrix. ...
~MatrixViewWorkOrder()
Destructor.
bool execute()
If WorkOrder::execute() returns true, a new matrix view is created.
Parent class for anything that performs an action in Project.
#define _FILEINFO_
Macro for the filename and line number.
Directory * directory() const
Returns the directory associated with this Project.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
bool isValid()
This is the public accessor for the list of elements that should be displayed in the current view...
CorrelationMatrix correlationMatrix()
Returns the CorrleationMatrix for this WorkOrder.
virtual bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
MatrixViewWorkOrder(Project *project)
This method sets the text of the work order.
void syncUndo()
This method deletes the last matrix viewed.
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.