oscilloscopeview.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by David Saxton                                    *
00003  *   david@bluehaze.org                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #ifndef OSCILLOSCOPEVIEW_H
00012 #define OSCILLOSCOPEVIEW_H
00013 
00014 #include <qframe.h>
00015 
00016 class Oscilloscope;
00017 class Simulator;
00018 class QMouseEvent;
00019 class QPaintEvent;
00020 class QPixmap;
00021 class QTimer;
00022 
00026 class OscilloscopeView : public QFrame
00027 {
00028         Q_OBJECT
00029         public:
00030                 OscilloscopeView( QWidget *parent, const char *name = 0 );
00031                 virtual ~OscilloscopeView();
00032                 
00033         public slots:
00037                 void updateView();
00038                 void slotSetFrameRate( int fps );
00039                 
00040         protected slots:
00041                 void updateViewTimeout();
00042                 
00043         protected:
00044                 virtual void mousePressEvent( QMouseEvent *event );
00045                 virtual void mouseMoveEvent( QMouseEvent *event );
00046                 virtual void mouseReleaseEvent( QMouseEvent *event );
00047                 virtual void paintEvent( QPaintEvent *event );
00048                 virtual void resizeEvent( QResizeEvent *event );
00049                 
00050                 void drawLogicData( QPainter & p );
00051                 void drawFloatingData( QPainter & p );
00052                 void updateOutputHeight();
00053                 void updateTimeLabel();
00054                 
00055                 bool b_needRedraw;
00056                 QPixmap *m_pixmap;
00057                 QTimer *m_updateViewTmr;
00058                 int m_fps;
00059                 int m_sliderValueAtClick;
00060                 int m_clickOffsetPos;
00061                 Simulator * m_pSimulator;
00062                 double m_halfOutputHeight;
00063 };
00064 
00065 #endif

Generated on Tue May 8 17:05:31 2007 for KTechLab by  doxygen 1.5.1