28 #include <QStandardItem> 35 #include "ControlList.h" 38 #include "ImageList.h" 42 #include "ShapeList.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);
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(
"$base/icons/kchart.png")
786 setData( QVariant::fromValue<BundleResults>(
bundleResults) );
796 setTextColor(Qt::black);
798 setIcon( QIcon(
FileName(
"$base/icons/applications-system.png")
800 setData( QVariant::fromValue<BundleSettingsQsp>(
bundleSettings) );
810 setTextColor(Qt::black);
817 setIcon( QIcon(
FileName(
"$base/icons/kchart.png")
829 setTextColor(Qt::black);
831 setIcon( QIcon(
FileName(
"$base/icons/view-preview.png")
833 setData( QVariant::fromValue<Image *>(
image) );
843 setTextColor(Qt::black);
850 setIcon( QIcon(
FileName(
"$base/icons/folder-image.png")
852 setData( QVariant::fromValue<ImageList *>(
imageList) );
860 setTextColor(Qt::black);
862 setIcon( QIcon(
FileName(
"$base/icons/folder-image.png")
864 setData( QVariant() );
874 setTextColor(Qt::black);
876 setIcon( QIcon(
FileName(
"$base/icons/rating.png")
878 setData( QVariant::fromValue<Shape *>(
shape) );
888 setTextColor(Qt::black);
895 setIcon( QIcon(
FileName(
"$base/icons/folder-orange.png")
897 setData( QVariant::fromValue<ShapeList *>(
shapeList) );
905 setTextColor(Qt::black);
907 setIcon( QIcon(
FileName(
"$base/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(
"$base/icons/folder-orange.png")
941 setData( QVariant::fromValue<TemplateList *>(
templateList) );
949 setText(
"Templates");
950 setIcon( QIcon(
FileName(
"$base/icons/folder-red.png")
952 setData( QVariant() );
955 mapsItem->setText(
"Maps");
956 setIcon( QIcon(
FileName(
"$base/icons/folder-red.png")
958 mapsItem->setData( QVariant() );
963 registrationsItem->setText(
"Registrations");
964 setIcon( QIcon(
FileName(
"$base/icons/folder-red.png")
966 registrationsItem->setData( QVariant() );
977 setTextColor(Qt::black);
979 setIcon( QIcon(
FileName(
"$base/icons/network-server-database.png")
981 setData( QVariant::fromValue<Control *>(
control) );
991 setTextColor(Qt::black);
993 setIcon( QIcon(
FileName(
"$base/icons/folder.png")
995 setData( QVariant::fromValue<ControlList *>(
controlList) );
1003 setTextColor(Qt::black);
1004 setText(
"Control Networks");
1005 setIcon( QIcon(
FileName(
"$base/icons/folder-remote.png")
1007 setData( QVariant() );
1017 setTextColor(Qt::black);
1018 setText(
"Correlation Matrix");
1019 setIcon( QIcon(
FileName(
"$base/icons/network-server-database.png")
1036 setTextColor(Qt::black);
1038 setIcon( QIcon(
FileName(
"$base/icons/folder-activities.png")
1040 setData( QVariant::fromValue<Project *>(
project) );
1049 setTextColor(Qt::black);
1051 setIcon( QIcon(
FileName(
"$base/icons/kchart.png")
1053 setData( QVariant() );
1063 setTextColor(Qt::black);
1064 setText(
guiCamera->displayProperties()->displayName() );
1065 setIcon( QIcon(
FileName(
"$base/icons/camera-photo.png")
1067 setData( QVariant::fromValue<GuiCameraQsp>(
guiCamera) );
1075 setTextColor(Qt::black);
1077 setIcon( QIcon(
FileName(
"$base/icons/camera-photo.png")
1079 setData( QVariant() );
1087 setTextColor(Qt::black);
1088 setText(
"Spacecraft");
1089 setIcon( QIcon(
FileName(
"$base/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(
"$base/icons/weather-clear-night.png")
1107 else if (
targetBody->displayProperties()->displayName() ==
"Enceladus")
1108 setIcon( QIcon(
FileName(
"$base/icons/nasa_enceladus.png")
1110 else if (
targetBody->displayProperties()->displayName() ==
"Mars")
1111 setIcon( QIcon(
FileName(
"$base/icons/nasa_mars.png")
1113 else if (
targetBody->displayProperties()->displayName() ==
"Titan")
1114 setIcon( QIcon(
FileName(
"$base/icons/nasa_titan.png")
1117 setIcon( QIcon(
FileName(
"$base/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(
"$base/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);
1238 if ( items.isEmpty() ) {
1242 return static_cast<ProjectItem *
>( items.first() );
1246 void ProjectItem::setTextColor(Qt::GlobalColor color) {
1247 setForeground(QBrush(color));
This represents an ISIS control net in a project-based GUI interface.
Internalizes a list of shapes and allows for operations on the entire list.
bool isFileItem() const
Returns true if a FileItemQsp is stored in the data of the item.
Control * control() const
Returns bundle output Control object.
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
QString name() const
Get the human-readable name of this image list.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
QString path() const
Get the path to the shapes in the shape list (relative to project root).
bool isShapeList() const
Returns true if an ShapeList is stored in the data of the item.
Internalizes a list of images and allows for operations on the entire list.
GuiCameraQsp guiCamera() const
Returns the GuiCameraQsp stored in the data of the item.
The main project for ipce.
TemplateList * templateList() const
Returns the TemplateList stored in the data of the item.
bool isImage() const
Returns true if an Image is stored in the data of the item.
void appendRow(ProjectItem *item)
Appends an item to the children of this item.
This is a container for the correlation matrix that comes from a bundle adjust.
File name manipulation and expansion.
void setTargetBody(TargetBodyQsp targetBody)
Sets the text, icon, and data corresponding to a TargetBodyQsp.
void setTemplateList(TemplateList *templateList)
Sets the text, icon, and data corresponding to an TemplateList.
Container class for BundleAdjustment results.
void setProject(Project *project)
Sets the text, icon, and data corresponding to a Project.
BundleSettingsQsp bundleSettings()
Returns bundle settings.
void setControlList(ControlList *controlList)
Sets the text, icon, and data corresponding to a ControlList.
ControlList * controlList() const
Returns the ControlList stored in the data of the item.
FileItemQsp fileItem() const
Returns the FileItemQsp stored in the data of the item.
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
void setChild(int row, ProjectItem *item)
Sets the child at the given row to an item.
void setControls()
Sets the text, icon, and data corresponding to a list of ControlList.
QString fileName() const
Get the file name that this Template represents.
void setBundleSettings(BundleSettingsQsp bundleSettings)
Sets the text, icon, and data corresponding to BundleSettings.
void setSpacecraft()
Sets the text, icon, and data corresponding to SpaceCraft.
bool isProject() const
Returns true if a Project is stored in the data of the item.
QString path() const
Get the path to these Templates in the TemplateList (relative to project root).
void setImage(Image *image)
Sets the text, icon, and data corresponding to an Image.
QList< TemplateList * > templates()
Return all template FileNames.
void setShapes()
Sets the text, icon, and data corresponding to a list of ShapeList.
void setControl(Control *control)
Sets the text, icon, and data corresponding to a Control.
List for holding TargetBodies.
QString name() const
Returns the name of the bundle.
void setGuiCamera(GuiCameraQsp guiCamera)
Sets the text, icon, and data corresponding to a GuiCameraQsp.
Project * project() const
Returns the Project 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. ...
void setShape(Shape *shape)
Sets the text, icon, and data corresponding to an Shape.
ProjectItemModel * model() const
Returns the ProjectItemModel associated with this item.
ProjectItem * parent() const
Returns the parent item of this item.
void insertRow(int row, ProjectItem *item)
Inserts an item to the children of this item at the row.
void setTargetBodyList()
Sets the text, icon, and data corresponding to a TargetBodyList.
ImageList * imageList() const
Returns the ImageList stored in the data of the item.
void setTemplate(Template *newTemplate)
Sets the text, icon, and data corresponding to a Template.
void setImageList(ImageList *imageList)
Sets the text, icon, and data corresponding to an ImageList.
QList< ImageList * > adjustedImages() const
Returns the list of images that were adjusted after a bundle.
Provides access to data stored in a Project through Qt's model-view framework.
static QStringList images(QStringList)
Verify that the input fileNames are image files.
void setBundleResults(BundleResults bundleResults)
Sets the text, icon, and data corresponding to BundleResults.
bool isBundleSolutionInfo() const
Returns true if a BundleSolutionInfo is stored in the data of the item.
QString runTime() const
Returns the run time.
ProjectItem * takeChild(int row)
Removes the child item at the given row and returns the removed item.
Template * getTemplate() const
Returns the Template stored in the data of the item.
void setProjectItem(ProjectItem *item)
Sets the text, icon, and data to those of another item.
BundleSettingsQsp bundleSettings() const
Returns the BundleSettings stored in the data of the item.
TargetBodyQsp targetBody() const
Returns the TargetBodyQsp stored in the data of the item.
BundleResults bundleResults() const
Returns the BundleResults stored in the data of the item.
BundleSolutionInfo * bundleSolutionInfo() const
Returns the BundleSolutionInfo stored in the data of the item.
This represents a cube in a project-based GUI interface.
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.
QString projectRoot() const
Get the top-level folder of the project.
QString fileName() const
Get the file name of the cube that this shape represents.
QString name() const
Get the human-readable name of this TemplateList.
bool isGuiCamera() const
Returns true if a GuiCameraQsp is stored in the data of the item.
QList< ControlList * > controls()
Return controls in project.
void setCorrelationMatrix(CorrelationMatrix correlationMatrix)
Sets the text, icon, and data corresponding to a CorrelationMatrix.
QString name() const
Get the project's GUI name.
bool isTargetBody() const
Returns true if a TargetBodyQsp is stored in the data of the item.
void setImages()
Sets the text, icon, and data corresponding to a list of ImageList.
void setResults()
Sets the text, icon, and data corresponding to a list of Results.
void setGuiCameraList()
Sets the text, icon, and data corresponding to a GuiCameraQsp.
List of GuiCameras saved as QSharedPointers.
bool isBundleResults() const
Returns true if BundleResults are stored in the data of the item.
bool isControl() const
Returns true if a Control is stored in the data of the item.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void setBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Sets the text, icon, and data corresponding to a BundleSolutionInfo.
CorrelationMatrix correlationMatrix() const
Returns the CorrelationMatrix stored the item.
QList< BundleSolutionInfo * > bundleSolutionInfo()
Return BundleSolutionInfo objects in Project.
QString name() const
Get the human-readable name of this control list.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
ProjectItem * child(int row) const
Returns the child item at a given row.
This represents a shape in a project-based GUI interface.
Shape * shape() const
Returns the Shape stored in the data of the item.
Control * control() const
Returns the Control stored in the data of the item.
ProjectItem()
Constructs an item without children, a parent, or a model.
bool isControlList() const
Returns true if a ControlList is stored in the data of the item.
~ProjectItem()
Destructs a ProjectItem.
QString path() const
Get the path to the images in the image list (relative to project root).
Represents an item of a ProjectItemModel in Qt's model-view framework.
BundleResults bundleResults()
Returns the bundle results.
Namespace for ISIS/Bullet specific routines.
bool isCorrelationMatrix() const
Returns true if a CorrelationMatrix is stored in the data of the item.
A container class for statistical results from a BundleAdjust solution.
bool isShape() const
Returns true if an Shape is stored in the data of the item.
QString name() const
Get the human-readable name of this shape list.
void setShapeList(ShapeList *shapeList)
Sets the text, icon, and data corresponding to an ShapeList.
QString fileName() const
Access the name of the control network file associated with this Control.
QString fileName() const
Get the file name of the cube that this image represents.
bool isBundleSettings() const
Returns true if BundleSettings are stored in the data of the item.
ShapeList * shapeList() const
Returns the ShapeList stored in the data of the item.