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

Last change on this file since 11788 was 11779, checked in by lyard, 13 years ago
Replaced root camera by openGL camera in the gui
File size: 6.5 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 void on_fMcpStartRun_clicked();
46 void on_fMcpStopRun_clicked();
47 void on_fMcpReset_clicked();
48
49 // System status
50 void on_fShutdown_clicked();
51 void on_fShutdownAll_clicked();
52
53 // Status LEDs signals
54 void on_fStatusFTULed_clicked();
55 void on_fStatusFTMLed_clicked();
56 void on_fStatusFADLed_clicked();
57 void on_fStatusLoggerLed_clicked();
58 void on_fStatusChatLed_clicked();
59 //void on_fStatusFTMEnable_stateChanged(int state);
60
61 // Tab Widget
62 void on_fTabWidget_tabCloseRequested(int which);
63 virtual void on_fTabWidget_currentChanged(int) = 0;
64
65 // Tab: FAD
66 void slot_fFadLED_clicked();
67
68 void on_fFadStartRun_clicked();
69 void on_fFadStopRun_clicked();
70 void on_fFadDrsOn_clicked();
71 void on_fFadDrsOff_clicked();
72 void on_fFadDwriteOn_clicked();
73 void on_fFadDwriteOff_clicked();
74 void on_fFadSingleTrigger_clicked();
75 void on_fFadTriggerLineOn_clicked();
76 void on_fFadTriggerLineOff_clicked();
77 void on_fFadContTriggerOn_clicked();
78 void on_fFadContTriggerOff_clicked();
79 void on_fFadBusyOnOn_clicked();
80 void on_fFadBusyOnOff_clicked();
81 void on_fFadBusyOffOn_clicked();
82 void on_fFadBusyOffOff_clicked();
83 void on_fFadResetTriggerId_clicked();
84 void on_fFadSocket0_clicked();
85 void on_fFadSocket17_clicked();
86
87 void on_fFadPrescalerCmd_valueChanged(int);
88 void on_fFadRunNumberCmd_valueChanged(int);
89 void on_fFadRoiCmd_valueChanged(int);
90
91 void FadDacCmd_valueChanged(uint16_t, uint16_t);
92
93 void on_fFadDac0Cmd_valueChanged(int v) { FadDacCmd_valueChanged(v, 0); }
94 void on_fFadDac1Cmd_valueChanged(int v) { FadDacCmd_valueChanged(v, 1); }
95 void on_fFadDac2Cmd_valueChanged(int v) { FadDacCmd_valueChanged(v, 2); }
96 void on_fFadDac3Cmd_valueChanged(int v) { FadDacCmd_valueChanged(v, 3); }
97 void on_fFadDac4Cmd_valueChanged(int v) { FadDacCmd_valueChanged(v, 4); }
98 void on_fFadDac5Cmd_valueChanged(int v) { FadDacCmd_valueChanged(v, 5); }
99 void on_fFadDac6Cmd_valueChanged(int v) { FadDacCmd_valueChanged(v, 6); }
100 void on_fFadDac7Cmd_valueChanged(int v) { FadDacCmd_valueChanged(v, 7); }
101
102 // Tab: Adc
103 virtual void DisplayEventData() = 0;
104 void on_fAdcCrate_valueChanged(int) { DisplayEventData(); }
105 void on_fAdcBoard_valueChanged(int) { DisplayEventData(); }
106 void on_fAdcChip_valueChanged(int) { DisplayEventData(); }
107 void on_fAdcChannel_valueChanged(int) { DisplayEventData(); }
108
109 // Tab: FTM
110 void on_fEnableTrigger_stateChanged(int);
111 void on_fEnableExt1_stateChanged(int);
112 void on_fEnableExt2_stateChanged(int);
113 void on_fEnableClockCond_stateChanged(int);
114 void on_fEnableVeto_stateChanged(int);
115
116 void on_fTriggerSeqPed_valueChanged(int) { SetTriggerSequence(); }
117 void on_fTriggerSeqLPint_valueChanged(int) { SetTriggerSequence(); }
118 void on_fTriggerSeqLPext_valueChanged(int) { SetTriggerSequence(); }
119
120 void on_fPhysicsCoincidence_valueChanged(int);
121 void on_fPhysicsWindow_valueChanged(int);
122 void on_fCalibCoincidence_valueChanged(int);
123 void on_fCalibWindow_valueChanged(int);
124
125 void on_fTriggerInterval_valueChanged(int);
126 void on_fTriggerDelay_valueChanged(int);
127 void on_fTimeMarkerDelay_valueChanged(int);
128 void on_fDeadTime_valueChanged(int);
129/*
130 void on_fClockCondR0_valueChanged(int) { }
131 void on_fClockCondR1_valueChanged(int) { }
132 void on_fClockCondR8_valueChanged(int) { }
133 void on_fClockCondR9_valueChanged(int) { }
134 void on_fClockCondR11_valueChanged(int) { }
135 void on_fClockCondR13_valueChanged(int) { }
136 void on_fClockCondR14_valueChanged(int) { }
137 void on_fClockCondR15_valueChanged(int) { }
138*/
139 void on_fPrescalingVal_valueChanged(int);
140
141 void on_fClockCondFreq_activated(int);
142
143 void on_fLpIntIntensity_valueChanged(int);
144 void on_fLpExtIntensity_valueChanged(int);
145 void on_fLpIntGroup1_stateChanged(int);
146 void on_fLpExtGroup1_stateChanged(int);
147 void on_fLpIntGroup2_stateChanged(int);
148 void on_fLpExtGroup2_stateChanged(int);
149
150 // Tab: FTUs
151 void slot_fFtuLED_clicked();
152 void on_fFtuPing_toggled(bool);
153 void on_fFtuAllOn_clicked();
154 void on_fFtuAllOff_clicked();
155
156 // Tab: Rates
157 virtual void on_fPixelEnable_stateChanged(int) = 0;
158 virtual void on_fThresholdVal_valueChanged(int) = 0;
159 virtual void on_fThresholdIdx_valueChanged(int) = 0;
160 virtual void on_fThresholdCrate_valueChanged(int) = 0;
161 virtual void on_fThresholdBoard_valueChanged(int) = 0;
162 virtual void on_fThresholdPatch_valueChanged(int) = 0;
163 virtual void on_fPixelIdx_valueChanged(int) = 0;
164 virtual void on_fRatesMin_valueChanged(int) = 0;
165 virtual void on_fRatesMax_valueChanged(int) = 0;
166
167 void on_fPixelEnableAll_clicked();
168 void on_fPixelDisableAll_clicked();
169
170 virtual void on_fPixelDisableOthers_clicked() = 0;
171 virtual void on_fThresholdDisableOthers_clicked() = 0;
172
173 virtual void on_fRatePatch1_valueChanged(int) = 0;
174 virtual void on_fRatePatch2_valueChanged(int) = 0;
175 virtual void on_fRateBoard1_valueChanged(int) = 0;
176 virtual void on_fRateBoard2_valueChanged(int) = 0;
177
178 // Tab: Chat
179 void on_fChatSend_clicked();
180
181 // Tab: Commands
182 /// Needs access to DimNetwork thus it is implemented in the derived class
183 virtual void on_fDimCmdSend_clicked() = 0;
184
185 // Main menu
186 // void on_fMenuLogSaveAs_triggered(bool)
187
188 virtual void slot_RootEventProcessed(TObject *, unsigned int, TCanvas *) = 0;
189 virtual void slot_RootUpdate() = 0;
190 virtual void slot_ChoosePixel(int) = 0;
191 virtual void slot_CameraDoubleClick(int) = 0;
192 virtual void slot_CameraMouseMove(int) = 0;
193
194 void slot_TimeUpdate();
195};
196
197#endif
Note: See TracBrowser for help on using the repository browser.