mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 22:45:23 +00:00
Limit number of saved lines in devicelog
This commit is contained in:
parent
3358861114
commit
c3bcb70d87
2 changed files with 55 additions and 3 deletions
|
|
@ -12,6 +12,18 @@ DeviceLog::DeviceLog(QWidget *parent) :
|
|||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->bClear, &QPushButton::clicked, this, &DeviceLog::clear);
|
||||
connect(ui->limitLines, &QCheckBox::toggled, [=](bool enabled){
|
||||
if(enabled) {
|
||||
ui->text->setMaximumBlockCount(ui->numLines->value());
|
||||
ui->numLines->setEnabled(true);
|
||||
} else {
|
||||
ui->text->setMaximumBlockCount(0);
|
||||
ui->numLines->setEnabled(false);
|
||||
}
|
||||
});
|
||||
connect(ui->numLines, qOverload<int>(&QSpinBox::valueChanged), [=](int lines) {
|
||||
ui->text->setMaximumBlockCount(lines);
|
||||
});
|
||||
}
|
||||
|
||||
DeviceLog::~DeviceLog()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue