OpenStudio:shared_gui_components
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | List of all members
openstudio::OSItemDelegate Class Reference

#include <OSListController.hpp>

+ Inheritance diagram for openstudio::OSItemDelegate:

Public Member Functions

virtual * view (QSharedPointer< OSListItem > dataSource)
 
virtual ~OSItemDelegate ()
 

Detailed Description

The purpose of OSItemDelegate is to create a visual representation of an OSListItem and to connect the data provided by an OSListItem to the view.

OSItemDelegate should be subclassed, and the view() method should be reimplemented to provide a QWidget that is not empty. This class will be commonly subclassed and is a member of the controller logic. It is particular to the view and the data source. If the view provided by OSItemDelegate is used often or if the view has a significant amount of detail, a separate view class should be defined outside of the OSItemDelegate and merely instantiated here. On the other hand if the view very specific with little opportunity for reuse, and if the design is simple, it is acceptable for OSItemDelegate::view() to build up a widget conglomeration on the fly from primitive widget types like QLabel, QWidget, etc.

Constructor & Destructor Documentation

virtual openstudio::OSItemDelegate::~OSItemDelegate ( )
inlinevirtual

Member Function Documentation

virtual * openstudio::OSItemDelegate::view ( QSharedPointer< OSListItem dataSource)
virtual