source: Evidence/Edd/Edd.h@ 138

Last change on this file since 138 was 138, checked in by ogrimm, 15 years ago
Updates
  • Property svn:keywords set to Revision
File size: 2.4 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
18#include <limits.h>
19#include <float.h>
20
21#include "dic.hxx"
22#include "Evidence.h"
23
24#define NO_LINK "__&DIM&NOLINK&__" // for checking if DIMserver is alive
25#define SVN_REVISION "$Revision: 138 $"
26
27// General indicator for DIM service
28class Edd_Indicator: public QLineEdit, public DimClient, public DimBrowser {
29 Q_OBJECT
30
31 char *ServiceName;
32 DimStampedInfo *Data;
33
34 QPoint dragStart;
35
36 void infoHandler();
37 void mousePressEvent(QMouseEvent *);
38 void mouseReleaseEvent(QMouseEvent *);
39 void mouseMoveEvent(QMouseEvent *);
40
41 public:
42 Edd_Indicator(char*, QWidget* = NULL);
43 ~Edd_Indicator();
44
45 signals:
46 void YEP(QString);
47};
48
49// Graph class for history display
50class Edd_Plot: public QwtPlot, public DimClient {
51 Q_OBJECT
52
53 struct PlotItem {
54 DimInfo *Data;
55 QwtPlotCurve *Signal;
56 double *x;
57 double *y;
58 int Count;
59 double Smallest;
60 double Largest;
61 };
62
63 QList<struct PlotItem> Items;
64 QMutex Mutex;
65
66 QMenu *Menu;
67 QAction *YLogAction;
68 QAction *NormAction;
69
70 QwtPlotPanner *Panner;
71 QwtPlotGrid *Grid;
72 QwtPlotZoomer *Zoomer;
73 QwtLegend *Legend;
74
75 void AddService(char *);
76 void infoHandler();
77 void dragEnterEvent(QDragEnterEvent *);
78 void dropEvent(QDropEvent *);
79
80 public:
81 Edd_Plot(char *, QWidget * = NULL);
82 ~Edd_Plot();
83
84 private slots:
85 void UpdatePlot();
86 void HandleZoom(const QwtDoubleRect &);
87 void contextMenuEvent(QContextMenuEvent *);
88 void MenuZoomOut();
89 void MenuSingleTrace();
90 void MenuSave();
91 void MenuPrint();
92
93 signals:
94 void YEP();
95
96};
97
98// Main window class
99class GUI: public QMainWindow {
100 Q_OBJECT
101
102 Edd_Indicator *Value, *Value1;
103 Edd_Plot *Graph, *Graph1;
104 QwtAnalogClock *Clock;
105
106 QWidget *Central, *MainWidget, *BiasWidget, *EnvironmentWidget;
107 QGridLayout *MainLayout, *BiasLayout, *EnvironmentLayout;
108
109 QTabWidget *TabWidget;
110
111 void closeEvent(QCloseEvent *);
112
113 public:
114 GUI();
115 ~GUI();
116
117 private slots:
118 void MenuAbout();
119};
120
121#endif
Note: See TracBrowser for help on using the repository browser.