source: trunk/FACT++/gui/MainWindow.h@ 11370

Last change on this file since 11370 was 11342, checked in by tbretz, 13 years ago
Divided Reset into soft and hard reset.
File size: 5.0 KB
Line 
1#ifndef FACT_MainWindow
2#define FACT_MainWindow
3
4#include "design.h"
5
6#include <QMainWindow>
7
8class TObject;
9class TCanvas;
10
11class MainWindow : public QMainWindow, protected Ui::MainWindow
12{
13 Q_OBJECT;
14
15 void MakeLEDs(QPushButton **arr, QGridLayout *lay, const char *slot) const;
16
17 void SelectTab(const QString &name);
18 void SetTriggerSequence();
19 void SetTriggerCoincidence();
20 void SetCalibCoincidence();
21
22protected:
23 QPushButton *fFtuLED[40];
24 QPushButton *fFadLED[40];
25
26 bool fInHandler;
27
28public:
29 MainWindow(QWidget *p=0);
30
31private slots:
32 // Helper
33 void on_fFtmStartRun_clicked();
34 void on_fFtmStopRun_clicked();
35
36 void on_fFadStart_clicked();
37 void on_fFadStop_clicked();
38 void on_fFadAbort_clicked();
39 void on_fFadSoftReset_clicked();
40 void on_fFadHardReset_clicked();
41
42 void on_fLoggerStart_clicked();
43 void on_fLoggerStop_clicked();
44
45 // System status
46 void on_fShutdown_clicked();
47 void on_fShutdownAll_clicked();
48
49 // Status LEDs signals
50 void on_fStatusFTULed_clicked();
51 void on_fStatusFTMLed_clicked();
52 void on_fStatusFADLed_clicked();
53 void on_fStatusLoggerLed_clicked();
54 void on_fStatusChatLed_clicked();
55 //void on_fStatusFTMEnable_stateChanged(int state);
56
57 // Tab Widget
58 void on_fTabWidget_tabCloseRequested(int which);
59 virtual void on_fTabWidget_currentChanged(int) = 0;
60
61 // Tab: FAD
62 void slot_fFadLED_clicked();
63
64 void on_fFadStartRun_clicked();
65 void on_fFadStopRun_clicked();
66 void on_fFadDrsOn_clicked();
67 void on_fFadDrsOff_clicked();
68 void on_fFadDwriteOn_clicked();
69 void on_fFadDwriteOff_clicked();
70 void on_fFadSingleTrigger_clicked();
71 void on_fFadTriggerLineOn_clicked();
72 void on_fFadTriggerLineOff_clicked();
73 void on_fFadContTriggerOn_clicked();
74 void on_fFadContTriggerOff_clicked();
75 void on_fFadBusyOn_clicked();
76 void on_fFadBusyOff_clicked();
77 void on_fFadResetTriggerId_clicked();
78 void on_fFadSocket0_clicked();
79 void on_fFadSocket17_clicked();
80
81 void on_fFadRunNumberCmd_valueChanged(int);
82 void on_fFadRoiCmd_valueChanged(int);
83
84 // Tab: Adc
85 virtual void DisplayEventData() = 0;
86 void on_fAdcCrate_valueChanged(int) { DisplayEventData(); }
87 void on_fAdcBoard_valueChanged(int) { DisplayEventData(); }
88 void on_fAdcChannel_valueChanged(int) { DisplayEventData(); }
89
90 // Tab: FTM
91 void on_fEnableTrigger_stateChanged(int);
92 void on_fEnableExt1_stateChanged(int);
93 void on_fEnableExt2_stateChanged(int);
94 void on_fEnableClockCond_stateChanged(int);
95 void on_fEnableVeto_stateChanged(int);
96
97 void on_fTriggerSeqPed_valueChanged(int) { SetTriggerSequence(); }
98 void on_fTriggerSeqLPint_valueChanged(int) { SetTriggerSequence(); }
99 void on_fTriggerSeqLPext_valueChanged(int) { SetTriggerSequence(); }
100
101 void on_fPhysicsCoincidence_valueChanged(int);
102 void on_fPhysicsWindow_valueChanged(int);
103 void on_fCalibCoincidence_valueChanged(int);
104 void on_fCalibWindow_valueChanged(int);
105
106 void on_fTriggerInterval_valueChanged(int);
107 void on_fTriggerDelay_valueChanged(int);
108 void on_fTimeMarkerDelay_valueChanged(int);
109 void on_fDeadTime_valueChanged(int);
110/*
111 void on_fClockCondR0_valueChanged(int) { }
112 void on_fClockCondR1_valueChanged(int) { }
113 void on_fClockCondR8_valueChanged(int) { }
114 void on_fClockCondR9_valueChanged(int) { }
115 void on_fClockCondR11_valueChanged(int) { }
116 void on_fClockCondR13_valueChanged(int) { }
117 void on_fClockCondR14_valueChanged(int) { }
118 void on_fClockCondR15_valueChanged(int) { }
119*/
120 void on_fPrescalingVal_valueChanged(int);
121
122 void on_fClockCondFreq_activated(int);
123
124 // Tab: FTUs
125 void slot_fFtuLED_clicked();
126 void on_fFtuPing_toggled(bool);
127 void on_fFtuAllOn_clicked();
128 void on_fFtuAllOff_clicked();
129
130 // Tab: Rates
131 virtual void on_fPixelEnable_stateChanged(int) = 0;
132 virtual void on_fThresholdVal_valueChanged(int) = 0;
133 virtual void on_fThresholdIdx_valueChanged(int) = 0;
134 virtual void on_fThresholdCrate_valueChanged(int) = 0;
135 virtual void on_fThresholdBoard_valueChanged(int) = 0;
136 virtual void on_fThresholdPatch_valueChanged(int) = 0;
137 virtual void on_fPixelIdx_valueChanged(int) = 0;
138
139 void on_fPixelEnableAll_clicked();
140 void on_fPixelDisableAll_clicked();
141
142 virtual void on_fPixelDisableOthers_clicked() = 0;
143 virtual void on_fThresholdDisableOthers_clicked() = 0;
144
145 virtual void on_fRatePatch1_valueChanged(int) = 0;
146 virtual void on_fRatePatch2_valueChanged(int) = 0;
147 virtual void on_fRateBoard1_valueChanged(int) = 0;
148 virtual void on_fRateBoard2_valueChanged(int) = 0;
149
150 // Tab: Chat
151 void on_fChatSend_clicked();
152
153 // Tab: Commands
154 /// Needs access to DimNetwork thus it is implemented in the derived class
155 virtual void on_fDimCmdSend_clicked() = 0;
156
157 // Main menu
158 // void on_fMenuLogSaveAs_triggered(bool)
159
160 virtual void slot_RootEventProcessed(TObject *, unsigned int, TCanvas *) = 0;
161 virtual void slot_RootUpdate() = 0;
162
163 void slot_TimeUpdate();
164};
165
166#endif
Note: See TracBrowser for help on using the repository browser.