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 
20 class QVariant;
21 
22 namespace Isis {
23 
24  class BundleResults;
25  class BundleSolutionInfo;
26  class Control;
27  class ControlList;
28  class CorrelationMatrix;
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);
152  ProjectItem(GuiCameraList *guiCameraList);
156  ProjectItem(TargetBodyList *targetBodyList);
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;
177  TargetBodyQsp targetBody() 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);
202  void setControl(Control *control);
204  void setControls();
206  void setImage(Image *image);
208  void setImages();
209  void setShape(Shape *shape);
211  void setShapes();
212  void setProject(Project *project);
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
Isis::ProjectItemModel
Provides access to data stored in a Project through Qt's model-view framework.
Definition: ProjectItemModel.h:132
Isis::ProjectItem::bundleSolutionInfo
BundleSolutionInfo * bundleSolutionInfo() const
Returns the BundleSolutionInfo stored in the data of the item.
Definition: ProjectItem.cpp:466
Isis::ProjectItem::bundleResults
BundleResults bundleResults() const
Returns the BundleResults stored in the data of the item.
Definition: ProjectItem.cpp:446
Isis::ProjectItem::isGuiCamera
bool isGuiCamera() const
Returns true if a GuiCameraQsp is stored in the data of the item.
Definition: ProjectItem.cpp:735
Isis::ProjectItem::setCorrelationMatrix
void setCorrelationMatrix(CorrelationMatrix correlationMatrix)
Sets the text, icon, and data corresponding to a CorrelationMatrix.
Definition: ProjectItem.cpp:1016
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::ProjectItem::setImages
void setImages()
Sets the text, icon, and data corresponding to a list of ImageList.
Definition: ProjectItem.cpp:859
Isis::ProjectItem::setGuiCameraList
void setGuiCameraList()
Sets the text, icon, and data corresponding to a GuiCameraQsp.
Definition: ProjectItem.cpp:1074
Isis::ProjectItem::isControl
bool isControl() const
Returns true if a Control is stored in the data of the item.
Definition: ProjectItem.cpp:690
Isis::ProjectItem::setResults
void setResults()
Sets the text, icon, and data corresponding to a list of Results.
Definition: ProjectItem.cpp:1048
Isis::ProjectItem::image
Image * image() const
Returns the Image stored in the data of the item.
Definition: ProjectItem.cpp:476
Isis::ProjectItem::setTemplates
void setTemplates()
Sets the text, icon, and data corresponding to a list of TemplateList.
Definition: ProjectItem.cpp:948
Isis::ProjectItem::correlationMatrix
CorrelationMatrix correlationMatrix() const
Returns the CorrelationMatrix stored the item.
Definition: ProjectItem.cpp:556
Isis::ControlList
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
Definition: ControlList.h:44
Isis::ProjectItem::isTargetBody
bool isTargetBody() const
Returns true if a TargetBodyQsp is stored in the data of the item.
Definition: ProjectItem.cpp:746
Isis::ProjectItem::shape
Shape * shape() const
Returns the Shape stored in the data of the item.
Definition: ProjectItem.cpp:496
Isis::ProjectItem::ProjectItem
ProjectItem()
Constructs an item without children, a parent, or a model.
Definition: ProjectItem.cpp:50
Isis::ProjectItem::isBundleResults
bool isBundleResults() const
Returns true if BundleResults are stored in the data of the item.
Definition: ProjectItem.cpp:613
Isis::TemplateList
Definition: TemplateList.h:35
Isis::ProjectItem::setBundleSolutionInfo
void setBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Sets the text, icon, and data corresponding to a BundleSolutionInfo.
Definition: ProjectItem.cpp:809
Isis::ProjectItem::isCorrelationMatrix
bool isCorrelationMatrix() const
Returns true if a CorrelationMatrix is stored in the data of the item.
Definition: ProjectItem.cpp:713
Isis::ProjectItem::setShapeList
void setShapeList(ShapeList *shapeList)
Sets the text, icon, and data corresponding to an ShapeList.
Definition: ProjectItem.cpp:887
Isis::ProjectItem::child
ProjectItem * child(int row) const
Returns the child item at a given row.
Definition: ProjectItem.cpp:1179
Isis::ProjectItem::isControlList
bool isControlList() const
Returns true if a ControlList is stored in the data of the item.
Definition: ProjectItem.cpp:702
Isis::ProjectItem::control
Control * control() const
Returns the Control stored in the data of the item.
Definition: ProjectItem.cpp:536
Isis::Control
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
Isis::ProjectItem::~ProjectItem
~ProjectItem()
Destructs a ProjectItem.
Definition: ProjectItem.cpp:438
QSharedPointer< BundleSettings >
Isis::ProjectItem::isShape
bool isShape() const
Returns true if an Shape is stored in the data of the item.
Definition: ProjectItem.cpp:668
Isis::CorrelationMatrix
This is a container for the correlation matrix that comes from a bundle adjust.
Definition: CorrelationMatrix.h:61
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::ImageList
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
Isis::ProjectItem::isImageList
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
Definition: ProjectItem.cpp:657
Isis::ProjectItem::isShapeList
bool isShapeList() const
Returns true if an ShapeList is stored in the data of the item.
Definition: ProjectItem.cpp:679
Isis::ProjectItem::guiCamera
GuiCameraQsp guiCamera() const
Returns the GuiCameraQsp stored in the data of the item.
Definition: ProjectItem.cpp:576
Isis::ProjectItem::isImage
bool isImage() const
Returns true if an Image is stored in the data of the item.
Definition: ProjectItem.cpp:646
Isis::ProjectItem::isBundleSettings
bool isBundleSettings() const
Returns true if BundleSettings are stored in the data of the item.
Definition: ProjectItem.cpp:624
Isis::ProjectItem::appendRow
void appendRow(ProjectItem *item)
Appends an item to the children of this item.
Definition: ProjectItem.cpp:1166
Isis::ProjectItem::setTargetBody
void setTargetBody(TargetBodyQsp targetBody)
Sets the text, icon, and data corresponding to a TargetBodyQsp.
Definition: ProjectItem.cpp:1101
Isis::ProjectItem::shapeList
ShapeList * shapeList() const
Returns the ShapeList stored in the data of the item.
Definition: ProjectItem.cpp:506
Isis::ProjectItem::isFileItem
bool isFileItem() const
Returns true if a FileItemQsp is stored in the data of the item.
Definition: ProjectItem.cpp:757
Isis::BundleSolutionInfo
Container class for BundleAdjustment results.
Definition: BundleSolutionInfo.h:159
Isis::ProjectItem::setProject
void setProject(Project *project)
Sets the text, icon, and data corresponding to a Project.
Definition: ProjectItem.cpp:1035
Isis::Template
Definition: Template.h:30
Isis::Shape
This represents a shape in a project-based GUI interface.
Definition: Shape.h:68
Isis::ProjectItem::templateList
TemplateList * templateList() const
Returns the TemplateList stored in the data of the item.
Definition: ProjectItem.cpp:526
Isis::ProjectItem::fileItem
FileItemQsp fileItem() const
Returns the FileItemQsp stored in the data of the item.
Definition: ProjectItem.cpp:597
GuiCamera.h
Isis::ShapeList
Internalizes a list of shapes and allows for operations on the entire list.
Definition: ShapeList.h:33
Isis::TargetBodyList
List for holding TargetBodies.
Definition: TargetBodyList.h:33
Isis::ProjectItem::setChild
void setChild(int row, ProjectItem *item)
Sets the child at the given row to an item.
Definition: ProjectItem.cpp:1222
Isis::ProjectItem::setControls
void setControls()
Sets the text, icon, and data corresponding to a list of ControlList.
Definition: ProjectItem.cpp:1002
Isis::Image
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Isis::ProjectItem::setTemplateList
void setTemplateList(TemplateList *templateList)
Sets the text, icon, and data corresponding to an TemplateList.
Definition: ProjectItem.cpp:931
Isis::ProjectItem::controlList
ControlList * controlList() const
Returns the ControlList stored in the data of the item.
Definition: ProjectItem.cpp:546
Isis::ProjectItem::setControlList
void setControlList(ControlList *controlList)
Sets the text, icon, and data corresponding to a ControlList.
Definition: ProjectItem.cpp:990
Isis::ProjectItem::isProject
bool isProject() const
Returns true if a Project is stored in the data of the item.
Definition: ProjectItem.cpp:724
Isis::ProjectItem::setSpacecraft
void setSpacecraft()
Sets the text, icon, and data corresponding to SpaceCraft.
Definition: ProjectItem.cpp:1086
Isis::ProjectItem::setImage
void setImage(Image *image)
Sets the text, icon, and data corresponding to an Image.
Definition: ProjectItem.cpp:828
Isis::ProjectItem::setShapes
void setShapes()
Sets the text, icon, and data corresponding to a list of ShapeList.
Definition: ProjectItem.cpp:904
Isis::ProjectItem::setGuiCamera
void setGuiCamera(GuiCameraQsp guiCamera)
Sets the text, icon, and data corresponding to a GuiCameraQsp.
Definition: ProjectItem.cpp:1062
Isis::ProjectItem::project
Project * project() const
Returns the Project stored in the data of the item.
Definition: ProjectItem.cpp:566
Isis::ProjectItem::setBundleSettings
void setBundleSettings(BundleSettingsQsp bundleSettings)
Sets the text, icon, and data corresponding to BundleSettings.
Definition: ProjectItem.cpp:795
Isis::ProjectItem::findItemData
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
Isis::ProjectItem::parent
ProjectItem * parent() const
Returns the parent item of this item.
Definition: ProjectItem.cpp:1211
Isis::ProjectItem::imageList
ImageList * imageList() const
Returns the ImageList stored in the data of the item.
Definition: ProjectItem.cpp:486
Isis::ProjectItem::setTargetBodyList
void setTargetBodyList()
Sets the text, icon, and data corresponding to a TargetBodyList.
Definition: ProjectItem.cpp:1127
Isis::ProjectItem::setTemplate
void setTemplate(Template *newTemplate)
Sets the text, icon, and data corresponding to a Template.
Definition: ProjectItem.cpp:918
Isis::ProjectItem::setControl
void setControl(Control *control)
Sets the text, icon, and data corresponding to a Control.
Definition: ProjectItem.cpp:976
Isis::ProjectItem::setBundleResults
void setBundleResults(BundleResults bundleResults)
Sets the text, icon, and data corresponding to BundleResults.
Definition: ProjectItem.cpp:781
Isis::BundleResults
A container class for statistical results from a BundleAdjust solution.
Definition: BundleResults.h:82
Isis::ProjectItem::setShape
void setShape(Shape *shape)
Sets the text, icon, and data corresponding to an Shape.
Definition: ProjectItem.cpp:873
Isis::ProjectItem::model
ProjectItemModel * model() const
Returns the ProjectItemModel associated with this item.
Definition: ProjectItem.cpp:1201
Isis::ProjectItem::insertRow
void insertRow(int row, ProjectItem *item)
Inserts an item to the children of this item at the row.
Definition: ProjectItem.cpp:1190
Isis::ProjectItem::setProjectItem
void setProjectItem(ProjectItem *item)
Sets the text, icon, and data to those of another item.
Definition: ProjectItem.cpp:767
Isis::ProjectItem::setImageList
void setImageList(ImageList *imageList)
Sets the text, icon, and data corresponding to an ImageList.
Definition: ProjectItem.cpp:842
Isis::GuiCameraList
List of GuiCameras saved as QSharedPointers.
Definition: GuiCameraList.h:35
Isis::ProjectItem::getTemplate
Template * getTemplate() const
Returns the Template stored in the data of the item.
Definition: ProjectItem.cpp:516
Isis::ProjectItem::bundleSettings
BundleSettingsQsp bundleSettings() const
Returns the BundleSettings stored in the data of the item.
Definition: ProjectItem.cpp:456
QStandardItem
Isis::FileItem
A container for a filename to be represented as a ProjectItem on the project tree.
Definition: FileItem.h:28
Isis::ProjectItem::isBundleSolutionInfo
bool isBundleSolutionInfo() const
Returns true if a BundleSolutionInfo is stored in the data of the item.
Definition: ProjectItem.cpp:635
Isis::ProjectItem::takeChild
ProjectItem * takeChild(int row)
Removes the child item at the given row and returns the removed item.
Definition: ProjectItem.cpp:1235
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(Isis::PlotWindow *)
We have plot windows as QVariant data types, so here it's enabled.
Isis::ProjectItem::targetBody
TargetBodyQsp targetBody() const
Returns the TargetBodyQsp stored in the data of the item.
Definition: ProjectItem.cpp:587
Isis::ProjectItem
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition: ProjectItem.h:134