Skip to content
Snippets Groups Projects
Select Git revision
  • 2872fa34a3c0494a7f63a685993eafa5cb8e5697
  • master default
2 results

test_put.py

Blame
  • Forked from finesse / pykat
    Source project has a limited visibility.
    pulsescopewidget.h 2.17 KiB
    /******************************************************************************
     *   Copyright (C) 2009 by Oliver Bock                                        *
     *   oliver.bock[AT]aei.mpg.de                                                *
     *                                                                            *
     *   This file is part of PulsatingScience.                                   *
     *                                                                            *
     *   PulsatingScience is free software: you can redistribute it and/or modify *
     *   it under the terms of the GNU General Public License as published        *
     *   by the Free Software Foundation, version 3 of the License.               *
     *                                                                            *
     *   PulsatingScience is distributed in the hope that it will be useful,      *
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of           *
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the             *
     *   GNU General Public License for more details.                             *
     *                                                                            *
     *   You should have received a copy of the GNU General Public License        *
     *   along with PulsatingScience. If not, see <http://www.gnu.org/licenses/>. *
     *                                                                            *
     ******************************************************************************/
    
    #ifndef PULSESCOPEWIDGET_H_
    #define PULSESCOPEWIDGET_H_
    
    #include <cmath>
    
    #include <QGraphicsView>
    #include <QGraphicsScene>
    #include <QGLContext>
    #include <QGraphicsPathItem>
    #include <QGraphicsLineItem>
    
    
    class PulseScopeWidget : public QGraphicsView
    {
    	Q_OBJECT
    
    public:
    	PulseScopeWidget(QWidget *parent = 0);
    	virtual ~PulseScopeWidget();
    
    	void resizeEvent(QResizeEvent *event);
    
    public slots:
    	void drawCurve(const QVector<double>& vector);
    	void markerStep(double stepSize);
    	void markerReset();
    
    private:
    	QGraphicsScene m_scene;
    	QVector<double> m_data;
    	QGraphicsPathItem *m_path;
    	QGraphicsLineItem *m_marker;
    
    	double m_scopeSizeH;
    	double m_scopeSizeV;
    };
    
    #endif /* PULSESCOPEWIDGET_H_ */