52,36 → 52,20 |
showMaximized(); |
} |
|
wg_Connection->set_SelectVisible(false); |
wg_Connection->set_ButtonVisible(false); |
wg_Connection->set_SelectVisible(true); |
wg_Connection->set_ButtonVisible(true); |
|
btn_Start->setCheckable(true); |
|
ac_Plotter->setChecked(true); |
|
Font_1.setFamily(QString::fromUtf8("Adobe Courier")); |
Font_1.setBold(true); |
Font_1.setWeight(75); |
|
for(int z = 0; z < MAX_DebugData; z++) |
{ |
wg_Index[z] = new wgt_Index(); |
verticalLayout->addWidget(wg_Index[z]); |
|
lb_Debug[z] = new QLabel(wg_Debug); |
le_Debug[z] = new QLineEdit(wg_Debug); |
cb_Debug[z] = new QCheckBox(wg_Config); |
le_Debug[z]->setFont(Font_1); |
le_Debug[z]->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
le_Debug[z]->setReadOnly(true); |
wg_Index[z]->set_Name(o_Settings->DebugData.Label[z]); |
wg_Index[z]->set_StyleSheet("color: " + QColor(DEF_DebugColors[z]).name() + ";"); |
|
wg_Grid->addWidget(lb_Debug[z], (z % 8), z / 8 * 2, 0); |
wg_Grid->addWidget(le_Debug[z], (z % 8), z / 8 * 2 + 1 , 0); |
|
wg_Grid_2->addWidget(cb_Debug[z], (z % 8), z / 8, 0); |
|
lb_Debug[z]->setText(o_Settings->DebugData.Label[z]); |
cb_Debug[z]->setText(o_Settings->DebugData.Label[z]); |
|
cb_Debug[z]->setChecked(o_Settings->DebugData.Show_Plotter[z]); |
connect(wg_Index[z], SIGNAL(sig_Clicked()), this, SLOT(slot_btn_ChoseOK())); |
} |
} |
|
90,16 → 74,12 |
{ |
connect(ac_Connect, SIGNAL(triggered()), wg_Connection, SLOT(slot_btn_Connect())); |
|
connect(ac_Plotter, SIGNAL(triggered()), this, SLOT(slot_ac_Plotter())); |
connect(ac_Debug, SIGNAL(triggered()), this, SLOT(slot_ac_Debug())); |
connect(ac_Chose, SIGNAL(triggered()), this, SLOT(slot_ac_Chose())); |
|
connect(ac_ReadLabels, SIGNAL(triggered()), this, SLOT(slot_ac_ReadLabels())); |
|
connect(Plotter_Scroll, SIGNAL(valueChanged(int)), this, SLOT(slot_Plotter_Scroll(int))); |
|
connect(btn_Start, SIGNAL(clicked()), this, SLOT(slot_Plotter_Start())); |
connect(btn_ChoseOK, SIGNAL(clicked()), this, SLOT(slot_btn_ChoseOK())); |
// connect(btn_ChoseOK, SIGNAL(clicked()), this, SLOT(slot_btn_ChoseOK())); |
|
// About QMK-Kernel & About-QT Dialog einfügen |
connect(ac_About, SIGNAL(triggered()), this, SLOT(slot_ac_About())); |
117,7 → 97,7 |
|
qwt_Plotter->setCanvasBackground(QColor(QRgb(0x00000000))); |
|
qwt_Plotter->insertLegend(new QwtLegend(), QwtPlot::RightLegend); |
// qwt_Plotter->insertLegend(new QwtLegend(), QwtPlot::RightLegend); |
|
QwtPlotGrid *Grid = new QwtPlotGrid(); |
Grid->setMajPen(QPen(Qt::gray, 0, Qt::DotLine)); |
136,6 → 116,8 |
Plot[a]->attach(qwt_Plotter); |
} |
qwt_Plotter->replot(); |
|
|
} |
|
void dlg_Main::update_Plotter() |
175,7 → 157,7 |
|
if (o_Settings->DebugData.Show_Plotter[a]) |
{ |
Plot[a]->setTitle(o_Settings->DebugData.Label[a]); |
// Plot[a]->setTitle(o_Settings->DebugData.Label[a]); |
Plot[a]->attach(qwt_Plotter); |
} |
} |
230,9 → 212,9 |
{ |
for(int z = 0; z < MAX_DebugData; z++) |
{ |
lb_Debug[z]->setText(o_Settings->DebugData.Label[z]); |
cb_Debug[z]->setText(o_Settings->DebugData.Label[z]); |
cb_Debug[z]->setChecked(o_Settings->DebugData.Show_Plotter[z]); |
wg_Index[z]->set_Name(o_Settings->DebugData.Label[z]); |
wg_Index[z]->set_Checked(o_Settings->DebugData.Show_Plotter[z]); |
|
} |
config_Plotter(); |
} |
245,10 → 227,8 |
for (int z = 0; z < MAX_DebugData; z++) |
{ |
Debug_Data[z] = ls_Debug.Analog[z]; |
if (ac_Debug->isChecked()) |
{ |
le_Debug[z]->setText(QString("%1").arg(Debug_Data[z])); |
} |
|
wg_Index[z]->set_Wert(QString("%1").arg(Debug_Data[z])); |
} |
if (btn_Start->isChecked()) |
{ |
265,9 → 245,11 |
{ |
o_Settings->DebugData.Label[MK_DebugLabels.Position] = "Debug-" + QString("%1").arg(MK_DebugLabels.Position); |
} |
lb_Debug[MK_DebugLabels.Position]->setText("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
cb_Debug[MK_DebugLabels.Position]->setText("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
// cb_Debug[MK_DebugLabels.Position]->setText("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
wg_Index[MK_DebugLabels.Position]->set_Name("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
// wg_Index[z]->set_Checked(o_Settings->DebugData.Show_Plotter[z]); |
|
|
} |
if (MK_DebugLabels.Position == 31) |
{ |
293,41 → 275,12 |
{ |
for(int z = 0; z < MAX_DebugData; z++) |
{ |
o_Settings->DebugData.Show_Plotter[z] = cb_Debug[z]->isChecked(); |
o_Settings->DebugData.Show_Plotter[z] = wg_Index[z]->get_Checked(); |
} |
config_Plotter(); |
o_Settings->write_DebugLabels(gs_Version.ID); |
} |
|
void dlg_Main::slot_ac_Chose() |
{ |
for(int z = 0; z < MAX_DebugData; z++) |
{ |
cb_Debug[z]->setChecked(o_Settings->DebugData.Show_Plotter[z]); |
} |
|
ac_Chose->setChecked(true); |
ac_Debug->setChecked(false); |
ac_Plotter->setChecked(false); |
wg_Pages->setCurrentIndex(2); |
} |
|
void dlg_Main::slot_ac_Debug() |
{ |
ac_Debug->setChecked(true); |
ac_Chose->setChecked(false); |
ac_Plotter->setChecked(false); |
wg_Pages->setCurrentIndex(1); |
} |
|
void dlg_Main::slot_ac_Plotter() |
{ |
ac_Plotter->setChecked(true); |
ac_Debug->setChecked(false); |
ac_Chose->setChecked(false); |
wg_Pages->setCurrentIndex(0); |
} |
|
void dlg_Main::slot_ac_ReadLabels() |
{ |
c_Data[0] = 0; |