CMS 3D CMS Logo

VisCuTkLayerSelection.h

Go to the documentation of this file.
00001 #ifndef VIS_CU_TK_LAYER_SELECTION_H
00002 #define VIS_CU_TK_LAYER_SELECTION_H
00003 
00004 #include <qwidget.h>
00005 #include <qpainter.h>
00006 #include <qlabel.h>
00007 #include <qstring.h>
00008 #include <iostream>
00009 #include <qregion.h>
00010 #include <qpointarray.h>
00011 #include <cmath>
00012 #include "VisReco/VisCustomTracker/interface/VisCuTkState.h"
00013 
00014 class VisCuTkLayer;
00015 class VisCuTkModule;
00016 class VisCuTkLayerSlWindow;
00017 
00018 class VisCuTkLayerSelection: public QWidget
00019 {
00020 
00021 public:
00022     VisCuTkLayerSelection(QWidget *parent=0, const char *name=0, VisCuTkState* state=0);
00023     void update();
00024     VisCuTkLayerSlWindow* gp;
00025 protected:
00026     void paintEvent(QPaintEvent* );     
00027     void mousePressEvent(QMouseEvent *e);
00028     void closeEvent( QCloseEvent* );
00029 
00030 private:
00031     VisCuTkLayer* lay; 
00032     int nlay, x_win;
00033     int nelem;
00034     QPointArray rg[2000]; 
00035     VisCuTkState* state[2000]; 
00036     double xmin, xmax, ymin, ymax;
00037     int xpixel(double x){
00038       return(int)((x-xmin)/(xmax-xmin)*x_win);
00039     }
00040     int ypixel(double y){
00041       double y1;
00042       y1 = (y-ymin)/(ymax-ymin);
00043       return x_win -(int)(y1*x_win);
00044     }
00045     bool posrel, horizontal_view;
00046     void  defwindow(int nlay);
00047     void  drawmodule(VisCuTkModule * mod,int nlay,QPointArray& q);
00048     void  drawModules();
00049         
00050     QSizePolicy sizePolicy() const;
00051 };
00052 #endif // VIS_CU_TK_SELECTION_LAYER_H

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