watchprocessor.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Gav Wood                                        *
00003  *   gav@cs.york.ac.uk                                                     *
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  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef __WATCHPROCESSOR_H
00021 #define __WATCHPROCESSOR_H
00022 
00023 #define __GEDDEI_BUILD
00024 
00025 #include <qobject.h>
00026 #include <qpicture.h>
00027 #include <qpixmap.h>
00028 #include <qmutex.h>
00029 
00030 #include "processor.h"
00031 #include "signaltype.h"
00032 using namespace Geddei;
00033 
00034 #include "signaltypes.h"
00035 using namespace SignalTypes;
00036 
00041 class QDockWindow;
00042 class QLabel;
00043 class QTimer;
00044 
00045 class GeddeiNite;
00046 
00050 class WatchProcessor: public QObject, public Processor
00051 {
00052  Q_OBJECT
00053 
00054  GeddeiNite *theGeddeiNite;
00055  QDockWindow *theDockWatch;
00056  QTimer *theTimer;
00057  QLabel *theLabel;
00058 
00059  QMutex theDrawing;
00060 
00061  uint theWatcher, theScope;
00062  float theFrequency;
00063  uint theWidth, theHeight;
00064  uint theThroughput, theDrawingTime, theReadTime, theOutTime;
00065 
00066  void watchWave();
00067  void watchGraph();
00068  void watchSpectrum();
00069  void watchSpectrograph();
00070  void watchMatrix();
00071 
00072  virtual void processor();
00073  virtual const bool verifyAndSpecifyTypes(const SignalTypeRefs &inTypes, SignalTypeRefs &outTypes);
00074  virtual void initFromProperties(const Properties &) { setupIO(1, 1); }
00075  virtual void specifyInputSpace(QValueVector<uint> &samples);
00076  virtual void specifyOutputSpace(QValueVector<uint> &samples) { specifyInputSpace(samples); }
00077 
00078 private slots:
00079  void repaint();
00080 
00081 public:
00082  WatchProcessor(GeddeiNite *gn);
00083  ~WatchProcessor();
00084 };
00085 
00086 #endif

Generated on Fri Nov 10 21:58:26 2006 for Exscalibar by  doxygen 1.5.1