25 #include <QFileDialog> 26 #include <QInputDialog> 27 #include <QMessageBox> 31 #include "ImageList.h" 49 QAction::setText(tr(
"Display &Images..."));
85 return (images->count() > 0 && images->count() < 50);
98 return (shapes->count() > 0 && shapes->count() < 20);
122 if (existingViews.count()) {
123 for (
int i = 0; i < existingViews.count(); i++) {
124 viewOptions.append(existingViews[i]->windowTitle());
128 viewOptions.append(tr(
"New Cube DN View"));
130 if (viewOptions.count() > 1) {
131 QString selected = QInputDialog::getItem(NULL, tr(
"View to see cubes in"),
132 tr(
"Which view would you like your\nimage's DN data to be put into?"),
133 viewOptions, viewOptions.count() - 1,
false, &success);
135 viewToUse = viewOptions.indexOf(selected);
138 viewToUse = viewOptions.count() - 1;
141 bool newView =
false;
142 if (viewToUse == viewOptions.count() - 1) {
144 QUndoCommand::setText(tr(
"View image DN data of list in new cube DN view"));
146 else if (viewToUse != -1) {
147 QUndoCommand::setText(tr(
"View image DN data in cube DN view [%1]")
148 .arg(existingViews[viewToUse]->windowTitle()));
153 internalData.append(newView?
"new view" :
"existing view");
Internalizes a list of shapes and allows for operations on the entire list.
bool setupExecution()
This method asks the user what view they want to see their cube list in.
Internalizes a list of images and allows for operations on the entire list.
The main project for ipce.
This work order is designed to bring up a qview-like view for a small number of cubes.
virtual void addItems(QList< ProjectItem *> items)
Adds several items to the view.
virtual bool setupExecution()
This sets up the state for the work order.
CubeDnViewWorkOrder(Project *project)
This method sets the text of the work order.
~CubeDnViewWorkOrder()
Destructor.
bool dependsOn(WorkOrder *other) const
This method returns true if other depends on a CubeDnViewWorkOrder
void execute()
This method adds a new CubeDnView to the project's directory and then adds currentItem() to that...
virtual CubeDnViewWorkOrder * clone() const
This method clones the CubeDnViewWorkOrder.
Directory * directory() const
Returns the directory associated with this Project.
ProjectItemModel * model()
Gets the ProjectItemModel for this directory.
Provide Undo/redo abilities, serialization, and history for an operation.
QList< CubeDnView * > cubeDnViews()
Accessor for the list of CubeDnViews currently available.
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
View that displays cubes in a QView-like way.
QList< ProjectItem * > selectedItems()
Returns a list of the selected items of the internal selection model.
Namespace for ISIS/Bullet specific routines.
Project * project() const
Returns the Project this WorkOrder is attached to.
virtual bool isExecutable(ImageList *images)
This check is used by Directory::supportedActions(DataType data).
bool m_isSavedToHistory
Set the work order to be shown in the HistoryTreeWidget.
QStringList internalData() const
Gets the internal data for this WorkOrder.
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
Directory * directory() const
return the workorder project directory Returns the Directory object of the Project this WorkOrder is ...
void setClean(bool value)
Function to change the clean state of the project.
CubeDnView * addCubeDnView(QString objectName="")
Add the qview workspace to the window.