9#include "CubeDnViewWorkOrder.h"
14#include <QInputDialog>
17#include "CubeDnView.h"
20#include "MdiCubeViewport.h"
22#include "ProjectItem.h"
23#include "ProjectItemModel.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");
virtual void addItems(QList< ProjectItem * > items)
Adds several items to the view.
View that displays cubes in a QView-like way.
virtual CubeDnViewWorkOrder * clone() const
This method clones the CubeDnViewWorkOrder.
CubeDnViewWorkOrder(Project *project)
This method sets the text of the work order.
bool setupExecution()
This method asks the user what view they want to see their cube list in.
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.
~CubeDnViewWorkOrder()
Destructor.
virtual bool isExecutable(ImageList *images)
This check is used by Directory::supportedActions(DataType data).
CubeDnView * addCubeDnView(QString objectName="")
Add the qview workspace to the window.
QList< CubeDnView * > cubeDnViews()
Accessor for the list of CubeDnViews currently available.
ProjectItemModel * model()
Gets the ProjectItemModel for this directory.
Internalizes a list of images and allows for operations on the entire list.
The main project for ipce.
Directory * directory() const
Returns the directory associated with this Project.
void setClean(bool value)
Function to change the clean state of the project.
QList< ProjectItem * > selectedItems()
Returns a list of the selected items of the internal selection model.
Internalizes a list of shapes and allows for operations on the entire list.
bool m_isSavedToHistory
Set the work order to be shown in the HistoryTreeWidget.
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
virtual bool setupExecution()
This sets up the state for the work order.
QStringList internalData() const
Gets 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 setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
Project * project() const
Returns the Project this WorkOrder is attached to.
WorkOrder(Project *project)
Create a work order that will work with the given project.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.