[med-svn] [Git][med-team/edfbrowser][master] 4 commits: routine-update: New upstream version
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Sun Sep 24 20:47:33 BST 2023
Étienne Mollier pushed to branch master at Debian Med / edfbrowser
Commits:
ec07b8fe by Étienne Mollier at 2023-09-24T21:40:06+02:00
routine-update: New upstream version
- - - - -
1c62e49f by Étienne Mollier at 2023-09-24T21:40:07+02:00
New upstream version 2.05+dfsg
- - - - -
db6cbdf1 by Étienne Mollier at 2023-09-24T21:40:08+02:00
Update upstream source from tag 'upstream/2.05+dfsg'
Update to upstream version '2.05+dfsg'
with Debian dir 1026af85c4de995d3b8add214262662a01490c36
- - - - -
24be356b by Étienne Mollier at 2023-09-24T21:44:17+02:00
routine-update: Ready to upload to unstable
- - - - -
21 changed files:
- cnvs/nk2edf.cpp
- debian/changelog
- doc/manual.html
- fir_filter_dialog.cpp
- global.h
- load_montage_dialog.cpp
- mainwindow.cpp
- mainwindow.h
- mainwindow_constr.cpp
- options_dialog.cpp
- options_dialog.h
- rc_host.cpp
- read_write_settings.cpp
- save_montage_dialog.cpp
- show_actual_montage_dialog.cpp
- signal_chooser.cpp
- signals_dialog.cpp
- utils.c
- utils.h
- version.txt
- view_montage_dialog.cpp
Changes:
=====================================
cnvs/nk2edf.cpp
=====================================
@@ -660,7 +660,7 @@ int UI_NK2EDFwindow::convert_nk2edf(FILE *inputfile, FILE *outputfile, FILE *pnt
char *buf,
*annotations,
- scratchpad[48];
+ scratchpad[256];
/************************* filter events ******************************************/
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+edfbrowser (2.05+dfsg-1) unstable; urgency=medium
+
+ * New upstream version
+
+ -- Étienne Mollier <emollier at debian.org> Sun, 24 Sep 2023 21:40:24 +0200
+
edfbrowser (2.04+dfsg-1) unstable; urgency=medium
* New upstream version 2.04+dfsg
=====================================
doc/manual.html
=====================================
@@ -21,7 +21,7 @@
</style>
</head><body>
-<h1>EDFbrowser 2.04 manual</h1>
+<h1>EDFbrowser 2.05 manual</h1>
<p><br></p>
@@ -2171,6 +2171,10 @@
<td class="border">FILe:STOp</td>
<td class="border">Stop playback</td>
</tr>
+ <tr class="border">
+ <td class="border">STReam:OPEn <path></td>
+ <td class="border">Opens a streaming file</td>
+ </tr>
<tr class="border">
<td class="border">MONtage:LOAd <path> <file number></td>
<td class="border">Loads a montage file and applies it to the file "file number", file number indicates which one of the opened files, must be in the range 1 - 32<br>
@@ -2337,6 +2341,10 @@
<td class="border">108</td>
<td class="border">File has a formatting error</td>
</tr>
+ <tr class="border">
+ <td class="border">109</td>
+ <td class="border">Cannot open a streaming file when there's already a file open</td>
+ </tr>
<tr class="border">
<td class="border">201</td>
<td class="border">Command syntax error</td>
=====================================
fir_filter_dialog.cpp
=====================================
@@ -586,7 +586,7 @@ void UI_FIRFilterDialog::check_text()
snprintf(filter_description_txt_2, 512, "Customized or user provided coefficients");
}
- textEdit->setMinimumWidth((max_len + 2) * mainwindow->norm_font_pixel_width);
+ textEdit->setMinimumWidth((max_len + 4) * mainwindow->norm_font_pixel_width);
err = fir_filter_freqz(taps, n_taps, z, deg, FIR_FILTER_MAX_MEAS_PNTS);
if(err)
=====================================
global.h
=====================================
@@ -63,7 +63,7 @@
#endif
#define PROGRAM_NAME "EDFbrowser"
-#define PROGRAM_VERSION "2.04"
+#define PROGRAM_VERSION "2.05"
#define PROGRAM_BETA_SUFFIX ""
#define MINIMUM_QT4_VERSION (0x040807)
#define MINIMUM_QT5_VERSION (0x050C06)
@@ -150,8 +150,9 @@
#define RC_CMD_SESSION (31)
#define RC_CMD_PLAY (32)
#define RC_CMD_STOP (33)
+#define RC_CMD_STREAM (34)
-#define RC_CMD_LIST_SZ (34)
+#define RC_CMD_LIST_SZ (35)
#define RC_CMD_QUERY (1 << 8)
#define RC_ERR_QUEUE_SZ (64)
=====================================
load_montage_dialog.cpp
=====================================
@@ -108,7 +108,7 @@ UI_LoadMontagewindow::UI_LoadMontagewindow(QWidget *w_parent, char *path)
int UI_LoadMontagewindow::LoadButtonClicked()
{
- int i, k, n=0, p, r,
+ int i, j, k, n=0, p, r,
tmp,
skip,
found,
@@ -138,7 +138,10 @@ int UI_LoadMontagewindow::LoadButtonClicked()
not_compatibel,
sf,
n_taps,
- sense;
+ sense,
+ hdr_idx=0,
+ sigcomp_idx=0,
+ inst_num=0;
char result[XML_STRBUFLEN],
scratchpad[2048]="",
@@ -229,6 +232,18 @@ int UI_LoadMontagewindow::LoadButtonClicked()
}
}
+ for(i=0; i<MAXAEEGDOCKS; i++)
+ {
+ p = mainwindow->signalcomp[k]->aeeg_idx[i];
+
+ if(p != 0)
+ {
+ delete mainwindow->aeeg_dock[p - 1];
+
+ mainwindow->aeeg_dock[p - 1] = NULL;
+ }
+ }
+
for(i=0; i<MAXSPECTRUMDOCKS; i++)
{
if(mainwindow->spectrumdock[i]->signalcomp == mainwindow->signalcomp[k])
@@ -262,6 +277,40 @@ int UI_LoadMontagewindow::LoadButtonClicked()
}
}
+ for(i=0; i<MAXHYPNOGRAMDOCKS; i++)
+ {
+ inst_num = edf_hdr->hypnogram_idx[i];
+
+ if(inst_num > 0)
+ {
+ if(mainwindow->hypnogram_dock[inst_num - 1] != NULL)
+ {
+ delete mainwindow->hypnogram_dock[inst_num - 1];
+
+ mainwindow->hypnogram_dock[inst_num - 1] = NULL;
+ }
+
+ edf_hdr->hypnogram_idx[i] = 0;
+ }
+ }
+
+ for(i=0; i<MAXHRVDOCKS; i++)
+ {
+ inst_num = edf_hdr->hrv_dock[i];
+
+ if(inst_num > 0)
+ {
+ if(mainwindow->hrv_dock[inst_num - 1] != NULL)
+ {
+ delete mainwindow->hrv_dock[inst_num - 1];
+
+ mainwindow->hrv_dock[inst_num - 1] = NULL;
+ }
+
+ edf_hdr->hrv_dock[i] = 0;
+ }
+ }
+
if(mainwindow->signalcomp[k]->hascursor2)
{
/* crosshair_2_active = 0;
@@ -2284,6 +2333,755 @@ int UI_LoadMontagewindow::LoadButtonClicked()
}
}
+ xml_goto_root(xml_hdl);
+
+ hypnogram_dock_param_t hypnogram_param;
+
+ memset(&hypnogram_param, 0, sizeof(hypnogram_dock_param_t));
+
+ for(i=0; i<MAXHYPNOGRAMDOCKS; i++)
+ {
+ if(!(xml_goto_nth_element_inside(xml_hdl, "hypnogram", i)))
+ {
+ memset(&hypnogram_param, 0, sizeof(hypnogram_dock_param_t));
+
+ if(xml_goto_nth_element_inside(xml_hdl, "instance_num", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ hypnogram_param.instance_num = atoi(result);
+ if((hypnogram_param.instance_num < 0) || (hypnogram_param.instance_num >= MAXHYPNOGRAMDOCKS))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "hdr_idx", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ hdr_idx = atoi(result);
+ if((hdr_idx < 0) || (hdr_idx >= mainwindow->files_open))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ hypnogram_param.edfhdr = mainwindow->edfheaderlist[hdr_idx];
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(!xml_goto_nth_element_inside(xml_hdl, "hypnogram_use_epoch_len", 0))
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ hypnogram_param.use_epoch_len = atoi(result);
+ if(hypnogram_param.use_epoch_len != 1)
+ {
+ hypnogram_param.use_epoch_len = 0;
+ }
+
+ mainwindow->hypnogram_use_epoch_len = hypnogram_param.use_epoch_len;
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(!xml_goto_nth_element_inside(xml_hdl, "use_overlays", 0))
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ hypnogram_param.use_overlays = atoi(result);
+ if(hypnogram_param.use_overlays != 1)
+ {
+ hypnogram_param.use_overlays = 0;
+ }
+
+ mainwindow->hypnogram_use_overlays = hypnogram_param.use_overlays;
+
+ xml_go_up(xml_hdl);
+ }
+
+ for(j=0; j<HYPNOGRAM_STAGENUM; j++)
+ {
+ if(xml_goto_nth_element_inside(xml_hdl, "stage_name", j))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ strlcpy(hypnogram_param.stage_name[j], result, 32);
+
+ strlcpy(mainwindow->hypnogram_stage_name[j], hypnogram_param.stage_name[j], 32);
+
+ xml_go_up(xml_hdl);
+ }
+
+ for(j=0; j<HYPNOGRAM_STAGENUM; j++)
+ {
+ if(xml_goto_nth_element_inside(xml_hdl, "annot_name", j))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ strlcpy(hypnogram_param.annot_name[j], result, 32);
+
+ strlcpy(mainwindow->hypnogram_annot_name[j], hypnogram_param.annot_name[j], 32);
+
+ xml_go_up(xml_hdl);
+ }
+
+ for(j=0; j<HYPNOGRAM_OVNUM; j++)
+ {
+ if(!xml_goto_nth_element_inside(xml_hdl, "annot_ov_name", j))
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ strlcpy(hypnogram_param.annot_ov_name[j], result, 32);
+
+ strlcpy(mainwindow->hypnogram_annot_ov_name[j], hypnogram_param.annot_ov_name[j], 32);
+
+ xml_go_up(xml_hdl);
+ }
+ }
+
+ for(j=0; j<HYPNOGRAM_OVNUM; j++)
+ {
+ mainwindow->get_rgbcolor_settings(xml_hdl, "annot_ov_color", j, &mainwindow->hypnogram_annot_ov_color[j]);
+
+ hypnogram_param.annot_ov_color[j].r = mainwindow->hypnogram_annot_ov_color[j].red();
+ hypnogram_param.annot_ov_color[j].g = mainwindow->hypnogram_annot_ov_color[j].green();
+ hypnogram_param.annot_ov_color[j].b = mainwindow->hypnogram_annot_ov_color[j].blue();
+ hypnogram_param.annot_ov_color[j].a = mainwindow->hypnogram_annot_ov_color[j].alpha();
+ }
+
+ hypnogram_param.mainwindow = mainwindow;
+
+ mainwindow->hypnogram_dock[hypnogram_param.instance_num] = new UI_hypnogram_dock(mainwindow, hypnogram_param);
+
+ mainwindow->addToolBar(Qt::BottomToolBarArea, mainwindow->hypnogram_dock[hypnogram_param.instance_num]->hypnogram_dock);
+
+ mainwindow->insertToolBarBreak(mainwindow->hypnogram_dock[hypnogram_param.instance_num]->hypnogram_dock);
+
+ hypnogram_param.edfhdr->hypnogram_idx[hypnogram_param.instance_num] = hypnogram_param.instance_num + 1;
+
+ QObject::connect(mainwindow, SIGNAL(annot_docklist_changed()), mainwindow->hypnogram_dock[hypnogram_param.instance_num], SLOT(update_curve()));
+
+ xml_go_up(xml_hdl);
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ xml_goto_root(xml_hdl);
+
+ cdsa_dock_param_t cdsa_param;
+
+ memset(&cdsa_param, 0, sizeof(cdsa_dock_param_t));
+
+ for(i=0; i<MAXCDSADOCKS; i++)
+ {
+ if(!(xml_goto_nth_element_inside(xml_hdl, "cdsa", i)))
+ {
+ memset(&cdsa_param, 0, sizeof(cdsa_dock_param_t));
+
+ if(xml_goto_nth_element_inside(xml_hdl, "instance_num", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.instance_num = atoi(result);
+ if((cdsa_param.instance_num < 0) || (cdsa_param.instance_num >= MAXCDSADOCKS))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "sigcomp_idx", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ sigcomp_idx = atoi(result);
+ if((sigcomp_idx < 0) || (sigcomp_idx >= mainwindow->signalcomps))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ cdsa_param.signalcomp = mainwindow->signalcomp[sigcomp_idx];
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "min_hz", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.min_hz = atoi(result);
+ if(cdsa_param.min_hz < 0)
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "max_hz", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.max_hz = atoi(result);
+ if(cdsa_param.max_hz < 0)
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "segment_len", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.segment_len = atoi(result);
+ if((cdsa_param.segment_len < 5) || (cdsa_param.segment_len > 300))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "block_len", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.block_len = atoi(result);
+ if((cdsa_param.block_len < 1) || (cdsa_param.block_len > 10))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "overlap", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.overlap = atoi(result);
+ if((cdsa_param.overlap < 1) || (cdsa_param.overlap > 5))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "window_func", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.window_func = atoi(result);
+ if((cdsa_param.window_func < 0) || (cdsa_param.window_func > 12))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "max_voltage", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.max_voltage = atof(result);
+ if((cdsa_param.max_voltage < 1.0e-7) || (cdsa_param.max_voltage > 1.0e5))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "max_pwr", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.max_pwr = atoi(result);
+ if((cdsa_param.max_pwr < -159) || (cdsa_param.max_pwr > 160))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "min_pwr", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.min_pwr = atoi(result);
+ if((cdsa_param.min_pwr < -160) || (cdsa_param.min_pwr > 159))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "log", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.log = atoi(result);
+ if((cdsa_param.log < 0) || (cdsa_param.log > 1))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "power_voltage", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ cdsa_param.power_voltage = atoi(result);
+ if((cdsa_param.power_voltage < 0) || (cdsa_param.power_voltage > 1))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if((!mainwindow->files_open) || (!mainwindow->signalcomps) || (mainwindow->live_stream_active))
+ {
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ if(cdsa_param.signalcomp->ecg_filter != NULL)
+ {
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ if(cdsa_param.signalcomp->edfhdr->edfparam[cdsa_param.signalcomp->edfsignal[0]].sf_int < 30)
+ {
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ if(cdsa_param.signalcomp->edfhdr->recording_len_sec < 30)
+ {
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ for(j=0; j<MAXCDSADOCKS; j++)
+ {
+ if(mainwindow->cdsa_dock[j] == NULL)
+ {
+ UI_cdsa_window wndw(mainwindow, cdsa_param.signalcomp, j, &cdsa_param);
+ break;
+ }
+ }
+
+ xml_go_up(xml_hdl);
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ xml_goto_root(xml_hdl);
+
+ aeeg_dock_param_t aeeg_param;
+
+ memset(&aeeg_param, 0, sizeof(aeeg_dock_param_t));
+
+ for(i=0; i<MAXAEEGDOCKS; i++)
+ {
+ if(!(xml_goto_nth_element_inside(xml_hdl, "aeeg", i)))
+ {
+ memset(&aeeg_param, 0, sizeof(aeeg_dock_param_t));
+
+ if(xml_goto_nth_element_inside(xml_hdl, "instance_num", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ aeeg_param.instance_num = atoi(result);
+ if((aeeg_param.instance_num < 0) || (aeeg_param.instance_num >= MAXAEEGDOCKS))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "sigcomp_idx", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ sigcomp_idx = atoi(result);
+ if((sigcomp_idx < 0) || (sigcomp_idx >= mainwindow->signalcomps))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ aeeg_param.signalcomp = mainwindow->signalcomp[sigcomp_idx];
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "bp_min_hz", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ aeeg_param.bp_min_hz = atof(result);
+ if(aeeg_param.bp_min_hz < 1)
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "bp_max_hz", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ aeeg_param.bp_max_hz = atof(result);
+ if(aeeg_param.bp_max_hz < 2)
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "segment_len", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ aeeg_param.segment_len = atoi(result);
+ if((aeeg_param.segment_len < 5) || (aeeg_param.segment_len > 300))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "lp_hz", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ aeeg_param.lp_hz = atof(result);
+ if((aeeg_param.lp_hz < 0.00999) || (aeeg_param.lp_hz > 5.001))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "scale_max_amp", 0))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ aeeg_param.scale_max_amp = atof(result);
+ if((aeeg_param.scale_max_amp < 9.999) || (aeeg_param.scale_max_amp > 500.001))
+ {
+ xml_go_up(xml_hdl);
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "plot_margins", 0))
+ {
+ aeeg_param.plot_margins = 1;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ return format_error(__FILE__, __LINE__, NULL, xml_hdl);
+ }
+
+ aeeg_param.plot_margins = atoi(result);
+ if(aeeg_param.plot_margins != 0)
+ {
+ aeeg_param.plot_margins = 1;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if((!mainwindow->files_open) || (!mainwindow->signalcomps) || (mainwindow->live_stream_active))
+ {
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ if(aeeg_param.signalcomp->ecg_filter != NULL)
+ {
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ if(aeeg_param.signalcomp->edfhdr->edfparam[aeeg_param.signalcomp->edfsignal[0]].sf_f < 99.999)
+ {
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ if(aeeg_param.signalcomp->edfhdr->recording_len_sec < 300)
+ {
+ xml_go_up(xml_hdl);
+ continue;
+ }
+
+ for(j=0; j<MAXAEEGDOCKS; j++)
+ {
+ if(mainwindow->aeeg_dock[j] == NULL)
+ {
+ UI_aeeg_window wndw(mainwindow, aeeg_param.signalcomp, j, &aeeg_param);
+ break;
+ }
+ }
+
+ xml_go_up(xml_hdl);
+ }
+ else
+ {
+ break;
+ }
+ }
+
xml_close(xml_hdl);
if(LoadMontageDialog!=NULL) LoadMontageDialog->close();
=====================================
mainwindow.cpp
=====================================
@@ -201,6 +201,8 @@ void UI_Mainwindow::open_stream()
live_stream_active = 1;
+ live_stream_active_paused = 0;
+
open_new_file();
if(files_open == 1)
@@ -211,17 +213,18 @@ void UI_Mainwindow::open_stream()
windowmenu->actions().at(0)->setEnabled(false); // Annotations window
windowmenu->actions().at(1)->setEnabled(false); // Annotation editor
former_page_Act->setEnabled(false);
- shift_page_left_Act->setEnabled(false);
- shift_page_right_Act->setEnabled(false);
+// shift_page_left_Act->setEnabled(false);
+// shift_page_right_Act->setEnabled(false);
next_page_Act->setEnabled(false);
// shift_page_up_Act->setEnabled(false);
// shift_page_down_Act->setEnabled(false);
printmenu->setEnabled(false);
recent_filesmenu->setEnabled(false);
recent_session_menu->setEnabled(false);
- playback_file_Act->setEnabled(false);
+// playback_file_Act->setEnabled(false);
live_stream_timer->start(live_stream_update_interval);
+ playback_file_Act->setIcon(QIcon(":/images/media-playback-pause-symbolic.symbolic.png"));
}
else
{
@@ -1297,6 +1300,19 @@ void UI_Mainwindow::playback_file()
if(live_stream_active)
{
+ if(live_stream_active_paused)
+ {
+ live_stream_timer->start(live_stream_update_interval);
+ live_stream_active_paused = 0;
+ playback_file_Act->setIcon(QIcon(":/images/media-playback-pause-symbolic.symbolic.png"));
+ }
+ else
+ {
+ live_stream_timer->stop();
+ live_stream_active_paused = 1;
+ playback_file_Act->setIcon(QIcon(":/images/media-playback-start-symbolic.symbolic.png"));
+ }
+
return;
}
@@ -2374,7 +2390,7 @@ void UI_Mainwindow::remove_all_filters()
strlcpy(signalcomp[i]->signallabel, signalcomp[i]->signallabel_bu, 512);
signalcomp[i]->signallabellen = signalcomp[i]->signallabellen_bu;
- strlcpy(signalcomp[i]->physdimension, signalcomp[i]->physdimension_bu, 512);
+ strlcpy(signalcomp[i]->physdimension, signalcomp[i]->physdimension_bu, 9);
}
if(signalcomp[i]->zratio_filter != NULL)
@@ -2385,7 +2401,7 @@ void UI_Mainwindow::remove_all_filters()
strlcpy(signalcomp[i]->signallabel, signalcomp[i]->signallabel_bu, 512);
signalcomp[i]->signallabellen = signalcomp[i]->signallabellen_bu;
- strlcpy(signalcomp[i]->physdimension, signalcomp[i]->physdimension_bu, 512);
+ strlcpy(signalcomp[i]->physdimension, signalcomp[i]->physdimension_bu, 9);
}
}
@@ -2855,7 +2871,7 @@ void UI_Mainwindow::close_file_action_func(QAction *action)
strlcpy(signalcomp[j]->signallabel, signalcomp[j]->signallabel_bu, 512);
signalcomp[j]->signallabellen = signalcomp[j]->signallabellen_bu;
- strlcpy(signalcomp[j]->physdimension, signalcomp[j]->physdimension_bu, 512);
+ strlcpy(signalcomp[j]->physdimension, signalcomp[j]->physdimension_bu, 9);
}
for(k=0; k<signalcomp[j]->fidfilter_cnt; k++)
@@ -2959,7 +2975,9 @@ void UI_Mainwindow::close_all_files()
toolbar_stats.active = 0;
nav_toolbar_label->setText("");
live_stream_active = 0;
+ live_stream_active_paused = 0;
live_stream_timer->stop();
+ playback_file_Act->setIcon(QIcon(":/images/media-playback-start-symbolic.symbolic.png"));
toolsmenu->setEnabled(true);
timemenu->setEnabled(true);
// windowmenu->setEnabled(true);
@@ -4508,6 +4526,7 @@ void UI_Mainwindow::show_kb_shortcuts()
"F1 - F8\t\tload predefined montage\n"
"Alt+Shift+C\tcrosshair (repeat for second crosshair)\n"
"Esc\t\tremove crosshairs or floating ruler\n"
+ "Ctrl+M\t\ttoggle annotation markers\n"
"\nafter zooming in by drawing a rectangle:\n"
"Backspace\t\tzoom back\n"
@@ -5191,7 +5210,7 @@ void UI_Mainwindow::remove_signalcomp(int signal_nr)
strlcpy(signalcomp[signal_nr]->signallabel, signalcomp[signal_nr]->signallabel_bu, 512);
signalcomp[signal_nr]->signallabellen = signalcomp[signal_nr]->signallabellen_bu;
- strlcpy(signalcomp[signal_nr]->physdimension, signalcomp[signal_nr]->physdimension_bu, 32);
+ strlcpy(signalcomp[signal_nr]->physdimension, signalcomp[signal_nr]->physdimension_bu, 9);
}
if(signalcomp[signal_nr]->zratio_filter != NULL)
=====================================
mainwindow.h
=====================================
@@ -202,6 +202,7 @@ public:
read_biosemi_status_signal,
read_nk_trigger_signal,
live_stream_active,
+ live_stream_active_paused,
playback_realtime_active,
live_stream_update_interval,
signal_averaging_active,
@@ -294,7 +295,8 @@ public:
display_pagetime_mmsec,
mc_v_scrollarea_ratio,
mc_v_scrollarea_auto,
- mc_v_scrollarea_max_signals;
+ mc_v_scrollarea_max_signals,
+ default_invert_eeg_signals;
volatile int rc_cmd_in_progress;
@@ -675,6 +677,7 @@ private:
int mpr_read(char *, int);
int parse_rc_command(const char *, char [CMD_MAX_SUB_CMDS][CMD_PARSE_STR_LEN], int *, char *, int);
int process_rc_cmd_file(const char *, int *, int);
+ int process_rc_cmd_stream(const char *, int *, int);
int process_rc_cmd_montage(const char *, int *, int);
int process_rc_cmd_session(const char *, int *, int);
int process_rc_cmd_signal(const char *, int *, int);
=====================================
mainwindow_constr.cpp
=====================================
@@ -118,6 +118,8 @@ UI_Mainwindow::UI_Mainwindow()
live_stream_active = 0;
+ live_stream_active_paused = 0;
+
playback_realtime_active = 0;
signal_averaging_active = 0;
@@ -195,13 +197,13 @@ UI_Mainwindow::UI_Mainwindow()
annot_editor_user_button_onset_on_page_middle[i] = 0;
annot_edit_user_button_name[i][0] = 0;
}
- strlcpy(annot_edit_user_button_name[0], "W", 64);
- strlcpy(annot_edit_user_button_name[1], "R", 64);
- strlcpy(annot_edit_user_button_name[2], "N1", 64);
- strlcpy(annot_edit_user_button_name[3], "N2", 64);
- strlcpy(annot_edit_user_button_name[4], "N3", 64);
- strlcpy(annot_edit_user_button_name[5], "N4", 64);
- strlcpy(annot_edit_user_button_name[6], "N5", 64);
+ strlcpy(annot_edit_user_button_name[0], "W", 32);
+ strlcpy(annot_edit_user_button_name[1], "R", 32);
+ strlcpy(annot_edit_user_button_name[2], "N1", 32);
+ strlcpy(annot_edit_user_button_name[3], "N2", 32);
+ strlcpy(annot_edit_user_button_name[4], "N3", 32);
+ strlcpy(annot_edit_user_button_name[5], "N4", 32);
+ strlcpy(annot_edit_user_button_name[6], "N5", 32);
for(i=0; i<MAX_ANNOTEDIT_SIDE_MENU_ANNOTS; i++)
{
annot_by_rect_draw_description[i][0] = 0;
@@ -368,6 +370,8 @@ UI_Mainwindow::UI_Mainwindow()
rc_system_locked = 0;
+ default_invert_eeg_signals = 0;
+
session_start_video = 0;
session_video_starttime = 0;
@@ -1006,6 +1010,11 @@ UI_Mainwindow::UI_Mainwindow()
view_markers_act = new QAction("Annotation Markers", this);
view_markers_act->setCheckable(true);
+#if QT_VERSION < 0x060000
+ view_markers_act->setShortcut(Qt::CTRL + Qt::Key_M);
+#else
+ view_markers_act->setShortcut(Qt::CTRL | Qt::Key_M);
+#endif
if(show_annot_markers)
{
view_markers_act->setChecked(true);
=====================================
options_dialog.cpp
=====================================
@@ -235,11 +235,15 @@ UI_OptionsDialog::UI_OptionsDialog(QWidget *w_parent)
{
checkbox2_3->setCheckState(Qt::Unchecked);
}
+ checkbox2_3->setToolTip("If enabled and an annotation description is \"signal linked\" e.g. \"some event@@EEG F4\",\n"
+ "the annotation marker and overlay color will only be drawn over that trace instead of from top to bottom");
hlayout_tmp = new QHBoxLayout;
hlayout_tmp->setAlignment(Qt::AlignCenter);
hlayout_tmp->addWidget(checkbox2_3);
hlayout_tmp->addStretch(1000);
flayout1_2->addRow("Use signal linked annotations", hlayout_tmp);
+ flayout1_2->labelForField(hlayout_tmp)->setToolTip("If enabled and an annotation description is \"signal linked\" e.g. \"some event@@EEG F4\",\n"
+ "the annotation marker and overlay color will only be drawn over that trace instead of from top to bottom");
checkbox2_1 = new QCheckBox;
checkbox2_1->setTristate(false);
@@ -1318,6 +1322,25 @@ UI_OptionsDialog::UI_OptionsDialog(QWidget *w_parent)
QObject::connect(checkbox4_16, SIGNAL(stateChanged(int)), this, SLOT(checkbox4_16Clicked(int)));
QObject::connect(spinbox4_6, SIGNAL(valueChanged(int)), this, SLOT(spinbox4_6ValueChanged(int)));
+ checkbox4_18 = new QCheckBox;
+ checkbox4_18->setTristate(false);
+ checkbox4_18->setToolTip("When adding signals to display in the signals dialog and the signal label starts with \"EEG \", invert the plotting of the signal");
+ if(mainwindow->default_invert_eeg_signals)
+ {
+ checkbox4_18->setCheckState(Qt::Checked);
+ }
+ else
+ {
+ checkbox4_18->setCheckState(Qt::Unchecked);
+ }
+ hlayout_tmp = new QHBoxLayout;
+ hlayout_tmp->setAlignment(Qt::AlignCenter);
+ hlayout_tmp->addWidget(checkbox4_18);
+ hlayout_tmp->addStretch(1000);
+ flayout4_1->addRow("Invert EEG signals", hlayout_tmp);
+ flayout4_1->labelForField(hlayout_tmp)->setToolTip("When adding signals to display in the signals dialog and the signal label starts with \"EEG \", invert the plotting of the signal");
+ QObject::connect(checkbox4_18, SIGNAL(stateChanged(int)), this, SLOT(checkbox4_18Clicked(int)));
+
QFormLayout *flayout4_2 = new QFormLayout;
flayout4_2->setSpacing(20);
@@ -1625,9 +1648,12 @@ UI_OptionsDialog::UI_OptionsDialog(QWidget *w_parent)
hlayout_tmp = new QHBoxLayout;
hlayout_tmp->setAlignment(Qt::AlignCenter);
hlayout_tmp->addWidget(spinbox5_1);
+ hlayout_tmp->setAlignment(spinbox5_1, Qt::AlignTop);
hlayout_tmp->addWidget(textEdit5_1, 500);
+ hlayout_tmp->setAlignment(textEdit5_1, Qt::AlignTop);
hlayout_tmp->addStretch(100);
flayout5_1->addRow("Font size", hlayout_tmp);
+ ((QLabel *)(flayout5_1->labelForField(hlayout_tmp)))->setAlignment(Qt::AlignTop);
spinbox5_2 = new QSpinBox;
spinbox5_2->setRange(8, 24);
@@ -1639,9 +1665,12 @@ UI_OptionsDialog::UI_OptionsDialog(QWidget *w_parent)
hlayout_tmp = new QHBoxLayout;
hlayout_tmp->setAlignment(Qt::AlignCenter);
hlayout_tmp->addWidget(spinbox5_2);
+ hlayout_tmp->setAlignment(spinbox5_2, Qt::AlignTop);
hlayout_tmp->addWidget(textEdit5_2, 500);
+ hlayout_tmp->setAlignment(textEdit5_2, Qt::AlignTop);
hlayout_tmp->addStretch(100);
flayout5_1->addRow("Monofont size", hlayout_tmp);
+ ((QLabel *)(flayout5_1->labelForField(hlayout_tmp)))->setAlignment(Qt::AlignTop);
DefaultButton5 = new QPushButton;
#if QT_VERSION >= 0x050200
@@ -2327,6 +2356,19 @@ void UI_OptionsDialog::checkbox4_16Clicked(int state)
}
+void UI_OptionsDialog::checkbox4_18Clicked(int state)
+{
+ if(state==Qt::Checked)
+ {
+ mainwindow->default_invert_eeg_signals = 1;
+ }
+ else
+ {
+ mainwindow->default_invert_eeg_signals = 0;
+ }
+}
+
+
void UI_OptionsDialog::checkbox4_13Clicked(int state)
{
if(state==Qt::Checked)
=====================================
options_dialog.h
=====================================
@@ -136,6 +136,7 @@ QCheckBox *checkbox1,
*checkbox4_15,
*checkbox4_16,
*checkbox4_17,
+ *checkbox4_18,
*checkbox2_1,
*checkbox2_2,
*checkbox2_3,
@@ -226,6 +227,7 @@ void checkbox4_14Clicked(int);
void checkbox4_15Clicked(int);
void checkbox4_16Clicked(int);
void checkbox4_17Clicked(int);
+void checkbox4_18Clicked(int);
void checkbox7_2Clicked(int);
void checkbox7_3Clicked(int);
void checkbox7_4Clicked(int);
=====================================
rc_host.cpp
=====================================
@@ -66,7 +66,8 @@ const char rc_cmd_key_lst[RC_CMD_LIST_SZ][32]=
"MODE", /* 30 */
"SESSION", /* 31 */
"PLAY", /* 32 */
- "STOP" /* 33 */
+ "STOP", /* 33 */
+ "STREAM" /* 34 */
};
@@ -165,7 +166,7 @@ void UI_Mainwindow::rc_host_sock_rxdata_handler()
static int rx_idx=0;
- char tx_msg_str[1024]="",
+ char tx_msg_str[2048]="",
cmd_args[1024]="",
cmds_parsed[CMD_MAX_SUB_CMDS][CMD_PARSE_STR_LEN]={"","","","","","","",""};
@@ -275,7 +276,7 @@ void UI_Mainwindow::rc_host_sock_rxdata_handler()
register_rc_err(203);
continue;
}
- len = snprintf(tx_msg_str, 1024,
+ len = snprintf(tx_msg_str, 2048,
"*LIST?\n"
"*IDN?\n"
"*QUIT\n"
@@ -286,6 +287,7 @@ void UI_Mainwindow::rc_host_sock_rxdata_handler()
"FILe:CLOse:ALL\n"
"FILe:PLAy\n"
"FILe:STOp\n"
+ "STReam:OPEn <path>\n"
"MONtage:LOAd <path>\n"
"SESsion:LOAd <path>\n"
"SIGnal:ADD:LABel <label> <file number>\n"
@@ -376,6 +378,16 @@ void UI_Mainwindow::rc_host_sock_rxdata_handler()
continue;
}
+ if((cmds_parsed_key[0] & RC_CMD_MASK) == RC_CMD_STREAM)
+ {
+ err = process_rc_cmd_stream(cmd_args, cmds_parsed_key, n_sub_cmds);
+ if(err)
+ {
+ register_rc_err(err);
+ }
+ continue;
+ }
+
if((cmds_parsed_key[0] & RC_CMD_MASK) == RC_CMD_MONTAGE)
{
err = process_rc_cmd_montage(cmd_args, cmds_parsed_key, n_sub_cmds);
@@ -646,7 +658,7 @@ int UI_Mainwindow::process_rc_cmd_file(const char *cmd_args, int *cmds_parsed_ke
{
if(n_sub_cmds == 2)
{
- if((!files_open) || live_stream_active) return 205;
+ if(!files_open) return 205;
playback_file();
return 0;
@@ -675,6 +687,40 @@ int UI_Mainwindow::process_rc_cmd_file(const char *cmd_args, int *cmds_parsed_ke
}
+int UI_Mainwindow::process_rc_cmd_stream(const char *cmd_args, int *cmds_parsed_key, int n_sub_cmds)
+{
+ if(n_sub_cmds < 2)
+ {
+ return 202;
+ }
+
+ if(cmds_parsed_key[1] == RC_CMD_OPEN)
+ {
+ if(n_sub_cmds == 2)
+ {
+ if(!strlen(cmd_args))
+ {
+ return 204;
+ }
+ if(files_open) return 109;
+
+ strlcpy(drop_path, cmd_args, MAX_PATH_LENGTH);
+ rc_file_open_requested = 1;
+ open_stream();
+ drop_path[0] = 0;
+ rc_file_open_requested = 0;
+ return rc_file_open_err;
+ }
+ else
+ {
+ return 202;
+ }
+ }
+
+ return 202;
+}
+
+
int UI_Mainwindow::process_rc_cmd_montage(const char *cmd_args, int *cmds_parsed_key, int n_sub_cmds)
{
int err, file_num=0;
=====================================
read_write_settings.cpp
=====================================
@@ -989,6 +989,23 @@ void UI_Mainwindow::read_general_settings()
xml_go_up(xml_hdl);
}
+ if(!(xml_goto_nth_element_inside(xml_hdl, "default_invert_eeg_signals", 0)))
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ xml_close(xml_hdl);
+ return;
+ }
+
+ default_invert_eeg_signals = atoi(result);
+ if(default_invert_eeg_signals != 1)
+ {
+ default_invert_eeg_signals = 0;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
if(!(xml_goto_nth_element_inside(xml_hdl, "spectrummarkerblock", 0)))
{
if(xml_goto_nth_element_inside(xml_hdl, "items", 0))
@@ -3414,6 +3431,9 @@ void UI_Mainwindow::write_settings()
fprintf(cfgfile, " <strip_label_types>%i</strip_label_types>\n",
strip_label_types);
+ fprintf(cfgfile, " <default_invert_eeg_signals>%i</default_invert_eeg_signals>\n",
+ default_invert_eeg_signals);
+
#ifdef Q_OS_WIN32
__mingw_fprintf(cfgfile, " <maxfilesize_to_readin_annotations>%lli</maxfilesize_to_readin_annotations>\n",
maxfilesize_to_readin_annotations);
=====================================
save_montage_dialog.cpp
=====================================
@@ -104,7 +104,9 @@ UI_SaveMontagewindow::UI_SaveMontagewindow(QWidget *w_parent)
void UI_SaveMontagewindow::SaveButtonClicked()
{
int i, j, k, n, r,
- use_index=0;
+ use_index=0,
+ hdr_idx=0,
+ sigcomp_idx=0;
char mtg_path[MAX_PATH_LENGTH];
@@ -431,6 +433,145 @@ void UI_SaveMontagewindow::SaveButtonClicked()
}
}
+ for(i=0; i<MAXHYPNOGRAMDOCKS; i++)
+ {
+ if(mainwindow->hypnogram_dock[i] == NULL) continue;
+
+ for(hdr_idx=0; hdr_idx<mainwindow->files_open; hdr_idx++)
+ {
+ if(mainwindow->edfheaderlist[hdr_idx] == mainwindow->hypnogram_dock[i]->param.edfhdr)
+ {
+ break;
+ }
+ }
+ if(hdr_idx == mainwindow->files_open) continue;
+
+ fprintf(mtgfile, " <hypnogram>\n");
+
+ fprintf(mtgfile, " <instance_num>%i</instance_num>\n", mainwindow->hypnogram_dock[i]->param.instance_num);
+
+ for(j=0; j<HYPNOGRAM_STAGENUM; j++)
+ {
+ fprintf(mtgfile, " <stage_name>");
+ xml_fwrite_encode_entity(mtgfile, mainwindow->hypnogram_dock[i]->param.stage_name[j]);
+ fprintf(mtgfile, "</stage_name>\n");
+ }
+
+ for(j=0; j<HYPNOGRAM_STAGENUM; j++)
+ {
+ fprintf(mtgfile, " <annot_name>");
+ xml_fwrite_encode_entity(mtgfile, mainwindow->hypnogram_dock[i]->param.annot_name[j]);
+ fprintf(mtgfile, "</annot_name>\n");
+ }
+
+ for(j=0; j<HYPNOGRAM_OVNUM; j++)
+ {
+ fprintf(mtgfile, " <annot_ov_name>");
+ xml_fwrite_encode_entity(mtgfile, mainwindow->hypnogram_dock[i]->param.annot_ov_name[j]);
+ fprintf(mtgfile, "</annot_ov_name>\n");
+ }
+
+ for(j=0; j<HYPNOGRAM_OVNUM; j++)
+ {
+ fprintf(mtgfile, " <annot_ov_color>\n"
+ " <red>%i</red>\n"
+ " <green>%i</green>\n"
+ " <blue>%i</blue>\n"
+ " <alpha>%i</alpha>\n"
+ " </annot_ov_color>\n",
+ mainwindow->hypnogram_dock[i]->param.annot_ov_color[j].r,
+ mainwindow->hypnogram_dock[i]->param.annot_ov_color[j].g,
+ mainwindow->hypnogram_dock[i]->param.annot_ov_color[j].b,
+ mainwindow->hypnogram_dock[i]->param.annot_ov_color[j].a);
+ }
+
+ fprintf(mtgfile, " <hypnogram_use_epoch_len>%i</hypnogram_use_epoch_len>\n", mainwindow->hypnogram_dock[i]->param.use_epoch_len);
+
+ fprintf(mtgfile, " <use_overlays>%i</use_overlays>\n", mainwindow->hypnogram_dock[i]->param.use_overlays);
+
+ fprintf(mtgfile, " <hdr_idx>%i</hdr_idx>\n", hdr_idx);
+
+ fprintf(mtgfile, " </hypnogram>\n");
+ }
+
+ for(i=0; i<MAXCDSADOCKS; i++)
+ {
+ if(mainwindow->cdsa_dock[i] == NULL) continue;
+
+ for(sigcomp_idx=0; sigcomp_idx<mainwindow->signalcomps; sigcomp_idx++)
+ {
+ if(mainwindow->signalcomp[sigcomp_idx] == mainwindow->cdsa_dock[i]->param.signalcomp)
+ {
+ break;
+ }
+ }
+ if(sigcomp_idx == mainwindow->signalcomps) continue;
+
+ fprintf(mtgfile, " <cdsa>\n");
+
+ fprintf(mtgfile, " <sigcomp_idx>%i</sigcomp_idx>\n", sigcomp_idx);
+
+ fprintf(mtgfile, " <min_hz>%i</min_hz>\n", mainwindow->cdsa_dock[i]->param.min_hz);
+
+ fprintf(mtgfile, " <max_hz>%i</max_hz>\n", mainwindow->cdsa_dock[i]->param.max_hz);
+
+ fprintf(mtgfile, " <segment_len>%i</segment_len>\n", mainwindow->cdsa_dock[i]->param.segment_len);
+
+ fprintf(mtgfile, " <block_len>%i</block_len>\n", mainwindow->cdsa_dock[i]->param.block_len);
+
+ fprintf(mtgfile, " <overlap>%i</overlap>\n", mainwindow->cdsa_dock[i]->param.overlap);
+
+ fprintf(mtgfile, " <window_func>%i</window_func>\n", mainwindow->cdsa_dock[i]->param.window_func);
+
+ fprintf(mtgfile, " <max_voltage>%.10e</max_voltage>\n", mainwindow->cdsa_dock[i]->param.max_voltage);
+
+ fprintf(mtgfile, " <max_pwr>%i</max_pwr>\n", mainwindow->cdsa_dock[i]->param.max_pwr);
+
+ fprintf(mtgfile, " <min_pwr>%i</min_pwr>\n", mainwindow->cdsa_dock[i]->param.min_pwr);
+
+ fprintf(mtgfile, " <log>%i</log>\n", mainwindow->cdsa_dock[i]->param.log);
+
+ fprintf(mtgfile, " <power_voltage>%i</power_voltage>\n", mainwindow->cdsa_dock[i]->param.power_voltage);
+
+ fprintf(mtgfile, " <instance_num>%i</instance_num>\n", mainwindow->cdsa_dock[i]->param.instance_num);
+
+ fprintf(mtgfile, " </cdsa>\n");
+ }
+
+ for(i=0; i<MAXAEEGDOCKS; i++)
+ {
+ if(mainwindow->aeeg_dock[i] == NULL) continue;
+
+ for(sigcomp_idx=0; sigcomp_idx<mainwindow->signalcomps; sigcomp_idx++)
+ {
+ if(mainwindow->signalcomp[sigcomp_idx] == mainwindow->aeeg_dock[i]->param.signalcomp)
+ {
+ break;
+ }
+ }
+ if(sigcomp_idx == mainwindow->signalcomps) continue;
+
+ fprintf(mtgfile, " <aeeg>\n");
+
+ fprintf(mtgfile, " <sigcomp_idx>%i</sigcomp_idx>\n", sigcomp_idx);
+
+ fprintf(mtgfile, " <bp_min_hz>%e</bp_min_hz>\n", mainwindow->aeeg_dock[i]->param.bp_min_hz);
+
+ fprintf(mtgfile, " <bp_max_hz>%e</bp_max_hz>\n", mainwindow->aeeg_dock[i]->param.bp_max_hz);
+
+ fprintf(mtgfile, " <segment_len>%i</segment_len>\n", mainwindow->aeeg_dock[i]->param.segment_len);
+
+ fprintf(mtgfile, " <lp_hz>%e</lp_hz>\n", mainwindow->aeeg_dock[i]->param.lp_hz);
+
+ fprintf(mtgfile, " <scale_max_amp>%e</scale_max_amp>\n", mainwindow->aeeg_dock[i]->param.scale_max_amp);
+
+ fprintf(mtgfile, " <plot_margins>%i</plot_margins>\n", mainwindow->aeeg_dock[i]->param.plot_margins);
+
+ fprintf(mtgfile, " <instance_num>%i</instance_num>\n", mainwindow->aeeg_dock[i]->param.instance_num);
+
+ fprintf(mtgfile, " </aeeg>\n");
+ }
+
fprintf(mtgfile, "</" PROGRAM_NAME "_montage>\n");
fclose(mtgfile);
=====================================
show_actual_montage_dialog.cpp
=====================================
@@ -437,7 +437,11 @@ UI_ShowActualMontagewindow::UI_ShowActualMontagewindow(QWidget *w_parent)
}
}
- snprintf(txtbuf, 2048, "timescale: %f seconds", (double)mainwindow->pagetime / (double)TIME_FIXP_SCALING);
+ snprintf(txtbuf, 2048, "Timescale: %i:%02i:%02i.%04i",
+ ((int)(mainwindow->pagetime / TIME_FIXP_SCALING)) / 3600,
+ (((int)(mainwindow->pagetime / TIME_FIXP_SCALING)) % 3600) / 60,
+ ((int)(mainwindow->pagetime / TIME_FIXP_SCALING)) % 60,
+ ((int)(mainwindow->pagetime % TIME_FIXP_SCALING)) / 1000);
remove_trailing_zeros(txtbuf);
parentItem->appendRow(new QStandardItem(txtbuf));
=====================================
signal_chooser.cpp
=====================================
@@ -325,7 +325,7 @@ void UI_SignalChooser::signalEdit()
void UI_SignalChooser::signalUp()
{
- int i, n,
+ int i, j, n,
size,
sigcomp_nr,
selected_signals[MAXSIGNALS];
@@ -361,6 +361,46 @@ void UI_SignalChooser::signalUp()
mainwindow->signalcomp[sigcomp_nr] = mainwindow->signalcomp[sigcomp_nr - 1];
mainwindow->signalcomp[sigcomp_nr - 1] = signalcomp;
+
+ for(j=0; j<MAXSPECTRUMDIALOGS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->spectr_dialog[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->spectr_dialog[j]--;
+ }
+ }
+
+ for(j=0; j<MAXCDSADOCKS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->cdsa_idx[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->cdsa_idx[j]--;
+ }
+ }
+
+ for(j=0; j<MAXAEEGDOCKS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->aeeg_idx[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->aeeg_idx[j]--;
+ }
+ }
+
+ for(j=0; j<MAXAVERAGECURVEDIALOGS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->avg_dialog[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->avg_dialog[j]--;
+ }
+ }
+
+ for(j=0; j<MAXZSCOREDIALOGS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->zscoredialog[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->zscoredialog[j]--;
+ }
+ }
}
load_signalcomps();
@@ -376,7 +416,7 @@ void UI_SignalChooser::signalUp()
void UI_SignalChooser::signalDown()
{
- int i, n,
+ int i, j, n,
size,
sigcomp_nr,
selected_signals[MAXSIGNALS];
@@ -414,6 +454,46 @@ void UI_SignalChooser::signalDown()
mainwindow->signalcomp[sigcomp_nr + 1] = signalcomp;
selected_signals[i] = sigcomp_nr;
+
+ for(j=0; j<MAXSPECTRUMDIALOGS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->spectr_dialog[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->spectr_dialog[j]++;
+ }
+ }
+
+ for(j=0; j<MAXCDSADOCKS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->cdsa_idx[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->cdsa_idx[j]++;
+ }
+ }
+
+ for(j=0; j<MAXAEEGDOCKS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->aeeg_idx[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->aeeg_idx[j]++;
+ }
+ }
+
+ for(j=0; j<MAXAVERAGECURVEDIALOGS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->avg_dialog[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->avg_dialog[j]++;
+ }
+ }
+
+ for(j=0; j<MAXZSCOREDIALOGS; j++)
+ {
+ if(mainwindow->signalcomp[sigcomp_nr]->zscoredialog[j] == (sigcomp_nr + 1))
+ {
+ mainwindow->signalcomp[sigcomp_nr]->zscoredialog[j]++;
+ }
+ }
}
load_signalcomps();
=====================================
signals_dialog.cpp
=====================================
@@ -395,14 +395,30 @@ void UI_Signalswindow::DisplayCompButtonClicked()
}
}
+ newsignalcomp->edfparam_0 = &newsignalcomp->edfhdr->edfparam[newsignalcomp->edfsignal[0]];
+
+ if(mainwindow->default_invert_eeg_signals)
+ {
+ if(strlen(newsignalcomp->signallabel) > 4)
+ {
+ if(!strncmp(newsignalcomp->signallabel, "EEG ", 4))
+ {
+ if(newsignalcomp->edfparam_0->bitvalue >= 0)
+ {
+ newsignalcomp->polarity *= -1;
+
+ newsignalcomp->screen_offset *= -1;
+ }
+ }
+ }
+ }
+
remove_trailing_spaces(newsignalcomp->signallabel);
newsignalcomp->signallabellen = strlen(newsignalcomp->signallabel);
- strlcpy(newsignalcomp->physdimension, newsignalcomp->edfhdr->edfparam[newsignalcomp->edfsignal[0]].physdimension, 9);
+ strlcpy(newsignalcomp->physdimension, newsignalcomp->edfparam_0->physdimension, 9);
remove_trailing_spaces(newsignalcomp->physdimension);
- newsignalcomp->edfparam_0 = &newsignalcomp->edfhdr->edfparam[newsignalcomp->edfsignal[0]];
-
mainwindow->signalcomp[mainwindow->signalcomps] = newsignalcomp;
mainwindow->signalcomps++;
@@ -481,12 +497,28 @@ void UI_Signalswindow::DisplayButtonClicked()
newsignalcomp->hasruler = 0;
newsignalcomp->polarity = 1;
- if(newsignalcomp->edfhdr->edfparam[s].bitvalue < 0.0)
+ if(newsignalcomp->edfhdr->edfparam[s].bitvalue < 0)
{
newsignalcomp->voltpercm *= -1;
}
newsignalcomp->sensitivity = newsignalcomp->edfhdr->edfparam[s].bitvalue / ((double)newsignalcomp->voltpercm * mainwindow->y_pixelsizefactor);
+ if(mainwindow->default_invert_eeg_signals)
+ {
+ if(strlen(newsignalcomp->edfhdr->edfparam[s].label) > 4)
+ {
+ if(!strncmp(newsignalcomp->edfhdr->edfparam[s].label, "EEG ", 4))
+ {
+ if(newsignalcomp->edfhdr->edfparam[s].bitvalue >= 0)
+ {
+ newsignalcomp->polarity *= -1;
+
+ newsignalcomp->screen_offset *= -1;
+ }
+ }
+ }
+ }
+
strlcpy(newsignalcomp->signallabel, newsignalcomp->edfhdr->edfparam[s].label, 256);
if(mainwindow->strip_label_types)
{
=====================================
utils.c
=====================================
@@ -2211,9 +2211,7 @@ char * strtok_r_e(char *str, const char *delim, char **saveptr)
* plus the length of src. While this may seem somewhat confusing,
* it was done to make truncation detection simple."
*/
-#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__FreeBSD__) || defined(__HAIKU__)
-/* nothing here */
-#else
+#ifdef HAS_NO_STRLC
int strlcpy(char *dst, const char *src, int sz)
{
int srclen;
=====================================
utils.h
=====================================
@@ -145,9 +145,10 @@ int t_lcm(int, int); /* returns least common multiple */
* plus the length of src. While this may seem somewhat confusing,
* it was done to make truncation detection simple."
*/
-#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__FreeBSD__) || defined(__HAIKU__)
+#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__FreeBSD__) || defined(__HAIKU__) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 38)) || (__GLIBC__ >= 3)
/* nothing here */
#else
+#define HAS_NO_STRLC
int strlcpy(char *, const char *, int);
int strlcat(char *, const char *, int);
#endif
=====================================
version.txt
=====================================
@@ -1,4 +1,21 @@
+ version 2.05 September 23, 2023
+ --------------
+
+ - Added keyboard shortcut Ctrl+M to toggle annotation markers.
+
+ - When saving a montage, if there's a aEEG/CDSA/Hypnogram instance present, save them as well into the montage file.
+
+ - Remote control: added command: STReam:OPEn
+
+ - Allow to pause fileposition updates during streaming.
+
+ - Options/Settings: added the option to enable to invert signals by default (when manually added in the signals dialog) and
+ if the signals are marked as EEG in the signal label.
+
+ - Fixed some compiler errors & warnings caused & revealed by GLIBC 2.38 & GCC 13.
+
+
version 2.04 May 20, 2023
--------------
=====================================
view_montage_dialog.cpp
=====================================
@@ -88,7 +88,7 @@ UI_ViewMontagewindow::UI_ViewMontagewindow(QWidget *w_parent)
void UI_ViewMontagewindow::SelectButtonClicked()
{
- int r,
+ int i, j, r,
signalcomps_read=0,
signals_read,
signal_cnt,
@@ -116,34 +116,66 @@ void UI_ViewMontagewindow::SelectButtonClicked()
holdoff=100,
plif_powerlinefrequency,
n_taps,
- idx_used=0;
+ idx_used=0,
+ hdr_idx=0,
+ sigcomp_idx=0,
+ min_hz=0,
+ max_hz=0,
+ segment_len=0,
+ block_len=0,
+ overlap=1,
+ window_func=0,
+ log=0,
+ power_voltage=0,
+ max_pwr=0,
+ min_pwr=0,
+ dftblocksize=0;
char result[XML_STRBUFLEN]="",
composition_txt[2048]="",
label[256]="",
str2[2048]="",
- str3[64]="";
+ str3[64]="",
+ e_file_path[MAXFILES][MAX_PATH_LENGTH];
double frequency,
frequency2,
voltpercm,
ripple,
- timescale,
d_tmp,
velocity,
factor[MAXSIGNALS],
- *fir_vars=NULL;
+ *fir_vars=NULL,
+ max_voltage=0,
+ bp_min_hz=0,
+ bp_max_hz=0,
+ lp_hz=0,
+ scale_max_amp=0;
+
+ long long timescale=0LL;
QStandardItem *parentItem,
*signalItem,
*filterItem,
*firfilterItem,
+ *powerspectrumdockItem,
+ *hypnogramItem,
+ *cdsaItem,
+ *aeegItem,
+ *tmp_item=NULL,
*math_item_before=NULL,
*math_item_after=NULL;
+ QColor tmp_color;
+
xml_hdl_t *xml_hdl;
+ for(i=0; i<MAXFILES; i++)
+ {
+ e_file_path[i][0] = 0;
+ }
+
strlcpy(mtg_path, QFileDialog::getOpenFileName(0, "Choose a montage", QString::fromLocal8Bit(mtg_dir), "Montage files (*.mtg *.MTG)").toLocal8Bit().data(), MAX_PATH_LENGTH);
if(!strcmp(mtg_path, ""))
@@ -1184,13 +1216,837 @@ void UI_ViewMontagewindow::SelectButtonClicked()
format_error(__FILE__, __LINE__, xml_hdl);
return;
}
- timescale = atof(result);
- timescale /= TIME_FIXP_SCALING;
- snprintf(composition_txt, 2048, "Timescale: %f seconds", timescale);
+ timescale = atoll(result);
+ snprintf(composition_txt, 2048, "Timescale: %i:%02i:%02i.%04i",
+ ((int)(timescale / TIME_FIXP_SCALING)) / 3600,
+ (((int)(timescale / TIME_FIXP_SCALING)) % 3600) / 60,
+ ((int)(timescale / TIME_FIXP_SCALING)) % 60,
+ ((int)(timescale % TIME_FIXP_SCALING)) / 1000);
remove_trailing_zeros(composition_txt);
parentItem->appendRow(new QStandardItem(composition_txt));
}
+ xml_goto_root(xml_hdl);
+
+ for(i=0; i<MAXSPECTRUMDOCKS; i++)
+ {
+ if(xml_goto_nth_element_inside(xml_hdl, "powerspectrumdock", i))
+ {
+ break;
+ }
+
+ powerspectrumdockItem = new QStandardItem("Power Spectrum");
+
+ parentItem->appendRow(powerspectrumdockItem);
+
+ if(xml_goto_nth_element_inside(xml_hdl, "signalnum", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ sigcomp_idx = atoi(result);
+ if(sigcomp_idx < 0)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Signal index: %i", sigcomp_idx + 1);
+ powerspectrumdockItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "dftblocksize", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ dftblocksize = atoi(result);
+ if(dftblocksize < 1)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "FFT blocksize: %i samples", dftblocksize);
+ powerspectrumdockItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "overlap", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ overlap = atoi(result);
+ if(overlap < 1)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ switch(overlap)
+ {
+ case 1 : powerspectrumdockItem->appendRow(new QStandardItem("Overlap: 0%"));
+ break;
+ case 2 : powerspectrumdockItem->appendRow(new QStandardItem("Overlap: 50%"));
+ break;
+ case 3 : powerspectrumdockItem->appendRow(new QStandardItem("Overlap: 67%"));
+ break;
+ case 4 : powerspectrumdockItem->appendRow(new QStandardItem("Overlap: 75%"));
+ break;
+ case 5 : powerspectrumdockItem->appendRow(new QStandardItem("Overlap: 80%"));
+ break;
+ default : powerspectrumdockItem->appendRow(new QStandardItem("Overlap: ??%"));
+ break;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "window_type", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ window_func = atoi(result);
+ if((window_func < 0) || (window_func > 12))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ switch(window_func)
+ {
+ case FFT_WNDW_TYPE_RECT : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: None"));
+ break;
+ case FFT_WNDW_TYPE_HAMMING : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: Hamming"));
+ break;
+ case FFT_WNDW_TYPE_4TERM_BLACKMANHARRIS : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: 4-term Blackman-Harris"));
+ break;
+ case FFT_WNDW_TYPE_7TERM_BLACKMANHARRIS : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: 7-term Blackman-Harris"));
+ break;
+ case FFT_WNDW_TYPE_NUTTALL3B : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: Nuttall3b"));
+ break;
+ case FFT_WNDW_TYPE_NUTTALL4C : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: Nuttall4c"));
+ break;
+ case FFT_WNDW_TYPE_HANN : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: Hann"));
+ break;
+ case FFT_WNDW_TYPE_HFT223D : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: HFT223D"));
+ break;
+ case FFT_WNDW_TYPE_HFT95 : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: HFT95"));
+ break;
+ case FFT_WNDW_TYPE_KAISER_A2 : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: Kaiser2"));
+ break;
+ case FFT_WNDW_TYPE_KAISER_A3 : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: Kaiser3"));
+ break;
+ case FFT_WNDW_TYPE_KAISER_A4 : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: Kaiser4"));
+ break;
+ case FFT_WNDW_TYPE_KAISER_A5 : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: Kaiser5"));
+ break;
+ default : powerspectrumdockItem->appendRow(new QStandardItem("FFT window function: ??"));
+ break;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ for(i=0; i<MAXHYPNOGRAMDOCKS; i++)
+ {
+ if(xml_goto_nth_element_inside(xml_hdl, "hypnogram", i))
+ {
+ break;
+ }
+
+ hypnogramItem = new QStandardItem("hypnogram");
+
+ parentItem->appendRow(hypnogramItem);
+
+ if(xml_goto_nth_element_inside(xml_hdl, "hdr_idx", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ hdr_idx = atoi(result);
+ if(hdr_idx < 0)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "File: %s", e_file_path[hdr_idx]);
+ hypnogramItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ for(j=0; j<HYPNOGRAM_STAGENUM; j++)
+ {
+ if(!xml_goto_nth_element_inside(xml_hdl, "stage_name", j))
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Stage %i name: %.2000s", j + 1, result);
+
+ xml_go_up(xml_hdl);
+
+ if(xml_goto_nth_element_inside(xml_hdl, "annot_name", j))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ strlcat(str2, " Annotation: ", 2048);
+ strlcat(str2, result, 2048);
+ hypnogramItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+ }
+
+ if(!xml_goto_nth_element_inside(xml_hdl, "use_overlays", 0))
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ if(atoi(result) == 1)
+ {
+ hypnogramItem->appendRow(new QStandardItem(" use overlays: yes"));
+ }
+ else
+ {
+ hypnogramItem->appendRow(new QStandardItem(" use overlays: no"));
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ for(j=0; j<HYPNOGRAM_OVNUM; j++)
+ {
+ if(!xml_goto_nth_element_inside(xml_hdl, "annot_ov_name", j))
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ xml_go_up(xml_hdl);
+
+ snprintf(str2, 2048, "Overlay annotation: %s", result);
+ tmp_item = new QStandardItem(str2);
+
+ mainwindow->get_rgbcolor_settings(xml_hdl, "annot_ov_color", j, &tmp_color);
+ if(tmp_color.isValid() == true)
+ {
+ tmp_item->setBackground(QBrush(tmp_color));
+ }
+
+ hypnogramItem->appendRow(tmp_item);
+ }
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ for(i=0; i<MAXCDSADOCKS; i++)
+ {
+ if(xml_goto_nth_element_inside(xml_hdl, "cdsa", i))
+ {
+ break;
+ }
+
+ cdsaItem = new QStandardItem("CDSA");
+
+ parentItem->appendRow(cdsaItem);
+
+ if(xml_goto_nth_element_inside(xml_hdl, "sigcomp_idx", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ sigcomp_idx = atoi(result);
+ if(sigcomp_idx < 0)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Signal index: %i", sigcomp_idx + 1);
+ cdsaItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "min_hz", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ min_hz = atoi(result);
+ if(min_hz < 0)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Lower frequency bin: %i Hz", min_hz);
+ cdsaItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "max_hz", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ max_hz = atoi(result);
+ if(max_hz < 0)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Upper frequency bin: %i Hz", max_hz);
+ cdsaItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "segment_len", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ segment_len = atoi(result);
+ if(segment_len < 1)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Segment length: %i seconds", segment_len);
+ cdsaItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "block_len", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ block_len = atoi(result);
+ if(block_len < 1)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Block length: %i seconds", block_len);
+ cdsaItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "overlap", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ overlap = atoi(result);
+ if(overlap < 1)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ switch(overlap)
+ {
+ case 1 : cdsaItem->appendRow(new QStandardItem("Overlap: 0%"));
+ break;
+ case 2 : cdsaItem->appendRow(new QStandardItem("Overlap: 50%"));
+ break;
+ case 3 : cdsaItem->appendRow(new QStandardItem("Overlap: 67%"));
+ break;
+ case 4 : cdsaItem->appendRow(new QStandardItem("Overlap: 75%"));
+ break;
+ case 5 : cdsaItem->appendRow(new QStandardItem("Overlap: 80%"));
+ break;
+ default : cdsaItem->appendRow(new QStandardItem("Overlap: ??%"));
+ break;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "window_func", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ window_func = atoi(result);
+ if((window_func < 0) || (window_func > 12))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ switch(window_func)
+ {
+ case FFT_WNDW_TYPE_RECT : cdsaItem->appendRow(new QStandardItem("FFT window function: None"));
+ break;
+ case FFT_WNDW_TYPE_HAMMING : cdsaItem->appendRow(new QStandardItem("FFT window function: Hamming"));
+ break;
+ case FFT_WNDW_TYPE_4TERM_BLACKMANHARRIS : cdsaItem->appendRow(new QStandardItem("FFT window function: 4-term Blackman-Harris"));
+ break;
+ case FFT_WNDW_TYPE_7TERM_BLACKMANHARRIS : cdsaItem->appendRow(new QStandardItem("FFT window function: 7-term Blackman-Harris"));
+ break;
+ case FFT_WNDW_TYPE_NUTTALL3B : cdsaItem->appendRow(new QStandardItem("FFT window function: Nuttall3b"));
+ break;
+ case FFT_WNDW_TYPE_NUTTALL4C : cdsaItem->appendRow(new QStandardItem("FFT window function: Nuttall4c"));
+ break;
+ case FFT_WNDW_TYPE_HANN : cdsaItem->appendRow(new QStandardItem("FFT window function: Hann"));
+ break;
+ case FFT_WNDW_TYPE_HFT223D : cdsaItem->appendRow(new QStandardItem("FFT window function: HFT223D"));
+ break;
+ case FFT_WNDW_TYPE_HFT95 : cdsaItem->appendRow(new QStandardItem("FFT window function: HFT95"));
+ break;
+ case FFT_WNDW_TYPE_KAISER_A2 : cdsaItem->appendRow(new QStandardItem("FFT window function: Kaiser2"));
+ break;
+ case FFT_WNDW_TYPE_KAISER_A3 : cdsaItem->appendRow(new QStandardItem("FFT window function: Kaiser3"));
+ break;
+ case FFT_WNDW_TYPE_KAISER_A4 : cdsaItem->appendRow(new QStandardItem("FFT window function: Kaiser4"));
+ break;
+ case FFT_WNDW_TYPE_KAISER_A5 : cdsaItem->appendRow(new QStandardItem("FFT window function: Kaiser5"));
+ break;
+ default : cdsaItem->appendRow(new QStandardItem("FFT window function: ??"));
+ break;
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "log", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ log = atoi(result);
+ if((log < 0) || (log > 1))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ if(log)
+ {
+ cdsaItem->appendRow(new QStandardItem("Logarithmic: yes"));
+ }
+ else
+ {
+ cdsaItem->appendRow(new QStandardItem("Logarithmic: no"));
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(log)
+ {
+ if(xml_goto_nth_element_inside(xml_hdl, "max_pwr", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ max_pwr = atoi(result);
+
+ snprintf(str2, 2048, "Max. level: %idB", max_pwr);
+
+ cdsaItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "min_pwr", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ min_pwr = atoi(result);
+
+ snprintf(str2, 2048, "Min. level: %idB", min_pwr);
+
+ cdsaItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ }
+ else
+ {
+ if(xml_goto_nth_element_inside(xml_hdl, "max_voltage", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ max_voltage = atof(result);
+
+ snprintf(str2, 2048, "Max. level: %e", max_voltage);
+
+ cdsaItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "power_voltage", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ power_voltage = atoi(result);
+ if((power_voltage < 0) || (power_voltage > 1))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ if(power_voltage)
+ {
+ cdsaItem->appendRow(new QStandardItem("Power: yes"));
+ }
+ else
+ {
+ cdsaItem->appendRow(new QStandardItem("Power: no"));
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
+ for(i=0; i<MAXAEEGDOCKS; i++)
+ {
+ if(xml_goto_nth_element_inside(xml_hdl, "aeeg", i))
+ {
+ break;
+ }
+
+ aeegItem = new QStandardItem("aEEG");
+
+ parentItem->appendRow(aeegItem);
+
+ if(xml_goto_nth_element_inside(xml_hdl, "sigcomp_idx", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ sigcomp_idx = atoi(result);
+ if(sigcomp_idx < 0)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Signal index: %i", sigcomp_idx + 1);
+ aeegItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "bp_min_hz", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ bp_min_hz = atof(result);
+ if(bp_min_hz < 0.999)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Bandpass min. frequency: %.1f Hz", bp_min_hz);
+ aeegItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "bp_max_hz", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ bp_max_hz = atof(result);
+ if(bp_max_hz < 1.999)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Bandpass max. frequency: %.1f Hz", bp_max_hz);
+ aeegItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "segment_len", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ segment_len = atoi(result);
+ if(segment_len < 5)
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Segment length: %i seconds", segment_len);
+ aeegItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "lp_hz", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ lp_hz = atof(result);
+ if((lp_hz < 0.009999) || (lp_hz > 5.00001))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ snprintf(str2, 2048, "Envelope lowpass filter: %.2f sec", lp_hz);
+ aeegItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ if(xml_goto_nth_element_inside(xml_hdl, "scale_max_amp", 0))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+ else
+ {
+ if(xml_get_content_of_element(xml_hdl, result, XML_STRBUFLEN))
+ {
+ format_error(__FILE__, __LINE__, xml_hdl);
+ return;
+ }
+
+ scale_max_amp = atof(result);
+
+ snprintf(str2, 2048, "Max. amplitude: %.1f", scale_max_amp);
+
+ aeegItem->appendRow(new QStandardItem(str2));
+
+ xml_go_up(xml_hdl);
+ }
+
+ xml_go_up(xml_hdl);
+ }
+
xml_close(xml_hdl);
// tree->expandAll();
View it on GitLab: https://salsa.debian.org/med-team/edfbrowser/-/compare/062816bb60278ae61c9c7cc2eb8ff2deff106cc4...24be356b60a2fd2bb668b66826b9eca9d266bcd6
--
View it on GitLab: https://salsa.debian.org/med-team/edfbrowser/-/compare/062816bb60278ae61c9c7cc2eb8ff2deff106cc4...24be356b60a2fd2bb668b66826b9eca9d266bcd6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230924/872aa79c/attachment-0001.htm>
More information about the debian-med-commit
mailing list