Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

utils.h

Go to the documentation of this file.
00001 /*
00002  * MAX : utils.h, Sam Dez 29 20:10:44 CET 2001 -sg
00003  *
00004  * This file is part of Max data acquisition software
00005  * Copyright (C) 1997,98 Christian Rosen
00006  *
00007  * Max is free software; you can redistribute it and/or modify it
00008  * under the terms of the version 2 of GNU General Public License as
00009  * published by the Free Software Foundation.
00010  *
00011  * Max is distributed in the hope that it will be useful, but WITHOUT
00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00014  * for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * (see the file COPYING) in this directory; if not, write to the
00018  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #include "definitions.h"
00022 #include "qtincludes.h"
00023 #include <assert.h>
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <errno.h>
00027 #include <sys/types.h>
00028 #include <math.h>
00029 #include <string.h>
00030 
00031 #ifndef _UTILITY_H_
00032 #define _UTILITY_H_
00033 class Options : public QWidget {
00034         Q_OBJECT
00035 public :
00036         Options(const char *dname=0,int save = 0,int plot = 0);
00037         QLabel      *label1;
00038         QPushButton *ok;
00039         QPushButton *cancel;
00040         QCheckBox   *cb[3];
00041 signals:
00042         void SIG_setoptions(int,int);
00043 public slots :
00044         void cancel_pressed();
00045         void ok_pressed();
00046         void checkBoxClicked();
00047 private:
00048         int index;
00049         int enable;
00050         int plot;
00051 };
00052 
00053 //this class contains widget to set trigger delay in ms
00054 class DelayWidget : public QWidget {
00055         Q_OBJECT
00056 public:
00057         DelayWidget(QWidget *parent = 0,const char* name=0);
00058         void Setdelay( uint);           //set delay in QlineEdit
00059 signals:
00060         void SIG_setdelay(uint); //set new options in infolist
00061 public slots :
00062         void  okpressed();
00063         void  cancelpressed();
00064 private:
00065         QLineEdit   *DelayEdit;
00066         QLabel      *headline;
00067         QLabel      *label1;
00068         QPushButton *ok;
00069         QPushButton *cancel;
00070 };
00071 
00072 //this class contains widget to set trigger delay in ms
00073 class UpdateWidget : public QWidget {
00074         Q_OBJECT
00075 public:
00076         UpdateWidget(QWidget *parent = 0,const char* name=0);
00077         void Setupdate( uint, uint);           //set delay in QlineEdit
00078 signals:
00079         void SIG_setupdate(uint, uint); //set new options in infolist
00080 public slots :
00081         void  okpressed();
00082         void  cancelpressed();
00083 private:
00084         QLineEdit   *DelayEdit;
00085         QLabel      *headline;
00086         QLineEdit   *DelayEdit2;        
00087         QLabel      *label1;
00088         QLabel      *label2;    
00089         QPushButton *ok;
00090         QPushButton *cancel;
00091 };
00092 
00093 class SaveWidget : public QWidget {
00094         Q_OBJECT
00095 public :
00096         SaveWidget(QWidget *parent=0, const char *name=0);
00097         ~SaveWidget() { delete tab; }
00098         void SetFilename(char *,char *,char *,char *,char *,char *,char *);
00099         void SetText( QString); //set info text in MultiLineEdit
00100 signals:
00101         void SIG_save(const char *,const char *,const char *,
00102                 int ,char *,const char *,const char *);
00103 public slots :
00104         void okpressed();
00105         void cancelpressed();
00106         void browseclicked();
00107         void browseclicked2();
00108         void browseclicked3();
00109         void browseclicked4();
00110 protected :
00111         void PaintEvent( QPaintEvent * );
00112         void ResizeEvent ( QResizeEvent *);
00113 private :
00114         QComboBox   *FormatSelector; //selector for image formats
00115         QMultiLineEdit *ed1;  //text window for info file
00116         QLineEdit   *editor;  //data filename
00117         QLineEdit   *editor2; //array filenmae
00118         QLineEdit   *editor3; //images filename
00119         QLineEdit   *editor4; //data directory
00120         QLineEdit   *editor5; //index for images
00121         QPushButton *okpb;    //o.k
00122         QPushButton *cpb;     //cancel
00123         QPushButton *browse1;
00124         QPushButton *browse2;
00125         QPushButton *browse3;
00126         QPushButton *browse4;
00127         QLabel      *headline;
00128         QLabel      *title1;
00129         QLabel      *title2;
00130         QLabel      *title3;
00131         QLabel      *title4;
00132         QLabel      *title5;
00133         QLabel      *last_dataFname;
00134         QLabel      *last_arrayFname;
00135         QLabel      *last_imFname;
00136         QLabel      *ComboTitle;
00137         QLabel      *last_aFname;
00138         QLabel      *last_iFname;
00139         QLabel      *last_dFname;
00140         QTabDialog  *tab;
00141         char        *filename;
00142         char        *array_filename;
00143         char        *image_filename;
00144         char        *directory;
00145         char        *l_dataname;
00146         char        *l_arrayname;
00147         char        *l_imname;
00148 };
00149 #endif

Generated at Mon Sep 2 18:21:04 2002 for MAX by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001