[med-svn] [Git][med-team/edfbrowser][master] 5 commits: routine-update: New upstream version

Nilesh Patra gitlab at salsa.debian.org
Sun Oct 25 16:24:20 GMT 2020



Nilesh Patra pushed to branch master at Debian Med / edfbrowser


Commits:
330d98b7 by Nilesh Patra at 2020-10-25T21:30:25+05:30
routine-update: New upstream version

- - - - -
58510500 by Nilesh Patra at 2020-10-25T21:30:26+05:30
New upstream version 1.79+dfsg
- - - - -
1bfc9734 by Nilesh Patra at 2020-10-25T21:30:28+05:30
Update upstream source from tag 'upstream/1.79+dfsg'

Update to upstream version '1.79+dfsg'
with Debian dir 3bcdc38e2b98c019e88d8c1e64eb227bb8bda803
- - - - -
7cc6e920 by Nilesh Patra at 2020-10-25T21:42:25+05:30
Remove already merged patches

- - - - -
0099ae4b by Nilesh Patra at 2020-10-25T21:43:17+05:30
routine-update: Ready to upload to unstable

- - - - -


19 changed files:

- debian/changelog
- − debian/patches/fix-ftbfs-qt5.14.patch
- − debian/patches/menuentry-exec-file.patch
- debian/patches/series
- doc/manual.html
- edfplusd_cnv.cpp
- filteredblockread.cpp
- global.h
- install/edfbrowser.desktop
- main.cpp
- mainwindow.cpp
- mainwindow.h
- mainwindow_constr.cpp
- signalcurve.cpp
- signals_dialog.cpp
- special_button.cpp
- statistics_dialog.cpp
- version.txt
- viewcurve.cpp


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+edfbrowser (1.79+dfsg-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version
+
+ -- Nilesh Patra <npatra974 at gmail.com>  Sun, 25 Oct 2020 21:43:17 +0530
+
 edfbrowser (1.78+dfsg-1) unstable; urgency=medium
 
   * New upstream version


=====================================
debian/patches/fix-ftbfs-qt5.14.patch deleted
=====================================
@@ -1,25 +0,0 @@
-Description: fix FTBFS with Qt 5.14
- Starting with Qt 5.14, the former syntax of QSplashScreen has been marked
- deprecated, and upstream took that properly in account in edfbrowse 1.78.
- However the newer approach didn't build, so this patch rolls back to the
- deprecated behavior, while waiting for a proper fix.
-Author: Étienne Mollier <etienne.mollier at mailoo.org>
-Bug: https://gitlab.com/Teuniz/EDFbrowser/-/issues/24
-Applied-Upstream: 1.79
-Last-Update: 2020-10-15
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- edfbrowser.orig/mainwindow_constr.cpp
-+++ edfbrowser/mainwindow_constr.cpp
-@@ -1168,11 +1168,7 @@
-   {
-     p.drawText(150, 260, 300, 30, Qt::AlignLeft | Qt::TextSingleLine, "version " PROGRAM_VERSION " " PROGRAM_BETA_SUFFIX "    " THIS_APP_BITS_W);
-   }
--#if QT_VERSION >= 0x050E00
--  splash = new QSplashScreen(this->screen(), *splash_pixmap, Qt::WindowStaysOnTopHint);
--#else
-   splash = new QSplashScreen(this, *splash_pixmap, Qt::WindowStaysOnTopHint);
--#endif
- 
-   if((QT_VERSION < MINIMUM_QT4_VERSION) || ((QT_VERSION >= 0x050000) && (QT_VERSION < MINIMUM_QT5_VERSION)))
-   {


=====================================
debian/patches/menuentry-exec-file.patch deleted
=====================================
@@ -1,21 +0,0 @@
-Description: allow file selection from menu item
- This addresses a lintian warning.  Looking from the documentation, the command
- line accepts one EDF file name, and eventually a second file name, but for
- montages MTG, hence the %f for "single file".
-Author: Étienne Mollier <etienne.mollier at mailoo.org>
-Forwarded: https://gitlab.com/Teuniz/EDFbrowser/-/merge_requests/5
-Applied-Upstream: 1.79
-Last-Update: 2020-10-15
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- edfbrowser.orig/install/edfbrowser.desktop
-+++ edfbrowser/install/edfbrowser.desktop
-@@ -6,7 +6,7 @@
- GenericName=EDF viewer
- Comment=A viewer/toolbox for timeseries storage files
- Icon=edf
--Exec=edfbrowser
-+Exec=edfbrowser %f
- Terminal=false
- Categories=Science;Application;
- MimeType=application/x-edf;application/x-bdf


=====================================
debian/patches/series
=====================================
@@ -1,3 +1 @@
 use_debian_packaged_edflib.patch
-menuentry-exec-file.patch
-fix-ftbfs-qt5.14.patch


=====================================
doc/manual.html
=====================================
@@ -7,7 +7,7 @@
     <meta name="description" content="EDFbrowser manual">
 </head><body>
 
-<h1>EDFbrowser 1.78 manual</h1>
+<h1>EDFbrowser 1.79 manual</h1>
 
 <p><br></p>
 


=====================================
edfplusd_cnv.cpp
=====================================
@@ -656,10 +656,14 @@ void UI_EDFDwindow::write_values_to_hdr(FILE *outputfile, long long timestamp, i
   utc_to_date_time(edfhdr->utc_starttime + (timestamp / TIME_DIMENSION), &date_time);
 
   fseeko(outputfile, 98LL, SEEK_SET);
-  fprintf(outputfile, "%02i-%s-%04i",
-          date_time.day,
-          date_time.month_str,
-          date_time.year);
+  if(fgetc(outputfile) != 'X')
+  {
+    fseeko(outputfile, 98LL, SEEK_SET);
+    fprintf(outputfile, "%02i-%s-%04i",
+            date_time.day,
+            date_time.month_str,
+            date_time.year);
+  }
 
   fseeko(outputfile, 168LL, SEEK_SET);
   fprintf(outputfile, "%02i.%02i.%02i%02i.%02i.%02i",


=====================================
filteredblockread.cpp
=====================================
@@ -28,6 +28,19 @@
 #include "filteredblockread.h"
 
 
+//#define FBR_DEBUG
+
+#ifdef FBR_DEBUG
+
+#include "edflib.h"
+
+int edf_hdl=-1, edf_chan=0, *edf_ibuf=NULL;
+
+struct edf_hdr_struct edfhdr;
+
+#endif
+
+
 double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signalcomp, int datarecord_or_smpls_cnt, int skip_f, int mode)
 {
   skip_filters = skip_f;
@@ -113,7 +126,7 @@ double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signa
   {
     free(readbuf);
   }
-  readbuf = (char *)malloc(hdr->recordsize  * datarecord_cnt);
+  readbuf = (char *)malloc(hdr->recordsize  * (datarecord_cnt + 1));
   if(readbuf == NULL)
   {
     datarecord_cnt = -1;
@@ -125,7 +138,31 @@ double * FilteredBlockReadClass::init_signalcomp(struct signalcompblock *i_signa
   }
 
   bitvalue = signalcomp->edfhdr->edfparam[signalcomp->edfsignal[0]].bitvalue;
+#ifdef FBR_DEBUG
+  edf_hdl = -1;
+
+  if(smpl_mode)
+  {
+    if(!edfopen_file_readonly(signalcomp->edfhdr->filename, &edfhdr, 0))
+    {
+      edf_hdl = edfhdr.handle;
+
+      printf("datarecord_duration: %lli    smp_in_datarecord: %i    sf: %f Hz   total samples in file: %lli\n",
+             edfhdr.datarecord_duration, edfhdr.signalparam[0].smp_in_datarecord,
+             (edfhdr.signalparam[0].smp_in_datarecord * EDFLIB_TIME_DIMENSION) / (double)edfhdr.datarecord_duration,
+              edfhdr.signalparam[0].smp_in_file);
+
+      edf_ibuf = (int *)malloc(total_samples * sizeof(int));
+      if(edf_ibuf == NULL)
+      {
+        edfclose_file(edf_hdl);
+        edf_hdl = -1;
 
+        printf("malloc error\n");
+      }
+    }
+  }
+#endif
   return processed_samples_buf;
 }
 
@@ -152,6 +189,14 @@ FilteredBlockReadClass::FilteredBlockReadClass()
 
 FilteredBlockReadClass::~FilteredBlockReadClass()
 {
+#ifdef FBR_DEBUG
+  if(edf_hdl >= 0)
+  {
+    edfclose_file(edf_hdl);
+  }
+
+  free(edf_ibuf);
+#endif
   free(processed_samples_buf);
 
   free(readbuf);
@@ -160,7 +205,7 @@ FilteredBlockReadClass::~FilteredBlockReadClass()
 
 int FilteredBlockReadClass::process_signalcomp(int datarecord_or_sample_start)
 {
-  int j, k, datarecord_start;
+  int j, k, datarecord_start, extra_datrec=0;
 
   long long s, s_end, sample_start, s_off=0;
 
@@ -198,6 +243,11 @@ int FilteredBlockReadClass::process_signalcomp(int datarecord_or_sample_start)
     datarecord_start = sample_start / (long long)samples_per_datrec;
 
     s_off = sample_start % (long long)samples_per_datrec;
+
+    if(((long long)samples_per_datrec - s_off) < total_samples)
+    {
+      extra_datrec = 1;
+    }
   }
   else
   {
@@ -221,7 +271,7 @@ int FilteredBlockReadClass::process_signalcomp(int datarecord_or_sample_start)
     return -4;
   }
 
-  if(fread(readbuf, hdr->recordsize * datarecord_cnt, 1, inputfile) != 1)
+  if(fread(readbuf, hdr->recordsize * (datarecord_cnt + extra_datrec), 1, inputfile) != 1)
   {
     return -5;
   }
@@ -230,7 +280,23 @@ int FilteredBlockReadClass::process_signalcomp(int datarecord_or_sample_start)
   {
     return -6;
   }
+#ifdef FBR_DEBUG
+  if(smpl_mode)
+  {
+    if(edf_hdl >= 0)
+    {
+      if(edfseek(edf_hdl, 0, sample_start, EDFSEEK_SET) != sample_start)
+      {
+        printf("error: edfseek(%lli)\n", sample_start);
+      }
 
+      if(edfread_digital_samples(edf_hdl, 0, total_samples, edf_ibuf) != total_samples)
+      {
+        printf("error: edfread_digital_samples(%lli)\n", total_samples);
+      }
+    }
+  }
+#endif
   s_end = total_samples + s_off;
 
   for(s=s_off; s<s_end; s++)
@@ -280,7 +346,12 @@ int FilteredBlockReadClass::process_signalcomp(int datarecord_or_sample_start)
 
       dig_value += f_tmp;
     }
-
+#ifdef FBR_DEBUG
+    if(((dig_value - edf_ibuf[s - s_off]) > 1) || ((dig_value - edf_ibuf[s - s_off]) < -1 ))
+    {
+      printf("dig_value: %f   edf_ibuf[%lli]: %i\n", dig_value, s - s_off, edf_ibuf[s - s_off]);
+    }
+#endif
     if(!skip_filters)
     {
       if(signalcomp->spike_filter)
@@ -326,7 +397,7 @@ int FilteredBlockReadClass::process_signalcomp(int datarecord_or_sample_start)
       dig_value *= signalcomp->polarity;
     }
 
-    processed_samples_buf[s] = (dig_value * bitvalue);
+    processed_samples_buf[s - s_off] = (dig_value * bitvalue);
   }
 
   return 0;


=====================================
global.h
=====================================
@@ -59,7 +59,7 @@
 #define QT_NO_DEPRECATED_WARNINGS
 
 #define PROGRAM_NAME                "EDFbrowser"
-#define PROGRAM_VERSION                   "1.78"
+#define PROGRAM_VERSION                   "1.79"
 #define PROGRAM_BETA_SUFFIX                   ""
 #define MINIMUM_QT4_VERSION             0x040701
 #define MINIMUM_QT5_VERSION             0x050901


=====================================
install/edfbrowser.desktop
=====================================
@@ -6,7 +6,7 @@ Name=EDFbrowser
 GenericName=EDF viewer
 Comment=A viewer/toolbox for timeseries storage files
 Icon=edf
-Exec=edfbrowser
+Exec=edfbrowser %f
 Terminal=false
 Categories=Science;Application;
 MimeType=application/x-edf;application/x-bdf


=====================================
main.cpp
=====================================
@@ -73,7 +73,8 @@ int main(int argc, char *argv[])
   }
   else
   {
-    p.drawText(150, 260, 300, 30, Qt::AlignLeft | Qt::TextSingleLine, "version " PROGRAM_VERSION " " PROGRAM_BETA_SUFFIX "    " THIS_APP_BITS_W);
+    p.drawText(50, 240, 300, 30, Qt::AlignLeft | Qt::TextSingleLine, "version " PROGRAM_VERSION "  " THIS_APP_BITS_W);
+    p.drawText(50, 260, 300, 30, Qt::AlignLeft | Qt::TextSingleLine, PROGRAM_BETA_SUFFIX);
   }
 
   QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);


=====================================
mainwindow.cpp
=====================================
@@ -2018,8 +2018,11 @@ void UI_Mainwindow::add_signals_dialog()
 
 void UI_Mainwindow::show_splashscreen()
 {
+#if QT_VERSION >= 0x050F00
+  splash = new QSplashScreen(this->screen(), *splash_pixmap);
+#else
   splash = new QSplashScreen(this, *splash_pixmap, Qt::WindowStaysOnTopHint);
-
+#endif
   splash->show();
 }
 


=====================================
mainwindow.h
=====================================
@@ -86,6 +86,7 @@
 #include <QFontMetrics>
 #include <QSize>
 #include <QToolTip>
+#include <QKeySequence>
 
 #if QT_VERSION >= 0x050200
 #include <QFontDatabase>


=====================================
mainwindow_constr.cpp
=====================================
@@ -327,13 +327,20 @@ UI_Mainwindow::UI_Mainwindow()
 
   font_pixel_height = fm.ascent();
 
+#if QT_VERSION >= 0x050B00
+  font_pixel_width = (fm.horizontalAdvance("ABCDEFGHIJKLMNOPQRSTUVWXYZ") / 26.0) + 0.5;
+#else
   font_pixel_width = (fm.width("ABCDEFGHIJKLMNOPQRSTUVWXYZ") / 26.0) + 0.5;
-
+#endif
 //  printf("font_pixel_height: %i    font_pixel_width: %i\n", font_pixel_height, font_pixel_width);
 
   h_scaling = fm.height() / 18.0;
 
+#if QT_VERSION >= 0x050B00
+  w_scaling = fm.horizontalAdvance("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") / 260.0;
+#else
   w_scaling = fm.width("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") / 260.0;
+#endif
 
   if(w_scaling > 4.0)  w_scaling = 4.0;
   if(w_scaling < 1.0)  w_scaling = 1.0;
@@ -1166,10 +1173,11 @@ UI_Mainwindow::UI_Mainwindow()
   }
   else
   {
-    p.drawText(150, 260, 300, 30, Qt::AlignLeft | Qt::TextSingleLine, "version " PROGRAM_VERSION " " PROGRAM_BETA_SUFFIX "    " THIS_APP_BITS_W);
+    p.drawText(50, 240, 300, 30, Qt::AlignLeft | Qt::TextSingleLine, "version " PROGRAM_VERSION "  " THIS_APP_BITS_W);
+    p.drawText(50, 260, 300, 30, Qt::AlignLeft | Qt::TextSingleLine, PROGRAM_BETA_SUFFIX);
   }
