#include <Iguana/Studio/interface/IgQtAppDebug.h>
Public Member Functions | |
IgQtAppDebugResourceInfo (QWidget *parent) | |
Protected Member Functions | |
virtual void | update (void) |
Definition at line 51 of file IgQtAppDebug.h.
IgQtAppDebugResourceInfo::IgQtAppDebugResourceInfo | ( | QWidget * | parent | ) |
Definition at line 159 of file IgQtAppDebug.cc.
References IgQtAppDebugInfo::list().
00160 : IgQtAppDebugInfo (parent) 00161 { 00162 list ()->addColumn ("Resource"); 00163 list ()->addColumn ("Value"); 00164 list ()->addColumn ("Units"); 00165 list ()->setColumnAlignment (1, Qt::AlignRight); 00166 00167 setCaption ("Program Resource Consumption"); 00168 resize (320, 580); 00169 }
Implements IgQtAppDebugInfo.
Definition at line 172 of file IgQtAppDebug.cc.
References ASSERT, lat::ResourceInfo::format(), i, lat::ResourceInfo::info_self(), IgQtAppDebugInfo::list(), lat::ResourceInfo::name(), and lat::ResourceInfo::unit().
00173 { 00174 QListView *props = list (); 00175 ASSERT (props); 00176 00177 lat::ResourceInfo::Status stats (lat::ResourceInfo::info_self()); 00178 lat::ResourceInfo::Status::iterator i = stats.begin (); 00179 char buf [512]; 00180 00181 props->clear (); 00182 for ( ; i != stats.end (); ++i) 00183 new QListViewItem (props, lat::ResourceInfo::name (i->first), 00184 lat::ResourceInfo::format (i->first, i->second, 00185 buf, sizeof (buf)), 00186 lat::ResourceInfo::unit (i->first)); 00187 }