Rev 750 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 750 | Rev 801 | ||
---|---|---|---|
Line 50... | Line 50... | ||
50 | if (o_Settings->GUI.isMax) |
50 | if (o_Settings->GUI.isMax) |
51 | { |
51 | { |
52 | showMaximized(); |
52 | showMaximized(); |
53 | } |
53 | } |
Line 54... | Line 54... | ||
54 | 54 | ||
55 | wg_Connection->set_SelectVisible(false); |
55 | wg_Connection->set_SelectVisible(true); |
Line 56... | Line 56... | ||
56 | wg_Connection->set_ButtonVisible(false); |
56 | wg_Connection->set_ButtonVisible(true); |
Line 57... | Line -... | ||
57 | - | ||
58 | btn_Start->setCheckable(true); |
- | |
59 | - | ||
60 | ac_Plotter->setChecked(true); |
- | |
61 | - | ||
62 | Font_1.setFamily(QString::fromUtf8("Adobe Courier")); |
- | |
63 | Font_1.setBold(true); |
57 | |
64 | Font_1.setWeight(75); |
58 | btn_Start->setCheckable(true); |
- | 59 | ||
- | 60 | for(int z = 0; z < MAX_DebugData; z++) |
|
Line 65... | Line -... | ||
65 | - | ||
66 | for(int z = 0; z < MAX_DebugData; z++) |
- | |
67 | { |
- | |
68 | - | ||
69 | lb_Debug[z] = new QLabel(wg_Debug); |
- | |
70 | le_Debug[z] = new QLineEdit(wg_Debug); |
- | |
71 | cb_Debug[z] = new QCheckBox(wg_Config); |
- | |
72 | le_Debug[z]->setFont(Font_1); |
- | |
73 | le_Debug[z]->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
- | |
74 | le_Debug[z]->setReadOnly(true); |
- | |
75 | - | ||
76 | wg_Grid->addWidget(lb_Debug[z], (z % 8), z / 8 * 2, 0); |
- | |
77 | wg_Grid->addWidget(le_Debug[z], (z % 8), z / 8 * 2 + 1 , 0); |
61 | { |
78 | 62 | wg_Index[z] = new wgt_Index(); |
|
Line 79... | Line 63... | ||
79 | wg_Grid_2->addWidget(cb_Debug[z], (z % 8), z / 8, 0); |
63 | verticalLayout->addWidget(wg_Index[z]); |
80 | 64 | ||
81 | lb_Debug[z]->setText(o_Settings->DebugData.Label[z]); |
65 | wg_Index[z]->set_Name(o_Settings->DebugData.Label[z]); |
Line 82... | Line 66... | ||
82 | cb_Debug[z]->setText(o_Settings->DebugData.Label[z]); |
66 | wg_Index[z]->set_StyleSheet("color: " + QColor(DEF_DebugColors[z]).name() + ";"); |
83 | 67 | ||
84 | cb_Debug[z]->setChecked(o_Settings->DebugData.Show_Plotter[z]); |
68 | connect(wg_Index[z], SIGNAL(sig_Clicked()), this, SLOT(slot_btn_ChoseOK())); |
85 | } |
69 | } |
Line 86... | Line -... | ||
86 | } |
- | |
87 | - | ||
88 | // Signale mit Slots verbinden |
- | |
89 | void dlg_Main::init_Connections() |
- | |
90 | { |
70 | } |
Line 91... | Line 71... | ||
91 | connect(ac_Connect, SIGNAL(triggered()), wg_Connection, SLOT(slot_btn_Connect())); |
71 | |
Line 92... | Line 72... | ||
92 | 72 | // Signale mit Slots verbinden |
|
93 | connect(ac_Plotter, SIGNAL(triggered()), this, SLOT(slot_ac_Plotter())); |
73 | void dlg_Main::init_Connections() |
Line 94... | Line 74... | ||
94 | connect(ac_Debug, SIGNAL(triggered()), this, SLOT(slot_ac_Debug())); |
74 | { |
95 | connect(ac_Chose, SIGNAL(triggered()), this, SLOT(slot_ac_Chose())); |
75 | connect(ac_Connect, SIGNAL(triggered()), wg_Connection, SLOT(slot_btn_Connect())); |
96 | 76 | ||
Line 115... | Line 95... | ||
115 | { |
95 | { |
116 | NextPlot = 0; |
96 | NextPlot = 0; |
Line 117... | Line 97... | ||
117 | 97 | ||
Line 118... | Line 98... | ||
118 | qwt_Plotter->setCanvasBackground(QColor(QRgb(0x00000000))); |
98 | qwt_Plotter->setCanvasBackground(QColor(QRgb(0x00000000))); |
Line 119... | Line 99... | ||
119 | 99 | ||
120 | qwt_Plotter->insertLegend(new QwtLegend(), QwtPlot::RightLegend); |
100 | // qwt_Plotter->insertLegend(new QwtLegend(), QwtPlot::RightLegend); |
Line 121... | Line 101... | ||
121 | 101 | ||
Line 134... | Line 114... | ||
134 | 114 | ||
135 | if (o_Settings->DebugData.Show_Plotter[a]) |
115 | if (o_Settings->DebugData.Show_Plotter[a]) |
136 | Plot[a]->attach(qwt_Plotter); |
116 | Plot[a]->attach(qwt_Plotter); |
137 | } |
117 | } |
- | 118 | qwt_Plotter->replot(); |
|
- | 119 | ||
138 | qwt_Plotter->replot(); |
120 | |
Line 139... | Line 121... | ||
139 | } |
121 | } |
140 | 122 | ||
141 | void dlg_Main::update_Plotter() |
123 | void dlg_Main::update_Plotter() |
Line 173... | Line 155... | ||
173 | Plot[a]->detach(); |
155 | Plot[a]->detach(); |
174 | Plot[a]->setPen(QPen(QColor(DEF_DebugColors[a]))); |
156 | Plot[a]->setPen(QPen(QColor(DEF_DebugColors[a]))); |
Line 175... | Line 157... | ||
175 | 157 | ||
176 | if (o_Settings->DebugData.Show_Plotter[a]) |
158 | if (o_Settings->DebugData.Show_Plotter[a]) |
177 | { |
159 | { |
178 | Plot[a]->setTitle(o_Settings->DebugData.Label[a]); |
160 | // Plot[a]->setTitle(o_Settings->DebugData.Label[a]); |
179 | Plot[a]->attach(qwt_Plotter); |
161 | Plot[a]->attach(qwt_Plotter); |
180 | } |
162 | } |
181 | } |
163 | } |
182 | qwt_Plotter->replot(); |
164 | qwt_Plotter->replot(); |
Line 228... | Line 210... | ||
228 | } |
210 | } |
229 | else |
211 | else |
230 | { |
212 | { |
231 | for(int z = 0; z < MAX_DebugData; z++) |
213 | for(int z = 0; z < MAX_DebugData; z++) |
232 | { |
214 | { |
233 | lb_Debug[z]->setText(o_Settings->DebugData.Label[z]); |
- | |
234 | cb_Debug[z]->setText(o_Settings->DebugData.Label[z]); |
215 | wg_Index[z]->set_Name(o_Settings->DebugData.Label[z]); |
235 | cb_Debug[z]->setChecked(o_Settings->DebugData.Show_Plotter[z]); |
216 | wg_Index[z]->set_Checked(o_Settings->DebugData.Show_Plotter[z]); |
- | 217 | ||
236 | } |
218 | } |
237 | config_Plotter(); |
219 | config_Plotter(); |
238 | } |
220 | } |
239 | } |
221 | } |
Line 243... | Line 225... | ||
243 | gs_Debug = ls_Debug; |
225 | gs_Debug = ls_Debug; |
Line 244... | Line 226... | ||
244 | 226 | ||
245 | for (int z = 0; z < MAX_DebugData; z++) |
227 | for (int z = 0; z < MAX_DebugData; z++) |
246 | { |
228 | { |
247 | Debug_Data[z] = ls_Debug.Analog[z]; |
- | |
248 | if (ac_Debug->isChecked()) |
229 | Debug_Data[z] = ls_Debug.Analog[z]; |
249 | { |
230 | |
250 | le_Debug[z]->setText(QString("%1").arg(Debug_Data[z])); |
- | |
251 | } |
231 | wg_Index[z]->set_Wert(QString("%1").arg(Debug_Data[z])); |
252 | } |
232 | } |
253 | if (btn_Start->isChecked()) |
233 | if (btn_Start->isChecked()) |
254 | { |
234 | { |
255 | update_Plotter(); |
235 | update_Plotter(); |
Line 263... | Line 243... | ||
263 | o_Settings->DebugData.Label[MK_DebugLabels.Position] = MK_DebugLabels.Text; |
243 | o_Settings->DebugData.Label[MK_DebugLabels.Position] = MK_DebugLabels.Text; |
264 | if (o_Settings->DebugData.Label[MK_DebugLabels.Position] == "") |
244 | if (o_Settings->DebugData.Label[MK_DebugLabels.Position] == "") |
265 | { |
245 | { |
266 | o_Settings->DebugData.Label[MK_DebugLabels.Position] = "Debug-" + QString("%1").arg(MK_DebugLabels.Position); |
246 | o_Settings->DebugData.Label[MK_DebugLabels.Position] = "Debug-" + QString("%1").arg(MK_DebugLabels.Position); |
267 | } |
247 | } |
268 | lb_Debug[MK_DebugLabels.Position]->setText("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
248 | // cb_Debug[MK_DebugLabels.Position]->setText("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
269 | cb_Debug[MK_DebugLabels.Position]->setText("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
249 | wg_Index[MK_DebugLabels.Position]->set_Name("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
- | 250 | // wg_Index[z]->set_Checked(o_Settings->DebugData.Show_Plotter[z]); |
|
- | 251 | ||
Line 270... | Line 252... | ||
270 | 252 | ||
271 | } |
253 | } |
272 | if (MK_DebugLabels.Position == 31) |
254 | if (MK_DebugLabels.Position == 31) |
273 | { |
255 | { |
Line 291... | Line 273... | ||
291 | 273 | ||
292 | void dlg_Main::slot_btn_ChoseOK() |
274 | void dlg_Main::slot_btn_ChoseOK() |
293 | { |
275 | { |
294 | for(int z = 0; z < MAX_DebugData; z++) |
276 | for(int z = 0; z < MAX_DebugData; z++) |
295 | { |
277 | { |
296 | o_Settings->DebugData.Show_Plotter[z] = cb_Debug[z]->isChecked(); |
278 | o_Settings->DebugData.Show_Plotter[z] = wg_Index[z]->get_Checked(); |
297 | } |
279 | } |
298 | config_Plotter(); |
280 | config_Plotter(); |
299 | o_Settings->write_DebugLabels(gs_Version.ID); |
281 | o_Settings->write_DebugLabels(gs_Version.ID); |
Line 300... | Line -... | ||
300 | } |
- | |
301 | - | ||
302 | void dlg_Main::slot_ac_Chose() |
- | |
303 | { |
- | |
304 | for(int z = 0; z < MAX_DebugData; z++) |
- | |
305 | { |
- | |
306 | cb_Debug[z]->setChecked(o_Settings->DebugData.Show_Plotter[z]); |
- | |
307 | } |
- | |
308 | - | ||
309 | ac_Chose->setChecked(true); |
- | |
310 | ac_Debug->setChecked(false); |
- | |
311 | ac_Plotter->setChecked(false); |
- | |
312 | wg_Pages->setCurrentIndex(2); |
- | |
313 | } |
- | |
314 | - | ||
315 | void dlg_Main::slot_ac_Debug() |
- | |
316 | { |
- | |
317 | ac_Debug->setChecked(true); |
- | |
318 | ac_Chose->setChecked(false); |
- | |
319 | ac_Plotter->setChecked(false); |
- | |
320 | wg_Pages->setCurrentIndex(1); |
- | |
321 | } |
- | |
322 | - | ||
323 | void dlg_Main::slot_ac_Plotter() |
- | |
324 | { |
- | |
325 | ac_Plotter->setChecked(true); |
- | |
326 | ac_Debug->setChecked(false); |
- | |
327 | ac_Chose->setChecked(false); |
- | |
328 | wg_Pages->setCurrentIndex(0); |
- | |
329 | } |
282 | } |
330 | 283 | ||
331 | void dlg_Main::slot_ac_ReadLabels() |
284 | void dlg_Main::slot_ac_ReadLabels() |
332 | { |
285 | { |
333 | c_Data[0] = 0; |
286 | c_Data[0] = 0; |