[med-svn] [Git][med-team/edfbrowser][master] 4 commits: New upstream version 2.10+dfsg

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Mon Jun 10 21:07:57 BST 2024



Étienne Mollier pushed to branch master at Debian Med / edfbrowser


Commits:
c4672cc9 by Étienne Mollier at 2024-06-10T21:59:52+02:00
New upstream version 2.10+dfsg
- - - - -
0f96db98 by Étienne Mollier at 2024-06-10T21:59:53+02:00
Update upstream source from tag 'upstream/2.10+dfsg'

Update to upstream version '2.10+dfsg'
with Debian dir c601256c4a0ef321a8252485ddac04bcedd8afc2
- - - - -
90b1b27f by Étienne Mollier at 2024-06-10T22:00:41+02:00
use_debian_packaged_edflib.patch: unfuzz.

- - - - -
1375c78d by Étienne Mollier at 2024-06-10T22:06:38+02:00
ready for upload to unstable.

- - - - -


15 changed files:

- annotations_dock.cpp
- annotations_dock.h
- check_edf_file.c
- debian/changelog
- debian/patches/use_debian_packaged_edflib.patch
- doc/manual.html
- edit_predefined_mtg.cpp
- fir_filter_dialog.cpp
- global.h
- header_editor.cpp
- mainwindow.cpp
- mainwindow_constr.cpp
- version.txt
- view_montage_dialog.cpp
- view_session_dialog.cpp


Changes:

=====================================
annotations_dock.cpp
=====================================
@@ -113,6 +113,7 @@ UI_Annotationswindow::UI_Annotationswindow(edfhdrblck_t *e_hdr, QWidget *w_paren
   rename_all_act = new QAction("Rename", list);
   delete_annots_act = new QAction("Delete", list);
   delete_all_annots_act = new QAction("Delete all", list);
+  delete_annots_act = new QAction("Delete", list);
 
   list->setContextMenuPolicy(Qt::ActionsContextMenu);
   list->insertAction(NULL, show_between_act);
@@ -135,6 +136,20 @@ UI_Annotationswindow::UI_Annotationswindow(edfhdrblck_t *e_hdr, QWidget *w_paren
   list->insertAction(NULL, delete_annots_act);
   list->insertAction(NULL, delete_all_annots_act);
 
+  jump_to_next_annot_act = new QAction("Next annotation", list);
+  jump_to_previous_annot_act = new QAction("Previous annotation", list);
+#if QT_VERSION < 0x060000
+  jump_to_next_annot_act->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));
+  jump_to_previous_annot_act->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B));
+#else
+  jump_to_next_annot_act->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_N));
+  jump_to_previous_annot_act->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B));
+#endif
+
+  dialog1->setContextMenuPolicy(Qt::PreventContextMenu);
+  dialog1->addAction(jump_to_next_annot_act);
+  dialog1->addAction(jump_to_previous_annot_act);
+
   QHBoxLayout *h_layout = new QHBoxLayout;
   h_layout->addWidget(relative_checkbox);
   h_layout->addWidget(label1);
@@ -188,6 +203,9 @@ UI_Annotationswindow::UI_Annotationswindow(edfhdrblck_t *e_hdr, QWidget *w_paren
   QObject::connect(delayed_list_filter_update_timer, SIGNAL(timeout()),                  this, SLOT(delayed_list_filter_update()));
 
   QObject::connect(mainwindow,                 SIGNAL(file_position_changed(long long)), this, SLOT(file_pos_changed(long long)));
+
+  QObject::connect(jump_to_next_annot_act,     SIGNAL(triggered(bool)),                  this, SLOT(jump_to_next_annot(bool)));
+  QObject::connect(jump_to_previous_annot_act, SIGNAL(triggered(bool)),                  this, SLOT(jump_to_previous_annot(bool)));
 }
 
 
@@ -446,6 +464,66 @@ void UI_Annotationswindow::more_button_clicked(bool)
 }
 
 
