CMS 3D CMS Logo

VisCuTkSelectionBar.h

Go to the documentation of this file.
00001 #ifndef VIS_CU_TK_SELECTION_BAR_H
00002 #define VIS_CU_TK_SELECTION_BAR_H
00003 
00004 #include <qwidget.h>
00005 #include "VisReco/VisCustomTracker/interface/VisCuCmsTracker.h"
00006 #include "VisReco/VisCustomTracker/interface/VisCuTkState.h"
00007 //#include "VisReco/VisCustomTracker/interface/VisCuTkObserver.h"
00008 #include "VisReco/VisCustomTracker/interface/VisCuTkLayerSlWindow.h"
00009 #include <qlabel.h>   
00010 #include <qstring.h>
00011 
00012 class VisCuTkSlWindow;
00013 
00014 class VisCuTkSelectionBar: public QWidget
00015 {
00016 
00017 public:
00018     VisCuTkSelectionBar(VisCuTkSlWindow* sw, QWidget *parent=0, const char *name=0);
00019     void drawSelectionBars();
00020     void setTracker(VisCuCmsTracker * tr);
00021     void update();
00022     VisCuTkSlWindow* gpp;
00023 protected:
00024     void paintEvent(QPaintEvent* );     
00025     void mousePressEvent(QMouseEvent *e);
00026 
00027 private:
00028     VisCuCmsTracker * tracker;
00029     QString label, label1;
00030     VisCuTkLayerSlWindow *layerWindow;
00031     QRect rsqr[400];
00032     VisCuTkState* state[400]; 
00033     int nelem;
00034     int ntotlay;
00035     double xmin, xmax, ymin, ymax;
00036     int xpixel(double x){
00037       return(int)((x-xmin)/(xmax-xmin)*530);
00038     }
00039     int ypixel(double y){
00040       double y1;
00041       y1 = (y-ymin)/(ymax-ymin);
00042       return 250-(int)(y1*250);
00043     }
00044     QSizePolicy sizePolicy() const;
00045 };
00046 #endif // VIS_CU_TK_SELECTION_BAR_H

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