diff --git a/mainwindow.cpp b/mainwindow.cpp index a558d89..4e8f5dc 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -109,15 +109,17 @@ void MainWindow::setupUi() channelLayout->setSpacing(2); for (int i = 0; i < 16; ++i) { - QCheckBox *check = new QCheckBox(QString("ch%1").arg(i)); - check->setChecked(true); + QCheckBox *check = new QCheckBox(QString("CH%1").arg(i+1)); + check->setChecked(false); check->setStyleSheet( "QCheckBox { color: #aaa; font-size: 11px; spacing: 4px; }" - "QCheckBox::indicator { width: 12px; height: 12px; }" - "QCheckBox::indicator:checked { background: #3498db; }" + "QCheckBox::indicator { width: 14px; height: 14px; }" + "QCheckBox::indicator:checked { background-color: #3498db; border: 1px solid #2980b9; }" + "QCheckBox::indicator:unchecked { background-color: #333; border: 1px solid #555; }" ); - connect(check, &QCheckBox::toggled, this, [this, i](bool checked) { - onToggleChannel(i, checked); + connect(check, &QCheckBox::clicked, this, [this, i](bool checked) { + m_plotWidget->setChannelVisible(i, checked); + m_plotWidget->update(); }); channelLayout->addWidget(check); m_channelChecks.append(check);