26 #include <QInputDialog> 30 #include "ImageFileListWidget.h" 34 ImageFileListViewWorkOrder::ImageFileListViewWorkOrder(Project *project) :
36 QAction::setText(tr(
"View File &Names..."));
42 ImageFileListViewWorkOrder::ImageFileListViewWorkOrder(
const ImageFileListViewWorkOrder &other) :
47 ImageFileListViewWorkOrder::~ImageFileListViewWorkOrder() {
51 ImageFileListViewWorkOrder *ImageFileListViewWorkOrder::clone()
const {
52 return new ImageFileListViewWorkOrder(*
this);
59 return !images->isEmpty();
84 if (existingViews.count()) {
85 for (
int i = 0; i < existingViews.count(); i++) {
86 viewOptions.append(existingViews[i]->windowTitle());
90 viewOptions.append(tr(
"New File List View"));
92 if (viewOptions.count() > 1) {
93 QString selected = QInputDialog::getItem(NULL, tr(
"View to see files in"),
94 tr(
"Which view would you like your\nimage's file names to be put into?"),
95 viewOptions, viewOptions.count() - 1,
false, &success);
97 viewToUse = viewOptions.indexOf(selected);
100 viewToUse = viewOptions.count() - 1;
103 if (viewToUse == viewOptions.count() - 1) {
105 QUndoCommand::setText(tr(
"View image file names of list [%1] in new file list view")
109 QUndoCommand::setText(tr(
"View [%1] Image File Names in new file list view")
113 else if (viewToUse != -1) {
115 QUndoCommand::setText(tr(
"View image file names of list [%1] in file list view [%2]")
116 .arg(
imageList()->name()).arg(existingViews[viewToUse]->windowTitle()));
119 QUndoCommand::setText(tr(
"View [%1] Image File Names in file list view [%2]")
120 .arg(
imageList()->count()).arg(existingViews[viewToUse]->windowTitle()));
QString name() const
Get the human-readable name of this image list.
Internalizes a list of images and allows for operations on the entire list.
ImageFileListWidget * addImageFileListView(QString objectName="")
Add an imageFileList widget to the window.
QList< ImageFileListWidget * > imageFileListViews()
Accessor for the list of ImageFileListWidgets currently available.
virtual bool setupExecution()
This sets up the state for the work order.
Directory * directory() const
Returns the directory associated with this Project.
bool isExecutable(ImageList *images)
Re-implement this method if your work order utilizes images for data in order to operate.
bool setupExecution()
This method asks the user what view they want to see their image list in.
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
void execute()
This method adds a new image file list to the project's directory and then adds currentItem() to that...
Namespace for ISIS/Bullet specific routines.
Project * project() const
Returns the Project this WorkOrder is attached to.
ImageList * imageList()
Returns a pointer to the ImageList for this WorkOrder.
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.