Isis Developer Reference
ProjectItemTreeView.h
Go to the documentation of this file.
1 #ifndef ProjectItemTreeView_h
2 #define ProjectItemTreeView_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
13 
14 class QEvent;
15 class QTreeView;
16 class QWidget;
17 
18 namespace Isis {
19 
20  class ProjectItem;
21  class ProjectItemModel;
22 
57 
58  Q_OBJECT
59 
60  public:
61  ProjectItemTreeView(QWidget *parent=0);
63 
64  virtual QSize sizeHint() const;
65 
67 
68  QTreeView *treeView();
69 
70  protected:
71  bool eventFilter(QObject *watched, QEvent *event);
72 
73  private slots:
74  void onItemAdded(ProjectItem *item);
75 
76  private:
77  QTreeView *m_treeView;
78  };
79 }
80 
81 #endif
Isis::ProjectItemModel
Provides access to data stored in a Project through Qt's model-view framework.
Definition: ProjectItemModel.h:132
AbstractProjectItemView.h
ProjectItem.h
Isis::AbstractProjectItemView::model
virtual ProjectItemModel * model()
Returns the model used by the view.
Definition: AbstractProjectItemView.cpp:83
QWidget
Isis::AbstractProjectItemView
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt's model-view framework.
Definition: AbstractProjectItemView.h:79
Isis::ProjectItemTreeView::~ProjectItemTreeView
~ProjectItemTreeView()
Default destructor.
Definition: ProjectItemTreeView.cpp:71
Isis::ProjectItemModel::selectionModel
QItemSelectionModel * selectionModel()
Returns the internal selection model.
Definition: ProjectItemModel.cpp:93
Isis::ProjectItemTreeView::sizeHint
virtual QSize sizeHint() const
Returns the suggested size.
Definition: ProjectItemTreeView.cpp:61
Isis::ProjectItemTreeView::treeView
QTreeView * treeView()
Returns the tree view.
Definition: ProjectItemTreeView.cpp:79
Isis::ProjectItem::isControlList
bool isControlList() const
Returns true if a ControlList is stored in the data of the item.
Definition: ProjectItem.cpp:702
Isis::ProjectItem::isImageList
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
Definition: ProjectItem.cpp:657
Isis::AbstractProjectItemView::setInternalModel
virtual void setInternalModel(ProjectItemModel *model)
Sets the internal model of the view.
Definition: AbstractProjectItemView.cpp:97
Isis::ProjectItemTreeView::eventFilter
bool eventFilter(QObject *watched, QEvent *event)
Filters out drag and drop events so that they are handled by the ProjectItemTreeView.
Definition: ProjectItemTreeView.cpp:131
Isis::ProjectItemTreeView::ProjectItemTreeView
ProjectItemTreeView(QWidget *parent=0)
Constructs a ProjectItemTreeView.
Definition: ProjectItemTreeView.cpp:29
Isis::AbstractProjectItemView::internalModel
virtual ProjectItemModel * internalModel()
Returns the internal model of the view.
Definition: AbstractProjectItemView.cpp:108
ProjectItemModel.h
Isis::ProjectItem::parent
ProjectItem * parent() const
Returns the parent item of this item.
Definition: ProjectItem.cpp:1211
Isis::ProjectItemTreeView::setInternalModel
virtual void setInternalModel(ProjectItemModel *model)
Sets the model so that the internal proxy model exactly matches the source model.
Definition: ProjectItemTreeView.cpp:90
QObject
Isis::ProjectItemTreeView
A ProjectItemTreeView displays items from a ProjectItemProxyModel in a tree structure.
Definition: ProjectItemTreeView.h:56
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
ProjectItemTreeView.h
Isis::ProjectItem
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition: ProjectItem.h:134