Isis 3 Programmer Reference
ProjectItem.h
Go to the documentation of this file.
1 #ifndef ProjectItem_h
2 #define ProjectItem_h
3 
25 #include <QStandardItem>
26 
27 #include "BundleSettings.h"
28 #include "FileItem.h"
29 #include "GuiCamera.h"
30 #include "TargetBody.h"
31 
32 class QVariant;
33 
34 namespace Isis {
35 
36  class BundleResults;
37  class BundleSolutionInfo;
38  class Control;
39  class ControlList;
40  class CorrelationMatrix;
41  class FileItem;
42  class Image;
43  class ImageList;
44  class GuiCameraList;
45  class Project;
46  class ProjectItem;
47  class ProjectItemModel;
48  class Shape;
49  class ShapeList;
50  class TargetBodyList;
51  class Template;
52  class TemplateList;
53 
146  class ProjectItem : public QStandardItem {
147  public:
148  ProjectItem();
149  explicit ProjectItem(ProjectItem *item);
164  ProjectItem(GuiCameraList *guiCameraList);
168  ProjectItem(TargetBodyList *targetBodyList);
170  ProjectItem(Template *newTemplate);
172  ProjectItem(FileItemQsp filename, QString treeText, QIcon icon);
173  ProjectItem(FileItemQsp filename, QString treeText, QString toolTipText, QIcon icon);
174 
175  ~ProjectItem();
176 
180  Control *control() const;
181  ControlList *controlList() const;
183  Image *image() const;
184  ImageList *imageList() const;
185  Shape *shape() const;
186  ShapeList *shapeList() const;
187  Project *project() const;
188  GuiCameraQsp guiCamera() const;
189  TargetBodyQsp targetBody() const;
190  Template *getTemplate() const;
191  TemplateList *templateList() const;
192  FileItemQsp fileItem() const;
193 
194  bool isBundleResults() const;
195  bool isBundleSettings() const;
196  bool isBundleSolutionInfo() const;
197  bool isControl() const;
198  bool isControlList() const;
199  bool isCorrelationMatrix() const;
200  bool isImage() const;
201  bool isImageList() const;
202  bool isShape() const;
203  bool isShapeList() const;
204  bool isProject() const;
205  bool isGuiCamera() const;
206  bool isTargetBody() const;
207  bool isFileItem() const;
208  bool isTemplate() const;
209 
210  void setProjectItem(ProjectItem *item);
214  void setControl(Control *control);
216  void setControls();
218  void setImage(Image *image);
220  void setImages();
221  void setShape(Shape *shape);
223  void setShapes();
224  void setProject(Project *project);
225  void setResults();
227  void setGuiCameraList();
228  void setSpacecraft();
230  void setTargetBodyList();
231  void setTemplate(Template *newTemplate);
232  void setTemplates();
234 
235  ProjectItem *findItemData(const QVariant &value, int role = Qt::UserRole+1);
236 
237  void appendRow(ProjectItem *item);
238  ProjectItem *child(int row) const;
239  void insertRow(int row, ProjectItem *item);
240  ProjectItemModel *model() const;
241  ProjectItem *parent() const;
242  void setChild(int row, ProjectItem *item);
243  ProjectItem *takeChild(int row);
244 
245  void setTextColor(Qt::GlobalColor color);
246  };
247 
248 }
249 
251 
252 #endif
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:79
Internalizes a list of shapes and allows for operations on the entire list.
Definition: ShapeList.h:33
bool isFileItem() const
Returns true if a FileItemQsp is stored in the data of the item.
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
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.
Definition: ImageList.h:55
GuiCameraQsp guiCamera() const
Returns the GuiCameraQsp stored in the data of the item.
The main project for ipce.
Definition: Project.h:289
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.
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.
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.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
Definition: ControlList.h:36
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.
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.
void setImage(Image *image)
Sets the text, icon, and data corresponding to an Image.
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.
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *&#39;s to be stored in a QVariant.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
List for holding TargetBodies.
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.
Provides access to data stored in a Project through Qt&#39;s model-view framework.
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.
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.
Definition: Image.h:107
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.
bool isGuiCamera() const
Returns true if a GuiCameraQsp is stored in the data of the item.
void setCorrelationMatrix(CorrelationMatrix correlationMatrix)
Sets the text, icon, and data corresponding to a CorrelationMatrix.
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.
Definition: GuiCameraList.h:35
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.
void setBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Sets the text, icon, and data corresponding to a BundleSolutionInfo.
CorrelationMatrix correlationMatrix() const
Returns the CorrelationMatrix stored the item.
ProjectItem * child(int row) const
Returns the child item at a given row.
This represents a shape in a project-based GUI interface.
Definition: Shape.h:78
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.
Definition: ProjectItem.cpp:50
bool isControlList() const
Returns true if a ControlList is stored in the data of the item.
~ProjectItem()
Destructs a ProjectItem.
Represents an item of a ProjectItemModel in Qt&#39;s model-view framework.
Definition: ProjectItem.h:146
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
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.
Definition: BundleResults.h:96
bool isShape() const
Returns true if an Shape is stored in the data of the item.
void setShapeList(ShapeList *shapeList)
Sets the text, icon, and data corresponding to an ShapeList.
A container for a filename to be represented as a ProjectItem on the project tree.
Definition: FileItem.h:40
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.