1 #ifndef ProjectItemModel_h
2 #define ProjectItemModel_h
26 #include <QStandardItemModel>
29 class QItemSelectionModel;
38 class BundleSolutionInfo;
109 Qt::DropAction action,
111 const QModelIndex& parent)
const;
135 void onSelectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected);
138 void onNameChanged(QString newName);
142 void onControlAdded(
Control *control);
146 void onRowsInserted(
const QModelIndex &parent,
int start,
int end);
147 void onRowsRemoved(
const QModelIndex &parent,
int start,
int end);
150 QItemSelectionModel *m_selectionModel;
QModelIndex indexFromItem(const ProjectItem *item)
Returns the QModelIndex corresponding to a given ProjectItem.
Definition: ProjectItemModel.cpp:242
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:57
Internalizes a list of shapes and allows for operations on the entire list.
Definition: ShapeList.h:33
void insertRow(int row, ProjectItem *item)
Inserts a top-level item at the given row.
Definition: ProjectItemModel.cpp:253
void itemAdded(ProjectItem *)
This signal is emitted when a ProjectItem is added to the model.
Definition: moc_ProjectItemModel.cpp:215
ProjectItem * takeItem(int row)
Removes the top-level row and returns the removed item.
Definition: ProjectItemModel.cpp:300
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:44
The main project for cnetsuite.
Definition: Project.h:105
ProjectItem * itemFromIndex(const QModelIndex &index)
Returns the ProjectItem corresponding to a given QModelIndex.
Definition: ProjectItemModel.cpp:277
Container class for BundleAdjustment results.
Definition: BundleSolutionInfo.h:98
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
Definition: ControlList.h:34
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.
Definition: ProjectItemModel.cpp:87
ProjectItem * currentItem()
Returns the current item of the internal selection model.
Definition: ProjectItemModel.cpp:144
List for holding TargetBodies.
Definition: TargetBodyList.h:33
Provides access to data stored in a Project through Qt's model-view framework.
Definition: ProjectItemModel.h:94
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...
Definition: ProjectItemModel.cpp:176
void itemRemoved(ProjectItem *)
Definition: moc_ProjectItemModel.cpp:222
void appendRow(ProjectItem *item)
Appends a top-level item to the model.
Definition: ProjectItemModel.cpp:230
QItemSelectionModel * selectionModel()
Returns the internal selection model.
Definition: ProjectItemModel.cpp:100
virtual void removeItems(QList< ProjectItem * > items)
Removes a list of items and their children from the model.
Definition: ProjectItemModel.cpp:218
virtual void removeItem(ProjectItem *item)
Removes an item and its children from the model.
Definition: ProjectItemModel.cpp:197
ProjectItem * item(int row)
Returns the top-level item at the given row.
Definition: ProjectItemModel.cpp:265
~ProjectItemModel()
Destructs the model.
Definition: ProjectItemModel.cpp:69
List of GuiCameras saved as QSharedPointers.
Definition: GuiCameraList.h:35
void setItem(int row, ProjectItem *item)
Sets the item at the top-level row.
Definition: ProjectItemModel.cpp:288
void onSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Slot to connect to the selectionChanged() signal from a selection model.
Definition: ProjectItemModel.cpp:579
QList< ProjectItem * > selectedItems()
Returns a list of the selected items of the internal selection model.
Definition: ProjectItemModel.cpp:154
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition: ProjectItem.h:113
Definition: BoxcarCachingAlgorithm.h:29
ProjectItemModel(QObject *parent=0)
Constructs an empty model.
Definition: ProjectItemModel.cpp:51
ProjectItem * addProject(Project *project)
Adds a Project to the model.
Definition: ProjectItemModel.cpp:114