source: fact/tools/ddd/GUI.h@ 14421

Last change on this file since 14421 was 10118, checked in by ogrimm, 14 years ago
Adapted various programs to new PixelMap class
File size: 2.0 KB
Line 
1#include <string>
2
3#include <QtGui>
4#include <QtNetwork/QTcpSocket>
5#include <QtNetwork/QAbstractSocket>
6
7#include <qwt_plot.h>
8#include <qwt_plot_curve.h>
9#include <qwt_plot_grid.h>
10#include <qwt_plot_zoomer.h>
11#include <qwt_plot_panner.h>
12
13#include "../../drsdaq/RawDataCTX.h"
14#include "../../pixelmap/PixelMap.h"
15#include "dic.hxx"
16
17#define SOCKET_TIMEOUT 10000 // Milliseconds to wait for socket connection
18#define MAX_OUTPUT_LINES 200 // Maximum number of lines in socket output window
19#define MAX_COM_SIZE 10000
20#define INITIAL_DIRECTORY ""
21
22// Main window class
23class ddd : public QMainWindow {
24 Q_OBJECT
25
26 QPushButton *GetButton, *SocketButton, *Connect;
27 QCheckBox *ContinuousBox;
28 QToolButton *LoadButton;
29 QLineEdit *FilenameBox, *IPAddress, *Command;
30 QSpinBox *PixelID, *EventNo, *ChannelNo, *ChipNo, *BoardNo, *Port;
31 QPlainTextEdit *RunHeaderDisplay, *EventHeaderDisplay, *SocketOutput;
32 QTabWidget *TabWidget;
33 QTcpSocket *Socket;
34 QWidget *SocketWindow, *Central;
35 QAction *OpenAction, *ConnectAction, *PhysPipeAction;
36 QGridLayout *SocketLayout, *MainLayout;
37 QFormLayout *CommandLayout, *PortLayout, *AddressLayout, *FormLayout, *SpinLayout;
38
39 QwtPlot *Graph;
40 QwtPlotZoomer *Zoomer;
41 QwtPlotCurve *Signal;
42 QwtPlotPanner *Panner;
43 QwtPlotGrid *Grid;
44
45 void closeEvent(QCloseEvent *);
46
47 bool ManualDisconnect, WaitForData;
48 RawDataCTX *RD;
49 PixelMap *PixMap;
50 FILE *Tmpfile;
51
52 public:
53 ddd();
54 ~ddd();
55 void CloseDatafile();
56
57 private slots:
58 void OpenDatafile();
59 void DisplayEvent(int=0);
60 void FileDialog();
61 void OpenSocketWindow();
62 void GetSignalFromSocket();
63 void MakeConnection();
64 void SendToSocket();
65 void ReadFromSocket();
66 void GotDisconnected();
67 void HandleZoom(const QwtDoubleRect &);
68 void TranslatePixelID(int);
69
70 void MenuSave();
71 void MenuPrint();
72 void MenuSaveASCII();
73 void MenuHelp();
74 void MenuAbout();
75};
Note: See TracBrowser for help on using the repository browser.