source: Evidence/Edd/Edd.h@ 151

Last change on this file since 151 was 142, checked in by ogrimm, 15 years ago
Various updates
  • Property svn:keywords set to Revision
File size: 3.1 KB
Line 
1#ifndef EDD_H_SEEN
2#define EDD_H_SEEN
3
4#include <QtGui>
5
6#include <qwt_plot.h>
7#include <qwt_plot_curve.h>
8#include <qwt_plot_grid.h>
9#include <qwt_plot_zoomer.h>
10#include <qwt_plot_panner.h>
11#include <qwt_scale_engine.h>
12#include <qwt_analog_clock.h>
13#include <qwt_scale_widget.h>
14#include <qwt_plot_layout.h>
15#include <qwt_legend.h>
16#include <qwt_legend_item.h>
17#include <qwt_symbol.h>
18
19#include <limits.h>
20#include <float.h>
21
22#include "dic.hxx"
23#include "Evidence.h"
24
25#define SVN_REVISION "$Revision: 142 $"
26
27// General indicator for DIM service
28class Edd_Indicator: public QLineEdit, public DimClient {
29 Q_OBJECT
30
31 QMenu *Menu;
32 QPoint dragStart;
33 QwtPlot *LastPlot;
34
35 DimStampedInfo *Data;
36
37 void mousePressEvent(QMouseEvent *);
38 void mouseReleaseEvent(QMouseEvent *);
39 void mouseMoveEvent(QMouseEvent *);
40
41 public:
42 Edd_Indicator(QString, QWidget * = NULL);
43 ~Edd_Indicator();
44
45 bool ShowAsTime;
46
47 private slots:
48 void Update(DimInfo *, int, QString, QByteArray, QString);
49 void contextMenuEvent(QContextMenuEvent *);
50 void MenuOpenHistory();
51 void MenuCopyService();
52};
53
54// Graph class for history display
55class Edd_Plot: public QwtPlot, public DimClient {
56 Q_OBJECT
57
58 struct PlotItem {
59 DimInfo *Data;
60 DimInfo *LiveData;
61 QwtPlotCurve *Signal;
62 int *x;
63 double *y;
64 int Count;
65 double Smallest;
66 double Largest;
67 QList<struct EvidenceHistoryItem> Live;
68 };
69
70 QList<struct PlotItem> Items;
71 QMutex Mutex;
72
73 QString StatusTip;
74
75 QMenu *Menu;
76 QAction *YLogAction;
77 QAction *NormAction;
78 QAction *StyleAction;
79
80 QwtPlotPanner *Panner;
81 QwtPlotGrid *Grid;
82 QwtPlotZoomer *Zoomer;
83 QwtLegend *Legend;
84
85 void dragEnterEvent(QDragEnterEvent *);
86 void dropEvent(QDropEvent *);
87
88 public:
89 Edd_Plot(QString = QString(), QWidget * = NULL);
90 ~Edd_Plot();
91 void AddService(QString);
92
93 private slots:
94 void UpdatePlot();
95 void Update(DimInfo* Info, int, QString, QByteArray, QString);
96
97 void HandleZoom(const QwtDoubleRect &);
98 void contextMenuEvent(QContextMenuEvent *);
99 void MenuZoomOut();
100 void MenuSingleTrace();
101 void MenuSaveASCII();
102 void MenuSave();
103 void MenuPrint();
104 void MenuPasteService();
105};
106
107// Textout indicator for DIM service
108class Edd_Textout: public QTextEdit, public DimClient {
109 Q_OBJECT
110
111 DimStampedInfo *Data;
112
113 public:
114 Edd_Textout(QString, QWidget * = NULL);
115 ~Edd_Textout();
116
117 bool Accumulate;
118
119 private slots:
120 void Update(DimInfo* Info, int, QString, QByteArray, QString);
121};
122
123// Main window class
124class GUI: public QMainWindow, public DimBrowser, public DimInfo {
125 Q_OBJECT
126
127 QwtAnalogClock *Clock;
128
129 QWidget *Central, *MainWidget, *BiasWidget, *EnvironmentWidget;
130 QGridLayout *MainLayout, *BiasLayout, *EnvironmentLayout;
131
132 QTabWidget *TabWidget;
133
134 void closeEvent(QCloseEvent *);
135 void infoHandler();
136
137 public:
138 GUI();
139 ~GUI();
140
141 private slots:
142 void MenuAbout();
143 void MenuNewHistory();
144
145 signals:
146 void YEP(DimInfo *, int, QString = QString(), QByteArray = QByteArray(), QString = QString());
147};
148
149#endif
Note: See TracBrowser for help on using the repository browser.