CMS 3D CMS Logo

VisCuTkLayerSlWindow.cc

Go to the documentation of this file.
00001 /****************************************************************************
00002 **      VisCuTkLayerSlWindow.cc
00003 **
00004 ****************************************************************************/
00005 
00006 #include "VisReco/VisCustomTracker/interface/VisCuTkLayerSlWindow.h"
00007 #include "VisReco/VisCustomTracker/interface/VisCuTkSelectionBar.h"
00008 #include "VisReco/VisCustomTracker/interface/VisCuTkLayer.h"
00009 #include "VisReco/VisCustomTracker/interface/VisCuTkPartDetector.h"
00010 #include "VisReco/VisCustomTracker/interface/VisCuTkLayerSelection.h"
00011 #include "VisReco/VisCustomTracker/interface/VisCuTkState.h"
00012 #include <qvariant.h>
00013 #include <qlayout.h>
00014 #include <qtooltip.h>
00015 #include <qwhatsthis.h>
00016 #include <string>
00017 #include <qstring.h>
00018 #include <iostream>
00019 #include <sstream>
00020 
00021 
00022 using namespace std;   
00023 /* 
00024  *  Constructs a VisCuTkSlWindow which is a child of 'parent', with the 
00025  *  name 'name' and widget flags set to 'f'.
00026  */
00027 VisCuTkLayerSlWindow::VisCuTkLayerSlWindow( QWidget* parent, const char* name, WFlags fl , VisCuTkState* state, VisCuTkSelectionBar* sb)
00028     : QWidget( parent, name, fl )
00029 {
00030   if ( !name )
00031     setName( "VisCuTkLayerSlWindow" );
00032   
00033   qw = sb; 
00034   layer=0;
00035   if(dynamic_cast<VisCuTkLayer*>(state))
00036     layer = dynamic_cast<VisCuTkLayer*>(state);
00037 
00038   //layer=state;
00039 
00040   //window size
00041   setMinimumSize( 400, 400 );
00042   setMaximumSize( 400, 400 );
00043   VisCuTkLayer* lay = dynamic_cast<VisCuTkLayer*>(state);
00044   ostringstream os(ostringstream::out);
00045   os << lay->getOwner()->getName() << "  "<<lay->getId()<<" modules selection window";
00046   const QString s ( os.str());
00047   setCaption( s );   
00048   
00049   layerSelection = new VisCuTkLayerSelection(this,"layer",state);
00050 
00051   gridLayer = new QGridLayout( this, 2, 1, 0 );
00052 
00053   labelinfo = new QLabel(this);
00054   // labelinfo->setGeometry( QRect(50 ,375, 280, 18 ) );
00055   labelinfo->setText( trUtf8( " " ) );
00056   
00057   gridLayer->addWidget( layerSelection, 0, 0 );
00058   gridLayer->addWidget( labelinfo, 1, 0 );
00059 }
00060 
00061 /*  
00062  *  Destroys the object and frees any allocated resources
00063  */
00064 VisCuTkLayerSlWindow::~VisCuTkLayerSlWindow()
00065 {
00066     // no need to delete child widgets, Qt does it all for us
00067 }
00068 
00069 void VisCuTkLayerSlWindow:: closeWindow()
00070 {
00071     if(layer!=0)layer->setSlWindow(0);  
00072 }
00073 void VisCuTkLayerSlWindow:: update()
00074 {
00075         
00076 }
00077 
00078 void VisCuTkLayerSlWindow:: notifyEvent()
00079 {
00080 }

Generated on Tue Jun 9 17:50:12 2009 for CMSSW by  doxygen 1.5.4