27 #include <QFileDialog>
28 #include <QInputDialog>
29 #include <QMessageBox>
33 #include "ImageList.h"
50 QAction::setText(tr(
"Display &Images..."));
83 return (images->count() > 0 && images->count() < 50);
94 return (shapes->count() > 0 && shapes->count() < 20);
114 if (existingViews.count()) {
115 for (
int i = 0; i < existingViews.count(); i++) {
116 viewOptions.append(existingViews[i]->windowTitle());
120 viewOptions.append(tr(
"New Cube DN View"));
122 if (viewOptions.count() > 1) {
123 QString selected = QInputDialog::getItem(NULL, tr(
"View to see cubes in"),
124 tr(
"Which view would you like your\nimage's DN data to be put into?"),
125 viewOptions, viewOptions.count() - 1,
false, &success);
127 viewToUse = viewOptions.indexOf(selected);
130 viewToUse = viewOptions.count() - 1;
133 bool newView =
false;
134 if (viewToUse == viewOptions.count() - 1) {
136 QUndoCommand::setText(tr(
"View image DN data of list in new cube DN view"));
138 else if (viewToUse != -1) {
139 QUndoCommand::setText(tr(
"View image DN data in cube DN view [%1]")
140 .arg(existingViews[viewToUse]->windowTitle()));
144 internalData.append(QString::number(viewToUse));
145 internalData.append(newView?
"new view" :
"existing view");
Internalizes a list of shapes and allows for operations on the entire list.
Internalizes a list of images and allows for operations on the entire list.
The main project for cnetsuite.
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.
Project * project() const
Returns the Project this WorkOrder is attached to.
CubeDnViewWorkOrder(Project *project)
This method sets the text of the work order.
~CubeDnViewWorkOrder()
Destructor.
QStringList internalData() const
Gets the internal data for this WorkOrder.
CubeDnView * addCubeDnView()
Add the qview workspace to the window.
void syncRedo()
This method adds a new CubeDnView to the project's directory and then adds currentItem() to that...
ProjectItemModel * model()
Gets the ProjectItemModel for this directory.
Parent class for anything that performs an action in Project.
bool execute()
If WorkOrder::execute() returns true, then this method returns true.
virtual CubeDnViewWorkOrder * clone() const
This method clones the CubeDnViewWorkOrder.
QList< CubeDnView * > cubeDnViews()
Accessor for the list of CubeDnViews currently available.
Directory * directory() const
Returns the directory associated with this Project.
View that displays cubes in a QView-like way.
QList< ProjectItem * > selectedItems()
Returns a list of the selected items of the internal selection model.
Directory * directory() const
Returns the Directory object of the Project this WorkOrder is attached to.
virtual bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
bool dependsOn(WorkOrder *other) const
This method returns true if other depends on a CubeDnViewWorkOrder.
virtual bool isExecutable(ImageList *images)
This check is used by Directory::supportedActions(DataType data).
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.