CMS 3D CMS Logo

IgQtSite.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "Iguana/Studio/interface/IgQtSite.h"
00004 #include "Iguana/Studio/interface/IgQtBadSiteError.h"
00005 
00006 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00007 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00008 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00009 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00010 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00011 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00012 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00013 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00014 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00015 
00016 QWidget *
00017 IgQtSite::selfFrom (IgSite *site)
00018 {
00019     if (! site)
00020         return 0;
00021     else if (IgQtSite *qsite = dynamic_cast<IgQtSite *> (site))
00022         return qsite->self ();
00023 
00024     throw new IgQtBadSiteError (site);
00025 }
00026 
00027 QWidget *
00028 IgQtSite::hostFrom (IgSite *site)
00029 {
00030     if (! site)
00031         return 0;
00032     else if (IgQtSite *qsite = dynamic_cast<IgQtSite *> (site))
00033         return qsite->host ();
00034 
00035     throw new IgQtBadSiteError (site);
00036 }
00037 
00038 void
00039 IgQtSite::host (IgSite *site, QWidget *child)
00040 {
00041     if (! site)
00042         return;
00043     else if (IgQtSite *qsite = dynamic_cast<IgQtSite *> (site))
00044         return qsite->host (child);
00045 
00046     throw new IgQtBadSiteError (site);
00047 }

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