+void UI_Annotationswindow::jump_to_next_annot(bool)
+{
+  int count, row, centered=1;
+
+  if(mainwindow->live_stream_active       ||
+     mainwindow->playback_realtime_active ||
+     mainwindow->signal_averaging_active)
+  {
+    return;
+  }
+
+  count = list->count();
+  if(count < 2)  return;
+
+  row = list->currentRow();
+  if(row >= (count - 1))  return;
+
+  row++;
+
+  list->setCurrentRow(row);
+
+  if(mainwindow->annot_onset_at_start_of_page_on_jump)
+  {
+    centered = 0;
+  }
+
+  annotation_selected(list->item(row), centered);
+}
+
+
+void UI_Annotationswindow::jump_to_previous_annot(bool)
+{
+  int count, row, centered=1;
+
+  if(mainwindow->live_stream_active       ||
+     mainwindow->playback_realtime_active ||
+     mainwindow->signal_averaging_active)
+  {
+    return;
+  }
+
+  count = list->count();
+  if(count < 2)  return;
+
+  row = list->currentRow();
+  if(row < 1)  return;
+
+  row--;
+
+  list->setCurrentRow(row);
+
+  if(mainwindow->annot_onset_at_start_of_page_on_jump)
+  {
+    centered = 0;
+  }
+
+  annotation_selected(list->item(row), centered);
+}
+
+
 void UI_Annotationswindow::show_heart_rate(bool)
 {
   int instance_num, row;


=====================================
annotations_dock.h
=====================================
@@ -114,7 +114,9 @@ private:
           *remove_duplicates_act,
           *rename_all_act,
           *delete_annots_act,
-          *delete_all_annots_act;
+          *delete_all_annots_act,
+          *jump_to_previous_annot_act,
+          *jump_to_next_annot_act;
 
   QTimer *delayed_list_filter_update_timer;
 
@@ -146,6 +148,8 @@ private slots:
   void delete_annots();
   void delete_all_annots();
   void file_pos_changed(long long);
+  void jump_to_next_annot(bool);
+  void jump_to_previous_annot(bool);
 };
 
 


=====================================
check_edf_file.c
=====================================
@@ -686,25 +686,33 @@ edfhdrblck_t * check_edf_file(FILE *inputfile, char *txt_string, int txt_len, in
         return NULL;
       }
     }
-    if(edfhdr->edfplus)
+    if(!strncmp(scratchpad, "EDF Annotations ", 16))
     {
-      if(!strncmp(scratchpad, "EDF Annotations ", 16))
+      if(edfhdr->edfplus)
       {
         edfhdr->annot_ch[edfhdr->nr_annot_chns] = i;
         edfhdr->nr_annot_chns++;
         edfhdr->edfparam[i].annotation = 1;
       }
+      else
+      {
+        scratchpad[3] = '_';
+      }
     }
-    if(edfhdr->bdfplus)
+    if(!strncmp(scratchpad, "BDF Annotations ", 16))
     {
-      if(!strncmp(scratchpad, "BDF Annotations ", 16))
+      if(edfhdr->bdfplus)
       {
         edfhdr->annot_ch[edfhdr->nr_annot_chns] = i;
         edfhdr->nr_annot_chns++;
         edfhdr->edfparam[i].annotation = 1;
       }
+      else
+      {
+        scratchpad[3] = '_';
+      }
     }
-    strncpy(edfhdr->edfparam[i].label, edf_hdr + 256 + (i * 16), 16);
+    memcpy(edfhdr->edfparam[i].label, scratchpad, 16);
     edfhdr->edfparam[i].label[16] = 0;
   }
   if(edfhdr->edfplus&&(!edfhdr->nr_annot_chns))


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+edfbrowser (2.10+dfsg-1) unstable; urgency=medium
+
+  * New upstream version 2.10+dfsg
+  * use_debian_packaged_edflib.patch: unfuzz.
+
+ -- Étienne Mollier <emollier at debian.org>  Mon, 10 Jun 2024 22:01:55 +0200
+
 edfbrowser (2.09+dfsg-1) unstable; urgency=medium
 
   * New upstream version 2.09+dfsg


=====================================
debian/patches/use_debian_packaged_edflib.patch
=====================================
@@ -14,7 +14,7 @@ Forwarded: not-needed
  
  
  OBJECTS_DIR = ./objects
-@@ -102,7 +103,6 @@
+@@ -103,7 +104,6 @@
  HEADERS += utils.h
  HEADERS += signalcurve.h
  HEADERS += spectrumanalyzer.h
