Main Page   Class Hierarchy   Compound List   File List   Compound Members  

midobasic.h

00001 // $Id: midobasic.h,v 1.0 2003/01/03 15:10:09 root Exp $ 
00002 #ifndef _MIDOBASIC_H
00003 #define _MIDOBASIC_H
00004 
00005 #include <qobject.h>
00006 #include <qvaluelist.h>
00007 
00008 #define POINTS_FOR_WIN  1000
00009 
00010 typedef struct {
00011   double time;
00012   double voltage;
00013 } Dato;
00014 
00015 typedef QValueList<Dato> DValueList;
00016 
00017 class MidoBasic : public QObject
00018 {
00019   Q_OBJECT
00020 public:
00021   MidoBasic();
00022 
00023   bool windowExists(char *);
00024 
00025 // --------------------------------------------
00026 // GESTIONE COMUNICAZIONE CON I CANALI
00027 public:
00028   int getNumCh() { return nCh; }
00029   void setNumCh(bool add);
00030   void setCh1Active(bool active) { Ch1Active = active; }
00031   void setCh2Active(bool active) { Ch2Active = active; }
00032   bool getCh1Active() { return Ch1Active; }
00033   bool getCh2Active() { return Ch2Active; }
00034   
00035 private:
00036   int nCh;
00037   bool Ch1Active, Ch2Active;
00038   
00039 // --------------------------------------------
00040 
00041 // --------------------------------------------
00042 // GESTIONE COMUNICAZIONE CON I PARAMETRI DEL DEVICE E
00043 // DELLA FINESTRA DI CAMPIONATURA
00044 public:
00045   void setSampleRate(double sR);
00046   void setMaximumSampleRate(double sR);
00047   void setTimeDiv(double tD);
00048   void setAnalogBandwith(double bw);
00049  void setNumChannel(int numCh);
00050 
00051   double getSampleRate() { return sampleRate; }
00052   double getMaximumSampleRate() { return maxSampleRate; }
00053   double getTimeDiv() { return timeDiv; }
00054   
00055 signals:
00056   void changeSampleRate(double sR);
00057   void changeTimeDiv(double tD);
00058   void changeAnalogBandwith(double bw);
00059   void changeNumChannel(int numCh);
00060 
00061 private:
00062   double maxSampleRate, sampleRate, analogBandwith, timeDiv;
00063 
00064   int numChannel;
00065 // --------------------------------------------
00066 
00067 // --------------------------------------------
00068 // GESTIONE COMUNICAZIONE PER IL MENU "VIEW"
00069 public:
00070   bool getViewAxisX();
00071   bool getViewAxisY();
00072   bool getViewSampleRate();
00073 
00074   void setViewAxisX(bool value);
00075   void setViewAxisY(bool value);
00076   void setViewSampleRate(bool value);
00077 
00078 signals:
00079   void axisXOsc(bool enable);
00080   void axisYOsc(bool enable);
00081   void sampleRateOsc(bool enable, double value);
00082 
00083 private:
00084   bool viewAxisX, viewAxisY, viewSampleRate;
00085 // --------------------------------------------
00086 
00087 // --------------------------------------------
00088 // GESTIONE COMUNICAZIONE PER IL MENU "MATH"
00089 public:
00090   void setMenuMath(bool enable);
00091   void setEnableInvertCh1(bool value);
00092   void setEnableInvertCh2(bool value);
00093   
00094   void setCh1Ch2(int menuChecked, bool active);
00095 
00096   void setInvertCh1(bool value);
00097   void setInvertCh2(bool value);
00098   bool getInvertCh1();
00099   bool getInvertCh2();
00100 
00101 signals:
00102   void changeMenuMath(bool enable);
00103   void enableInvertCh1(bool enable);
00104   void enableInvertCh2(bool enable);
00105 
00106   void changeMathCh1Ch2(int menuChecked,bool active);
00107   void changeInvertCh(int menuChecked, bool enable);
00108 
00109 private:
00110   bool invCh1, invCh2;
00111 
00112 // --------------------------------------------  
00113 // GESTIONE COMUNICAZIONE CON IL MENU APRI/SALVA FILE
00114 public:
00115   void printPlot(QString filename);
00116   void printPlot();
00117   
00118 signals:
00119   void doPrintPlot(QString filename);
00120   void doPrintPlot();
00121 // --------------------------------------------  
00122 
00123 public:
00124 
00125   void setMidValueCh1(double value);
00126   double getMidValueCh1() { return midValueCh1; }
00127   void setMidValueCh2(double value);
00128   double getMidValueCh2() { return midValueCh2; }
00129 
00130   const char* version();
00131 
00132 private:
00133   double midValueCh1,midValueCh2;
00134 
00135 };
00136 
00137 extern MidoBasic *md;
00138 
00139 #endif

Generated at Tue Mar 18 13:49:45 2003 for MIDO by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000