27 #include <QDragEnterEvent>
28 #include <QDragMoveEvent>
59 proxyModel->setSourceModel(model);
73 return proxyModel->sourceModel();
109 0, 0, QModelIndex() ) ) {
110 event->acceptProposedAction();
124 0, 0, QModelIndex() ) ) {
125 event->acceptProposedAction();
138 0, 0, QModelIndex() ) ) {
139 internalModel()->dropMimeData( event->mimeData(),
event->dropAction(),
140 0, 0, QModelIndex() );
141 event->acceptProposedAction();
276 proxyModel->addItem(item);
305 proxyModel->removeItem(item);
virtual void addItem(ProjectItem *item)
Adds an item to the view.
virtual QList< QAction * > projectMenuActions()
Returns a list of actions appropriate for a project menu.
virtual void dropEvent(QDropEvent *event)
Drops the data into the internal model if it can accept the data.
virtual void addItems(QList< ProjectItem * > items)
Adds several items to the view.
virtual void setInternalModel(ProjectItemModel *model)
Sets the internal model of the view.
virtual void setModel(ProjectItemModel *model)
Sets the model used by the view.
virtual QList< QAction * > helpMenuActions()
Returns a list of actions appropriate for a help menu.
virtual QList< QAction * > editMenuActions()
Returns a list of actions appropriate for an edit menu.
ProjectItem * currentItem()
Returns the current item of the internal selection model.
virtual void removeItem(ProjectItem *item)
Removes an item to the view.
Provides access to data stored in a Project through Qt's model-view framework.
virtual ProjectItem * currentItem()
Returns the current item of the model.
virtual QList< QAction * > settingsMenuActions()
Returns a list of actions appropriate for a settings menu.
virtual ProjectItemModel * internalModel()
Returns the internal model of the view.
Allows access to items in a ProjectItemModel through a proxy model.
virtual QList< QAction * > contextMenuActions()
Returns a list of actions appropriate for a context menu.
virtual void dragMoveEvent(QDragMoveEvent *event)
Accepts the drag event if the internal model can accept the mime data.
ProjectItemModel * m_internalModel
The internal model used by the view.
virtual QList< QAction * > activeToolBarActions()
Returns a list of actions appropriate for the active tool bar.
virtual void dragEnterEvent(QDragEnterEvent *event)
Accepts the drag enter event if the internal model can accept the mime data.
AbstractProjectItemView(QWidget *parent=0)
Constructs the AbstractProjectItemView.
virtual QList< QAction * > viewMenuActions()
Returns a list of actions appropriate for a view menu.
virtual QList< ProjectItem * > selectedItems()
Return the selected items of the model.
QList< ProjectItem * > selectedItems()
Returns a list of the selected items of the internal selection model.
Represents an item of a ProjectItemModel in Qt's model-view framework.
virtual void removeItems(QList< ProjectItem * > items)
Removes several items from the view.
virtual QList< QAction * > fileMenuActions()
Returns a list of actions appropriate for a file menu.
virtual QList< QAction * > permToolBarActions()
Returns a list of actions appropriate for the permanent tool bar.
virtual QList< QAction * > toolPadActions()
Returns a list of actions appropriate for the tool pad.
virtual ProjectItemModel * model()
Returns the model used by the view.