-#if QT_VERSION >= 0x050E00
-  splash = new QSplashScreen(this->screen(), *splash_pixmap, Qt::WindowStaysOnTopHint);
+#if QT_VERSION >= 0x050F00
+  splash = new QSplashScreen(this->screen(), *splash_pixmap);
 #else
   splash = new QSplashScreen(this, *splash_pixmap, Qt::WindowStaysOnTopHint);
 #endif


=====================================
signalcurve.cpp
=====================================
@@ -53,7 +53,11 @@ SignalCurve::SignalCurve(QWidget *w_parent) : QWidget(w_parent)
 
   h_scaling = fm.height() / 18.0;
 
+#if QT_VERSION >= 0x050B00
+  w_scaling = fm.horizontalAdvance("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") / 260.0;
+#else
   w_scaling = fm.width("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") / 260.0;
+#endif
 
   if(w_scaling > 4.0)  w_scaling = 4.0;
   if(w_scaling < 1.0)  w_scaling = 1.0;


=====================================
signals_dialog.cpp
=====================================
@@ -168,7 +168,9 @@ UI_Signalswindow::UI_Signalswindow(QWidget *w_parent)
 
   QHBoxLayout *hlayout3 = new QHBoxLayout;
   hlayout3->addWidget(label3);
-  hlayout3->addStretch(1000);
+  hlayout3->addStretch(100);
+  hlayout3->addWidget(label4);
+  hlayout3->addStretch(900);
 
   QHBoxLayout *hlayout5 = new QHBoxLayout;
   hlayout5->addWidget(SelectAllButton);


