24#include "ProjectItem.h" 
   28#include <QStandardItem> 
   32#include "BundleResults.h" 
   33#include "BundleSolutionInfo.h" 
   35#include "ControlList.h" 
   36#include "CorrelationMatrix.h" 
   40#include "ProjectItemModel.h" 
   44#include "TemplateList.h" 
   51    setTextColor(Qt::black);
 
 
   64    setTextColor(Qt::black);
 
   65    item->setEditable(
false);
 
   67    for (
int i=0; i < item->rowCount(); i++) {
 
 
   81    setTextColor(Qt::black);
 
   83    setData(QVariant::fromValue<FileItemQsp>(filename));
 
 
   98    setTextColor(Qt::black);
 
  100    setData(QVariant::fromValue<FileItemQsp>(filename));
 
  102    setToolTip(toolTipText);
 
 
  114    setTextColor(Qt::black);
 
 
  127    setTextColor(Qt::black);
 
 
  140    setTextColor(Qt::black);
 
 
  159    setTextColor(Qt::black);
 
 
  171    setTextColor(Qt::black);
 
 
  186    setTextColor(Qt::black);
 
 
  202    setTextColor(Qt::black);
 
 
  214    setTextColor(Qt::black);
 
 
  226    setTextColor(Qt::black);
 
 
  241    setTextColor(Qt::black);
 
 
  256    setTextColor(Qt::black);
 
 
  268    setTextColor(Qt::black);
 
 
  283    setTextColor(Qt::black);
 
 
  298    setTextColor(Qt::black);
 
 
  311    setTextColor(Qt::black);
 
 
  326    setTextColor(Qt::black);
 
 
  340    setTextColor(Qt::black);
 
 
  353    setTextColor(Qt::black);
 
 
  368    setTextColor(Qt::black);
 
  377    targetBodyListItem->setTargetBodyList();
 
  381    guiCameraListItem->setGuiCameraList();
 
  385    spaceCraftItem->setSpacecraft();
 
 
  399    setTextColor(Qt::black);
 
 
  414    setTextColor(Qt::black);
 
 
  426    setTextColor(Qt::black);
 
 
  477    return data().value<
Image *>();
 
 
  497    return data().value<
Shape *>();
 
 
  537    return data().value<
Control *>();
 
 
  567    return data().value<
Project *>();
 
 
  602  bool ProjectItem::isTemplate()
 const {
 
  603    return data().canConvert<
Template *>();
 
  647    return data().canConvert<
Image *>();
 
 
  669    return data().canConvert<
Shape *>();
 
 
  691    return data().canConvert<
Control *>();
 
 
  725    return data().canConvert<
Project *>();
 
 
  768    setTextColor(Qt::black);
 
  769    setText( item->text() );
 
  770    setIcon( item->icon() );
 
  771    setData( item->data() );
 
  772    setEditable(item->isEditable());
 
 
  782    setTextColor(Qt::black);
 
  783    setText(
"Statistics");
 
  784    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/kchart.png")
 
  786    setData( QVariant::fromValue<BundleResults>(
bundleResults) );
 
 
  796    setTextColor(Qt::black);
 
  798    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/applications-system.png")
 
  800    setData( QVariant::fromValue<BundleSettingsQsp>(
bundleSettings) );
 
 
  810    setTextColor(Qt::black);
 
  817    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/kchart.png")
 
 
  829    setTextColor(Qt::black);
 
  831    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/view-preview.png")
 
  833    setData( QVariant::fromValue<Image *>(
image) );
 
 
  843    setTextColor(Qt::black);
 
  850    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-image.png")
 
  852    setData( QVariant::fromValue<ImageList *>(
imageList) );
 
 
  860    setTextColor(Qt::black);
 
  862    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-image.png")
 
  864    setData( QVariant() );
 
 
  874    setTextColor(Qt::black);
 
  876    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/rating.png")
 
  878    setData( QVariant::fromValue<Shape *>(
shape) );
 
 
  888    setTextColor(Qt::black);
 
  895    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-orange.png")
 
  897    setData( QVariant::fromValue<ShapeList *>(
shapeList) );
 
 
  905    setTextColor(Qt::black);
 
  907    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-red.png")
 
  909    setData( QVariant() );
 
 
  919    setTextColor(Qt::black);
 
  920    setText( QFileInfo( newTemplate->fileName() ).fileName() );
 
  921    setIcon( QIcon(
":folder"));
 
  922    setData( QVariant::fromValue<Template *>(newTemplate) );
 
 
  932    setTextColor(Qt::black);
 
  939    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-orange.png")
 
  941    setData( QVariant::fromValue<TemplateList *>(
templateList) );
 
 
  949    setText(
"Templates");
 
  950    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-red.png")
 
  952    setData( QVariant() );
 
  955    mapsItem->setText(
"Maps");
 
  956    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-red.png")
 
  958    mapsItem->setData( QVariant() );
 
  963    registrationsItem->setText(
"Registrations");
 
  964    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-red.png")
 
  966    registrationsItem->setData( QVariant() );
 
 
  977    setTextColor(Qt::black);
 
  979    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/network-server-database.png")
 
  981    setData( QVariant::fromValue<Control *>(
control) );
 
 
  991    setTextColor(Qt::black);
 
  993    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder.png")
 
  995    setData( QVariant::fromValue<ControlList *>(
controlList) );
 
 
 1003    setTextColor(Qt::black);
 
 1004    setText(
"Control Networks");
 
 1005    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-remote.png")
 
 1007    setData( QVariant() );
 
 
 1017    setTextColor(Qt::black);
 
 1018    setText(
"Correlation Matrix");
 
 1019    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/network-server-database.png")
 
 
 1036    setTextColor(Qt::black);
 
 1038    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/folder-activities.png")
 
 1040    setData( QVariant::fromValue<Project *>(
project) );
 
 
 1049    setTextColor(Qt::black);
 
 1051    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/kchart.png")
 
 1053    setData( QVariant() );
 
 
 1063    setTextColor(Qt::black);
 
 1064    setText( 
guiCamera->displayProperties()->displayName() );
 
 1065    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/camera-photo.png")
 
 1067    setData( QVariant::fromValue<GuiCameraQsp>(
guiCamera) );
 
 
 1075    setTextColor(Qt::black);
 
 1077    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/camera-photo.png")
 
 1079    setData( QVariant() );
 
 
 1087    setTextColor(Qt::black);
 
 1088    setText(
"Spacecraft");
 
 1089    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/preferences-desktop-launch-feedback.png")
 
 1091    setData( QVariant() );
 
 
 1102    setTextColor(Qt::black);
 
 1103    setText( 
targetBody->displayProperties()->displayName() );
 
 1104    if (
targetBody->displayProperties()->displayName() == 
"MOON")
 
 1105      setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/weather-clear-night.png")
 
 1107    else if (
targetBody->displayProperties()->displayName() == 
"Enceladus")
 
 1108      setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/nasa_enceladus.png")
 
 1110    else if (
targetBody->displayProperties()->displayName() == 
"Mars")
 
 1111      setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/nasa_mars.png")
 
 1113    else if (
targetBody->displayProperties()->displayName() == 
"Titan")
 
 1114      setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/nasa_titan.png")
 
 1117      setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/view-web-browser-dom-tree.png")
 
 1120    setData( QVariant::fromValue<TargetBodyQsp>(
targetBody) );
 
 
 1128    setTextColor(Qt::black);
 
 1129    setText(
"Target Body");
 
 1130    setIcon( QIcon(
FileName(
"$ISISROOT/appdata/images/icons/view-web-browser-dom-tree.png")
 
 1132    setData( QVariant() );
 
 
 1146    if ( data(role) == value ) {
 
 1150    for (
int i=0; i<rowCount(); i++) {
 
 
 1167    setTextColor(Qt::black);
 
 1168    QStandardItem::appendRow(item);
 
 
 1180    return static_cast<ProjectItem *
>( QStandardItem::child(row) );
 
 
 1191    setTextColor(Qt::black);
 
 1192    QStandardItem::insertRow(row, item);
 
 
 1212    return static_cast<ProjectItem *
>( QStandardItem::parent() );
 
 
 1223    setTextColor(Qt::black);
 
 1224    QStandardItem::setChild(row, item);
 
 
 1236    QList<QStandardItem *> items = QStandardItem::takeRow(row);
 
 1238    if ( items.isEmpty() ) {
 
 1242    return static_cast<ProjectItem *
>( items.first() );
 
 
 1246  void ProjectItem::setTextColor(Qt::GlobalColor color) {
 
 1247    setForeground(QBrush(color));
 
A container class for statistical results from a BundleAdjust solution.
 
Container class for BundleAdjustment results.
 
BundleSettingsQsp bundleSettings()
Returns bundle settings.
 
QList< ImageList * > adjustedImages() const
Returns the list of images that were adjusted after a bundle.
 
BundleResults bundleResults()
Returns the bundle results.
 
QString runTime() const
Returns the run time.
 
QString name() const
Returns the name of the bundle.
 
Control * control() const
Returns bundle output Control object.
 
This represents an ISIS control net in a project-based GUI interface.
 
QString fileName() const
Access the name of the control network file associated with this Control.
 
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
 
QString name() const
Get the human-readable name of this control list.
 
This is a container for the correlation matrix that comes from a bundle adjust.
 
File name manipulation and expansion.
 
List of GuiCameras saved as QSharedPointers.
 
This represents a cube in a project-based GUI interface.
 
QString fileName() const
Get the file name of the cube that this image represents.
 
Internalizes a list of images and allows for operations on the entire list.
 
QString path() const
Get the path to the images in the image list (relative to project root).
 
QString name() const
Get the human-readable name of this image list.
 
The main project for ipce.
 
QList< TemplateList * > templates()
Return all template FileNames.
 
static QStringList images(QStringList)
Verify that the input fileNames are image files.
 
QList< ControlList * > controls()
Return controls in project.
 
QList< BundleSolutionInfo * > bundleSolutionInfo()
Return BundleSolutionInfo objects in Project.
 
QString projectRoot() const
Get the top-level folder of the project.
 
QString name() const
Get the project's GUI name.
 
Represents an item of a ProjectItemModel in Qt's model-view framework.
 
TargetBodyQsp targetBody() const
Returns the TargetBodyQsp stored in the data of the item.
 
void setControls()
Sets the text, icon, and data corresponding to a list of ControlList.
 
void setTemplateList(TemplateList *templateList)
Sets the text, icon, and data corresponding to an TemplateList.
 
void appendRow(ProjectItem *item)
Appends an item to the children of this item.
 
void setResults()
Sets the text, icon, and data corresponding to a list of Results.
 
void setShapes()
Sets the text, icon, and data corresponding to a list of ShapeList.
 
void setProjectItem(ProjectItem *item)
Sets the text, icon, and data to those of another item.
 
bool isShape() const
Returns true if an Shape is stored in the data of the item.
 
void setShape(Shape *shape)
Sets the text, icon, and data corresponding to an Shape.
 
BundleSolutionInfo * bundleSolutionInfo() const
Returns the BundleSolutionInfo stored in the data of the item.
 
BundleSettingsQsp bundleSettings() const
Returns the BundleSettings stored in the data of the item.
 
ProjectItem * findItemData(const QVariant &value, int role=Qt::UserRole+1)
Finds and returns the first item in the model that contains the data in the role.
 
Template * getTemplate() const
Returns the Template stored in the data of the item.
 
bool isProject() const
Returns true if a Project is stored in the data of the item.
 
void setCorrelationMatrix(CorrelationMatrix correlationMatrix)
Sets the text, icon, and data corresponding to a CorrelationMatrix.
 
void setSpacecraft()
Sets the text, icon, and data corresponding to SpaceCraft.
 
void setBundleResults(BundleResults bundleResults)
Sets the text, icon, and data corresponding to BundleResults.
 
FileItemQsp fileItem() const
Returns the FileItemQsp stored in the data of the item.
 
ShapeList * shapeList() const
Returns the ShapeList stored in the data of the item.
 
bool isControl() const
Returns true if a Control is stored in the data of the item.
 
bool isControlList() const
Returns true if a ControlList is stored in the data of the item.
 
BundleResults bundleResults() const
Returns the BundleResults stored in the data of the item.
 
void setGuiCameraList()
Sets the text, icon, and data corresponding to a GuiCameraQsp.
 
bool isShapeList() const
Returns true if an ShapeList is stored in the data of the item.
 
CorrelationMatrix correlationMatrix() const
Returns the CorrelationMatrix stored the item.
 
void setControl(Control *control)
Sets the text, icon, and data corresponding to a Control.
 
Shape * shape() const
Returns the Shape stored in the data of the item.
 
void setChild(int row, ProjectItem *item)
Sets the child at the given row to an item.
 
void setTargetBody(TargetBodyQsp targetBody)
Sets the text, icon, and data corresponding to a TargetBodyQsp.
 
void setControlList(ControlList *controlList)
Sets the text, icon, and data corresponding to a ControlList.
 
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
 
void setProject(Project *project)
Sets the text, icon, and data corresponding to a Project.
 
void setTemplate(Template *newTemplate)
Sets the text, icon, and data corresponding to a Template.
 
void setBundleSettings(BundleSettingsQsp bundleSettings)
Sets the text, icon, and data corresponding to BundleSettings.
 
bool isBundleSettings() const
Returns true if BundleSettings are stored in the data of the item.
 
ProjectItem * parent() const
Returns the parent item of this item.
 
ImageList * imageList() const
Returns the ImageList stored in the data of the item.
 
bool isBundleResults() const
Returns true if BundleResults are stored in the data of the item.
 
bool isFileItem() const
Returns true if a FileItemQsp is stored in the data of the item.
 
Control * control() const
Returns the Control stored in the data of the item.
 
Project * project() const
Returns the Project stored in the data of the item.
 
void setGuiCamera(GuiCameraQsp guiCamera)
Sets the text, icon, and data corresponding to a GuiCameraQsp.
 
void setImage(Image *image)
Sets the text, icon, and data corresponding to an Image.
 
ProjectItem()
Constructs an item without children, a parent, or a model.
 
void setImages()
Sets the text, icon, and data corresponding to a list of ImageList.
 
void setTemplates()
Sets the text, icon, and data corresponding to a list of TemplateList.
 
Image * image() const
Returns the Image stored in the data of the item.
 
~ProjectItem()
Destructs a ProjectItem.
 
ControlList * controlList() const
Returns the ControlList stored in the data of the item.
 
void insertRow(int row, ProjectItem *item)
Inserts an item to the children of this item at the row.
 
void setImageList(ImageList *imageList)
Sets the text, icon, and data corresponding to an ImageList.
 
bool isBundleSolutionInfo() const
Returns true if a BundleSolutionInfo is stored in the data of the item.
 
bool isImage() const
Returns true if an Image is stored in the data of the item.
 
void setShapeList(ShapeList *shapeList)
Sets the text, icon, and data corresponding to an ShapeList.
 
GuiCameraQsp guiCamera() const
Returns the GuiCameraQsp stored in the data of the item.
 
void setBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Sets the text, icon, and data corresponding to a BundleSolutionInfo.
 
void setTargetBodyList()
Sets the text, icon, and data corresponding to a TargetBodyList.
 
ProjectItem * child(int row) const
Returns the child item at a given row.
 
bool isGuiCamera() const
Returns true if a GuiCameraQsp is stored in the data of the item.
 
bool isCorrelationMatrix() const
Returns true if a CorrelationMatrix is stored in the data of the item.
 
ProjectItemModel * model() const
Returns the ProjectItemModel associated with this item.
 
TemplateList * templateList() const
Returns the TemplateList stored in the data of the item.
 
ProjectItem * takeChild(int row)
Removes the child item at the given row and returns the removed item.
 
bool isTargetBody() const
Returns true if a TargetBodyQsp is stored in the data of the item.
 
Provides access to data stored in a Project through Qt's model-view framework.
 
This represents a shape in a project-based GUI interface.
 
QString fileName() const
Get the file name of the cube that this shape represents.
 
Internalizes a list of shapes and allows for operations on the entire list.
 
QString path() const
Get the path to the shapes in the shape list (relative to project root).
 
QString name() const
Get the human-readable name of this shape list.
 
List for holding TargetBodies.
 
QString name() const
Get the human-readable name of this TemplateList.
 
QString path() const
Get the path to these Templates in the TemplateList (relative to project root).
 
This is free and unencumbered software released into the public domain.