26#include <QInputDialog>
30#include "Footprint2DView.h"
32#include "MosaicSceneItem.h"
33#include "MosaicSceneWidget.h"
35#include "ProjectItem.h"
36#include "ProjectItemModel.h"
48 QAction::setText(tr(
"View &Footprints..."));
100 foreach (
Image *image, *images) {
122 foreach (
Shape *shape, *shapes) {
142 int maxRecommendedFootprints = 50000;
143 if (success &&
imageList()->count() > maxRecommendedFootprints) {
144 QMessageBox::StandardButton selectedOpt = QMessageBox::warning(NULL,
145 tr(
"Potentially Slow Operation"),
146 tr(
"You are asking to open %L1 images in a 2D footprint view at once. This is possible, "
147 "but will take a significant amount of time and cause overall slowness. Working with "
148 "more than %L2 footprints is not recommended. Are you sure you want to view these "
149 "%L1 footprints?").arg(
imageList()->count()).arg(maxRecommendedFootprints),
150 QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
152 if (selectedOpt == QMessageBox::No) {
162 if (existingViews.count()) {
163 for (
int i = 0; i < existingViews.count(); i++) {
164 viewOptions.append(existingViews[i]->windowTitle());
168 viewOptions.append(tr(
"New Footprint View"));
170 if (viewOptions.count() > 1) {
171 QString selected = QInputDialog::getItem(NULL, tr(
"View to see footprints in"),
172 tr(
"Which view would you like your\nimage's footprints to be put into?"),
173 viewOptions, viewOptions.count() - 1,
false, &success);
175 viewToUse = viewOptions.indexOf(selected);
178 viewToUse = viewOptions.count() - 1;
181 if (viewToUse == viewOptions.count() - 1) {
182 QUndoCommand::setText(tr(
"View footprints in new 2D footprint view"));
184 else if (viewToUse != -1) {
185 QUndoCommand::setText(tr(
"View footprints in footprint view [%1]")
186 .arg(existingViews[viewToUse]->windowTitle()));
216 view->addItems( selectedItems );
QList< Footprint2DView * > footprint2DViews()
Accessor for the list of Footprint2DViews currently available.
ProjectItemModel * model()
Gets the ProjectItemModel for this directory.
Footprint2DView * addFootprint2DView(QString objectName="")
Add the qmos view widget to the window.
This represents a cube in a project-based GUI interface.
bool isFootprintable() const
Test to see if it's possible to create a footprint from this image.
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.
This represents a shape in a project-based GUI interface.
bool isFootprintable() const
Test to see if it's possible to create a footprint from this shape.
Internalizes a list of shapes and allows for operations on the entire list.
Provide Undo/redo abilities, serialization, and history for an operation.
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.
ImageList * imageList()
Returns a pointer to the ImageList for this WorkOrder.
This is free and unencumbered software released into the public domain.