"Boiler Plate" QTreeView subclass with hooks for custom drawing and editing
Bake 1 -- RiverWare 6.1 -- Qt 4.6.3 -- Phil Weinstein -- 1-15-2011


// BoilerTreeView.cpp
//
// CLASSES:
//  class BoilerTreeView               : public QTreeView
//  class BoilerTreeView::ItemModel    : public QAbstractItemModel
//  class BoilerTreeView::ItemDelegate : public QStyledItemDelegate
//  class BoilerTreeViewTest           : public QWidget
//
// DESCRIPTION:
//  This boiler plate Qt4 QTreeView class with internal "model" and
//  "delegate" subclasses is intended for adaptation for application
//  QTreeView classes. It is concrete (i.e. it can be instantiated).
//
//  If column sorting is desired, I recommend handling sorting directly
//  in the item model class rather than by introducing a QSortFilterProxyModel
//  subclass. Use of that class creates ambiguities in interpreting
//  QModelIndex values, and itself has some problems. However, if you
//  really want to use a QSortFilterProxyModel, I recommend use of our
//  own "RwQSortFilterProxyModel" subclass to fix those problems.
//  (See the comments at the head of RwQSortFilterProxyModel.cpp).
//
//  To use as a basis for a new QTreeView subclass, copy this file, and the
//  the accompanying header file, and do a global substitution within the
//  new files of "Boiler", "Entity", "Entities", "entity".
//
//    (1) BoilerTreeView.cpp
//    (2) BoilerTreeView.hpp
//
//  This module was adapted from the Qt4 model/view replacement of a Qt3
//  GenListView-based QListView instance in the RiverWare 6.1 Multiple Run
//  Configuration Editor dialog. See QtRun/MrmPolicyTreeView.hpp and .cpp.
//
//  This module contains "QObject" classes (all three classes listed above).
//  So this module needs to be supported as such in the make files;
//  On Windows: in the two ".pro" files in the containing project (library).
//
//--