Loading about_dialog.cpp +9 −10 Original line number Diff line number Diff line Loading @@ -32,23 +32,22 @@ UI_Aboutwindow::UI_Aboutwindow(UI_Mainwindow *mainwindow) { char str[512]; char str[1024]; strcpy(str, " QT version at runtime is "); strncat(str, qVersion(), 32); strcat(str, "\n QT version at compiletime is "); strncat(str, QT_VERSION_STR, 32); strncat(str, "\n Compiled on " __DATE__ " " __TIME__, 40); sprintf(str + strlen(str), "\n CPU-cores detected on this system: %i", mainwindow->maincurve->cpu_cnt); strlcpy(str, " QT version at runtime is ", 512); strlcat(str, qVersion(), 512); strlcat(str, "\n QT version at compiletime is ", 512); strlcat(str, QT_VERSION_STR, 512); strlcat(str, "\n Compiled on " __DATE__ " " __TIME__, 512); snprintf(str + strlen(str), 512, "\n CPU-cores detected on this system: %i", mainwindow->maincurve->cpu_cnt); if(mainwindow->use_threads == 1) { strcat(str, "\n Multi-Threading is enabled."); strlcat(str, "\n Multi-Threading is enabled.", 1024); } else { strcat(str, "\n Multi-Threading is disabled."); strlcat(str, "\n Multi-Threading is disabled.", 1024); } str[511] = 0; AboutDialog = new QDialog; Loading about_dialog.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include "global.h" #include "mainwindow.h" #include "utils.h" Loading active_file_chooser.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include "global.h" #include "mainwindow.h" #include "utils.h" Loading adjustfiltersettings.cpp +35 −37 Original line number Diff line number Diff line Loading @@ -69,14 +69,14 @@ AdjustFilterSettings::AdjustFilterSettings(struct signalcompblock *signal_comp, filtersettings_dialog->setMinimumSize(460, 255); filtersettings_dialog->setMaximumSize(460, 255); strcpy(txtbuf, "Filter settings "); strlcpy(txtbuf, "Filter settings ", 2048); if(signalcomp->alias[0] != 0) { strcat(txtbuf, signalcomp->alias); strlcat(txtbuf, signalcomp->alias, 2048); } else { strcat(txtbuf, signalcomp->signallabel); strlcat(txtbuf, signalcomp->signallabel, 2048); } filtersettings_dialog->setWindowTitle(txtbuf); filtersettings_dialog->setModal(true); Loading Loading @@ -161,9 +161,7 @@ void AdjustFilterSettings::loadFilterSettings(void) { int i; char txtbuf[2048]; txtbuf[0] = 0; char txtbuf[2048]={""}; filterbox->clear(); Loading @@ -183,17 +181,17 @@ void AdjustFilterSettings::loadFilterSettings(void) { if(model == 0) { sprintf(txtbuf, "HighPass Butterworth"); snprintf(txtbuf, 2048, "HighPass Butterworth"); } if(model == 1) { sprintf(txtbuf, "HighPass Chebyshev %.1fdB ripple", ripple); snprintf(txtbuf, 2048, "HighPass Chebyshev %.1fdB ripple", ripple); } if(model == 2) { sprintf(txtbuf, "HighPass Bessel"); snprintf(txtbuf, 2048, "HighPass Bessel"); } } Loading @@ -201,40 +199,40 @@ void AdjustFilterSettings::loadFilterSettings(void) { if(model == 0) { sprintf(txtbuf, "LowPass Butterworth"); snprintf(txtbuf, 2048, "LowPass Butterworth"); } if(model == 1) { sprintf(txtbuf, "LowPass Chebyshev %.1fdB ripple", ripple); snprintf(txtbuf, 2048, "LowPass Chebyshev %.1fdB ripple", ripple); } if(model == 2) { sprintf(txtbuf, "LowPass Bessel"); snprintf(txtbuf, 2048, "LowPass Bessel"); } } if(type == 2) { sprintf(txtbuf, "Notch (resonator)"); snprintf(txtbuf, 2048, "Notch (resonator)"); } if(type == 3) { if(model == 0) { sprintf(txtbuf, "BandPass Butterworth"); snprintf(txtbuf, 2048, "BandPass Butterworth"); } if(model == 1) { sprintf(txtbuf, "BandPass Chebyshev %.1fdB ripple", ripple); snprintf(txtbuf, 2048, "BandPass Chebyshev %.1fdB ripple", ripple); } if(model == 2) { sprintf(txtbuf, "BandPass Bessel"); snprintf(txtbuf, 2048, "BandPass Bessel"); } } Loading @@ -242,25 +240,25 @@ void AdjustFilterSettings::loadFilterSettings(void) { if(model == 0) { sprintf(txtbuf, "BandStop Butterworth"); snprintf(txtbuf, 2048, "BandStop Butterworth"); } if(model == 1) { sprintf(txtbuf, "BandStop Chebyshev %.1fdB ripple", ripple); snprintf(txtbuf, 2048, "BandStop Chebyshev %.1fdB ripple", ripple); } if(model == 2) { sprintf(txtbuf, "BandStop Bessel"); snprintf(txtbuf, 2048, "BandStop Bessel"); } } sprintf(txtbuf + strlen(txtbuf), " %f", frequency1); snprintf(txtbuf + strlen(txtbuf), 2048, " %f", frequency1); remove_trailing_zeros(txtbuf); strcat(txtbuf, " Hz"); strlcat(txtbuf, " Hz", 2048); filterbox->addItem(txtbuf); Loading @@ -275,12 +273,12 @@ void AdjustFilterSettings::loadFilterSettings(void) if(type == 0) { sprintf(txtbuf, "Highpass Moving Average %i samples", size); snprintf(txtbuf, 2048, "Highpass Moving Average %i samples", size); } if(type == 1) { sprintf(txtbuf, "Lowpass Moving Average %i samples", size); snprintf(txtbuf, 2048, "Lowpass Moving Average %i samples", size); } filterbox->addItem(txtbuf); Loading Loading @@ -589,17 +587,17 @@ void AdjustFilterSettings::update_filter() { if(model == 0) { sprintf(spec_str_1, "HpBu%i/%f", order, frequency1); snprintf(spec_str_1, 256, "HpBu%i/%f", order, frequency1); } if(model == 1) { sprintf(spec_str_1, "HpCh%i/%f/%f", order, ripple, frequency1); snprintf(spec_str_1, 256, "HpCh%i/%f/%f", order, ripple, frequency1); } if(model == 2) { sprintf(spec_str_1, "HpBe%i/%f", order, frequency1); snprintf(spec_str_1, 256, "HpBe%i/%f", order, frequency1); } } Loading @@ -607,40 +605,40 @@ void AdjustFilterSettings::update_filter() { if(model == 0) { sprintf(spec_str_1, "LpBu%i/%f", order, frequency1); snprintf(spec_str_1, 256, "LpBu%i/%f", order, frequency1); } if(model == 1) { sprintf(spec_str_1, "LpCh%i/%f/%f", order, ripple, frequency1); snprintf(spec_str_1, 256, "LpCh%i/%f/%f", order, ripple, frequency1); } if(model == 2) { sprintf(spec_str_1, "LpBe%i/%f", order, frequency1); snprintf(spec_str_1, 256, "LpBe%i/%f", order, frequency1); } } if(type == 2) { sprintf(spec_str_1, "BsRe/%i/%f", order, frequency1); snprintf(spec_str_1, 256, "BsRe/%i/%f", order, frequency1); } if(type == 3) { if(model == 0) { sprintf(spec_str_1, "BpBu%i/%f-%f", order, frequency1, frequency2); snprintf(spec_str_1, 256, "BpBu%i/%f-%f", order, frequency1, frequency2); } if(model == 1) { sprintf(spec_str_1, "BpCh%i/%f/%f-%f", order, ripple, frequency1, frequency2); snprintf(spec_str_1, 256, "BpCh%i/%f/%f-%f", order, ripple, frequency1, frequency2); } if(model == 2) { sprintf(spec_str_1, "BpBe%i/%f-%f", order, frequency1, frequency2); snprintf(spec_str_1, 256, "BpBe%i/%f-%f", order, frequency1, frequency2); } } Loading @@ -648,21 +646,21 @@ void AdjustFilterSettings::update_filter() { if(model == 0) { sprintf(spec_str_1, "BsBu%i/%f-%f", order, frequency1, frequency2); snprintf(spec_str_1, 256, "BsBu%i/%f-%f", order, frequency1, frequency2); } if(model == 1) { sprintf(spec_str_1, "BsCh%i/%f/%f-%f", order, ripple, frequency1, frequency2); snprintf(spec_str_1, 256, "BsCh%i/%f/%f-%f", order, ripple, frequency1, frequency2); } if(model == 2) { sprintf(spec_str_1, "BsBe%i/%f-%f", order, frequency1, frequency2); snprintf(spec_str_1, 256, "BsBe%i/%f-%f", order, frequency1, frequency2); } } strcpy(spec_str_2, spec_str_1); strlcpy(spec_str_2, spec_str_1, 256); filter_spec = spec_str_2; Loading annotations_dock.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -195,7 +195,7 @@ void UI_Annotationswindow::show_stats(bool) annot_list = &mainwindow->edfheaderlist[file_num]->annot_list; if(annot_list == NULL) { sprintf(str, "Nullpointer returned: file: %s line %i", __FILE__, __LINE__); snprintf(str, 4096, "Nullpointer returned: file: %s line %i", __FILE__, __LINE__); QMessageBox messagewindow(QMessageBox::Critical, "Error", str); messagewindow.exec(); return; Loading @@ -204,7 +204,7 @@ void UI_Annotationswindow::show_stats(bool) annot = edfplus_annotation_get_item_visible_only(annot_list, list->currentRow()); if(annot == NULL) { sprintf(str, "Nullpointer returned: file: %s line %i", __FILE__, __LINE__); snprintf(str, 4096, "Nullpointer returned: file: %s line %i", __FILE__, __LINE__); QMessageBox messagewindow(QMessageBox::Critical, "Error", str); messagewindow.exec(); return; Loading Loading @@ -402,7 +402,7 @@ void UI_Annotationswindow::filter_edited(const QString text) return; } strcpy(filter_str, lineedit1->text().toUtf8().data()); strlcpy(filter_str, lineedit1->text().toUtf8().data(), 32); len = strlen(filter_str); Loading Loading @@ -648,7 +648,7 @@ void UI_Annotationswindow::hide_same_annots(bool) annot = edfplus_annotation_get_item_visible_only(annot_list, n); strcpy(str1, annot->annotation); strlcpy(str1, annot->annotation, MAX_ANNOTATION_LEN); remove_leading_spaces(str1); Loading @@ -658,7 +658,7 @@ void UI_Annotationswindow::hide_same_annots(bool) { annot = edfplus_annotation_get_item(annot_list, i); strcpy(str2, annot->annotation); strlcpy(str2, annot->annotation, MAX_ANNOTATION_LEN); remove_leading_spaces(str2); Loading Loading @@ -699,7 +699,7 @@ void UI_Annotationswindow::unhide_same_annots(bool) annot = edfplus_annotation_get_item_visible_only(annot_list, n); strcpy(str1, annot->annotation); strlcpy(str1, annot->annotation, MAX_ANNOTATION_LEN); remove_leading_spaces(str1); Loading @@ -709,7 +709,7 @@ void UI_Annotationswindow::unhide_same_annots(bool) { annot = edfplus_annotation_get_item(annot_list, i); strcpy(str2, annot->annotation); strlcpy(str2, annot->annotation, MAX_ANNOTATION_LEN); remove_leading_spaces(str2); Loading Loading @@ -958,7 +958,7 @@ void UI_Annotationswindow::updateList(void) remove_trailing_zeros(str); strcat(str, "\n\n"); strlcat(str, "\n\n", MAX_ANNOTATION_LEN + 32); string = QString::fromLatin1(str); Loading Loading
about_dialog.cpp +9 −10 Original line number Diff line number Diff line Loading @@ -32,23 +32,22 @@ UI_Aboutwindow::UI_Aboutwindow(UI_Mainwindow *mainwindow) { char str[512]; char str[1024]; strcpy(str, " QT version at runtime is "); strncat(str, qVersion(), 32); strcat(str, "\n QT version at compiletime is "); strncat(str, QT_VERSION_STR, 32); strncat(str, "\n Compiled on " __DATE__ " " __TIME__, 40); sprintf(str + strlen(str), "\n CPU-cores detected on this system: %i", mainwindow->maincurve->cpu_cnt); strlcpy(str, " QT version at runtime is ", 512); strlcat(str, qVersion(), 512); strlcat(str, "\n QT version at compiletime is ", 512); strlcat(str, QT_VERSION_STR, 512); strlcat(str, "\n Compiled on " __DATE__ " " __TIME__, 512); snprintf(str + strlen(str), 512, "\n CPU-cores detected on this system: %i", mainwindow->maincurve->cpu_cnt); if(mainwindow->use_threads == 1) { strcat(str, "\n Multi-Threading is enabled."); strlcat(str, "\n Multi-Threading is enabled.", 1024); } else { strcat(str, "\n Multi-Threading is disabled."); strlcat(str, "\n Multi-Threading is disabled.", 1024); } str[511] = 0; AboutDialog = new QDialog; Loading
about_dialog.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include "global.h" #include "mainwindow.h" #include "utils.h" Loading
active_file_chooser.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include "global.h" #include "mainwindow.h" #include "utils.h" Loading
adjustfiltersettings.cpp +35 −37 Original line number Diff line number Diff line Loading @@ -69,14 +69,14 @@ AdjustFilterSettings::AdjustFilterSettings(struct signalcompblock *signal_comp, filtersettings_dialog->setMinimumSize(460, 255); filtersettings_dialog->setMaximumSize(460, 255); strcpy(txtbuf, "Filter settings "); strlcpy(txtbuf, "Filter settings ", 2048); if(signalcomp->alias[0] != 0) { strcat(txtbuf, signalcomp->alias); strlcat(txtbuf, signalcomp->alias, 2048); } else { strcat(txtbuf, signalcomp->signallabel); strlcat(txtbuf, signalcomp->signallabel, 2048); } filtersettings_dialog->setWindowTitle(txtbuf); filtersettings_dialog->setModal(true); Loading Loading @@ -161,9 +161,7 @@ void AdjustFilterSettings::loadFilterSettings(void) { int i; char txtbuf[2048]; txtbuf[0] = 0; char txtbuf[2048]={""}; filterbox->clear(); Loading @@ -183,17 +181,17 @@ void AdjustFilterSettings::loadFilterSettings(void) { if(model == 0) { sprintf(txtbuf, "HighPass Butterworth"); snprintf(txtbuf, 2048, "HighPass Butterworth"); } if(model == 1) { sprintf(txtbuf, "HighPass Chebyshev %.1fdB ripple", ripple); snprintf(txtbuf, 2048, "HighPass Chebyshev %.1fdB ripple", ripple); } if(model == 2) { sprintf(txtbuf, "HighPass Bessel"); snprintf(txtbuf, 2048, "HighPass Bessel"); } } Loading @@ -201,40 +199,40 @@ void AdjustFilterSettings::loadFilterSettings(void) { if(model == 0) { sprintf(txtbuf, "LowPass Butterworth"); snprintf(txtbuf, 2048, "LowPass Butterworth"); } if(model == 1) { sprintf(txtbuf, "LowPass Chebyshev %.1fdB ripple", ripple); snprintf(txtbuf, 2048, "LowPass Chebyshev %.1fdB ripple", ripple); } if(model == 2) { sprintf(txtbuf, "LowPass Bessel"); snprintf(txtbuf, 2048, "LowPass Bessel"); } } if(type == 2) { sprintf(txtbuf, "Notch (resonator)"); snprintf(txtbuf, 2048, "Notch (resonator)"); } if(type == 3) { if(model == 0) { sprintf(txtbuf, "BandPass Butterworth"); snprintf(txtbuf, 2048, "BandPass Butterworth"); } if(model == 1) { sprintf(txtbuf, "BandPass Chebyshev %.1fdB ripple", ripple); snprintf(txtbuf, 2048, "BandPass Chebyshev %.1fdB ripple", ripple); } if(model == 2) { sprintf(txtbuf, "BandPass Bessel"); snprintf(txtbuf, 2048, "BandPass Bessel"); } } Loading @@ -242,25 +240,25 @@ void AdjustFilterSettings::loadFilterSettings(void) { if(model == 0) { sprintf(txtbuf, "BandStop Butterworth"); snprintf(txtbuf, 2048, "BandStop Butterworth"); } if(model == 1) { sprintf(txtbuf, "BandStop Chebyshev %.1fdB ripple", ripple); snprintf(txtbuf, 2048, "BandStop Chebyshev %.1fdB ripple", ripple); } if(model == 2) { sprintf(txtbuf, "BandStop Bessel"); snprintf(txtbuf, 2048, "BandStop Bessel"); } } sprintf(txtbuf + strlen(txtbuf), " %f", frequency1); snprintf(txtbuf + strlen(txtbuf), 2048, " %f", frequency1); remove_trailing_zeros(txtbuf); strcat(txtbuf, " Hz"); strlcat(txtbuf, " Hz", 2048); filterbox->addItem(txtbuf); Loading @@ -275,12 +273,12 @@ void AdjustFilterSettings::loadFilterSettings(void) if(type == 0) { sprintf(txtbuf, "Highpass Moving Average %i samples", size); snprintf(txtbuf, 2048, "Highpass Moving Average %i samples", size); } if(type == 1) { sprintf(txtbuf, "Lowpass Moving Average %i samples", size); snprintf(txtbuf, 2048, "Lowpass Moving Average %i samples", size); } filterbox->addItem(txtbuf); Loading Loading @@ -589,17 +587,17 @@ void AdjustFilterSettings::update_filter() { if(model == 0) { sprintf(spec_str_1, "HpBu%i/%f", order, frequency1); snprintf(spec_str_1, 256, "HpBu%i/%f", order, frequency1); } if(model == 1) { sprintf(spec_str_1, "HpCh%i/%f/%f", order, ripple, frequency1); snprintf(spec_str_1, 256, "HpCh%i/%f/%f", order, ripple, frequency1); } if(model == 2) { sprintf(spec_str_1, "HpBe%i/%f", order, frequency1); snprintf(spec_str_1, 256, "HpBe%i/%f", order, frequency1); } } Loading @@ -607,40 +605,40 @@ void AdjustFilterSettings::update_filter() { if(model == 0) { sprintf(spec_str_1, "LpBu%i/%f", order, frequency1); snprintf(spec_str_1, 256, "LpBu%i/%f", order, frequency1); } if(model == 1) { sprintf(spec_str_1, "LpCh%i/%f/%f", order, ripple, frequency1); snprintf(spec_str_1, 256, "LpCh%i/%f/%f", order, ripple, frequency1); } if(model == 2) { sprintf(spec_str_1, "LpBe%i/%f", order, frequency1); snprintf(spec_str_1, 256, "LpBe%i/%f", order, frequency1); } } if(type == 2) { sprintf(spec_str_1, "BsRe/%i/%f", order, frequency1); snprintf(spec_str_1, 256, "BsRe/%i/%f", order, frequency1); } if(type == 3) { if(model == 0) { sprintf(spec_str_1, "BpBu%i/%f-%f", order, frequency1, frequency2); snprintf(spec_str_1, 256, "BpBu%i/%f-%f", order, frequency1, frequency2); } if(model == 1) { sprintf(spec_str_1, "BpCh%i/%f/%f-%f", order, ripple, frequency1, frequency2); snprintf(spec_str_1, 256, "BpCh%i/%f/%f-%f", order, ripple, frequency1, frequency2); } if(model == 2) { sprintf(spec_str_1, "BpBe%i/%f-%f", order, frequency1, frequency2); snprintf(spec_str_1, 256, "BpBe%i/%f-%f", order, frequency1, frequency2); } } Loading @@ -648,21 +646,21 @@ void AdjustFilterSettings::update_filter() { if(model == 0) { sprintf(spec_str_1, "BsBu%i/%f-%f", order, frequency1, frequency2); snprintf(spec_str_1, 256, "BsBu%i/%f-%f", order, frequency1, frequency2); } if(model == 1) { sprintf(spec_str_1, "BsCh%i/%f/%f-%f", order, ripple, frequency1, frequency2); snprintf(spec_str_1, 256, "BsCh%i/%f/%f-%f", order, ripple, frequency1, frequency2); } if(model == 2) { sprintf(spec_str_1, "BsBe%i/%f-%f", order, frequency1, frequency2); snprintf(spec_str_1, 256, "BsBe%i/%f-%f", order, frequency1, frequency2); } } strcpy(spec_str_2, spec_str_1); strlcpy(spec_str_2, spec_str_1, 256); filter_spec = spec_str_2; Loading
annotations_dock.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -195,7 +195,7 @@ void UI_Annotationswindow::show_stats(bool) annot_list = &mainwindow->edfheaderlist[file_num]->annot_list; if(annot_list == NULL) { sprintf(str, "Nullpointer returned: file: %s line %i", __FILE__, __LINE__); snprintf(str, 4096, "Nullpointer returned: file: %s line %i", __FILE__, __LINE__); QMessageBox messagewindow(QMessageBox::Critical, "Error", str); messagewindow.exec(); return; Loading @@ -204,7 +204,7 @@ void UI_Annotationswindow::show_stats(bool) annot = edfplus_annotation_get_item_visible_only(annot_list, list->currentRow()); if(annot == NULL) { sprintf(str, "Nullpointer returned: file: %s line %i", __FILE__, __LINE__); snprintf(str, 4096, "Nullpointer returned: file: %s line %i", __FILE__, __LINE__); QMessageBox messagewindow(QMessageBox::Critical, "Error", str); messagewindow.exec(); return; Loading Loading @@ -402,7 +402,7 @@ void UI_Annotationswindow::filter_edited(const QString text) return; } strcpy(filter_str, lineedit1->text().toUtf8().data()); strlcpy(filter_str, lineedit1->text().toUtf8().data(), 32); len = strlen(filter_str); Loading Loading @@ -648,7 +648,7 @@ void UI_Annotationswindow::hide_same_annots(bool) annot = edfplus_annotation_get_item_visible_only(annot_list, n); strcpy(str1, annot->annotation); strlcpy(str1, annot->annotation, MAX_ANNOTATION_LEN); remove_leading_spaces(str1); Loading @@ -658,7 +658,7 @@ void UI_Annotationswindow::hide_same_annots(bool) { annot = edfplus_annotation_get_item(annot_list, i); strcpy(str2, annot->annotation); strlcpy(str2, annot->annotation, MAX_ANNOTATION_LEN); remove_leading_spaces(str2); Loading Loading @@ -699,7 +699,7 @@ void UI_Annotationswindow::unhide_same_annots(bool) annot = edfplus_annotation_get_item_visible_only(annot_list, n); strcpy(str1, annot->annotation); strlcpy(str1, annot->annotation, MAX_ANNOTATION_LEN); remove_leading_spaces(str1); Loading @@ -709,7 +709,7 @@ void UI_Annotationswindow::unhide_same_annots(bool) { annot = edfplus_annotation_get_item(annot_list, i); strcpy(str2, annot->annotation); strlcpy(str2, annot->annotation, MAX_ANNOTATION_LEN); remove_leading_spaces(str2); Loading Loading @@ -958,7 +958,7 @@ void UI_Annotationswindow::updateList(void) remove_trailing_zeros(str); strcat(str, "\n\n"); strlcat(str, "\n\n", MAX_ANNOTATION_LEN + 32); string = QString::fromLatin1(str); Loading