Isis Developer Reference
ProjectItem.h
Go to the documentation of this file.
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
239
240#endif
Q_DECLARE_METATYPE(Isis::ProjectItem *)
A container class for statistical results from a BundleAdjust solution.
Definition BundleResults.h:91
Container class for BundleAdjustment results.
Definition BundleSolutionInfo.h:162
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.
Definition CorrelationMatrix.h:61
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.
Definition GuiCameraList.h:35
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.
Definition ProjectItem.h:134
void setTextColor(Qt::GlobalColor color)
Definition ProjectItem.cpp:1246
TargetBodyQsp targetBody() const
Returns the TargetBodyQsp stored in the data of the item.
Definition ProjectItem.cpp:587
void setControls()
Sets the text, icon, and data corresponding to a list of ControlList.
Definition ProjectItem.cpp:1002
void setTemplateList(TemplateList *templateList)
Sets the text, icon, and data corresponding to an TemplateList.
Definition ProjectItem.cpp:931
void appendRow(ProjectItem *item)
Appends an item to the children of this item.
Definition ProjectItem.cpp:1166
void setResults()
Sets the text, icon, and data corresponding to a list of Results.
Definition ProjectItem.cpp:1048
void setShapes()
Sets the text, icon, and data corresponding to a list of ShapeList.
Definition ProjectItem.cpp:904
void setProjectItem(ProjectItem *item)
Sets the text, icon, and data to those of another item.
Definition ProjectItem.cpp:767
bool isShape() const
Returns true if an Shape is stored in the data of the item.
Definition ProjectItem.cpp:668
void setShape(Shape *shape)
Sets the text, icon, and data corresponding to an Shape.
Definition ProjectItem.cpp:873
BundleSolutionInfo * bundleSolutionInfo() const
Returns the BundleSolutionInfo stored in the data of the item.
Definition ProjectItem.cpp:466
BundleSettingsQsp bundleSettings() const
Returns the BundleSettings stored in the data of the item.
Definition ProjectItem.cpp:456
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.
Definition ProjectItem.cpp:1145
Template * getTemplate() const
Returns the Template stored in the data of the item.
Definition ProjectItem.cpp:516
bool isProject() const
Returns true if a Project is stored in the data of the item.
Definition ProjectItem.cpp:724
bool isTemplate() const
Definition ProjectItem.cpp:602
void setCorrelationMatrix(CorrelationMatrix correlationMatrix)
Sets the text, icon, and data corresponding to a CorrelationMatrix.
Definition ProjectItem.cpp:1016
void setSpacecraft()
Sets the text, icon, and data corresponding to SpaceCraft.
Definition ProjectItem.cpp:1086
void setBundleResults(BundleResults bundleResults)
Sets the text, icon, and data corresponding to BundleResults.
Definition ProjectItem.cpp:781
FileItemQsp fileItem() const
Returns the FileItemQsp stored in the data of the item.
Definition ProjectItem.cpp:597
ShapeList * shapeList() const
Returns the ShapeList stored in the data of the item.
Definition ProjectItem.cpp:506
bool isControl() const
Returns true if a Control is stored in the data of the item.
Definition ProjectItem.cpp:690
bool isControlList() const
Returns true if a ControlList is stored in the data of the item.
Definition ProjectItem.cpp:702
BundleResults bundleResults() const
Returns the BundleResults stored in the data of the item.
Definition ProjectItem.cpp:446
void setGuiCameraList()
Sets the text, icon, and data corresponding to a GuiCameraQsp.
Definition ProjectItem.cpp:1074
bool isShapeList() const
Returns true if an ShapeList is stored in the data of the item.
Definition ProjectItem.cpp:679
CorrelationMatrix correlationMatrix() const
Returns the CorrelationMatrix stored the item.
Definition ProjectItem.cpp:556
void setControl(Control *control)
Sets the text, icon, and data corresponding to a Control.
Definition ProjectItem.cpp:976
Shape * shape() const
Returns the Shape stored in the data of the item.
Definition ProjectItem.cpp:496
void setChild(int row, ProjectItem *item)
Sets the child at the given row to an item.
Definition ProjectItem.cpp:1222
void setTargetBody(TargetBodyQsp targetBody)
Sets the text, icon, and data corresponding to a TargetBodyQsp.
Definition ProjectItem.cpp:1101
void setControlList(ControlList *controlList)
Sets the text, icon, and data corresponding to a ControlList.
Definition ProjectItem.cpp:990
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
Definition ProjectItem.cpp:657
void setProject(Project *project)
Sets the text, icon, and data corresponding to a Project.
Definition ProjectItem.cpp:1035
void setTemplate(Template *newTemplate)
Sets the text, icon, and data corresponding to a Template.
Definition ProjectItem.cpp:918
void setBundleSettings(BundleSettingsQsp bundleSettings)
Sets the text, icon, and data corresponding to BundleSettings.
Definition ProjectItem.cpp:795
bool isBundleSettings() const
Returns true if BundleSettings are stored in the data of the item.
Definition ProjectItem.cpp:624
ProjectItem * parent() const
Returns the parent item of this item.
Definition ProjectItem.cpp:1211
ImageList * imageList() const
Returns the ImageList stored in the data of the item.
Definition ProjectItem.cpp:486
bool isBundleResults() const
Returns true if BundleResults are stored in the data of the item.
Definition ProjectItem.cpp:613
bool isFileItem() const
Returns true if a FileItemQsp is stored in the data of the item.
Definition ProjectItem.cpp:757
Control * control() const
Returns the Control stored in the data of the item.
Definition ProjectItem.cpp:536
Project * project() const
Returns the Project stored in the data of the item.
Definition ProjectItem.cpp:566
void setGuiCamera(GuiCameraQsp guiCamera)
Sets the text, icon, and data corresponding to a GuiCameraQsp.
Definition ProjectItem.cpp:1062
void setImage(Image *image)
Sets the text, icon, and data corresponding to an Image.
Definition ProjectItem.cpp:828
ProjectItem()
Constructs an item without children, a parent, or a model.
Definition ProjectItem.cpp:50
void setImages()
Sets the text, icon, and data corresponding to a list of ImageList.
Definition ProjectItem.cpp:859
void setTemplates()
Sets the text, icon, and data corresponding to a list of TemplateList.
Definition ProjectItem.cpp:948
Image * image() const
Returns the Image stored in the data of the item.
Definition ProjectItem.cpp:476
~ProjectItem()
Destructs a ProjectItem.
Definition ProjectItem.cpp:438
ControlList * controlList() const
Returns the ControlList stored in the data of the item.
Definition ProjectItem.cpp:546
void insertRow(int row, ProjectItem *item)
Inserts an item to the children of this item at the row.
Definition ProjectItem.cpp:1190
void setImageList(ImageList *imageList)
Sets the text, icon, and data corresponding to an ImageList.
Definition ProjectItem.cpp:842
bool isBundleSolutionInfo() const
Returns true if a BundleSolutionInfo is stored in the data of the item.
Definition ProjectItem.cpp:635
bool isImage() const
Returns true if an Image is stored in the data of the item.
Definition ProjectItem.cpp:646
void setShapeList(ShapeList *shapeList)
Sets the text, icon, and data corresponding to an ShapeList.
Definition ProjectItem.cpp:887
GuiCameraQsp guiCamera() const
Returns the GuiCameraQsp stored in the data of the item.
Definition ProjectItem.cpp:576
void setBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Sets the text, icon, and data corresponding to a BundleSolutionInfo.
Definition ProjectItem.cpp:809
void setTargetBodyList()
Sets the text, icon, and data corresponding to a TargetBodyList.
Definition ProjectItem.cpp:1127
ProjectItem * child(int row) const
Returns the child item at a given row.
Definition ProjectItem.cpp:1179
bool isGuiCamera() const
Returns true if a GuiCameraQsp is stored in the data of the item.
Definition ProjectItem.cpp:735
bool isCorrelationMatrix() const
Returns true if a CorrelationMatrix is stored in the data of the item.
Definition ProjectItem.cpp:713
ProjectItemModel * model() const
Returns the ProjectItemModel associated with this item.
Definition ProjectItem.cpp:1201
TemplateList * templateList() const
Returns the TemplateList stored in the data of the item.
Definition ProjectItem.cpp:526
ProjectItem * takeChild(int row)
Removes the child item at the given row and returns the removed item.
Definition ProjectItem.cpp:1235
bool isTargetBody() const
Returns true if a TargetBodyQsp is stored in the data of the item.
Definition ProjectItem.cpp:746
Provides access to data stored in a Project through Qt's model-view framework.
Definition ProjectItemModel.h:132
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.
Definition TargetBodyList.h:33
Definition Template.h:30
Definition TemplateList.h:35
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16