CMS 3D CMS Logo

VisCSCPlotWidget.h

Go to the documentation of this file.
00001 #ifndef PLOTWIDGET_H
00002 #define PLOTWIDGET_H
00003 
00004 #include "qwidget.h"
00005 #include "qpointarray.h"
00006 #include "qbrush.h"
00007 #include "VisReco/VisMuonCSC/interface/VisCSCStackPlots.h"
00008 #include <vector>
00009 
00027 class VisCSCPlotWidget :
00028         public QWidget
00029 {
00030         Q_OBJECT
00031 public:
00032         VisCSCPlotWidget(const int nbins, QWidget* parent = 0, const char* name = 0, WFlags f = 0);
00033         ~VisCSCPlotWidget(void);
00034         void setData( const std::vector<VisCSCStackPlots::dataPt> &data); 
00035         QSize minimumSizeHint() const; 
00036         QSize sizeHint() const; 
00037         void setMaxVal(float val); 
00038         void setAutoScale(bool b); 
00039         float getScale(void); 
00040 
00041 protected:
00042         void paintEvent(QPaintEvent *); 
00043         QPoint xform(const int i, const int val); 
00044         int xinvform(const QPoint ); 
00045         void mousePressEvent( QMouseEvent * );
00046 private:
00047         std::vector<VisCSCStackPlots::dataPt> m_data; 
00048         QPointArray m_corners; 
00049         const int m_bins; 
00050         bool m_autoScale;
00051         float m_scale; 
00052         float m_maxVal; 
00053         float m_maxDataVal; 
00054         std::vector<QBrush> m_brushes;
00055 };
00056 #endif //PLOTWIDGET_H
00057 

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