Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis 3 Programmer Reference
ProjectItemModel.h
1#ifndef ProjectItemModel_h
2#define ProjectItemModel_h
3
9
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QStandardItemModel>
13
14#include "FileName.h"
15
16class QItemSelection;
17class QItemSelectionModel;
18class QMimeData;
19class QModelIndex;
20class QString;
21class QVariant;
22
23namespace Isis {
24
25 class ShapeList;
27 class Control;
28 class ControlList;
29 class FileName;
30 class GuiCameraList;
31 class ImageList;
32 class Project;
33 class ProjectItem;
34 class TargetBodyList;
35 class TemplateList;
36
132
133 Q_OBJECT
134
135 public:
136 ProjectItemModel(QObject *parent = 0);
138
139 QItemSelectionModel *selectionModel();
140
141 ProjectItem *addProject(Project *project);
142
143 ProjectItem *findItemData(const QVariant &data, int role = Qt::UserRole+1);
144
145 virtual bool canDropMimeData(const QMimeData *data,
146 Qt::DropAction action,
147 int row, int column,
148 const QModelIndex& parent) const;
149
150 virtual void removeItem(ProjectItem *item);
151 virtual void removeItems(QList<ProjectItem *> items);
152
156
157
159 void clean();
160 QModelIndex indexFromItem(const ProjectItem *item);
161 void insertRow(int row, ProjectItem *item);
162 ProjectItem *item(int row);
163 ProjectItem *itemFromIndex(const QModelIndex &index);
164 void setItem(int row, ProjectItem *item);
165 ProjectItem *takeItem(int row);
166
167 bool setData(const QModelIndex &index, const QVariant &value, int role);
168 Qt::ItemFlags flags(const QModelIndex &index) const;
169
170 signals:
175
176
181
185 void cleanProject(bool);
186
187
191 void projectNameEdited(QString);
192
193 protected slots:
194 void onSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
195
196 private slots:
197 void onNameChanged(QString newName);
198 void onBundleSolutionInfoAdded(BundleSolutionInfo *bundleSolutionInfo);
199 void onImagesAdded(ImageList *images);
200 void onShapesAdded(ShapeList *shapes);
201 void onControlAdded(Control *control);
202 void onControlListAdded(ControlList *controlList);
203 void onTargetsAdded(TargetBodyList *targets);
204 void onTemplatesAdded(TemplateList *templateList);
205 void onGuiCamerasAdded(GuiCameraList *cameras);
206 void onRowsInserted(const QModelIndex &parent, int start, int end);
207 void onRowsRemoved(const QModelIndex &parent, int start, int end);
208
209 private:
210
211 QItemSelectionModel *m_selectionModel;
212 QStringList m_reservedNames;
213 bool rejectName(QStringList &reserved, QString target);
214
215
216 };
217
218}
219
220#endif
Container class for BundleAdjustment results.
This represents an ISIS control net in a project-based GUI interface.
Definition Control.h:65
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
Definition ControlList.h:41
List of GuiCameras saved as QSharedPointers.
Internalizes a list of images and allows for operations on the entire list.
Definition ImageList.h:52
The main project for ipce.
Definition Project.h:287
Represents an item of a ProjectItemModel in Qt's model-view framework.
void onTargetsAdded(TargetBodyList *targets)
Slot to connect to the targetsAdded() signal from a Project.
ProjectItemModel(QObject *parent=0)
Constructs an empty model.
QList< ProjectItem * > selectedItems()
Returns a list of the selected items of the internal selection model.
void cleanProject(bool)
This signal is emitted whrn a ProjectItem's name is changed.
void onImagesAdded(ImageList *images)
Slot to connect to the imagesAdded() signal from a Project.
void appendRow(ProjectItem *item)
Appends a top-level item to the model.
void onGuiCamerasAdded(GuiCameraList *cameras)
Slot to connect to the guiCamerasAdded() signal from a Project.
void onBundleSolutionInfoAdded(BundleSolutionInfo *bundleSolutionInfo)
Slot to connect to the bundleSolutionInfoAdded() signal from a project.
void clean()
Used to clean the ProjectItemModel of everything but the headers.
void insertRow(int row, ProjectItem *item)
Inserts a top-level item at the given row.
void onSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Slot to connect to the selectionChanged() signal from a selection model.
void setItem(int row, ProjectItem *item)
Sets the item at the top-level row.
virtual bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
You cannot drop mime data into the ProjectItemModel.
bool setData(const QModelIndex &index, const QVariant &value, int role)
This virtual method was added to handle changing the project name by double-clicking the project name...
ProjectItem * itemFromIndex(const QModelIndex &index)
Returns the ProjectItem corresponding to a given QModelIndex.
ProjectItem * takeItem(int row)
Removes the top-level row and returns the removed item.
~ProjectItemModel()
Destructs the model.
QList< ProjectItem * > selectedBOSSImages()
ProjectItemModel::selectedBOSSImages.
void onControlListAdded(ControlList *controlList)
Slot to connect to the controlListAdded() signal from a Project.
void itemAdded(ProjectItem *)
This signal is emitted when a ProjectItem is added to the model.
ProjectItem * item(int row)
Returns the top-level item at the given row.
bool rejectName(QStringList &reserved, QString target)
Checks to see if we are adding a reserved name to the project (ex.
virtual void removeItems(QList< ProjectItem * > items)
Removes a list of items and their children from the model.
void onNameChanged(QString newName)
Slot to connect to the nameChanged() signal from a Project.
void onTemplatesAdded(TemplateList *templateList)
Slot connected to the templatesAdded() signal from a project.
void onControlAdded(Control *control)
Slot to connect to the controlAdded() signal from a project.
ProjectItem * addProject(Project *project)
Adds a Project to the model.
ProjectItem * findItemData(const QVariant &data, int role=Qt::UserRole+1)
Returns the first item found that contains the given data in the given role or a null pointer if no i...
ProjectItem * currentItem()
Returns the current item of the internal selection model.
void projectNameEdited(QString)
This signal is emitted when the project name is edited.
QModelIndex indexFromItem(const ProjectItem *item)
Returns the QModelIndex corresponding to a given ProjectItem.
void itemRemoved(ProjectItem *)
This signal is emitted when a ProjectItem is removed to the model.
QItemSelectionModel * m_selectionModel
The internal selection model.
void onRowsInserted(const QModelIndex &parent, int start, int end)
Slot to connect to the rowsInserted() signal from QAbstractItemModel.
virtual void removeItem(ProjectItem *item)
Removes an item and its children from the model.
void onRowsRemoved(const QModelIndex &parent, int start, int end)
Slot to connect to the rowsAboutToBeRemoved() signal from QAbstractItemModel.
void onShapesAdded(ShapeList *shapes)
Slot to connect to the shapesAdded() signal from a Project.
Qt::ItemFlags flags(const QModelIndex &index) const
This virtual method was added to handle changing the project name by double-clicking the project name...
QItemSelectionModel * selectionModel()
Returns the internal selection model.
Internalizes a list of shapes and allows for operations on the entire list.
Definition ShapeList.h:30
List for holding TargetBodies.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16