1 #ifndef AbstractProjectItemView_h 2 #define AbstractProjectItemView_h 26 #include <QMainWindow> 29 class QDragEnterEvent;
31 template <
typename T>
class QList;
36 class ProjectItemModel;
107 virtual void dropEvent(QDropEvent *event);
109 virtual void moveEvent(QMoveEvent *event);
110 virtual void resizeEvent(QResizeEvent *event);
125 void windowChangeEvent(
bool event);
virtual void enterEvent(QEvent *event)
Enables actions when cursor enters the view.
virtual void addItem(ProjectItem *item)
Adds an item to the view.
virtual void leaveEvent(QEvent *event)
Disables actions when cursor leaves the view.
virtual void dropEvent(QDropEvent *event)
Drops the data into the internal model if it can accept the data.
virtual void disableActions()
Disables toolbars and toolpad actions.
virtual void addItems(QList< ProjectItem *> items)
Adds several items to the view.
virtual void removeItems(QList< ProjectItem *> items)
Removes several items from 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 QSize sizeHint() const
Returns the suggested size.
virtual void removeItem(ProjectItem *item)
Removes an item to the view.
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework...
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 ProjectItemModel * internalModel()
Returns the internal model of the view.
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 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< ProjectItem * > selectedItems()
Return the selected items of the model.
Represents an item of a ProjectItemModel in Qt's model-view framework.
Namespace for ISIS/Bullet specific routines.
virtual void enableActions()
Enables toolbars and toolpad actions.
virtual ProjectItemModel * model()
Returns the model used by the view.