Isis 3 Programmer Reference
ProjectItem.h
1#ifndef ProjectItem_h
2#define ProjectItem_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12
13#include <QStandardItem>
14
15#include "BundleSettings.h"
16#include "FileItem.h"
17#include "GuiCamera.h"
18#include "TargetBody.h"
19
20class QVariant;
21
22namespace Isis {
23
24 class BundleResults;
26 class Control;
27 class ControlList;
29 class FileItem;
30 class Image;
31 class ImageList;
32 class GuiCameraList;
33 class Project;
34 class ProjectItem;
35 class ProjectItemModel;
36 class Shape;
37 class ShapeList;
38 class TargetBodyList;
39 class Template;
40 class TemplateList;
41
134 class ProjectItem : public QStandardItem {
135 public:
136 ProjectItem();
137 explicit ProjectItem(ProjectItem *item);
143 ProjectItem(QList<ControlList *> controls);
147 ProjectItem(QList<ImageList *> images);
150 ProjectItem(QList<ShapeList *> shapes);
152 ProjectItem(GuiCameraList *guiCameraList);
154 ProjectItem(QList<BundleSolutionInfo *> results);
156 ProjectItem(TargetBodyList *targetBodyList);
157 ProjectItem(QList<TemplateList *> templates);
158 ProjectItem(Template *newTemplate);
160 ProjectItem(FileItemQsp filename, QString treeText, QIcon icon);
161 ProjectItem(FileItemQsp filename, QString treeText, QString toolTipText, QIcon icon);
162
163 ~ProjectItem();
164
168 Control *control() const;
169 ControlList *controlList() const;
171 Image *image() const;
172 ImageList *imageList() const;
173 Shape *shape() const;
174 ShapeList *shapeList() const;
175 Project *project() const;
176 GuiCameraQsp guiCamera() const;
178 Template *getTemplate() const;
179 TemplateList *templateList() const;
180 FileItemQsp fileItem() const;
181
182 bool isBundleResults() const;
183 bool isBundleSettings() const;
184 bool isBundleSolutionInfo() const;
185 bool isControl() const;
186 bool isControlList() const;
187 bool isCorrelationMatrix() const;
188 bool isImage() const;
189 bool isImageList() const;
190 bool isShape() const;
191 bool isShapeList() const;
192 bool isProject() const;
193 bool isGuiCamera() const;
194 bool isTargetBody() const;
195 bool isFileItem() const;
196 bool isTemplate() const;
197
198 void setProjectItem(ProjectItem *item);
204 void setControls();
206 void setImage(Image *image);
208 void setImages();
209 void setShape(Shape *shape);
211 void setShapes();
213 void setResults();
215 void setGuiCameraList();
216 void setSpacecraft();
218 void setTargetBodyList();
219 void setTemplate(Template *newTemplate);
220 void setTemplates();
222
223 ProjectItem *findItemData(const QVariant &value, int role = Qt::UserRole+1);
224
225 void appendRow(ProjectItem *item);
226 ProjectItem *child(int row) const;
227 void insertRow(int row, ProjectItem *item);
228 ProjectItemModel *model() const;
229 ProjectItem *parent() const;
230 void setChild(int row, ProjectItem *item);
231 ProjectItem *takeChild(int row);
232
233 void setTextColor(Qt::GlobalColor color);
234 };
235
236}
237
238Q_DECLARE_METATYPE(Isis::ProjectItem *);
239
240#endif
A container class for statistical results from a BundleAdjust solution.
Container class for BundleAdjustment results.
This represents an ISIS control net in a project-based GUI interface.
Definition Control.h:66
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
Definition ControlList.h:44
This is a container for the correlation matrix that comes from a bundle adjust.
A container for a filename to be represented as a ProjectItem on the project tree.
Definition FileItem.h:28
List of GuiCameras saved as QSharedPointers.
This represents a cube in a project-based GUI interface.
Definition Image.h:107
Internalizes a list of images and allows for operations on the entire list.
Definition ImageList.h:55
The main project for ipce.
Definition Project.h:289
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.
Definition Shape.h:68
Internalizes a list of shapes and allows for operations on the entire list.
Definition ShapeList.h:33
List for holding TargetBodies.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16