|
Isis 3 Programmer Reference
|
Go to the documentation of this file.
26 #include <QMessageBox>
28 #include "IException.h"
29 #include "ImageList.h"
32 #include "ProjectItem.h"
33 #include "ProjectItemModel.h"
37 RemoveImagesWorkOrder::RemoveImagesWorkOrder(
Project *project) :
WorkOrder(project) {
41 QAction::setText(
"&Delete images from project...");
54 RemoveImagesWorkOrder::~RemoveImagesWorkOrder() {
86 long itemCount = selectedItems.count();
88 if (selectedItems.at(0)->isImage()) {
89 QUndoCommand::setText(
"&Delete image " + selectedItems.at(0)->image()->fileName() +
" from project...");
91 else if (selectedItems.at(0)->isImageList()) {
92 QUndoCommand::setText(
"&Delete " + QString::number(selectedItems.at(0)->imageList()->count(), 10) +
" images from project...");
105 totalCount += item->
imageList()->count();
106 imageListAdded.append(item->
imageList());
112 foreach (
Image *image, images) {
118 QUndoCommand::setText(
"&Delete " + QString::number(totalCount, 10) +
" images from project...");
145 foreach (
ProjectItem *selectedItem, selectedItems) {
150 foreach (
ImageList* projectImageList, projectImageLists) {
151 projectImageList->
removeAll(selectedImage);
155 imageListToProcess.append(selectedItem->
imageList());
156 needToRemoveItems.append(selectedItem);
160 "Item cannot be removed from the project.",
166 foreach (
ImageList* projectImageList, projectImageLists) {
167 projectImageList->
removeAll(selectedImage);
virtual bool setupExecution()
This sets up the state for the work order.
This is free and unencumbered software released into the public domain.
Provide Undo/redo abilities, serialization, and history for an operation.
ProjectItemModel * model()
Gets the ProjectItemModel for this directory.
Image * image() const
Returns the Image stored in the data of the item.
void execute()
@description Remove any selected items from the project directory.
ImageList * imageList()
Returns a pointer to the ImageList for this WorkOrder.
virtual void removeItems(QList< ProjectItem * > items)
Removes a list of items and their children from the model.
void append(Image *const &value)
Appends an image to the image list.
Removes selected images from current project.
bool setupExecution()
@description Set up the execution.
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.
static QStringList images(QStringList)
Verify that the input fileNames are image files.
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
bool isImage() const
Returns true if an Image is stored in the data of the item.
QList< ProjectItem * > selectedItems()
Returns a list of the selected items of the internal selection model.
Project * project() const
Returns the Project this WorkOrder is attached to.
This represents a cube in a project-based GUI interface.
virtual bool isExecutable(ImageList *images)
Determines if we can remove this ImageList.
ImageList * imageList() const
Returns the ImageList stored in the data of the item.
void setModifiesDiskState(bool changesProjectOnDisk)
int removeAll(Image *const &value)
Removes all occurances of an image.
void setClean(bool value)
Function to change the clean state of the project.
virtual void removeItem(ProjectItem *item)
Removes an item and its children from the model.
This is free and unencumbered software released into the public domain.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Represents an item of a ProjectItemModel in Qt's model-view framework.