CMS 3D CMS Logo

IgQtAppDebugService.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "Iguana/Studio/interface/IgQtAppDebugService.h"
00004 #include "Iguana/Studio/interface/IgQtAppDebug.h"
00005 #include "Iguana/Studio/interface/IgQtAppMenuService.h"
00006 #include <classlib/utils/DebugAids.h>
00007 #include <qmenubar.h>
00008 #include <qpopupmenu.h>
00009 
00010 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00011 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00012 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00013 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00014 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00015 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00016 
00017 IG_DEFINE_STATE_ELEMENT (IgQtAppDebugService, "Services/Qt/App Debug");
00018 
00019 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00020 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00021 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00022 
00023 IgQtAppDebugService::IgQtAppDebugService (IgState *state,
00024                                           QWidget *mainWindow)
00025     : m_state (state),
00026       m_mainWindow (mainWindow),
00027       m_info (new IgQtAppDebug (state, mainWindow))
00028 {
00029     ASSERT (state);
00030     ASSERT (mainWindow);
00031     state->put (s_key, this);
00032 
00033     ASSERT (IgQtAppMenuService::get (state));
00034     QMenuBar    *menu = IgQtAppMenuService::get (state)->menuBar ();
00035     QPopupMenu  *debug = new QPopupMenu (mainWindow);
00036 
00037     debug->setCaption ("Debug");
00038     debug->insertTearOffHandle ();
00039     debug->insertItem
00040         ("Show &Resources", m_info, SLOT(resources()), 0,
00041          MENU_ID_DEBUG_RESOURCES, IgQtAppMenuService::index
00042          (debug, MENU_ID_DEBUG_RESOURCES));
00043     debug->insertItem
00044         ("Show &Libraries", m_info, SLOT(libraries()), 0,
00045          MENU_ID_DEBUG_LIBRARIES, IgQtAppMenuService::index
00046          (debug, MENU_ID_DEBUG_LIBRARIES));
00047     debug->insertItem
00048         ("Show &Plugins", m_info, SLOT(plugins()), 0,
00049          MENU_ID_DEBUG_PLUGINS, IgQtAppMenuService::index
00050          (debug, MENU_ID_DEBUG_PLUGINS));
00051     debug->insertItem
00052         ("&Show State Tree", m_info, SLOT(dumpState()), 0,
00053          MENU_ID_DEBUG_DUMPSTATE,  IgQtAppMenuService::index
00054          (debug, MENU_ID_DEBUG_DUMPSTATE));
00055     // debug->insertItem
00056     //     ("Show &State", m_info, SLOT(state()), 0,
00057     //      MENU_ID_DEBUG_STATE, IgQtAppMenuService::index
00058     //      (debug, MENU_ID_DEBUG_STATE));
00059     // debug->insertItem
00060     //     ("Show &Pools", this, SLOT(pools()), 0,
00061     //      MENU_ID_DEBUG_POOLS,  IgQtAppMenuService::index
00062     //      (debug, MENU_ID_DEBUG_POOLS));
00063     // debug->insertItem
00064     //     ("Show &Crash", this, SLOT(crash()), 0,
00065     //      MENU_ID_DEBUG_CRASH,  IgQtAppMenuService::index
00066     //      (debug, MENU_ID_DEBUG_CRASH));
00067     debug->insertItem
00068         ("&Debug Me Now", m_info, SLOT(debugme()), 0,
00069          MENU_ID_DEBUG_DEBUGME,  IgQtAppMenuService::index
00070          (debug, MENU_ID_DEBUG_DEBUGME));
00071 
00072     debug->insertSeparator (IgQtAppMenuService::index 
00073                             (debug, MENU_ID_DEBUG_PROFILER_SEP));
00074 
00075     debug->insertItem
00076         ("Show &Profiler", m_info, SLOT(showProfiler()), 0,
00077          MENU_ID_DEBUG_PROFILER,  IgQtAppMenuService::index
00078          (debug, MENU_ID_DEBUG_PROFILER));
00079     
00080     menu->insertItem ("&Debug", debug, MENU_ID_DEBUG,
00081                       IgQtAppMenuService::index (menu, MENU_ID_DEBUG));
00082 }
00083 
00084 IgQtAppDebugService::~IgQtAppDebugService (void)
00085 {
00086     ASSERT (m_state);
00087     ASSERT (m_mainWindow);
00088     m_state->detach (s_key);
00089 }

Generated on Tue Jun 9 17:38:49 2009 for CMSSW by  doxygen 1.5.4