@@ -22,7 +22,7 @@ Forwarded: not-needed
  HEADERS += export_annotations.h
  HEADERS += edit_predefined_mtg.h
  HEADERS += spectrum_dock.h
-@@ -228,7 +228,6 @@
+@@ -230,7 +230,6 @@
  SOURCES += utils.c
  SOURCES += signalcurve.cpp
  SOURCES += spectrumanalyzer.cpp


=====================================
doc/manual.html
=====================================
@@ -21,7 +21,7 @@
     </style>
 </head><body>
 
-<h1>EDFbrowser 2.09 manual</h1>
+<h1>EDFbrowser 2.10 manual</h1>
 
 <p><br></p>
 
@@ -423,7 +423,7 @@
 
 <p>
   When a file contains annotations (sometimes called events), the annotation window will appear.<br>
-  Just click on one of the annotations to jump to that position in the file.<br>
+  Just click on one of the annotations to jump to that position in the file (use Ctl+N to jump to the next annotation or Ctl+B for the previous annotation).<br>
   The annotation marker will appear either at the start or the middle of the page,<br>
   depending on an option that is in Settings -> Options -> Other.<br>
   <br>


=====================================
edit_predefined_mtg.cpp
=====================================
@@ -39,7 +39,7 @@ UI_edit_predefined_mtg_window::UI_edit_predefined_mtg_window(QWidget *w_parent)
   mainwindow = (UI_Mainwindow *)w_parent;
 
   edit_predefined_mtg_Dialog = new QDialog;
-  edit_predefined_mtg_Dialog->setMinimumSize(800 * mainwindow->w_scaling, 265 * mainwindow->h_scaling);
+  edit_predefined_mtg_Dialog->setMinimumSize(800 * mainwindow->w_scaling, 370 * mainwindow->h_scaling);
   edit_predefined_mtg_Dialog->setWindowTitle("Edit key-bindings for montages");
   edit_predefined_mtg_Dialog->setModal(true);
   edit_predefined_mtg_Dialog->setAttribute(Qt::WA_DeleteOnClose, true);
@@ -57,7 +57,7 @@ UI_edit_predefined_mtg_window::UI_edit_predefined_mtg_window(QWidget *w_parent)
       strlcat(str, &(mainwindow->predefined_mtg_path[i][0]), 1200);
     }
 
-    new QListWidgetItem(str, mtg_path_list);
+    new QListWidgetItem(QString::fromLocal8Bit(str), mtg_path_list);
   }
 
   CloseButton = new QPushButton;
@@ -137,7 +137,7 @@ void UI_edit_predefined_mtg_window::adEntry()
   snprintf(str, 1200, "F%i : ", row + 1);
   strlcat(str, path, 1200);
 
-  listItem->setText(str);
+  listItem->setText(QString::fromLocal8Bit(str));
 }
 
 


