OpenStudio:openstudio_lib
 All Classes Namespaces Functions Variables Enumerations Enumerator
Public Slots | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
openstudio::ModelObjectTreeItem Class Reference

#include <ModelObjectTreeItems.hpp>

+ Inheritance diagram for openstudio::ModelObjectTreeItem:

Public Slots

void change ()
 
void changeRelationship (int index, Handle newHandle, Handle oldHandle)
 
void refresh ()
 
void refreshTree ()
 

Public Member Functions

std::vector
< ModelObjectTreeItem * > 
children () const
 
boost::optional
< openstudio::Handle > 
handle () const
 
bool isDirty ()
 
OSItemitem () const
 
void makeDirty ()
 
openstudio::model::Model model () const
 
boost::optional
< openstudio::model::ModelObject > 
modelObject () const
 
 ModelObjectTreeItem (const openstudio::model::ModelObject &modelObject, bool isDefaulted, OSItemType type, QTreeWidgetItem *parent=nullptr)
 Constructed with a modelObject this tree item represents that object. More...
 
 ModelObjectTreeItem (const std::string &name, const openstudio::model::Model &model, QTreeWidgetItem *parent=nullptr)
 Constructed with no modelObject this tree item represents a container. More...
 
std::string name () const
 
std::vector
< ModelObjectTreeItem * > 
recursiveChildren () const
 
void setStyle (int headerLevel, const QString &color)
 
virtual ~ModelObjectTreeItem ()
 

Protected Member Functions

virtual void addModelObjectChild (const model::ModelObject &child, bool isDefaulted)
 
virtual void addNonModelObjectChild (const std::string &child)
 
virtual std::vector
< model::ModelObject > 
defaultedModelObjectChildren () const
 
virtual void finalize ()
 
void makeChildren ()
 
virtual std::vector
< model::ModelObject > 
modelObjectChildren () const
 
virtual std::vector< std::string > nonModelObjectChildren () const
 

Static Protected Member Functions

static OSItemType initializeOSItemType ()
 

Static Protected Attributes

static const OSItemType m_type
 

Constructor & Destructor Documentation

openstudio::ModelObjectTreeItem::ModelObjectTreeItem ( const openstudio::model::ModelObject &  modelObject,
bool  isDefaulted,
OSItemType  type,
QTreeWidgetItem parent = nullptr 
)

Constructed with a modelObject this tree item represents that object.

openstudio::ModelObjectTreeItem::ModelObjectTreeItem ( const std::string &  name,
const openstudio::model::Model &  model,
QTreeWidgetItem parent = nullptr 
)

Constructed with no modelObject this tree item represents a container.

virtual openstudio::ModelObjectTreeItem::~ModelObjectTreeItem ( )
virtual

Member Function Documentation

virtual void openstudio::ModelObjectTreeItem::addModelObjectChild ( const model::ModelObject &  child,
bool  isDefaulted 
)
protectedvirtual
virtual void openstudio::ModelObjectTreeItem::addNonModelObjectChild ( const std::string &  child)
protectedvirtual
void openstudio::ModelObjectTreeItem::change ( )
slot
void openstudio::ModelObjectTreeItem::changeRelationship ( int  index,
Handle  newHandle,
Handle  oldHandle 
)
slot
std::vector<ModelObjectTreeItem*> openstudio::ModelObjectTreeItem::children ( ) const
virtual std::vector<model::ModelObject> openstudio::ModelObjectTreeItem::defaultedModelObjectChildren ( ) const
protectedvirtual
virtual void openstudio::ModelObjectTreeItem::finalize ( )
protectedvirtual
boost::optional<openstudio::Handle> openstudio::ModelObjectTreeItem::handle ( ) const
static OSItemType openstudio::ModelObjectTreeItem::initializeOSItemType ( )
staticprotected
bool openstudio::ModelObjectTreeItem::isDirty ( )
OSItem* openstudio::ModelObjectTreeItem::item ( ) const
void openstudio::ModelObjectTreeItem::makeChildren ( )
protected
void openstudio::ModelObjectTreeItem::makeDirty ( )
openstudio::model::Model openstudio::ModelObjectTreeItem::model ( ) const
boost::optional<openstudio::model::ModelObject> openstudio::ModelObjectTreeItem::modelObject ( ) const
virtual std::vector<model::ModelObject> openstudio::ModelObjectTreeItem::modelObjectChildren ( ) const
protectedvirtual
std::string openstudio::ModelObjectTreeItem::name ( ) const
virtual std::vector<std::string> openstudio::ModelObjectTreeItem::nonModelObjectChildren ( ) const
protectedvirtual
std::vector<ModelObjectTreeItem*> openstudio::ModelObjectTreeItem::recursiveChildren ( ) const
void openstudio::ModelObjectTreeItem::refresh ( )
slot
void openstudio::ModelObjectTreeItem::refreshTree ( )
slot
void openstudio::ModelObjectTreeItem::setStyle ( int  headerLevel,
const QString &  color 
)

Member Data Documentation

const OSItemType openstudio::ModelObjectTreeItem::m_type
staticprotected