|
Isis 3 Programmer Reference
|
9 #include "CubeDnViewWorkOrder.h"
13 #include <QFileDialog>
14 #include <QInputDialog>
15 #include <QMessageBox>
17 #include "CubeDnView.h"
18 #include "Directory.h"
19 #include "ImageList.h"
20 #include "MdiCubeViewport.h"
22 #include "ProjectItem.h"
23 #include "ProjectItemModel.h"
24 #include "Workspace.h"
37 QAction::setText(tr(
"Display &Images..."));
73 return (images->count() > 0 && images->count() < 50);
86 return (shapes->count() > 0 && shapes->count() < 20);
110 if (existingViews.count()) {
111 for (
int i = 0; i < existingViews.count(); i++) {
112 viewOptions.append(existingViews[i]->windowTitle());
116 viewOptions.append(tr(
"New Cube DN View"));
118 if (viewOptions.count() > 1) {
119 QString selected = QInputDialog::getItem(NULL, tr(
"View to see cubes in"),
120 tr(
"Which view would you like your\nimage's DN data to be put into?"),
121 viewOptions, viewOptions.count() - 1,
false, &success);
123 viewToUse = viewOptions.indexOf(selected);
126 viewToUse = viewOptions.count() - 1;
129 bool newView =
false;
130 if (viewToUse == viewOptions.count() - 1) {
132 QUndoCommand::setText(tr(
"View image DN data of list in new cube DN view"));
134 else if (viewToUse != -1) {
135 QUndoCommand::setText(tr(
"View image DN data in cube DN view [%1]")
136 .arg(existingViews[viewToUse]->windowTitle()));
141 internalData.append(newView?
"new view" :
"existing view");
This work order is designed to bring up a qview-like view for a small number of cubes.
virtual bool setupExecution()
This sets up the state for the work order.
QList< CubeDnView * > cubeDnViews()
Accessor for the list of CubeDnViews currently available.
View that displays cubes in a QView-like way.
This is free and unencumbered software released into the public domain.
Provide Undo/redo abilities, serialization, and history for an operation.
bool setupExecution()
This method asks the user what view they want to see their cube list in.
ProjectItemModel * model()
Gets the ProjectItemModel for this directory.
bool m_isSavedToHistory
Set the work order to be shown in the HistoryTreeWidget.
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
CubeDnView * addCubeDnView(QString objectName="")
Add the qview workspace to the window.
CubeDnViewWorkOrder(Project *project)
This method sets the text of the work order.
Directory * directory() const
return the workorder project directory Returns the Directory object of the Project this WorkOrder is ...
virtual void addItems(QList< ProjectItem * > items)
Adds several items to the view.
The main project for ipce.
Directory * directory() const
Returns the directory associated with this Project.
Internalizes a list of images and allows for operations on the entire list.
~CubeDnViewWorkOrder()
Destructor.
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
virtual bool isExecutable(ImageList *images)
This check is used by Directory::supportedActions(DataType data).
QList< ProjectItem * > selectedItems()
Returns a list of the selected items of the internal selection model.
void execute()
This method adds a new CubeDnView to the project's directory and then adds currentItem() to that.
Project * project() const
Returns the Project this WorkOrder is attached to.
Internalizes a list of shapes and allows for operations on the entire list.
bool dependsOn(WorkOrder *other) const
This method returns true if other depends on a CubeDnViewWorkOrder.
QStringList internalData() const
Gets the internal data for this WorkOrder.
virtual CubeDnViewWorkOrder * clone() const
This method clones the CubeDnViewWorkOrder.
void setClean(bool value)
Function to change the clean state of the project.
This is free and unencumbered software released into the public domain.