GNU Radio 3.4.0 C++ API
timedisplayform.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2011 Free Software Foundation, Inc.
00004  * 
00005  * This file is part of GNU Radio
00006  * 
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  * 
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef TIME_DISPLAY_FORM_H
00024 #define TIME_DISPLAY_FORM_H
00025 
00026 #include <spectrumUpdateEvents.h>
00027 #include <FrequencyDisplayPlot.h>
00028 #include <WaterfallDisplayPlot.h>
00029 #include <TimeDomainDisplayPlot.h>
00030 #include <ConstellationDisplayPlot.h>
00031 #include <QtGui/QApplication>
00032 #include <QtGui/QGridLayout>
00033 #include <QValidator>
00034 #include <QTimer>
00035 #include <vector>
00036 
00037 class TimeDisplayForm : public QWidget
00038 {
00039   Q_OBJECT
00040 
00041   public:
00042   TimeDisplayForm(int nplots=1, QWidget* parent = 0);
00043   ~TimeDisplayForm();
00044   
00045   void Reset();
00046   
00047 public slots:
00048   void resizeEvent( QResizeEvent * e );
00049   void customEvent( QEvent * e );
00050   void setFrequencyRange( const double newCenterFrequency,
00051                           const double newStartFrequency,
00052                           const double newStopFrequency );
00053   void closeEvent( QCloseEvent * e );
00054 
00055   void setTimeDomainAxis(double min, double max);
00056 
00057   void setUpdateTime(double t);
00058 
00059   void setTitle(int which, QString title);
00060   void setColor(int which, QString color);
00061 
00062 private slots:
00063   void newData( const TimeUpdateEvent* );
00064   void updateGuiTimer();
00065 
00066   void onTimePlotPointSelected(const QPointF p);
00067 
00068 signals:
00069   void plotPointSelected(const QPointF p, int type);
00070 
00071 private:
00072   uint64_t _numRealDataPoints;
00073   QIntValidator* _intValidator;
00074 
00075   QGridLayout *_layout;
00076   TimeDomainDisplayPlot* _timeDomainDisplayPlot;
00077   bool _systemSpecifiedFlag;
00078   double _startFrequency;
00079   double _stopFrequency;
00080   
00081   QTimer *displayTimer;
00082   double d_update_time;
00083 };
00084 
00085 #endif /* TIME_DISPLAY_FORM_H */