arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TFItemVec Class Reference

#include <TFItem.h>

List of all members.


Detailed Description

TFItemVec, manages a bunch of transfer function elements, and the tf itself, as far as QT is concerned.

Definition at line 153 of file TFItem.h.

Public Types

typedef std::vector< TFItemSP
>::iterator 
TFItemVecIter
typedef std::vector< TFItemSP
>::const_iterator 
TFItemVecConstIter

Public Member Functions

 TFItemVec (QCanvas *canvas, TFBaseSP tf)
 construct

virtual ~TFItemVec ()
 destruct

void setTF (TFBaseSP tf)
 set TF

TFBaseSP getTF () const
void setCanvas (QCanvas *canvas)
 set Canvas

QCanvas * getCanvas () const
void update ()
 call update on all items in vector, also sync up with the tf...

void setScale (tfVec2 scales)
tfVec2 getScale () const
void setBorder (tfVec2 border)
tfVec2 getBorder () const
TFItemSP getItem (TFEltSP elt) const
 get an item based on the Element it represents

void addItem (TFEltSP elt)
 add an item, will try to figure out what "kind" of item based on the subclass of the elt, see genTFItem() factory function (above)


Protected Member Functions

void checkNewElts ()
 check new elements

void checkDelElts ()
 check deleted elements


Protected Attributes

TFBaseSP _tf
QCanvas * _canvas
tfVec2 _scales
tfVec2 _border


Member Typedef Documentation

typedef std::vector<TFItemSP>::const_iterator TFItemVec::TFItemVecConstIter
 

Definition at line 157 of file TFItem.h.

Referenced by getItem().

typedef std::vector<TFItemSP>::iterator TFItemVec::TFItemVecIter
 

Definition at line 156 of file TFItem.h.

Referenced by checkDelElts().


Constructor & Destructor Documentation

TFItemVec::TFItemVec QCanvas *  canvas,
TFBaseSP  tf
 

construct

Definition at line 138 of file TFItem.cpp.

References height, setTF(), STF::tfSType, and width.

TFItemVec::~TFItemVec  )  [virtual]
 

destruct

Definition at line 147 of file TFItem.cpp.


Member Function Documentation

void TFItemVec::addItem TFEltSP  elt  ) 
 

add an item, will try to figure out what "kind" of item based on the subclass of the elt, see genTFItem() factory function (above)

check if it is already in list

add it to list

cant generate the correct item, return

Definition at line 184 of file TFItem.cpp.

References _canvas, genTFItem(), getItem(), and gutz::SmartPtr< T >::isNull().

Referenced by checkNewElts().

void TFItemVec::checkDelElts  )  [protected]
 

check deleted elements

Definition at line 214 of file TFItem.cpp.

References _tf, end, getItem(), TFElementListIter, and TFItemVecIter.

Referenced by update().

void TFItemVec::checkNewElts  )  [protected]
 

check new elements

Definition at line 203 of file TFItem.cpp.

References _tf, addItem(), and TFElementListIter.

Referenced by update().

tfVec2 TFItemVec::getBorder  )  const [inline]
 

Definition at line 176 of file TFItem.h.

References _border, and tfVec2.

QCanvas* TFItemVec::getCanvas  )  const [inline]
 

Definition at line 166 of file TFItem.h.

References _canvas.

TFItemSP TFItemVec::getItem TFEltSP  elt  )  const
 

get an item based on the Element it represents

Definition at line 172 of file TFItem.cpp.

References end, TFItemSP, and TFItemVecConstIter.

Referenced by addItem(), and checkDelElts().

tfVec2 TFItemVec::getScale  )  const [inline]
 

Definition at line 174 of file TFItem.h.

References _scales, and tfVec2.

TFBaseSP TFItemVec::getTF  )  const [inline]
 

Definition at line 163 of file TFItem.h.

References _tf.

void TFItemVec::setBorder tfVec2  border  )  [inline]
 

Definition at line 175 of file TFItem.h.

References _border, border, and update().

void TFItemVec::setCanvas QCanvas *  canvas  ) 
 

set Canvas

Definition at line 249 of file TFItem.cpp.

References _canvas, and size.

void TFItemVec::setScale tfVec2  scales  )  [inline]
 

Definition at line 173 of file TFItem.h.

References _scales, and update().

void TFItemVec::setTF TFBaseSP  tf  ) 
 

set TF

nuke everything

rebuild

Definition at line 238 of file TFItem.cpp.

References _tf, and update().

Referenced by TFView::setTF(), TFItemVec(), and TFView::TFView().

void TFItemVec::update  ) 
 

call update on all items in vector, also sync up with the tf...

(check for new or deleted elements)

Definition at line 154 of file TFItem.cpp.

References _border, _scales, _tf, checkDelElts(), checkNewElts(), gutz::SmartPtrRef< TFGeneric >::isNull(), and size.

Referenced by TFView::resizeEvent(), setBorder(), setScale(), setTF(), and TFView::setVolume().


Member Data Documentation

tfVec2 TFItemVec::_border [protected]
 

Definition at line 193 of file TFItem.h.

Referenced by getBorder(), setBorder(), and update().

QCanvas* TFItemVec::_canvas [protected]
 

Definition at line 191 of file TFItem.h.

Referenced by addItem(), getCanvas(), and setCanvas().

tfVec2 TFItemVec::_scales [protected]
 

Definition at line 192 of file TFItem.h.

Referenced by getScale(), setScale(), and update().

TFBaseSP TFItemVec::_tf [protected]
 

Definition at line 190 of file TFItem.h.

Referenced by checkDelElts(), checkNewElts(), getTF(), setTF(), and update().


The documentation for this class was generated from the following files:
Send questions, comments, and bug reports to:
jmk