=====================================
fir_filter_dialog.cpp
=====================================
@@ -1171,7 +1171,7 @@ void UI_FIRFilterDialog::pm_design_button_pressed()
     {
       for(i=0, idx=0; i<thrd->rz_params.tap_num; i++)
       {
-        idx += snprintf(str + idx, 128, "%.24f\n", thrd->rz_params.f_taps[i]);
+        idx += snprintf(str + idx, 128, "%+.24f\n", thrd->rz_params.f_taps[i]);
 
         if(idx >= (buf_sz - 128))
         {
@@ -1357,7 +1357,7 @@ void UI_FIRFilterDialog::sinc_design_button_pressed()
 
   for(i=0, idx=0; i<sinc_n_taps; i++)
   {
-    idx += snprintf(str + idx, 128, "%.24f\n", sinc_taps[i]);
+    idx += snprintf(str + idx, 128, "%+.24f\n", sinc_taps[i]);
 
     if(idx >= (buf_sz - 128))
     {


=====================================
global.h
=====================================
@@ -63,7 +63,7 @@
 #endif
 
 #define PROGRAM_NAME                "EDFbrowser"
-#define PROGRAM_VERSION                   "2.09"
+#define PROGRAM_VERSION                   "2.10"
 #define PROGRAM_BETA_SUFFIX                   ""
 #define MINIMUM_QT4_VERSION           (0x040807)
 #define MINIMUM_QT5_VERSION           (0x050C06)


=====================================
header_editor.cpp
=====================================
@@ -1441,6 +1441,10 @@ void UI_headerEditorWindow::save_hdr()
       }
       latin1_to_ascii(scratchpad, 16);
       scratchpad[16] = 0;
+      if((!strcmp(scratchpad, "EDF Annotations ")) || (!strcmp(scratchpad, "BDF Annotations ")))
+      {
+        scratchpad[3] = '_';
+      }
       fseeko(file, (long long)(256 + (i * 16)), SEEK_SET);
       fprintf(file, "%s", scratchpad);
 


=====================================
mainwindow.cpp
=====================================
@@ -1764,7 +1764,7 @@ void UI_Mainwindow::open_new_file()
 
   rc_file_open_err = 0;
 
-  if(edflib_version() != 125)  return;
+  if(edflib_version() != 126)  return;
 
   if(annot_editor_active && files_open)
   {
@@ -2119,7 +2119,7 @@ void UI_Mainwindow::open_new_file()
 
       if(viewtime_sync==VIEWTIME_SYNCED_ABSOLUT)
       {
-        edfheaderlist[files_open]->viewtime = edfheaderlist[sel_viewtime]->utc_starttime_hr - edfheaderlist[files_open]->utc_starttime_hr;
+        edfheaderlist[files_open]->viewtime = edfheaderlist[sel_viewtime]->viewtime + edfheaderlist[sel_viewtime]->utc_starttime_hr - edfheaderlist[files_open]->utc_starttime_hr;
       }
 
       if(viewtime_sync==VIEWTIME_USER_DEF_SYNCED)
@@ -4562,6 +4562,12 @@ void UI_Mainwindow::show_kb_shortcuts()
     "<tr> <td>Former page</td> <td>  :  </td> <td>PgUp</td> </tr>\n"
     "<tr> <td>Shift right one tenth of page</td> <td>  :  </td> <td>Right arrow</td> </tr>\n"
     "<tr> <td>Shift left one tenth of page</td> <td>  :  </td> <td>Left arrow</td> </tr>\n"
+    "<tr> <td>Shift left or right</td> <td>  :  </td> <td>Mousewheel</td> </tr>\n"
+    "<tr> <td>Zoom in or out horizontally</td> <td>  :  </td> <td>Ctrl + Mousewheel</td> </tr>\n"
+    "<tr> <td>Zoom in horizontally</td> <td>  :  </td> <td>Ctrl + Plus</td> </tr>\n"
+    "<tr> <td>Zoom out horizontally</td> <td>  :  </td> <td>Ctrl + Minus</td> </tr>\n"
+    "<tr> <td>Drag horizontally</td> <td>  :  </td> <td>Keep middle mousebutton pressed</td> </tr>\n"
+    "<tr> <td> </td> <td> </td> <td> </td> </tr>\n"
     "<tr> <td>Increase amplitude</td> <td>  :  </td> <td>Plus</td> </tr>\n"
     "<tr> <td>Decrease amplitude</td> <td>  :  </td> <td>Minus</td> </tr>\n"
     "<tr> <td>Shift traces up</td> <td>  :  </td> <td>Up arrow</td> </tr>\n"
@@ -4570,12 +4576,12 @@ void UI_Mainwindow::show_kb_shortcuts()
     "<tr> <td>Move vertical scrollbar</td> <td>  :  </td> <td>Shift + Down Arrow</td> </tr>\n"
     "<tr> <td>Go to start of file</td> <td>  :  </td> <td>Ctrl + Home</td> </tr>\n"
     "<tr> <td>Go to end of file</td> <td>  :  </td> <td>Ctrl + End</td> </tr>\n"
-    "<tr> <td>Zoom in horizontally</td> <td>  :  </td> <td>Ctrl + Plus</td> </tr>\n"
-    "<tr> <td>Zoom out horizontally</td> <td>  :  </td> <td>Ctrl + Minus</td> </tr>\n"
     "<tr> <td>Load predefined montage</td> <td>  :  </td> <td>F1 - F8</td> </tr>\n"
     "<tr> <td>Crosshair (repeat for second crosshair)</td> <td>  :  </td> <td>Alt + Shift + C</td> </tr>\n"
     "<tr> <td>Remove crosshairs and floating ruler</td> <td>  :  </td> <td>Esc</td> </tr>\n"
     "<tr> <td>Toggle annotation markers</td> <td>  :  </td> <td>Ctrl + M</td> </tr>\n"
+    "<tr> <td>Jump to next annotation</td> <td>  :  </td> <td>Ctrl + N</td> </tr>\n"
+    "<tr> <td>Jump to previous annotation</td> <td>  :  </td> <td>Ctrl + B</td> </tr>\n"
     "<tr> <td> </td> <td> </td> <td> </td> </tr>\n"
     "<tr> <td>After zooming in by drawing a rectangle:</td> <td> </td> <td> </td> </tr>\n"
     "<tr> <td>Zoom back</td> <td>  :  </td> <td>Backspace</td> </tr>\n"
@@ -4590,9 +4596,6 @@ void UI_Mainwindow::show_kb_shortcuts()
     "<tr> <td>Close all files</td> <td>  :  </td> <td>Ctrl+W</td> </tr>\n"
     "<tr> <td>Exit program</td> <td>  :  </td> <td>Ctrl + Q</td> </tr>\n"
 #endif
-    "<tr> <td>Shift left or right</td> <td>  :  </td> <td>Mousewheel</td> </tr>\n"
-    "<tr> <td>Zoom in or out horizontally</td> <td>  :  </td> <td>Ctrl + Mousewheel</td> </tr>\n"
-    "<tr> <td>Drag horizontally</td> <td>  :  </td> <td>Keep middle mousebutton pressed</td> </tr>\n"
     "<tr> <td> </td> <td> </td> <td> </td> </tr>\n"
     "<tr> <td>Toggle Playback or Pause</td> <td>  :  </td> <td>Ctrl + Space</td> </tr>\n"
     "<tr> <td>Toggle Playback with video</td> <td>  :  </td> <td>Ctrl + Shift + V</td> </tr>\n"


=====================================
mainwindow_constr.cpp
=====================================
@@ -1600,7 +1600,7 @@ UI_Mainwindow::UI_Mainwindow()
     messagewindow.exec();
   }
 
-  if(edflib_version() != 125)
+  if(edflib_version() != 126)
   {
     cmdlineargument = 0;
 


=====================================
version.txt
=====================================
@@ -1,5 +1,22 @@
 
- version 2.09      April 4, 2024
+ version 2.10      June 8, 2024
+ --------------
+
+ - Added keyboard shortcuts for jumping to next and previous annotation.
+
+ - Predefined montage dialog: take care of locale for filename & path.
+
+ - Fixed a bug that caused the timesync to be initially wrong when opening
+   multiple files and timesync was set to absolute (default).
+
+ - When opening a file, in case a signal label is named "EDF Annotations " and
+   the file is not EDF+, change the label to "EDF_Annotations " (in memory)
+   in order to avoid a possible conflict when exporting the file to EDF+.
+
+ - Update EDFlib.
+
+
+ version 2.09      April 7, 2024
  --------------
 
  -  Fixed a regression bug that prevented the signal properties dialog from being


=====================================
view_montage_dialog.cpp
=====================================
@@ -198,7 +198,7 @@ void UI_ViewMontagewindow::SelectButtonClicked()
     return;
   }
 
-  ViewMontageDialog->setWindowTitle(mtg_path);
+  ViewMontageDialog->setWindowTitle(QString::fromLocal8Bit(mtg_path));
 
   t_model->clear();
 


=====================================
view_session_dialog.cpp
=====================================
@@ -211,7 +211,7 @@ void UI_ViewSessionwindow::SelectButtonClicked()
     return;
   }
 
-  ViewSessionDialog->setWindowTitle(session_path);
+  ViewSessionDialog->setWindowTitle(QString::fromLocal8Bit(session_path));
 
   t_model->clear();
 



View it on GitLab: https://salsa.debian.org/med-team/edfbrowser/-/compare/a9ad332c4e0a71c0c5ed382c89bca3a4f8063a0e...1375c78dfaee7d574a25d8e2044d743219ffad84

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/med-team/edfbrowser/-/compare/a9ad332c4e0a71c0c5ed382c89bca3a4f8063a0e...1375c78dfaee7d574a25d8e2044d743219ffad84
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/20240610/01449745/attachment-0001.htm>


More information about the debian-med-commit mailing list