=====================================
special_button.cpp
=====================================
@@ -121,7 +121,11 @@ void SpecialButton::setText(const char *str)
 
     QFontMetrics fm(font);
 
+#if QT_VERSION >= 0x050B00
+    sz_hint_w = fm.horizontalAdvance(buttonText) + 40;
+#else
     sz_hint_w = fm.width(buttonText) + 40;
+#endif
     sz_hint_h = fm.height() + 8;
 
     if(sz_hint_w < 50)  sz_hint_w = 50;


=====================================
statistics_dialog.cpp
=====================================
@@ -107,7 +107,7 @@ UI_StatisticWindow::UI_StatisticWindow(struct signalcompblock *signalcomp,
 
   if((job_src == STAT_JOB_SRC_ECG) || (job_src == STAT_JOB_SRC_ANNOT))
   {
-    StatDialog->setMinimumSize(600, 400);
+    StatDialog->setMinimumSize(600 * mainwindow->w_scaling, 450 * mainwindow->h_scaling);
     StatDialog->setSizeGripEnabled(true);
 
     startSlider = new QSlider;
@@ -154,15 +154,13 @@ UI_StatisticWindow::UI_StatisticWindow(struct signalcompblock *signalcomp,
 
   if(job_src == STAT_JOB_SRC_SIGNAL)
   {
-    StatDialog->setMinimumSize(300, 440);
-    StatDialog->setMaximumSize(300, 440);
+    StatDialog->setMinimumSize(300 * mainwindow->w_scaling, 440 * mainwindow->h_scaling);
   }
 
   Label1 = new QLabel(StatDialog);
   Label1->setAlignment(Qt::AlignLeft | Qt::AlignTop);
 
   pushButton1 = new QPushButton(StatDialog);
-  pushButton1->setMinimumSize(100, 25);
   pushButton1->setText("&Close");
 
   hlayout1_1_1 = new QHBoxLayout;


=====================================
version.txt
=====================================
@@ -1,4 +1,18 @@
 
+
+ version 1.79      October 25, 2020
+ --------------
+
+ - CDSA: fixed a bug that caused a crash when the datarecord duration of an EDF file is longer than
+   the segment length of the CDSA.
+
+ - EDF+D to EDF+C converter: bugfix: don't write EDF+ startdate in the output file if it wasn't
+   used in the input file.
+
+ - Add signals dialog: fixed a regression bug that caused the field "Recording duration" not to appear.
+
+
+
  version 1.78      October 10, 2020
  --------------
 


=====================================
viewcurve.cpp
=====================================
@@ -3778,8 +3778,8 @@ void ViewCurve::exec_sidemenu(int signal_nr_intern)
   QVBoxLayout *vlayout1 = new QVBoxLayout;
   vlayout1->addWidget(SidemenuLabel);
   vlayout1->addLayout(flayout);
-  vlayout1->addStretch(1000);
   vlayout1->addLayout(gr);
+  vlayout1->addStretch(1000);
   sidemenu->setLayout(vlayout1);
 
   QObject::connect(ScaleBox,          SIGNAL(valueChanged(double)),     this,     SLOT(ScaleBoxChanged(double)));



View it on GitLab: https://salsa.debian.org/med-team/edfbrowser/-/compare/b7acbc8a2ea234e9b8ef795918dd857b2e90a919...0099ae4be6ac617fbc5782f629b4ab6363f55094

-- 
View it on GitLab: https://salsa.debian.org/med-team/edfbrowser/-/compare/b7acbc8a2ea234e9b8ef795918dd857b2e90a919...0099ae4be6ac617fbc5782f629b4ab6363f55094
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/20201025/d88dc8d1/attachment-0001.html>


More information about the debian-med-commit mailing list