CMS 3D CMS Logo

IgQtAppDumpStateInfo Class Reference

#include <Iguana/Studio/interface/IgQtAppDebug.h>

Inheritance diagram for IgQtAppDumpStateInfo:

IgQtAppDebugInfo

List of all members.

Public Member Functions

 IgQtAppDumpStateInfo (IgState *state, QWidget *parent)

Protected Member Functions

virtual void populate (IgState *state, QListViewItem *item)
virtual void update (void)

Private Attributes

IgStatem_state


Detailed Description

Definition at line 81 of file IgQtAppDebug.h.


Constructor & Destructor Documentation

IgQtAppDumpStateInfo::IgQtAppDumpStateInfo ( IgState state,
QWidget *  parent 
)

Definition at line 228 of file IgQtAppDebug.cc.

References IgQtAppDebugInfo::list().

00230     : IgQtAppDebugInfo (parent, false),
00231       m_state (state->root ())
00232 {
00233     list ()->addColumn ("States");
00234 
00235     setCaption ("IGUANA State tree");
00236     resize (600, 200);
00237 }


Member Function Documentation

void IgQtAppDumpStateInfo::populate ( IgState state,
QListViewItem *  item 
) [protected, virtual]

Definition at line 250 of file IgQtAppDebug.cc.

References IgState::child(), IgState::children(), element(), IgState::element(), IgState::elements(), i, IgStateKey::label(), and IgStateElement::stateKey().

Referenced by update().

00251 {
00252     item->setOpen (true);
00253     
00254     QListViewItem* element = new QListViewItem (item, "Elements");
00255     bool hasElements = false;
00256     for (unsigned int i=0; i<state->elements(); i++)
00257     {
00258         if (state->element (i))
00259         {
00260             new QListViewItem (element,
00261               state->element (i)->stateKey().label ().c_str());
00262             hasElements = true;
00263         }
00264     }
00265     if (!hasElements)
00266         delete element;
00267     else
00268         element->setOpen (true);
00269         
00270     if (state->children())
00271         for (unsigned int i=0; i<state->children(); i++)
00272             populate (state->child(i), new QListViewItem (item, "State"));
00273 }

void IgQtAppDumpStateInfo::update ( void   )  [protected, virtual]

Implements IgQtAppDebugInfo.

Definition at line 240 of file IgQtAppDebug.cc.

References ASSERT, IgQtAppDebugInfo::list(), m_state, and populate().

00241 {
00242     QListView *props = list ();
00243     ASSERT (props);
00244 
00245     props->clear ();
00246     populate (m_state, new QListViewItem (props, "State"));
00247 }


Member Data Documentation

IgState* IgQtAppDumpStateInfo::m_state [private]

Definition at line 91 of file IgQtAppDebug.h.

Referenced by update().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:26 2009 for CMSSW by  doxygen 1.5.4