[med-svn] [SCM] aghermann branch, master, updated. 5727b0b7844548ed4c4fceab25995fc02b87da50
Andrei Zavada
johnhommer at gmail.com
Tue Dec 4 00:35:24 UTC 2012
The following commit has been merged in the master branch:
commit 633264376e98aa61bbbfd8373230b2aacfdf72cc
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Mon Dec 3 11:11:24 2012 +0200
mighty WIP again
* sort out MC profile wrt n_bins;
* expose and use basic FFTW flags for PSD profile;
* uniformly rename TColour ids, use rgba as appropriate;
* fix regressions after profile overhaul
(those in populate_2 in particular);
* make use of G_CONNECT, lose tons of lines in *-construct.cc;
* fix SFindDialog::search wrt changing field channel;
* specialize SUIVar_<size_t>;
* specialize SValidator<size_t>, for great justice;
* understand that _total in old-style enums goes to enclosing namespace.
diff --git a/ChangeLog b/ChangeLog
index 4c725ee..fd97de6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+v.0.8.0 (2012-12-xx)
+ * Experimental SWU profile; general overhaul of profiles.
+
v.0.7.4 (2012-11-10)
* PSD: don't apply windowing function twice (deeply sorry about that!).
diff --git a/data/dialogs.glade b/data/dialogs.glade
index 9ca2873..79cc579 100644
--- a/data/dialogs.glade
+++ b/data/dialogs.glade
@@ -328,7 +328,7 @@
<property name="xalign">0</property>
<property name="xpad">5</property>
<property name="ypad">15</property>
- <property name="label" translatable="yes"><b><big><big>Aghermann 0.8.0 RC</big></big></b>
+ <property name="label" translatable="yes"><b><big><big>Aghermann 0.8</big></big></b>
<a href="http://johnhommer.com/academic/code/aghermann">johnhommer.com/academic/code/aghermann</a></property>
<property name="use_markup">True</property>
</object>
@@ -987,6 +987,7 @@ With bug reports, either send yours to <a href="mailto:aghermann-users at lists.
<object class="GtkTextView" id="lEDFFileDetailsReport">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="border_width">5</property>
<property name="editable">False</property>
<property name="cursor_visible">False</property>
<property name="buffer">tEDFFileDetailsReport</property>
diff --git a/data/main.glade b/data/main.glade
index 70e34c6..bf6ed0c 100644
--- a/data/main.glade
+++ b/data/main.glade
@@ -264,6 +264,13 @@
<property name="step_increment">0.5</property>
<property name="page_increment">1</property>
</object>
+ <object class="GtkAdjustment" id="jMCParamFreqInc">
+ <property name="lower">0.25</property>
+ <property name="upper">2</property>
+ <property name="value">0.5</property>
+ <property name="step_increment">0.25</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkAdjustment" id="jMCParamIIRBackpolate">
<property name="upper">1</property>
<property name="value">0.5</property>
@@ -293,6 +300,13 @@
<property name="step_increment">0.10000000000000001</property>
<property name="page_increment">0.5</property>
</object>
+ <object class="GtkAdjustment" id="jMCParamNBins">
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="value">5</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">5</property>
+ </object>
<object class="GtkAdjustment" id="jMCParamPiBPeakWidth">
<property name="upper">1</property>
<property name="value">0.20000000000000001</property>
@@ -390,6 +404,13 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="jSWUParamMinUpswingDuration">
+ <property name="lower">0.01</property>
+ <property name="upper">1</property>
+ <property name="value">0.29999999999999999</property>
+ <property name="step_increment">0.01</property>
+ <property name="page_increment">0.10000000000000001</property>
+ </object>
<object class="GtkAdjustment" id="jUltradianCycleDetectionAccuracy">
<property name="lower">0.5</property>
<property name="upper">20</property>
@@ -457,6 +478,20 @@
</row>
</data>
</object>
+ <object class="GtkListStore" id="mFFTParamsPlanType">
+ <columns>
+ <!-- column-name type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">ESTIMATE</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">MEASURE</col>
+ </row>
+ </data>
+ </object>
<object class="GtkListStore" id="mFFTParamsWindowType">
<columns>
<!-- column-name gchararray1 -->
@@ -656,7 +691,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Remove cached computed files:
-rm */*/*/.*.{psd,mc}</property>
+rm */*/*/.*.{psd,mc,swu}</property>
<property name="label" translatable="yes">_Purge cache</property>
<property name="use_underline">True</property>
</object>
@@ -1050,8 +1085,8 @@ rm */*/*/.*.{psd,mc}</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel" id="label12">
- <property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
<property name="valign">center</property>
<property name="xalign">1</property>
<property name="label" translatable="yes"><i>f</i><sub>0</sub>: </property>
@@ -1066,8 +1101,8 @@ rm */*/*/.*.{psd,mc}</property>
</child>
<child>
<object class="GtkSpinButton" id="eMsmtProfileParamsSWUF0">
- <property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="no_show_all">True</property>
<property name="valign">center</property>
<property name="has_frame">False</property>
<property name="invisible_char">•</property>
@@ -1090,8 +1125,8 @@ rm */*/*/.*.{psd,mc}</property>
</child>
<child>
<object class="GtkLabel" id="label13">
- <property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Hz</property>
</object>
@@ -1478,40 +1513,7 @@ rm */*/*/.*.{psd,mc}</property>
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkFrame" id="fFreqConventionalRanges">
+ <object class="GtkFrame" id="fScoreCodes">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
@@ -1520,28 +1522,39 @@ rm */*/*/.*.{psd,mc}</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkTable" id="table24">
+ <object class="GtkTable" id="table19">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
- <property name="n_rows">7</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">5</property>
- <property name="row_spacing">10</property>
+ <property name="n_rows">9</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">15</property>
+ <property name="row_spacing">2</property>
<child>
- <object class="GtkLabel" id="label25">
+ <object class="GtkLabel" id="label57">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b><small>Band</small></b></property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Try this string verbatim first...</property>
+ <property name="tooltip_text" translatable="yes">Try this string verbatim first...</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b><small>Stage</small></b></property>
<property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eFFTParamsWindowType</property>
</object>
</child>
<child>
- <object class="GtkLabel" id="label45">
+ <object class="GtkLabel" id="label126">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b><small>[..</small></b></property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">... failing which, any of these characters will indicate the corresponding stage.</property>
+ <property name="tooltip_text" translatable="yes">... failing which, any of these characters will indicate the corresponding stage.</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b><small>Code(s)</small></b></property>
<property name="use_markup">True</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -1549,35 +1562,47 @@ rm */*/*/.*.{psd,mc}</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label56">
+ <object class="GtkLabel" id="label127">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b><small>..]</small></b></property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">NREM1</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label69">
+ <object class="GtkLabel" id="label128">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">δ</span></property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">NREM2</property>
</object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label71">
+ <object class="GtkLabel" id="label129">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">β</span></property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">NREM3</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label131">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">NREM4</property>
</object>
<packing>
<property name="top_attach">5</property>
@@ -1585,11 +1610,11 @@ rm */*/*/.*.{psd,mc}</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label72">
+ <object class="GtkLabel" id="label132">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">γ</span></property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">REM</property>
</object>
<packing>
<property name="top_attach">6</property>
@@ -1597,33 +1622,52 @@ rm */*/*/.*.{psd,mc}</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label75">
+ <object class="GtkLabel" id="label133">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">α</span></property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Wake</property>
</object>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="eBandDeltaFrom">
+ <object class="GtkLabel" id="label135">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Unscored</property>
+ </object>
+ <packing>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHSeparator" id="hseparator6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_padding">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eScoreCodeNREM1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_frame">False</property>
+ <property name="max_length">5</property>
<property name="invisible_char">•</property>
- <property name="xalign">1</property>
+ <property name="width_chars">5</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandDeltaFrom</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -1633,262 +1677,323 @@ rm */*/*/.*.{psd,mc}</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="eBandAlphaFrom">
+ <object class="GtkEntry" id="eScoreCodeNREM2">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_frame">False</property>
+ <property name="max_length">5</property>
<property name="invisible_char">•</property>
- <property name="xalign">1</property>
+ <property name="width_chars">5</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandAlphaFrom</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="eBandBetaFrom">
+ <object class="GtkEntry" id="eScoreCodeNREM3">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_frame">False</property>
+ <property name="max_length">5</property>
<property name="invisible_char">•</property>
- <property name="xalign">1</property>
+ <property name="width_chars">5</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandBetaFrom</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="eBandGammaFrom">
+ <object class="GtkEntry" id="eScoreCodeNREM4">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_frame">False</property>
+ <property name="max_length">5</property>
<property name="invisible_char">•</property>
- <property name="xalign">1</property>
+ <property name="width_chars">5</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandGammaFrom</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="eBandDeltaUpto">
+ <object class="GtkEntry" id="eScoreCodeREM">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_frame">False</property>
+ <property name="max_length">5</property>
<property name="invisible_char">•</property>
- <property name="xalign">1</property>
+ <property name="width_chars">5</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandDeltaUpto</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="eBandAlphaUpto">
+ <object class="GtkEntry" id="eScoreCodeWake">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_frame">False</property>
+ <property name="max_length">5</property>
<property name="invisible_char">•</property>
- <property name="xalign">1</property>
+ <property name="width_chars">5</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandAlphaUpto</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="eBandBetaUpto">
+ <object class="GtkEntry" id="eScoreCodeUnscored">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_frame">False</property>
+ <property name="max_length">5</property>
<property name="invisible_char">•</property>
- <property name="xalign">1</property>
+ <property name="width_chars">5</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandBetaUpto</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
</packing>
</child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label130">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="label" translatable="yes"><b><big>Import score codes</big></b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="fSleepAnalysis">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="border_width">5</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">10</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
- <object class="GtkSpinButton" id="eBandGammaUpto">
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">A factor to multiply some siman parameters</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_NREM-REM detection accuracy</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eArtifDampenFactor</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eUltradianCycleDetectionAccuracy">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_frame">False</property>
<property name="invisible_char">•</property>
<property name="xalign">1</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandGammaUpto</property>
- <property name="digits">1</property>
+ <property name="adjustment">jUltradianCycleDetectionAccuracy</property>
+ <property name="digits">2</property>
<property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label73">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">θ</span></property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Fitting function (clamped to 0):</property>
+ <attributes>
+ <attribute name="scale" value="0.80000000000000004"/>
+ </attributes>
</object>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="eBandThetaFrom">
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkImage" id="image3">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
- <property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandThetaFrom</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">equation-uc.png</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b><big>Sleep analysis</big></b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="fSMP">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="border_width">5</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkTable" id="table29">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">10</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
- <object class="GtkSpinButton" id="eBandThetaUpto">
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Max threads to use: </property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eSMPMaxThreads</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eSMPMaxThreads">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_frame">False</property>
<property name="invisible_char">•</property>
<property name="xalign">1</property>
<property name="shadow_type">none</property>
- <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
- <property name="caps_lock_warning">False</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="adjustment">jBandThetaUpto</property>
- <property name="digits">2</property>
+ <property name="adjustment">jSMPMaxThreads</property>
<property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkSeparator" id="separator13">
+ <object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes">(0 = # CPU cores)</property>
+ <attributes>
+ <attribute name="scale" value="0.80000000000000004"/>
+ </attributes>
</object>
<packing>
+ <property name="left_attach">1</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label26">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><big><b>Frequency bands</b>, Hz</big></property>
+ <property name="label" translatable="yes"><b><big>SMP</big></b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="fScoreCodes">
+ <object class="GtkFrame" id="fFreqConventionalRanges">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
@@ -1897,39 +2002,28 @@ rm */*/*/.*.{psd,mc}</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkTable" id="table19">
+ <object class="GtkTable" id="table24">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
- <property name="n_rows">9</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">15</property>
- <property name="row_spacing">2</property>
+ <property name="n_rows">7</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">5</property>
+ <property name="row_spacing">10</property>
<child>
- <object class="GtkLabel" id="label57">
+ <object class="GtkLabel" id="label25">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Try this string verbatim first...</property>
- <property name="tooltip_text" translatable="yes">Try this string verbatim first...</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b><small>Stage</small></b></property>
+ <property name="label" translatable="yes"><b><small>Band</small></b></property>
<property name="use_markup">True</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eFFTParamsWindowType</property>
</object>
</child>
<child>
- <object class="GtkLabel" id="label126">
+ <object class="GtkLabel" id="label45">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">... failing which, any of these characters will indicate the corresponding stage.</property>
- <property name="tooltip_text" translatable="yes">... failing which, any of these characters will indicate the corresponding stage.</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b><small>Code(s)</small></b></property>
+ <property name="label" translatable="yes"><b><small>[..</small></b></property>
<property name="use_markup">True</property>
- <property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -1937,47 +2031,35 @@ rm */*/*/.*.{psd,mc}</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label127">
+ <object class="GtkLabel" id="label56">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">NREM1</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label128">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">NREM2</property>
+ <property name="label" translatable="yes"><b><small>..]</small></b></property>
+ <property name="use_markup">True</property>
</object>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label129">
+ <object class="GtkLabel" id="label69">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">NREM3</property>
+ <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">δ</span></property>
+ <property name="use_markup">True</property>
</object>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label131">
+ <object class="GtkLabel" id="label71">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">NREM4</property>
+ <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">β</span></property>
+ <property name="use_markup">True</property>
</object>
<packing>
<property name="top_attach">5</property>
@@ -1985,11 +2067,11 @@ rm */*/*/.*.{psd,mc}</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label132">
+ <object class="GtkLabel" id="label72">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">REM</property>
+ <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">γ</span></property>
+ <property name="use_markup">True</property>
</object>
<packing>
<property name="top_attach">6</property>
@@ -1997,375 +2079,296 @@ rm */*/*/.*.{psd,mc}</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label133">
+ <object class="GtkLabel" id="label75">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Wake</property>
+ <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">α</span></property>
+ <property name="use_markup">True</property>
</object>
<packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label135">
+ <object class="GtkSpinButton" id="eBandDeltaFrom">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Unscored</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandDeltaFrom</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkHSeparator" id="hseparator6">
+ <object class="GtkSpinButton" id="eBandAlphaFrom">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandAlphaFrom</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
</object>
<packing>
+ <property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_padding">5</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="eScoreCodeNREM1">
+ <object class="GtkSpinButton" id="eBandBetaFrom">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">5</property>
+ <property name="has_frame">False</property>
<property name="invisible_char">•</property>
- <property name="width_chars">5</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandBetaFrom</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="eScoreCodeNREM2">
+ <object class="GtkSpinButton" id="eBandGammaFrom">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">5</property>
+ <property name="has_frame">False</property>
<property name="invisible_char">•</property>
- <property name="width_chars">5</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandGammaFrom</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="eScoreCodeNREM3">
+ <object class="GtkSpinButton" id="eBandDeltaUpto">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">5</property>
+ <property name="has_frame">False</property>
<property name="invisible_char">•</property>
- <property name="width_chars">5</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandDeltaUpto</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eBandAlphaUpto">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
+ <property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandAlphaUpto</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="eScoreCodeNREM4">
+ <object class="GtkSpinButton" id="eBandBetaUpto">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">5</property>
+ <property name="has_frame">False</property>
<property name="invisible_char">•</property>
- <property name="width_chars">5</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandBetaUpto</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="eScoreCodeREM">
+ <object class="GtkSpinButton" id="eBandGammaUpto">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">5</property>
+ <property name="has_frame">False</property>
<property name="invisible_char">•</property>
- <property name="width_chars">5</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandGammaUpto</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="eScoreCodeWake">
+ <object class="GtkLabel" id="label73">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><span face="serif" size="x-large" style="italic">θ</span></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eBandThetaFrom">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">5</property>
+ <property name="has_frame">False</property>
<property name="invisible_char">•</property>
- <property name="width_chars">5</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandThetaFrom</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="eScoreCodeUnscored">
+ <object class="GtkSpinButton" id="eBandThetaUpto">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">5</property>
+ <property name="has_frame">False</property>
<property name="invisible_char">•</property>
- <property name="width_chars">5</property>
+ <property name="xalign">1</property>
<property name="shadow_type">none</property>
+ <property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
+ <property name="caps_lock_warning">False</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">jBandThetaUpto</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label130">
+ <object class="GtkLabel" id="label26">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="label" translatable="yes"><b><big>Import score codes</big></b></property>
+ <property name="label" translatable="yes"><big><b>Frequency bands</b>, Hz</big></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
- <child>
- <object class="GtkFrame" id="fSleepAnalysis">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="n_rows">3</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">10</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">A factor to multiply some siman parameters</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_NREM-REM detection accuracy</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eArtifDampenFactor</property>
- </object>
- </child>
- <child>
- <object class="GtkSpinButton" id="eUltradianCycleDetectionAccuracy">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="shadow_type">none</property>
- <property name="invisible_char_set">True</property>
- <property name="adjustment">jUltradianCycleDetectionAccuracy</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Fitting function (clamped to 0):</property>
- <attributes>
- <attribute name="scale" value="0.80000000000000004"/>
- </attributes>
- </object>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">equation-uc.png</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"><b><big>Sleep analysis</big></b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="fSMP">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkTable" id="table29">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">10</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Max threads to use: </property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eSMPMaxThreads</property>
- </object>
- </child>
- <child>
- <object class="GtkSpinButton" id="eSMPMaxThreads">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="shadow_type">none</property>
- <property name="invisible_char_set">True</property>
- <property name="adjustment">jSMPMaxThreads</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">(0 = # CPU cores)</property>
- <attributes>
- <attribute name="scale" value="0.80000000000000004"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"><b><big>SMP</big></b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- </packing>
- </child>
</object>
</child>
</object>
@@ -2403,7 +2406,7 @@ rm */*/*/.*.{psd,mc}</property>
<property name="valign">start</property>
<property name="border_width">20</property>
<property name="n_rows">3</property>
- <property name="n_columns">3</property>
+ <property name="n_columns">4</property>
<property name="column_spacing">40</property>
<property name="row_spacing">40</property>
<child>
@@ -2413,6 +2416,12 @@ rm */*/*/.*.{psd,mc}</property>
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
<object class="GtkFrame" id="fCommon">
<property name="height_request">94</property>
<property name="visible">True</property>
@@ -2461,8 +2470,7 @@ rm */*/*/.*.{psd,mc}</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes"><small>Takes effect for the PSD and MC profiles.
-Also, scoring can only be done when the page size
+ <property name="label" translatable="yes"><small>Scoring can only be done when the page size
in scoring facility matches this value.</small></property>
<property name="use_markup">True</property>
</object>
@@ -2492,7 +2500,7 @@ in scoring facility matches this value.</small></property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="fFFTParams">
+ <object class="GtkFrame" id="fArtifacts">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
@@ -2501,26 +2509,22 @@ in scoring facility matches this value.</small></property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkTable" id="table11">
+ <object class="GtkTable" id="table12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
<property name="n_rows">2</property>
- <property name="n_columns">2</property>
+ <property name="n_columns">3</property>
<property name="column_spacing">10</property>
- <property name="row_spacing">5</property>
+ <property name="row_spacing">10</property>
<child>
- <object class="GtkLabel" id="label49">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Window type</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eFFTParamsWindowType</property>
- </object>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
</child>
<child>
- <object class="GtkComboBox" id="eFFTParamsWindowType">
+ <object class="GtkComboBox" id="eArtifDampenWindowType">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">mFFTParamsWindowType</property>
@@ -2528,17 +2532,19 @@ in scoring facility matches this value.</small></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options"/>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label53">
+ <object class="GtkLabel" id="label24">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">_Collect into bins of</property>
+ <property name="label" translatable="yes">D_ampening window type</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">eFFTParamsBinSize</property>
+ <property name="mnemonic_widget">eArtifDampenWindowType</property>
</object>
<packing>
<property name="top_attach">1</property>
@@ -2546,307 +2552,579 @@ in scoring facility matches this value.</small></property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="eFFTParamsBinSize">
+ <object class="GtkLabel" id="label118">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="model">mFFTParamsBinSize</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Dampening factor</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eArtifDampenFactor</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eArtifDampenFactor">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">jArtifDampFactor</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"/>
</packing>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label48">
+ <object class="GtkLabel" id="label52">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b><big>FFT parameters</big></b></property>
+ <property name="label" translatable="yes"><b><big>Artifacts</big></b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="fMicrocontinuity">
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="n_rows">6</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">5</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">5</property>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkLabel" id="label141">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">IIR backpo_late</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eMCParamIIRBackpolate</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label166">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Gai_n</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eMCParamMCGain</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label175">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Band width</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eMCParamBandWidth</property>
- </object>
- </child>
- <child>
- <object class="GtkSpinButton" id="eMCParamIIRBackpolate">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="shadow_type">none</property>
- <property name="invisible_char_set">True</property>
- <property name="adjustment">jMCParamIIRBackpolate</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="eMCParamMCGain">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="shadow_type">none</property>
- <property name="invisible_char_set">True</property>
- <property name="adjustment">jMCParamMCGain</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="eMCParamBandWidth">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="shadow_type">none</property>
- <property name="invisible_char_set">True</property>
- <property name="adjustment">jMCParamBandWidth</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkSeparator" id="separator10">
+ <object class="GtkTable" id="table11">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label49">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Window type</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eFFTParamsWindowType</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="eFFTParamsWindowType">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">mFFTParamsWindowType</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label53">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Collect into bins of</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eFFTParamsBinSize</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="eFFTParamsBinSize">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">mFFTParamsBinSize</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">FFTW plan type</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eFFTParamsBinSize</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="eFFTParamsPlanType">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">mFFTParamsPlanType</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
</object>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
</child>
- <child>
- <object class="GtkSeparator" id="separator12">
+ <child type="tab">
+ <object class="GtkLabel" id="label18">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">PSD</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
- <property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label124">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><small>This is not the complete implementation of the
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">10</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label141">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">IIR backpo_late</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eMCParamIIRBackpolate</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label166">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Gai_n</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eMCParamMCGain</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label175">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Band width</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eMCParamBandWidth</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eMCParamIIRBackpolate">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">jMCParamIIRBackpolate</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eMCParamMCGain">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">jMCParamMCGain</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eMCParamBandWidth">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">jMCParamBandWidth</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label124">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes"><small>This is not the complete implementation of the
EEG microcontinuity algorithm. Read more <a href="http://johnhommer.com/academic/code/aghermann/mc.html">here</a>.</small></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label140">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"><b><big>Microcontinuity parameters</big></b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="fArtifacts">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkTable" id="table12">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">10</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkComboBox" id="eArtifDampenWindowType">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">mFFTParamsWindowType</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Freq. inc</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eMCParamMCGain</property>
+ </object>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eMCParamFreqInc">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">jMCParamFreqInc</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"># bins</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eMCParamMCGain</property>
+ </object>
+ <packing>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eMCParamNBins">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">jMCParamNBins</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label87">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"> Hz</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label101">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"> Hz</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"/>
+ <property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label24">
+ <child type="tab">
+ <object class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">D_ampening window type</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eArtifDampenWindowType</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">MC</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label118">
+ <object class="GtkTable" id="table30">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Dampening factor</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eArtifDampenFactor</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label54">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Min upswing duration</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eMCParamBandWidth</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="eSWUParamMinUpswingDuration">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_frame">False</property>
+ <property name="invisible_char">•</property>
+ <property name="xalign">1</property>
+ <property name="shadow_type">none</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">jSWUParamMinUpswingDuration</property>
+ <property name="digits">2</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label102">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"> sec</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes"><small>This is a <i>very experimental</i> work in progress.
+Read more <a href="http://johnhommer.com/academic/code/aghermann/swu.html">here</a>.</small></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
</object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
</child>
- <child>
- <object class="GtkSpinButton" id="eArtifDampenFactor">
+ <child type="tab">
+ <object class="GtkLabel" id="label20">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_frame">False</property>
- <property name="invisible_char">•</property>
- <property name="xalign">1</property>
- <property name="shadow_type">none</property>
- <property name="invisible_char_set">True</property>
- <property name="adjustment">jArtifDampFactor</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">SWU</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
</packing>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label52">
+ <object class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b><big>Artifacts</big></b></property>
+ <property name="label" translatable="yes"><b><big>Profile parameters</big></b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">4</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
</object>
@@ -2903,9 +3181,6 @@ EEG microcontinuity algorithm. Read more <a href="http://johnhommer.com/acade
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkFrame" id="fDAHeights">
<property name="width_request">100</property>
<property name="height_request">80</property>
@@ -3209,64 +3484,6 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkFrame" id="fBrowseCommand">
- <property name="width_request">100</property>
- <property name="height_request">80</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">5</property>
- <property name="bottom_padding">5</property>
- <property name="left_padding">5</property>
- <property name="right_padding">5</property>
- <child>
- <object class="GtkTable" id="table17">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="column_spacing">5</property>
- <child>
- <object class="GtkEntry" id="eBrowseCommand">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Common other choices are <i>ROX-Filer</i> and <i>nautilus</i></property>
- <property name="tooltip_text" translatable="yes">Common other choices are ROX-Filer and nautilus</property>
- <property name="max_length">255</property>
- <property name="invisible_char">•</property>
- <property name="text" translatable="yes">thunar</property>
- <property name="invisible_char_set">True</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"><b>‘Browse with file manager’ command</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
<object class="GtkFrame" id="fColours">
<property name="width_request">397</property>
<property name="height_request">400</property>
@@ -3301,17 +3518,18 @@ dragging individual signals with <i>Alt</i>.</small></property
<object class="GtkTable" id="table5">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="border_width">10</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<child>
- <object class="GtkColorButton" id="bColourPowerMT">
+ <object class="GtkColorButton" id="bColourMWProfile">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="use_alpha">True</property>
- <property name="title" translatable="yes">PSD profile</property>
+ <property name="title" translatable="yes">Profile</property>
<property name="color">#081d6d2e1621</property>
</object>
<packing>
@@ -3338,12 +3556,11 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourNight">
+ <object class="GtkColorButton" id="bColourMWNight">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
- <property name="use_alpha">True</property>
<property name="title" translatable="yes">Night</property>
<property name="color">#743b75b8d0ce</property>
</object>
@@ -3383,12 +3600,11 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourDay">
+ <object class="GtkColorButton" id="bColourMWDay">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
- <property name="use_alpha">True</property>
<property name="title" translatable="yes">Day</property>
<property name="color">#3f6dbc6fe795</property>
</object>
@@ -3427,11 +3643,12 @@ dragging individual signals with <i>Alt</i>.</small></property
<object class="GtkTable" id="table7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="border_width">10</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
- <object class="GtkColorButton" id="bColourTicksMT">
+ <object class="GtkColorButton" id="bColourMWTicks">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3476,7 +3693,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourLabelsMT">
+ <object class="GtkColorButton" id="bColourMWLabels">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3533,11 +3750,12 @@ dragging individual signals with <i>Alt</i>.</small></property
<object class="GtkTable" id="table8">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="border_width">10</property>
<property name="n_rows">7</property>
<property name="n_columns">2</property>
<child>
- <object class="GtkColorButton" id="bColourNREM1">
+ <object class="GtkColorButton" id="bColourScoreNREM1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3649,7 +3867,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourNREM2">
+ <object class="GtkColorButton" id="bColourScoreNREM2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3665,7 +3883,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourNREM3">
+ <object class="GtkColorButton" id="bColourScoreNREM3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3681,7 +3899,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourNREM4">
+ <object class="GtkColorButton" id="bColourScoreNREM4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3697,7 +3915,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourREM">
+ <object class="GtkColorButton" id="bColourScoreREM">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3713,7 +3931,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourWake">
+ <object class="GtkColorButton" id="bColourScoreWake">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3729,7 +3947,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourNONE">
+ <object class="GtkColorButton" id="bColourScoreNONE">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -3772,6 +3990,7 @@ dragging individual signals with <i>Alt</i>.</small></property
<object class="GtkTable" id="table4">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="border_width">10</property>
<property name="n_rows">5</property>
<property name="n_columns">2</property>
@@ -3953,18 +4172,84 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkTable" id="table10">
+ <object class="GtkTable" id="table31">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="border_width">10</property>
- <property name="n_rows">3</property>
+ <property name="n_rows">6</property>
<property name="n_columns">2</property>
<child>
- <object class="GtkLabel" id="label105">
+ <object class="GtkLabel" id="label48">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">EMG</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label55">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Hypnogram</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkColorButton" id="bColourSFEMG">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <property name="use_alpha">True</property>
+ <property name="title" translatable="yes">EMG</property>
+ <property name="color">#108f6e4d178b</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkColorButton" id="bColourSFHypnogram">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <property name="title" translatable="yes">Hypnogram paper</property>
+ <property name="color">#fdefffffdbfc</property>
+ </object>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label112">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Ticks</property>
+ <property name="label" translatable="yes">PSD</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -3974,11 +4259,11 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkLabel" id="label107">
+ <object class="GtkLabel" id="label140">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Labels</property>
+ <property name="label" translatable="yes">µContinuity</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -3990,46 +4275,48 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourTicksSF">
+ <object class="GtkColorButton" id="bColourSFProfileMC">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="use_alpha">True</property>
- <property name="title" translatable="yes">Ticks (scoring facility)</property>
- <property name="color">#3e8effff42d7</property>
+ <property name="title" translatable="yes">EEG Microcontinuity</property>
+ <property name="color">#1a0182debe4a</property>
+ <property name="rgba">rgba(26,130,190,0.80496453900709219)</property>
</object>
<packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourLabelsSF">
+ <object class="GtkColorButton" id="bColourSFProfilePSD">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="use_alpha">True</property>
- <property name="title" translatable="yes">Labels (scoring facility)</property>
- <property name="color">#4e4e9a9a0606</property>
+ <property name="title" translatable="yes">EEG PSD</property>
+ <property name="color">#49421305b258</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourCursor">
+ <object class="GtkColorButton" id="bColourSFProfileSWU">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="use_alpha">True</property>
- <property name="title" translatable="yes">Cursor</property>
- <property name="color">#ffff1daa0000</property>
+ <property name="title" translatable="yes">SWU</property>
+ <property name="color">#8e81165353b1</property>
+ <property name="rgba">rgba(216,13,13,0.80000000000000004)</property>
</object>
<packing>
<property name="top_attach">2</property>
@@ -4039,11 +4326,11 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkLabel" id="label28">
+ <object class="GtkLabel" id="label58">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Cursor</property>
+ <property name="label" translatable="yes">SWU</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -4054,16 +4341,27 @@ dragging individual signals with <i>Alt</i>.</small></property
<property name="x_padding">5</property>
</packing>
</child>
+ <child>
+ <object class="GtkSeparator" id="separator11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label108">
+ <object class="GtkLabel" id="label42">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Ticks & labels</property>
+ <property name="label" translatable="yes">Profiles</property>
</object>
<packing>
<property name="position">2</property>
@@ -4074,42 +4372,11 @@ dragging individual signals with <i>Alt</i>.</small></property
<object class="GtkTable" id="table9">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="border_width">10</property>
- <property name="n_rows">7</property>
+ <property name="n_rows">6</property>
<property name="n_columns">2</property>
<child>
- <object class="GtkLabel" id="label98">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">EMG</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options">GTK_FILL</property>
- <property name="x_padding">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label99">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Hypnogram</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">GTK_FILL</property>
- <property name="x_padding">5</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label100">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -4119,47 +4386,12 @@ dragging individual signals with <i>Alt</i>.</small></property
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">5</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourEMG">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">none</property>
- <property name="use_alpha">True</property>
- <property name="title" translatable="yes">EMG line</property>
- <property name="color">#108f6e4d178b</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkColorButton" id="bColourHypnogram">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">none</property>
- <property name="title" translatable="yes">Hypnogram paper</property>
- <property name="color">#fdefffffdbfc</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkColorButton" id="bColourArtifacts">
+ <object class="GtkColorButton" id="bColourSFArtifacts">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4169,14 +4401,12 @@ dragging individual signals with <i>Alt</i>.</small></property
<property name="color">#db3c1ab939cf</property>
</object>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourAnnotations">
+ <object class="GtkColorButton" id="bColourSFAnnotations">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4186,8 +4416,8 @@ dragging individual signals with <i>Alt</i>.</small></property
<property name="color">#3da9846af6c2</property>
</object>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -4202,14 +4432,14 @@ dragging individual signals with <i>Alt</i>.</small></property
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">5</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourSelection">
+ <object class="GtkColorButton" id="bColourSFSelection">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4219,8 +4449,8 @@ dragging individual signals with <i>Alt</i>.</small></property
<property name="color">#6b57e4d75206</property>
</object>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -4235,74 +4465,112 @@ dragging individual signals with <i>Alt</i>.</small></property
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">5</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourProfilePsdSF">
+ <object class="GtkColorButton" id="bColourSFTicks">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="use_alpha">True</property>
- <property name="title" translatable="yes">EEG PSD</property>
- <property name="color">#0f0f6262a9a9</property>
+ <property name="title" translatable="yes">Ticks (scoring facility)</property>
+ <property name="color">#3e8effff42d7</property>
</object>
<packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label97">
+ <object class="GtkLabel" id="label105">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">PSD</property>
+ <property name="label" translatable="yes">Ticks</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">5</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label22">
+ <object class="GtkColorButton" id="bColourSFCursor">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <property name="use_alpha">True</property>
+ <property name="title" translatable="yes">Cursor</property>
+ <property name="color">#ffff1daa0000</property>
+ <property name="rgba">rgba(216,13,13,0.80000000000000004)</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label28">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">µContinuity</property>
+ <property name="label" translatable="yes">Cursor</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">5</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourProfileMcSF">
+ <object class="GtkColorButton" id="bColourSFLabels">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="use_alpha">True</property>
- <property name="title" translatable="yes">EEG Microcontinuity</property>
- <property name="color">#e73f8bfb0315</property>
+ <property name="title" translatable="yes">Labels (scoring facility)</property>
+ <property name="color">#4e4e9a9a0606</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label107">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Labels</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">5</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">3</property>
@@ -4348,11 +4616,12 @@ dragging individual signals with <i>Alt</i>.</small></property
<object class="GtkTable" id="table16">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="border_width">10</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<child>
- <object class="GtkColorButton" id="bColourSWA">
+ <object class="GtkColorButton" id="bColourMFSWA">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4428,7 +4697,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourSWASim">
+ <object class="GtkColorButton" id="bColourMFSWASim">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4444,7 +4713,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourProcessS">
+ <object class="GtkColorButton" id="bColourMFProcessS">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4460,7 +4729,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourPaperMR">
+ <object class="GtkColorButton" id="bColourMFPaper">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4491,6 +4760,7 @@ dragging individual signals with <i>Alt</i>.</small></property
<object class="GtkTable" id="table3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="border_width">10</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
@@ -4525,7 +4795,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourTicksMR">
+ <object class="GtkColorButton" id="bColourMFTicks">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4540,7 +4810,7 @@ dragging individual signals with <i>Alt</i>.</small></property
</packing>
</child>
<child>
- <object class="GtkColorButton" id="bColourLabelsMR">
+ <object class="GtkColorButton" id="bColourMFLabels">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -4611,6 +4881,67 @@ dragging individual signals with <i>Alt</i>.</small></property
<property name="y_options">GTK_FILL</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkFrame" id="fBrowseCommand">
+ <property name="width_request">100</property>
+ <property name="height_request">80</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="border_width">5</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">5</property>
+ <property name="bottom_padding">5</property>
+ <property name="left_padding">5</property>
+ <property name="right_padding">5</property>
+ <child>
+ <object class="GtkTable" id="table17">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">10</property>
+ <property name="column_spacing">5</property>
+ <child>
+ <object class="GtkEntry" id="eBrowseCommand">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Common other choices are ROX-Filer and nautilus</property>
+ <property name="tooltip_text" translatable="yes">Common other choices are ROX-Filer and nautilus</property>
+ <property name="max_length">255</property>
+ <property name="invisible_char">•</property>
+ <property name="text" translatable="yes">thunar</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b><big>File manager</big></b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
</object>
</child>
</object>
@@ -4877,7 +5208,7 @@ dragging individual signals with <i>Alt</i>.</small></property
<property name="halign">start</property>
<property name="valign">start</property>
<property name="border_width">20</property>
- <property name="n_rows">3</property>
+ <property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="column_spacing">40</property>
<property name="row_spacing">40</property>
@@ -4891,15 +5222,6 @@ dragging individual signals with <i>Alt</i>.</small></property
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<object class="GtkFrame" id="fSimParamCtlParm">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -5404,8 +5726,8 @@ dragging individual signals with <i>Alt</i>.</small></property
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
<child>
@@ -6782,6 +7104,12 @@ dragging individual signals with <i>Alt</i>.</small></property
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child>
diff --git a/data/sf.glade b/data/sf.glade
index fcdc50a..96dfb18 100644
--- a/data/sf.glade
+++ b/data/sf.glade
@@ -2211,8 +2211,9 @@
<object class="GtkLabel" id="label194">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Higher values mean looser fit criteria,
-on individual parameters:</property>
+ <property name="tooltip_markup" translatable="yes">Higher values mean looser fit criteria
+on individual parameters: <b>a</b> for <i>Envelope</i>,
+<b>b</b> for <i>Low-pass filter</i>, and <b>c</b> for <i>Derivative ZC density</i>.</property>
<property name="xalign">0</property>
<property name="yalign">1</property>
<property name="label" translatable="yes"><b>Strictness:</b></property>
@@ -2981,15 +2982,15 @@ on individual parameters:</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="bScoreClear">
- <property name="label" translatable="yes">⌫</property>
+ <object class="GtkButton" id="bScoreWake">
+ <property name="label" translatable="yes">☺</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_markup" translatable="yes">Clear (<b>q</b>)</property>
+ <property name="tooltip_markup" translatable="yes">Wake (<b>w</b>)</property>
<property name="valign">center</property>
<property name="focus_on_click">False</property>
- <accelerator key="q" signal="activate"/>
+ <accelerator key="w" signal="activate"/>
</object>
<packing>
<property name="expand">False</property>
@@ -2998,15 +2999,15 @@ on individual parameters:</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="bScoreWake">
- <property name="label" translatable="yes">☺</property>
+ <object class="GtkButton" id="bScoreClear">
+ <property name="label" translatable="yes">⌫</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_markup" translatable="yes">Wake (<b>w</b>)</property>
+ <property name="tooltip_markup" translatable="yes">Clear (<b>q</b>)</property>
<property name="valign">center</property>
<property name="focus_on_click">False</property>
- <accelerator key="w" signal="activate"/>
+ <accelerator key="q" signal="activate"/>
</object>
<packing>
<property name="expand">False</property>
@@ -3241,18 +3242,17 @@ on individual parameters:</property>
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="bSFShowFindDialog">
- <property name="label" translatable="yes">_Find</property>
+ <object class="GtkToggleButton" id="bSFShowPhaseDiffDialog">
+ <property name="label" translatable="yes">Δφ</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Find/manage patterns (<b>F3</b>)</property>
- <property name="tooltip_text" translatable="yes">Find/manage patterns (F3)</property>
+ <property name="tooltip_markup" translatable="yes">Interchannel signal shift (<b>F4</b>)</property>
+ <property name="tooltip_text" translatable="yes">Interchannel signal shift (F4)</property>
<property name="valign">center</property>
- <property name="use_underline">True</property>
<property name="focus_on_click">False</property>
- <accelerator key="F3" signal="activate"/>
+ <accelerator key="F4" signal="activate"/>
</object>
<packing>
<property name="expand">False</property>
@@ -3262,17 +3262,18 @@ on individual parameters:</property>
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="bSFShowPhaseDiffDialog">
- <property name="label" translatable="yes">Δφ</property>
+ <object class="GtkToggleButton" id="bSFShowFindDialog">
+ <property name="label" translatable="yes">_Find</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Interchannel signal shift (<b>F4</b>)</property>
- <property name="tooltip_text" translatable="yes">Interchannel signal shift (F4)</property>
+ <property name="tooltip_markup" translatable="yes">Find/manage patterns (<b>F3</b>)</property>
+ <property name="tooltip_text" translatable="yes">Find/manage patterns (F3)</property>
<property name="valign">center</property>
+ <property name="use_underline">True</property>
<property name="focus_on_click">False</property>
- <accelerator key="F4" signal="activate"/>
+ <accelerator key="F3" signal="activate"/>
</object>
<packing>
<property name="expand">False</property>
@@ -4864,7 +4865,7 @@ skew: 𝑔(𝑢) = 𝑢2</property>
<property name="overwrite_mode">True</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">jSFADBackpolate</property>
- <property name="digits">1</property>
+ <property name="digits">2</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/src/common/config-validate.hh b/src/common/config-validate.hh
index ade684b..741eff4 100644
--- a/src/common/config-validate.hh
+++ b/src/common/config-validate.hh
@@ -135,6 +135,21 @@ struct SValidator {
};
+template <>
+inline void
+SValidator<size_t>::get( const libconfig::Config& C) const
+{
+ int tmp;
+ if ( not C.lookupValue( key, tmp) ) {
+ fprintf( stderr, "SValidator::get(): key %s not found\n", key.c_str());
+ return; // leave at default
+ }
+ if ( not valf(tmp) )
+ throw invalid_argument( string("Bad value for \"") + key + "\"");
+ *rcp = tmp;
+}
+
+
template <typename T>
void
get( forward_list<SValidator<T>>& vl,
diff --git a/src/expdesign/loadsave.cc b/src/expdesign/loadsave.cc
index 3df1e5b..db2f7b0 100644
--- a/src/expdesign/loadsave.cc
+++ b/src/expdesign/loadsave.cc
@@ -31,7 +31,8 @@ using namespace agh;
int
-agh::CExpDesign::load_settings()
+agh::CExpDesign::
+load_settings()
{
libconfig::Config conf;
@@ -42,6 +43,7 @@ agh::CExpDesign::load_settings()
using namespace confval;
get( config_keys_d, conf);
+ get( config_keys_z, conf);
get( config_keys_g, conf);
get( config_keys_b, conf);
diff --git a/src/expdesign/primaries.cc b/src/expdesign/primaries.cc
index 4cdb220..4c44647 100644
--- a/src/expdesign/primaries.cc
+++ b/src/expdesign/primaries.cc
@@ -39,30 +39,35 @@ CExpDesign (const string& session_dir_,
tunables0 (tstep, tlo, thi),
_id_pool (0),
config_keys_g ({
- confval::SValidator<double>("ctl_param.StepSize", &ctl_params0.siman_params.step_size),
- confval::SValidator<double>("ctl_param.Boltzmannk", &ctl_params0.siman_params.k, confval::SValidator<double>::SVFRangeEx( DBL_MIN, 1e9)),
- confval::SValidator<double>("ctl_param.TInitial", &ctl_params0.siman_params.t_initial, confval::SValidator<double>::SVFRangeEx( DBL_MIN, 1e9)),
- confval::SValidator<double>("ctl_param.DampingMu", &ctl_params0.siman_params.mu_t, confval::SValidator<double>::SVFRangeEx( DBL_MIN, 1e9)),
- confval::SValidator<double>("ctl_param.TMin", &ctl_params0.siman_params.t_min, confval::SValidator<double>::SVFRangeEx( DBL_MIN, 1e9)),
- confval::SValidator<double>("profile.ReqScoredPC", &req_percent_scored, confval::SValidator<double>::SVFRangeIn( 80., 100.)),
- confval::SValidator<double>("fft_param.BinSize", &fft_params.binsize, confval::SValidator<double>::SVFRangeIn( .125, 1.)),
- confval::SValidator<double>("artifacts.DampenFactor", &af_dampen_factor, confval::SValidator<double>::SVFRangeIn( 0., 1.)),
+ confval::SValidator<double>("ctl_param.step_size", &ctl_params0.siman_params.step_size),
+ confval::SValidator<double>("ctl_param.boltzmann_k", &ctl_params0.siman_params.k, confval::SValidator<double>::SVFRangeEx( DBL_MIN, 1e9)),
+ confval::SValidator<double>("ctl_param.t_initial", &ctl_params0.siman_params.t_initial, confval::SValidator<double>::SVFRangeEx( DBL_MIN, 1e9)),
+ confval::SValidator<double>("ctl_param.damping_mu", &ctl_params0.siman_params.mu_t, confval::SValidator<double>::SVFRangeEx( DBL_MIN, 1e9)),
+ confval::SValidator<double>("ctl_param.t_min", &ctl_params0.siman_params.t_min, confval::SValidator<double>::SVFRangeEx( DBL_MIN, 1e9)),
+ confval::SValidator<double>("profile.req_scored_pc", &req_percent_scored, confval::SValidator<double>::SVFRangeIn( 80., 100.)),
+ confval::SValidator<double>("fft_param.binsize", &fft_params.binsize, confval::SValidator<double>::SVFRangeIn( .125, 1.)),
+ confval::SValidator<double>("artifacts.dampen_factor", &af_dampen_factor, confval::SValidator<double>::SVFRangeIn( 0., 1.)),
confval::SValidator<double>("mc_param.mc_gain", &mc_params.mc_gain, confval::SValidator<double>::SVFRangeIn( 0., 100.)),
confval::SValidator<double>("mc_param.f0fc", &mc_params.f0fc, confval::SValidator<double>::SVFRangeEx( 0., 80.)),
confval::SValidator<double>("mc_param.bandwidth", &mc_params.bandwidth, confval::SValidator<double>::SVFRangeIn( 0.125, 2.)),
confval::SValidator<double>("mc_param.iir_backpolate", &mc_params.iir_backpolate, confval::SValidator<double>::SVFRangeIn( 0., 1.)),
+ confval::SValidator<double>("swu_param.min_upswing_duration",
+ &swu_params.min_upswing_duration, confval::SValidator<double>::SVFRangeIn( 0.01, 1.)),
}),
config_keys_d ({
- confval::SValidator<int>("smp.num_threads", &num_threads, confval::SValidator<int>::SVFRangeIn( 0, 20)),
- confval::SValidator<int>("fft_param.WelchWindowType", (int*)&fft_params.welch_window_type, confval::SValidator<int>::SVFRangeIn( 0, (int)sigproc::TWinType::_total - 1)),
- confval::SValidator<int>("artifacts.DampenWindowType", (int*)&af_dampen_window_type, confval::SValidator<int>::SVFRangeIn( 0, (int)sigproc::TWinType::_total - 1)),
- confval::SValidator<int>("ctl_param.ItersFixedT", &ctl_params0.siman_params.iters_fixed_T, confval::SValidator<int>::SVFRangeIn( 1, 1000000)),
- confval::SValidator<int>("ctl_param.NTries", &ctl_params0.siman_params.n_tries, confval::SValidator<int>::SVFRangeIn( 1, 10000)),
- confval::SValidator<int>("profile.swa_laden_pages_before_SWA_0",
- (int*)&swa_laden_pages_before_SWA_0,
- confval::SValidator<size_t>::SVFRangeIn( 1, 100)),
- confval::SValidator<int>("fftparam.PageSize", (int*)&fft_params.pagesize, confval::SValidator<size_t>::SVFRangeIn( 4, 120)),
- confval::SValidator<int>("mcparam.SmoothSide", (int*)&mc_params.smooth_side, confval::SValidator<size_t>::SVFRangeIn( 0, 5)),
+ confval::SValidator<int>("fft_param.welch_window_type", (int*)&fft_params.welch_window_type, confval::SValidator<int>::SVFRangeIn( 0, (int)sigproc::TWinType_total - 1)),
+ confval::SValidator<int>("fft_param.plan_type", (int*)&fft_params.plan_type, confval::SValidator<int>::SVFRangeIn( 0, (int)metrics::psd::TFFTWPlanType_total - 1)),
+ confval::SValidator<int>("artifacts.dampen_window_type",(int*)&af_dampen_window_type, confval::SValidator<int>::SVFRangeIn( 0, (int)sigproc::TWinType_total - 1)),
+ confval::SValidator<int>("ctl_param.iters_fixed_t", &ctl_params0.siman_params.iters_fixed_T, confval::SValidator<int>::SVFRangeIn( 1, 1000000)),
+ confval::SValidator<int>("ctl_param.n_tries", &ctl_params0.siman_params.n_tries, confval::SValidator<int>::SVFRangeIn( 1, 10000)),
+ }),
+ config_keys_z ({
+ confval::SValidator<size_t>("smp.num_threads", &num_threads, confval::SValidator<size_t>::SVFRangeIn( 0, 20)),
+ confval::SValidator<size_t>("mc_params.n_bins", &mc_params.n_bins, confval::SValidator<size_t>::SVFRangeIn( 1, 100)),
+ confval::SValidator<size_t>("profile.swa_laden_pages_before_SWA_0",
+ &swa_laden_pages_before_SWA_0, confval::SValidator<size_t>::SVFRangeIn( 1, 100)),
+ confval::SValidator<size_t>("fft_param.pagesize", &fft_params.pagesize, confval::SValidator<size_t>::SVFRangeIn( 4, 120)),
+ confval::SValidator<size_t>("mc_param.smooth_side", &mc_params.smooth_side, confval::SValidator<size_t>::SVFRangeIn( 0, 5)),
}),
config_keys_b ({
confval::SValidator<bool>("ctl_param.DBAmendment1", &ctl_params0.DBAmendment1),
@@ -476,18 +481,16 @@ void
agh::CExpDesign::
remove_untried_modruns()
{
- for ( auto &G : groups )
- for ( auto &J : G.second )
- for ( auto &D : J.measurements )
+ for ( auto& G : groups )
+ for ( auto& J : G.second )
+ for ( auto& D : J.measurements )
retry_modruns:
for ( auto RSt = D.second.modrun_sets.begin(); RSt != D.second.modrun_sets.end(); ++RSt )
for ( auto Ri = RSt->second.begin(); Ri != RSt->second.end(); ++Ri ) {
- // printf( "#----- check Subject: %s; Session: %s; Channel: %s; Range: %g-%g Hz (%d)\n",
- // Ri->second.subject(), Ri->second.session(), Ri->second.channel(),
- // Ri->second.freq_from(), Ri->second.freq_upto(),
- // Ri->second.status);
if ( !(Ri->second.status & ach::CModelRun::modrun_tried) ) {
RSt->second.erase( Ri);
+ if ( RSt->second.empty() )
+ D.second.modrun_sets.erase(RSt);
goto retry_modruns;
}
}
diff --git a/src/expdesign/primaries.hh b/src/expdesign/primaries.hh
index dd52f41..401bcae 100644
--- a/src/expdesign/primaries.hh
+++ b/src/expdesign/primaries.hh
@@ -419,7 +419,7 @@ class CExpDesign {
for_all_modruns( const TModelRunOpFun&, const TModelRunReportFun&, const TModelRunFilterFun&);
// inventory
- int num_threads;
+ size_t num_threads;
metrics::psd::SPPack
fft_params;
metrics::swu::SPPack
@@ -460,6 +460,7 @@ class CExpDesign {
// load/save
forward_list<confval::SValidator<double>> config_keys_g;
forward_list<confval::SValidator<int>> config_keys_d;
+ forward_list<confval::SValidator<size_t>> config_keys_z;
forward_list<confval::SValidator<bool>> config_keys_b;
};
diff --git a/src/libsigfile/page.cc b/src/libsigfile/page.cc
index c9c15e1..304641e 100644
--- a/src/libsigfile/page.cc
+++ b/src/libsigfile/page.cc
@@ -29,7 +29,7 @@ const char sigfile::SPage::score_codes[] = {
};
-const char* const sigfile::SPage::score_names[(size_t)TScore::_total] = {
+const char* const sigfile::SPage::score_names[TScore::TScore_total] = {
"blank",
"NREM1", "NREM2", "NREM3", "NREM4",
"REM",
diff --git a/src/libsigfile/page.hh b/src/libsigfile/page.hh
index 5faaf93..d9934b0 100644
--- a/src/libsigfile/page.hh
+++ b/src/libsigfile/page.hh
@@ -34,19 +34,19 @@ struct SPage {
none,
nrem1, nrem2, nrem3, nrem4,
rem, wake,
- _total
+ TScore_total
};
- static const char score_codes[TScore::_total];
+ static const char score_codes[TScore::TScore_total];
static char score_code( TScore i)
{
- if ( i >= TScore::_total )
+ if ( i >= TScore::TScore_total )
return '?';
return score_codes[i];
}
- static const char* const score_names[TScore::_total];
+ static const char* const score_names[TScore::TScore_total];
static const char* score_name( TScore i)
{
- if ( i >= TScore::_total )
+ if ( i >= TScore::TScore_total )
return "(invalid)";
return score_names[i];
}
@@ -56,13 +56,13 @@ struct SPage {
char2score( char c)
{
size_t i = TScore::none;
- while ( i != TScore::_total && c != score_codes[i] )
+ while ( i != TScore::TScore_total && c != score_codes[i] )
++i;
return (TScore)i;
}
static char score2char( TScore i)
{
- if ( i >= TScore::_total )
+ if ( i >= TScore::TScore_total )
return '?';
return score_codes[i];
}
@@ -81,7 +81,7 @@ struct SPage {
}
char score_code() const
{
- return score_codes[(size_t)score()];
+ return score_codes[score()];
}
bool has_swa() const
@@ -223,7 +223,7 @@ class CHypnogram {
}
int save_canonical( const char* fname) const;
- typedef array<string, (size_t)SPage::TScore::_total> TCustomScoreCodes;
+ typedef array<string, (size_t)SPage::TScore::TScore_total> TCustomScoreCodes;
int load_canonical( const char* fname)
{
return load_canonical( fname,
diff --git a/src/metrics/mc.cc b/src/metrics/mc.cc
index 0aafc15..c8dcfce 100644
--- a/src/metrics/mc.cc
+++ b/src/metrics/mc.cc
@@ -46,6 +46,7 @@ reset()
smooth_side = 0;
freq_from = 0.5;
freq_inc = .5;
+ n_bins = 5;
}
@@ -124,7 +125,7 @@ go_compute()
Pp.freq_from + b * Pp.freq_inc,
Pp.freq_from + b * Pp.freq_inc + Pp.f0fc,
Pp.bandwidth);
- auto suss = su_ss.second - su_ss.first; // make it positive
+ auto suss = su_ss.first - su_ss.second; // make it positive
// collapse into our pages
for ( size_t p = 0; p < pages(); ++p ) {
auto range = slice (p * Pp.scope, Pp.pagesize/Pp.scope, 1);
diff --git a/src/metrics/mc.hh b/src/metrics/mc.hh
index 690ebc7..3ec004e 100644
--- a/src/metrics/mc.hh
+++ b/src/metrics/mc.hh
@@ -39,6 +39,7 @@ struct SPPack
size_t smooth_side;
double freq_from,
freq_inc;
+ size_t n_bins;
SPPack (const SPPack&) = default;
SPPack ()
@@ -56,7 +57,8 @@ struct SPPack
bandwidth == rv.bandwidth &&
smooth_side == rv.smooth_side &&
freq_from == rv.freq_from &&
- freq_inc == rv.freq_inc;
+ freq_inc == rv.freq_inc &&
+ n_bins == rv.n_bins;
}
void make_same( const SPPack& rv)
{
@@ -69,6 +71,7 @@ struct SPPack
smooth_side = rv.smooth_side;
freq_from = rv.freq_from;
freq_inc = rv.freq_inc;
+ n_bins = rv.n_bins;
}
void check() const; // throws
@@ -77,7 +80,7 @@ struct SPPack
size_t
compute_n_bins( size_t) const // to match psd::SPPack::compute_n_bins
{
- return 5;
+ return n_bins;
}
};
diff --git a/src/metrics/psd.cc b/src/metrics/psd.cc
index 9b8b53c..f9ab35b 100644
--- a/src/metrics/psd.cc
+++ b/src/metrics/psd.cc
@@ -33,6 +33,12 @@ using namespace std;
+sigproc::TWinType
+ metrics::psd::SPPack::welch_window_type = sigproc::TWinType::hanning;
+metrics::psd::TFFTWPlanType
+ metrics::psd::SPPack::plan_type = metrics::psd::TFFTWPlanType::estimate;
+
+
void
metrics::psd::SPPack::
@@ -40,12 +46,23 @@ check() const
{
metrics::SPPack::check();
- if ( welch_window_type > sigproc::TWinType::_total )
+ if ( welch_window_type > sigproc::TWinType::TWinType_total )
+#ifdef _OPENMP
+#pragma omp single
+#endif
throw invalid_argument ("Invalid window type");
-
+ if ( plan_type != metrics::psd::TFFTWPlanType::estimate &&
+ plan_type != metrics::psd::TFFTWPlanType::measure )
+#ifdef _OPENMP
+#pragma omp single
+#endif
+ throw invalid_argument ("Invalid FFTW plan type");
for ( auto c : {.1, .25, .5} )
if ( binsize == c )
return;
+#ifdef _OPENMP
+#pragma omp single
+#endif
throw invalid_argument ("Invalid binsize");
}
@@ -55,7 +72,6 @@ reset()
{
metrics::SPPack::reset();
binsize = .25;
- welch_window_type = sigproc::TWinType::welch;
}
@@ -84,11 +100,11 @@ fname_base() const
DEF_UNIQUE_CHARP (_);
ASPRINTF( &_,
"%s.%s-%zu"
- ":%zu-%g-%c",
+ ":%zu-%g-%c%c",
_using_F.filename(), _using_F.channel_by_id(_using_sig_no),
_using_F.dirty_signature( _using_sig_no),
Pp.pagesize, Pp.binsize,
- 'a'+(char)Pp.welch_window_type);
+ 'a'+(char)Pp.welch_window_type, 'a'+(char)Pp.plan_type);
string ret {_};
return ret;
}
@@ -103,12 +119,12 @@ mirror_fname() const
string basename_dot = agh::fs::make_fname_base (_using_F.filename(), "", true);
ASPRINTF( &_,
"%s.%s-%zu"
- ":%zu-%g-%c@%zu"
+ ":%zu-%g-%c%c@%zu"
".psd",
basename_dot.c_str(), _using_F.channel_by_id(_using_sig_no),
_using_F.dirty_signature( _using_sig_no),
Pp.pagesize, Pp.binsize,
- 'a'+(char)Pp.welch_window_type,
+ 'a'+(char)Pp.welch_window_type, 'a'+(char)Pp.plan_type,
sizeof(double));
string ret {_};
return ret;
@@ -161,13 +177,16 @@ go_compute()
// printf( "Will use %d core(s)\n", n_procs);
//#endif
// }
+ // use single-threaded fftw; SMP active at a higher level
if ( fft_plan == nullptr || spp != saved_spp ) {
printf( "Preparing fftw plan for %zu samples...", spp);
saved_spp = spp;
memcpy( fft_Ti, &S[0], spp * sizeof(double)); // not necessary?
- fft_plan = fftw_plan_dft_r2c_1d( spp, fft_Ti, (fftw_complex*)fft_To, 0 /* FFTW_PATIENT */);
+ fft_plan = fftw_plan_dft_r2c_1d(
+ spp, fft_Ti, (fftw_complex*)fft_To,
+ plan_flags(Pp.plan_type));
printf( "done\n");
}
}
diff --git a/src/metrics/psd.hh b/src/metrics/psd.hh
index b9c29b4..63c4d02 100644
--- a/src/metrics/psd.hh
+++ b/src/metrics/psd.hh
@@ -18,6 +18,8 @@
#include <list>
#include <valarray>
+#include <fftw3.h>
+
#include "sigproc/winfun.hh"
#include "forward-decls.hh"
#include "page-metrics-base.hh"
@@ -39,16 +41,46 @@ enum TBand {
alpha,
beta,
gamma,
- _total,
+ TBand_total,
};
+enum TFFTWPlanType {
+ estimate,
+ measure,
+ TFFTWPlanType_total
+};
+inline int
+plan_flags( TFFTWPlanType t)
+{
+ switch ( t ) {
+ case TFFTWPlanType::estimate:
+ return 0|FFTW_ESTIMATE;
+ case TFFTWPlanType::measure:
+ return 0|FFTW_MEASURE;
+ default:
+ return 0;
+ }
+}
+
+inline TFFTWPlanType
+plan_type( int f)
+{
+ // this is oversimplified
+ if ( f & FFTW_MEASURE )
+ return TFFTWPlanType::measure;
+ if ( f & FFTW_ESTIMATE )
+ return TFFTWPlanType::estimate;
+ return (TFFTWPlanType)0;
+}
struct SPPack
: public metrics::SPPack {
double binsize;
- sigproc::TWinType
+ static sigproc::TWinType
welch_window_type;
+ static TFFTWPlanType
+ plan_type;
SPPack ()
{
@@ -57,13 +89,11 @@ struct SPPack
bool same_as( const SPPack& rv) const
{
- return metrics::SPPack::same_as(rv) &&
- welch_window_type == rv.welch_window_type;
+ return metrics::SPPack::same_as(rv);
}
void make_same( const SPPack& rv)
{
metrics::SPPack::make_same(rv);
- welch_window_type = rv.welch_window_type;
}
size_t
diff --git a/src/metrics/swu.cc b/src/metrics/swu.cc
index e0fb91a..6b0ee94 100644
--- a/src/metrics/swu.cc
+++ b/src/metrics/swu.cc
@@ -66,10 +66,10 @@ fname_base() const
DEF_UNIQUE_CHARP (_);
ASPRINTF( &_,
"%s.%s-%zu"
- ":%zu",
+ ":%zu-%g",
_using_F.filename(), _using_F.channel_by_id(_using_sig_no),
_using_F.dirty_signature( _using_sig_no),
- Pp.pagesize);
+ Pp.pagesize, Pp.min_upswing_duration);
string ret {_};
return ret;
}
@@ -83,11 +83,11 @@ mirror_fname() const
string basename_dot = agh::fs::make_fname_base (_using_F.filename(), "", true);
ASPRINTF( &_,
"%s.%s-%zu"
- ":%zu@%zu"
+ ":%zu-%g@%zu"
".swu",
basename_dot.c_str(), _using_F.channel_by_id(_using_sig_no),
_using_F.dirty_signature( _using_sig_no),
- Pp.pagesize,
+ Pp.pagesize, Pp.min_upswing_duration,
sizeof(TFloat));
string ret {_};
return ret;
diff --git a/src/sigproc/sigproc.ii b/src/sigproc/sigproc.ii
index 29846a9..7390414 100644
--- a/src/sigproc/sigproc.ii
+++ b/src/sigproc/sigproc.ii
@@ -204,7 +204,7 @@ dzcdf( const valarray<T>& in,
template <typename T>
CPattern<T>::
-CPattern( const valarray<T>& pattern,
+CPattern (const valarray<T>& pattern,
size_t _context_before, size_t _context_after,
size_t _samplerate,
const SPatternParamPack& params_,
diff --git a/src/sigproc/winfun.cc b/src/sigproc/winfun.cc
index 77282ff..4c6c5d0 100644
--- a/src/sigproc/winfun.cc
+++ b/src/sigproc/winfun.cc
@@ -21,7 +21,7 @@ using namespace std;
// must match those defined in glade
const char*
- sigproc::welch_window_type_names[sigproc::TWinType::_total] = {
+ sigproc::welch_window_type_names[sigproc::TWinType::TWinType_total] = {
"Bartlett", "Blackman", "Blackman-Harris",
"Hamming", "Hanning", "Parzen",
"Square", "Welch"
diff --git a/src/sigproc/winfun.hh b/src/sigproc/winfun.hh
index c19388f..d363ab9 100644
--- a/src/sigproc/winfun.hh
+++ b/src/sigproc/winfun.hh
@@ -32,11 +32,11 @@ enum TWinType {
parzen,
square,
welch,
- _total
+ TWinType_total
};
extern const char*
- welch_window_type_names[TWinType::_total];
+ welch_window_type_names[TWinType::TWinType_total];
extern TFloat (*winf[])(size_t, size_t);
diff --git a/src/ui/libcommon.cc b/src/ui/libcommon.cc
index ad43745..1c0d4e1 100644
--- a/src/ui/libcommon.cc
+++ b/src/ui/libcommon.cc
@@ -230,6 +230,14 @@ gtk_combo_box_set_model_properly( GtkComboBox *cb, GtkListStore *m)
{
gtk_combo_box_set_model( cb, (GtkTreeModel*)m);
gtk_combo_box_set_id_column( cb, 0);
+ gtk_cell_layout_set_renderer( cb);
+}
+
+
+void
+aghui::
+gtk_cell_layout_set_renderer( GtkComboBox *cb)
+{
GtkCellRenderer *r = gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start( (GtkCellLayout*)cb, r, FALSE);
gtk_cell_layout_set_attributes( (GtkCellLayout*)cb, r,
@@ -237,7 +245,6 @@ gtk_combo_box_set_model_properly( GtkComboBox *cb, GtkListStore *m)
NULL);
}
-
void
aghui::
pop_ok_message( GtkWindow *parent, const char* primary_text, const char *fmt, ...)
diff --git a/src/ui/mf/mf.cc b/src/ui/mf/mf.cc
index f8a035a..09b3c4f 100644
--- a/src/ui/mf/mf.cc
+++ b/src/ui/mf/mf.cc
@@ -170,7 +170,7 @@ draw_timeline( cairo_t *cr)
for ( t = dawn; t < timeline_end; t += 3600 * 12, up = !up )
if ( t > timeline_start )
- _p.CwB[up ? SExpDesignUI::TColour::day : SExpDesignUI::TColour::night].
+ _p.CwB[up ? SExpDesignUI::TColour::mw_day : SExpDesignUI::TColour::mw_night].
pattern_add_color_stop_rgba( cp, (difftime( t, timeline_start)/(timeline_end-timeline_start)));
cairo_set_source( cr, cp);
cairo_rectangle( cr, 0., 0., da_wd, da_ht);
@@ -187,7 +187,7 @@ draw_timeline( cairo_t *cr)
0, csimulation.timeline().size());
// Process S in one go for the entire timeline
cairo_set_line_width( cr, 2.);
- _p.CwB[SExpDesignUI::TColour::process_s].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::mf_process_s].set_source_rgba( cr);
cairo_move_to( cr, tl_pad + 0,
da_ht - lgd_margin-hypn_depth
- csimulation[csimulation.sim_start()].S * da_ht / SWA_max * display_factor);
@@ -229,14 +229,14 @@ draw_episode( cairo_t *cr,
size_t tl_start, size_t tl_end)
{
if ( zoomed_episode != -1 ) {
- _p.CwB[SExpDesignUI::TColour::paper_mr].set_source_rgb( cr);
+ _p.CwB[SExpDesignUI::TColour::mf_paper].set_source_rgb( cr);
cairo_rectangle( cr, 0., 0., da_wd, da_ht);
cairo_fill( cr);
cairo_stroke( cr);
}
cairo_set_line_width( cr, 1.5);
- _p.CwB[SExpDesignUI::TColour::swa].set_source_rgba( cr, 1.);
+ _p.CwB[SExpDesignUI::TColour::mf_swa].set_source_rgba( cr);
size_t tl_len = tl_end - tl_start,
ep_len = ep_end - ep_start,
@@ -271,7 +271,7 @@ draw_episode( cairo_t *cr,
// simulated SWA
cairo_set_line_width( cr, 2.5);
- _p.CwB[SExpDesignUI::TColour::swa_sim].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::mf_swa_sim].set_source_rgba( cr);
cairo_move_to( cr, tl_pad + (float)(ep_start + wakepages - tl_start) / tl_len * da_wd_actual(),
da_ht - lgd_margin-hypn_depth
- csimulation[ep_start + wakepages].metric_sim * da_ht / SWA_max * display_factor);
@@ -286,7 +286,7 @@ draw_episode( cairo_t *cr,
// draw only for zoomed episode: else it is drawn for all in one go
if ( zoomed_episode != -1 ) {
cairo_set_line_width( cr, 3);
- _p.CwB[SExpDesignUI::TColour::process_s].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::mf_process_s].set_source_rgba( cr);
cairo_move_to( cr, tl_pad + (float)(ep_start + wakepages - tl_start) / tl_len * da_wd_actual(),
da_ht - lgd_margin-hypn_depth
- csimulation[ep_start + wakepages].S * da_ht / SWA_max * display_factor);
@@ -363,13 +363,13 @@ draw_ticks( cairo_t *cr,
cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
start = start/pps * pps; // align to 30 min
for ( i = start; i < end; i += (unsigned)tick_spc ) {
- _p.CwB[SExpDesignUI::TColour::ticks_mr].set_source_rgba( cr, .4);
+ _p.CwB[SExpDesignUI::TColour::mf_ticks].set_source_rgba( cr);
cairo_set_line_width( cr, (i % (24*pph) == 0) ? 1 : .3);
cairo_move_to( cr, (float)(i-start)/(end-start) * da_wd_actual(), 0);
cairo_rel_line_to( cr, 0., da_ht);
cairo_stroke( cr);
- _p.CwB[SExpDesignUI::TColour::labels_mr].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::mf_labels].set_source_rgba( cr);
cairo_move_to( cr,
(float)(i-start)/(end-start) * da_wd_actual() + 2,
da_ht - hypn_depth-lgd_margin + 14);
diff --git a/src/ui/mw/mw-construct.cc b/src/ui/mw/mw-construct.cc
index f33d1da..8babe26 100644
--- a/src/ui/mw/mw-construct.cc
+++ b/src/ui/mw/mw-construct.cc
@@ -73,7 +73,6 @@ SExpDesignUIWidgets ()
// misc
auto font_desc = pango_font_description_from_string( "Mono 9");
- GtkCellRenderer *renderer;
GtkTreeViewColumn *col;
// =========== 1. Measurements
@@ -182,11 +181,7 @@ SExpDesignUIWidgets ()
!AGH_GBGETOBJ (GtkBox, cMsmtMainToolbar) )
throw runtime_error ("Failed to construct widgets");
- renderer = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start( (GtkCellLayout*)eMsmtProfileType, renderer, FALSE);
- gtk_cell_layout_set_attributes( (GtkCellLayout*)eMsmtProfileType, renderer,
- "text", 0,
- NULL);
+ gtk_cell_layout_set_renderer( eMsmtProfileType);
// and when was the list store attached to it, eh?
G_CONNECT_1 (eMsmtProfileType, changed);
@@ -251,7 +246,7 @@ SExpDesignUIWidgets ()
G_CONNECT_2 (tvSimulations, row, activated);
for ( auto c = 0; c < msimulations_visibility_switch_col; ++c ) {
- renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
g_object_set( (GObject*)renderer,
"editable", FALSE,
"xalign", (c >= 2) ? .5 : 0.,
@@ -316,38 +311,27 @@ SExpDesignUIWidgets ()
if ( !AGH_GBGETOBJ (GtkSpinButton, eUltradianCycleDetectionAccuracy) ||
!AGH_GBGETOBJ (GtkComboBox, eFFTParamsBinSize) ||
!AGH_GBGETOBJ (GtkComboBox, eFFTParamsPageSize) ||
+ !AGH_GBGETOBJ (GtkComboBox, eFFTParamsPlanType) ||
!AGH_GBGETOBJ (GtkComboBox, eFFTParamsWindowType) )
throw runtime_error ("Failed to construct widgets");
- renderer = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start( (GtkCellLayout*)eFFTParamsPageSize, renderer, FALSE);
- gtk_cell_layout_set_attributes( (GtkCellLayout*)eFFTParamsPageSize, renderer,
- "text", 0,
- NULL);
- renderer = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start( (GtkCellLayout*)eFFTParamsBinSize, renderer, FALSE);
- gtk_cell_layout_set_attributes( (GtkCellLayout*)eFFTParamsBinSize, renderer,
- "text", 0,
- NULL);
- renderer = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start( (GtkCellLayout*)eFFTParamsWindowType, renderer, FALSE);
- gtk_cell_layout_set_attributes( (GtkCellLayout*)eFFTParamsWindowType, renderer,
- "text", 0,
- NULL);
+ for ( auto& e : {eFFTParamsBinSize, eFFTParamsPageSize, eFFTParamsPlanType, eFFTParamsWindowType} )
+ gtk_cell_layout_set_renderer( e);
+
// ------------- fArtifacts
if ( !AGH_GBGETOBJ (GtkComboBox, eArtifDampenWindowType) ||
!AGH_GBGETOBJ (GtkSpinButton, eArtifDampenFactor) )
throw runtime_error ("Failed to construct widgets");
- renderer = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start( (GtkCellLayout*)eArtifDampenWindowType, renderer, FALSE);
- gtk_cell_layout_set_attributes( (GtkCellLayout*)eArtifDampenWindowType, renderer,
- "text", 0,
- NULL);
+ gtk_cell_layout_set_renderer( eArtifDampenWindowType);
+
// ------------- fMicrocontinuity
if ( !AGH_GBGETOBJ (GtkSpinButton, eMCParamBandWidth) ||
!AGH_GBGETOBJ (GtkSpinButton, eMCParamIIRBackpolate) ||
- !AGH_GBGETOBJ (GtkSpinButton, eMCParamMCGain) )
+ !AGH_GBGETOBJ (GtkSpinButton, eMCParamMCGain) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eMCParamFreqInc) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eMCParamNBins) ||
+ !AGH_GBGETOBJ (GtkSpinButton, eSWUParamMinUpswingDuration) )
throw runtime_error ("Failed to construct widgets");
// ------- custom score codes
@@ -468,36 +452,39 @@ SExpDesignUIWidgets ()
G_CONNECT_1 (bSimParamRevertTunables, clicked);
// ------ colours
- if ( !(CwB[TColour::night ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourNight")) ||
- !(CwB[TColour::day ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourDay")) ||
- !(CwB[TColour::power_mt ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourPowerMT")) ||
- !(CwB[TColour::ticks_mt ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourTicksMT")) ||
- !(CwB[TColour::labels_mt ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourLabelsMT")) ||
-
- !(CwB[TColour::swa ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSWA")) ||
- !(CwB[TColour::swa_sim ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSWASim")) ||
- !(CwB[TColour::process_s ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourProcessS")) ||
- !(CwB[TColour::paper_mr ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourPaperMR")) ||
- !(CwB[TColour::ticks_mr ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourTicksMR")) ||
- !(CwB[TColour::labels_mr ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourLabelsMR")) ||
-
- !(CwB[TColour::score_none ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourNONE")) ||
- !(CwB[TColour::score_nrem1 ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourNREM1")) ||
- !(CwB[TColour::score_nrem2 ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourNREM2")) ||
- !(CwB[TColour::score_nrem3 ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourNREM3")) ||
- !(CwB[TColour::score_nrem4 ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourNREM4")) ||
- !(CwB[TColour::score_rem ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourREM")) ||
- !(CwB[TColour::score_wake ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourWake")) ||
- !(CwB[TColour::profile_psd_sf].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourProfilePsdSF")) ||
- !(CwB[TColour::profile_mc_sf ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourProfileMcSF")) ||
- !(CwB[TColour::emg ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourEMG")) ||
- !(CwB[TColour::hypnogram ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourHypnogram")) ||
- !(CwB[TColour::artifact ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourArtifacts")) ||
- !(CwB[TColour::annotations ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourAnnotations")) ||
- !(CwB[TColour::selection ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSelection")) ||
- !(CwB[TColour::ticks_sf ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourTicksSF")) ||
- !(CwB[TColour::labels_sf ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourLabelsSF")) ||
- !(CwB[TColour::cursor ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourCursor")) ||
+ if ( !(CwB[TColour::mw_night ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMWNight")) ||
+ !(CwB[TColour::mw_day ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMWDay")) ||
+ !(CwB[TColour::mw_profile ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMWProfile")) ||
+ !(CwB[TColour::mw_ticks ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMWTicks")) ||
+ !(CwB[TColour::mw_labels ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMWLabels")) ||
+
+ !(CwB[TColour::sf_profile_psd].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFProfilePSD")) ||
+ !(CwB[TColour::sf_profile_mc ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFProfileMC")) ||
+ !(CwB[TColour::sf_profile_swu].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFProfileSWU")) ||
+ !(CwB[TColour::sf_emg ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFEMG")) ||
+ !(CwB[TColour::sf_hypnogram ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFHypnogram")) ||
+ !(CwB[TColour::sf_artifact ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFArtifacts")) ||
+ !(CwB[TColour::sf_annotations].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFAnnotations")) ||
+ !(CwB[TColour::sf_selection ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFSelection")) ||
+ !(CwB[TColour::sf_ticks ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFTicks")) ||
+ !(CwB[TColour::sf_labels ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFLabels")) ||
+ !(CwB[TColour::sf_cursor ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourSFCursor")) ||
+
+ !(CwB[TColour::mf_swa ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMFSWA")) ||
+ !(CwB[TColour::mf_swa_sim ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMFSWASim")) ||
+ !(CwB[TColour::mf_process_s ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMFProcessS")) ||
+ !(CwB[TColour::mf_paper ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMFPaper")) ||
+ !(CwB[TColour::mf_ticks ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMFTicks")) ||
+ !(CwB[TColour::mf_labels ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourMFLabels")) ||
+
+ !(CwB[TColour::score_none ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourScoreNONE")) ||
+ !(CwB[TColour::score_nrem1 ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourScoreNREM1")) ||
+ !(CwB[TColour::score_nrem2 ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourScoreNREM2")) ||
+ !(CwB[TColour::score_nrem3 ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourScoreNREM3")) ||
+ !(CwB[TColour::score_nrem4 ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourScoreNREM4")) ||
+ !(CwB[TColour::score_rem ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourScoreREM")) ||
+ !(CwB[TColour::score_wake ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourScoreWake")) ||
+
!(CwB[TColour::band_delta ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourBandDelta")) ||
!(CwB[TColour::band_theta ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourBandTheta")) ||
!(CwB[TColour::band_alpha ].btn = (GtkColorButton*)gtk_builder_get_object( builder, "bColourBandAlpha")) ||
@@ -632,10 +619,9 @@ SExpDesignUIWidgets ()
NULL);
G_CONNECT_2 (tvGlobalAnnotations, row, activated);
- renderer = gtk_cell_renderer_text_new();
int c = 0;
for ( auto column : {"Recording", "Page(s)", "Channel", "Label"} ) {
- renderer = gtk_cell_renderer_text_new();
+ GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
g_object_set( (GObject*)renderer,
"editable", FALSE,
NULL);
diff --git a/src/ui/mw/mw-loadsave.cc b/src/ui/mw/mw-loadsave.cc
index 132420d..cb67060 100644
--- a/src/ui/mw/mw-loadsave.cc
+++ b/src/ui/mw/mw-loadsave.cc
@@ -11,7 +11,6 @@
*/
#include <forward_list>
-//#include <initializer_list>
#include "common/config-validate.hh"
#include "ui/globals.hh"
@@ -31,42 +30,44 @@ saving_colors()
using namespace aghui;
return forward_list<pair<const char*, SExpDesignUI::TColour>>
({
- {"NONE", SExpDesignUI::TColour::score_none },
- {"NREM1", SExpDesignUI::TColour::score_nrem1 },
- {"NREM2", SExpDesignUI::TColour::score_nrem2 },
- {"NREM3", SExpDesignUI::TColour::score_nrem3 },
- {"NREM4", SExpDesignUI::TColour::score_nrem4 },
- {"REM", SExpDesignUI::TColour::score_rem },
- {"Wake", SExpDesignUI::TColour::score_wake },
- {"ProfilePsdSF",SExpDesignUI::TColour::profile_psd_sf},
- {"ProfileMcSF", SExpDesignUI::TColour::profile_mc_sf },
- {"EMG", SExpDesignUI::TColour::emg },
- {"Hypnogram", SExpDesignUI::TColour::hypnogram },
- {"Artifacts", SExpDesignUI::TColour::artifact },
- {"Annotations", SExpDesignUI::TColour::annotations },
- {"Selection", SExpDesignUI::TColour::selection },
- {"TicksSF", SExpDesignUI::TColour::ticks_sf },
- {"LabelsSF", SExpDesignUI::TColour::labels_sf },
+ {"MWNight", SExpDesignUI::TColour::mw_night },
+ {"MWDay", SExpDesignUI::TColour::mw_day },
+ {"MWTicks", SExpDesignUI::TColour::mw_ticks },
+ {"MWLabels", SExpDesignUI::TColour::mw_labels },
+ {"MWProfile", SExpDesignUI::TColour::mw_profile },
+
+ {"ScoreNONE", SExpDesignUI::TColour::score_none },
+ {"ScorNeREM1", SExpDesignUI::TColour::score_nrem1 },
+ {"ScoreNREM2", SExpDesignUI::TColour::score_nrem2 },
+ {"ScoreNREM3", SExpDesignUI::TColour::score_nrem3 },
+ {"ScoreNREM4", SExpDesignUI::TColour::score_nrem4 },
+ {"ScoreREM", SExpDesignUI::TColour::score_rem },
+ {"ScoreWake", SExpDesignUI::TColour::score_wake },
+
+ {"SFProfilePSD", SExpDesignUI::TColour::sf_profile_psd},
+ {"SFProfileSWU", SExpDesignUI::TColour::sf_profile_swu},
+ {"SFProfileMC", SExpDesignUI::TColour::sf_profile_mc },
+ {"SFEMG", SExpDesignUI::TColour::sf_emg },
+ {"SFHypnogram", SExpDesignUI::TColour::sf_hypnogram },
+ {"SFArtifacts", SExpDesignUI::TColour::sf_artifact },
+ {"SFAnnotations", SExpDesignUI::TColour::sf_annotations},
+ {"SFSelection", SExpDesignUI::TColour::sf_selection },
+ {"SFTicks", SExpDesignUI::TColour::sf_ticks },
+ {"SFLabels", SExpDesignUI::TColour::sf_labels },
+ {"SFCursor", SExpDesignUI::TColour::sf_cursor },
+
{"BandDelta", SExpDesignUI::TColour::band_delta },
{"BandTheta", SExpDesignUI::TColour::band_theta },
{"BandAlpha", SExpDesignUI::TColour::band_alpha },
{"BandBeta", SExpDesignUI::TColour::band_beta },
{"BandGamma", SExpDesignUI::TColour::band_gamma },
- {"Cursor", SExpDesignUI::TColour::cursor },
-
- {"Night", SExpDesignUI::TColour::night },
- {"Day", SExpDesignUI::TColour::day },
-
- {"TicksMT", SExpDesignUI::TColour::ticks_mt },
- {"LabelsMT", SExpDesignUI::TColour::labels_mt },
- {"PowerMT", SExpDesignUI::TColour::power_mt },
- {"SWA", SExpDesignUI::TColour::swa },
- {"SWASim", SExpDesignUI::TColour::swa_sim },
- {"ProcessS", SExpDesignUI::TColour::process_s },
- {"PaperMR", SExpDesignUI::TColour::paper_mr },
- {"TicksMR", SExpDesignUI::TColour::ticks_mr },
- {"LabelsMR", SExpDesignUI::TColour::labels_mr }
+ {"MFSWA", SExpDesignUI::TColour::mf_swa },
+ {"MFSWASim", SExpDesignUI::TColour::mf_swa_sim },
+ {"MFProcessS", SExpDesignUI::TColour::mf_process_s },
+ {"MFPaper", SExpDesignUI::TColour::mf_paper },
+ {"MFTicks", SExpDesignUI::TColour::mf_ticks },
+ {"MFLabels", SExpDesignUI::TColour::mf_labels }
});
}
} // inline namespace
@@ -85,7 +86,7 @@ load_settings()
try {
auto& SC = conf.lookup("ScoreCodes");
- for ( size_t i = sigfile::SPage::TScore::none; i < sigfile::SPage::TScore::_total; ++i )
+ for ( size_t i = sigfile::SPage::TScore::none; i < sigfile::SPage::TScore::TScore_total; ++i )
ext_score_codes[i].assign( (const char*)SC[i]);
} catch (...) {
fprintf( stderr, "SExpDesignUI::load_settings(): Something is wrong with section ScoreCodes in %s\n", CONF_FILE);
@@ -105,7 +106,7 @@ load_settings()
}
try {
- for ( size_t i = metrics::psd::TBand::delta; i < metrics::psd::TBand::_total; ++i ) {
+ for ( size_t i = metrics::psd::TBand::delta; i < metrics::psd::TBand::TBand_total; ++i ) {
auto& A = conf.lookup(string("Band.")+FreqBandNames[i]);
float f0 = A[0],
f1 = A[1];
@@ -183,7 +184,7 @@ save_settings()
forward_list<double> {C.clr.red, C.clr.green, C.clr.blue, C.clr.alpha});
}
- for ( unsigned i = metrics::psd::TBand::delta; i < metrics::psd::TBand::_total; ++i )
+ for ( unsigned i = metrics::psd::TBand::delta; i < metrics::psd::TBand::TBand_total; ++i )
confval::put( conf, string("Band.") + FreqBandNames[i],
forward_list<double> {freq_bands[i][0], freq_bands[i][1]});
diff --git a/src/ui/mw/mw-measurements.cc b/src/ui/mw/mw-measurements.cc
index d3eadab..42d63db 100644
--- a/src/ui/mw/mw-measurements.cc
+++ b/src/ui/mw/mw-measurements.cc
@@ -102,7 +102,7 @@ draw_timeline( cairo_t *cr) const
bool day = false;
for ( t = dawn; t < timeline_end(); t += 3600 * 12, day = !day )
if ( t > timeline_start() )
- _p._p.CwB[day ? TColour::day : TColour::night].
+ _p._p.CwB[day ? TColour::mw_day : TColour::mw_night].
pattern_add_color_stop_rgba( cp, (double)_p._p.T2P(t) / timeline_width());
cairo_set_source( cr, cp);
cairo_rectangle( cr, tl_left_margin(), 0., tl_left_margin() + timeline_width(), timeline_height());
@@ -133,7 +133,7 @@ draw_timeline( cairo_t *cr) const
j_tl_pixel_end = _p._p.T2P( episodes.back().end_rel),
j_tl_pixels = j_tl_pixel_end - j_tl_pixel_start;
- _p._p.CwB[TColour::power_mt].set_source_rgba( cr);
+ _p._p.CwB[TColour::mw_profile].set_source_rgba( cr);
cairo_set_line_width( cr, .3);
cairo_move_to( cr, tl_left_margin() + j_tl_pixel_start, timeline_height()-12);
{
@@ -229,12 +229,12 @@ draw_timeline( cairo_t *cr) const
if ( M.have_uc_determined() ) {
agh::beersma::FUltradianCycle F (*M.uc_params);
snprintf_buf( "T: %g r: %g", F.T, F.r);
- _p._p.CwB[TColour::power_mt].set_source_rgba_contrasting( cr);
+ _p._p.CwB[TColour::mw_profile].set_source_rgba_contrasting( cr);
cairo_move_to( cr, tl_left_margin() + e_pixel_start + 2, timeline_height() - 22);
cairo_show_text( cr, __buf__);
cairo_stroke( cr);
- _p._p.CwB[TColour::ticks_mt /* bounds? */].set_source_rgba( cr, .7);
+ _p._p.CwB[TColour::mw_ticks /* bounds? */].set_source_rgba( cr, .7);
cairo_set_line_width( cr, .5);
auto dxe = tl_left_margin() + e_pixel_start,
@@ -254,7 +254,7 @@ draw_timeline( cairo_t *cr) const
// ticks
if ( is_focused ) {
cairo_set_line_width( cr, .5);
- _p._p.CwB[TColour::ticks_mt].set_source_rgb( cr);
+ _p._p.CwB[TColour::mw_ticks].set_source_rgb( cr);
cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
unsigned clock_d0 = localtime(&tl_start_fixed)->tm_mday + 1;
for ( time_t t = tl_start_fixed; t <= timeline_end(); t += 3600 ) {
diff --git a/src/ui/mw/mw-populate.cc b/src/ui/mw/mw-populate.cc
index eb98260..08ddab6 100644
--- a/src/ui/mw/mw-populate.cc
+++ b/src/ui/mw/mw-populate.cc
@@ -407,7 +407,7 @@ populate_1()
timeline_width = (timeline_end - timeline_start) / 3600 * timeline_pph;
timeline_pages = (timeline_end - timeline_start) / ED->fft_params.pagesize;
- if ( profile_scale_psd == 0. || profile_scale_mc == 0. ) // not previously saved
+ if ( profile_scale_psd == 0. || profile_scale_mc == 0. || profile_scale_swu == 0. ) // not previously saved
calculate_profile_scale();
printf( "SExpDesignUI::populate_1(): common timeline:\n");
diff --git a/src/ui/mw/mw-settings_cb.cc b/src/ui/mw/mw-settings_cb.cc
index ecd0582..f8d266c 100644
--- a/src/ui/mw/mw-settings_cb.cc
+++ b/src/ui/mw/mw-settings_cb.cc
@@ -38,8 +38,6 @@ tDesign_switch_page_cb( GtkNotebook*, gpointer, guint page_num, gpointer userdat
// collect values from widgets
ED.W_V1.down();
- // Profile tab
-
ED.ED->fft_params.pagesize = ED.FFTPageSizeValues[ED.pagesize_item];
ED.ED->fft_params.binsize = ED.FFTBinSizeValues [ED.binsize_item];
@@ -60,12 +58,16 @@ tDesign_switch_page_cb( GtkNotebook*, gpointer, guint page_num, gpointer userdat
ED.adjust_op_freq_spinbuttons();
#ifdef _OPENMP
- omp_set_num_threads( (ED.ED->num_threads == 0) ? agh::global::num_procs : ED.ED->num_threads);
+ omp_set_num_threads(
+ (ED.ED->num_threads == 0)
+ ? agh::global::num_procs
+ : ED.ED->num_threads);
printf( "SMP enabled with %d thread(s)\n", omp_get_max_threads());
#endif
// scan as necessary
if ( ED.pagesize_item_saved != ED.pagesize_item ||
ED.binsize_item_saved != ED.binsize_item ||
+ ED.fft_params_plan_type_saved != ED.ED->fft_params.plan_type ||
ED.fft_params_welch_window_type_saved != ED.ED->fft_params.welch_window_type ||
ED.af_dampen_window_type_saved != ED.ED->af_dampen_window_type ||
ED.af_dampen_factor_saved != ED.ED->af_dampen_factor ||
@@ -76,12 +78,14 @@ tDesign_switch_page_cb( GtkNotebook*, gpointer, guint page_num, gpointer userdat
// recalculte mesurements layout as necessary
ED.timeline_pph_saved != ED.timeline_pph )
ED.populate_1();
+
} else {
ED.timeline_pph_saved = ED.timeline_pph;
ED.timeline_height_saved = ED.timeline_height;
ED.pagesize_item_saved = ED.pagesize_item;
ED.binsize_item_saved = ED.binsize_item;
ED.fft_params_welch_window_type_saved = ED.ED->fft_params.welch_window_type;
+ ED.fft_params_plan_type_saved = ED.ED->fft_params.plan_type;
ED.af_dampen_window_type_saved = ED.ED->af_dampen_window_type;
ED.af_dampen_factor_saved = ED.ED->af_dampen_factor;
ED.mc_params_saved = ED.ED->mc_params;
diff --git a/src/ui/mw/mw-simulations.cc b/src/ui/mw/mw-simulations.cc
index 6d94a50..8099868 100644
--- a/src/ui/mw/mw-simulations.cc
+++ b/src/ui/mw/mw-simulations.cc
@@ -69,6 +69,7 @@ populate_2()
snprintf_buf( "CF = %g", M.cf);
gtk_tree_store_set( mSimulations, &iter_h,
1, __buf__,
+ msimulations_modref_col, &M,
-1);
// tunable columns
@@ -84,7 +85,9 @@ populate_2()
}
// and a virgin offering
auto P_new = make_active_profile_paramset();
- if ( EE.modrun_sets.find( P_new) == EE.modrun_sets.end() ) {
+ auto Mi = EE.modrun_sets.find( P_new);
+ if ( Mi == EE.modrun_sets.end() ||
+ Mi->second.find( AghT()) == Mi->second.end() ) {
gtk_tree_store_append( mSimulations, &iter_m, &iter_j);
gtk_tree_store_set( mSimulations, &iter_m,
@@ -101,7 +104,7 @@ populate_2()
P_new,
&virgin);
if ( retval ) {
- gtk_tree_store_set( mSimulations, &iter_m,
+ gtk_tree_store_set( mSimulations, &iter_h,
1, agh::CProfile::explain_status( retval).c_str(),
msimulations_modref_col, NULL,
-1);
diff --git a/src/ui/mw/mw-widgets.hh b/src/ui/mw/mw-widgets.hh
index c9cd327..a1b3b70 100644
--- a/src/ui/mw/mw-widgets.hh
+++ b/src/ui/mw/mw-widgets.hh
@@ -57,6 +57,7 @@ struct SExpDesignUIWidgets {
*mFFTParamsPageSize,
*mFFTParamsBinSize,
*mFFTParamsWindowType,
+ *mFFTParamsPlanType,
*mMsmtProfileType,
*mGlobalFiltersNotchFilter;
static const auto
@@ -162,14 +163,18 @@ struct SExpDesignUIWidgets {
*eFFTParamsWindowType,
*eFFTParamsPageSize,
*eFFTParamsBinSize,
+ *eFFTParamsPlanType,
*eArtifDampenWindowType;
GtkEntry
- *eScoreCode[sigfile::SPage::TScore::_total];
+ *eScoreCode[sigfile::SPage::TScore_total];
GtkSpinButton
*eArtifDampenFactor,
*eMCParamBandWidth,
*eMCParamIIRBackpolate,
*eMCParamMCGain,
+ *eMCParamFreqInc,
+ *eMCParamNBins,
+ *eSWUParamMinUpswingDuration,
*eDAMsmtPPH,
*eDAMsmtTLHeight,
*eDAPageHeight,
@@ -179,7 +184,7 @@ struct SExpDesignUIWidgets {
*jFreqFrom,
*jFreqWidth;
GtkSpinButton
- *eBand[metrics::psd::TBand::_total][2];
+ *eBand[metrics::psd::TBand_total][2];
GtkEntry
*eBrowseCommand;
@@ -331,35 +336,31 @@ struct SExpDesignUIWidgets {
// colours
enum TColour {
- night, day,
+ mw_night, mw_day,
+ mw_profile, mw_ticks, mw_bounds,
+ mw_labels,
+
+ sf_artifact,
+ sf_annotations,
+ sf_selection,
+ sf_profile_psd, sf_profile_mc, sf_profile_swu,
+ sf_hypnogram,
+ sf_cursor,
+ sf_emg,
+ sf_labels, sf_ticks,
+
+ mf_swa, mf_swa_sim, mf_process_s,
+ mf_paper,
+ mf_labels,
+ mf_ticks,
- power_mt, ticks_mt, bounds,
- labels_mt, jinfo,
+ band_delta, band_theta, band_alpha,
+ band_beta, band_gamma,
score_none, score_nrem1, score_nrem2,
score_nrem3, score_nrem4, score_rem,
score_wake,
score_invalid, // has no color chooser
-
- artifact,
- annotations,
- selection,
-
- labels_sf, ticks_sf, profile_psd_sf, profile_mc_sf,
- hypnogram, hypnogram_scoreline,
- cursor,
-
- spectrum, spectrum_axes, spectrum_grid,
-
- emg,
-
- band_delta, band_theta, band_alpha,
- band_beta, band_gamma,
-
- swa, swa_sim, process_s,
- paper_mr,
- labels_mr,
- ticks_mr,
};
map<TColour, SManagedColor>
CwB;
diff --git a/src/ui/mw/mw.cc b/src/ui/mw/mw.cc
index 2800f69..a85a5d9 100644
--- a/src/ui/mw/mw.cc
+++ b/src/ui/mw/mw.cc
@@ -115,7 +115,7 @@ subject_presentation_by_csubject( const agh::CSubject& j)
const char
- *const aghui::SExpDesignUI::FreqBandNames[metrics::psd::TBand::_total] = {
+ *const aghui::SExpDesignUI::FreqBandNames[metrics::psd::TBand::TBand_total] = {
"Delta", "Theta", "Alpha", "Beta", "Gamma",
};
@@ -159,6 +159,7 @@ SExpDesignUI (aghui::SSessionChooser *parent,
{ 30.0, 40.0 },
},
profile_scale_psd (0.),
+ profile_scale_swu (0.),
profile_scale_mc (0.),
autoscale (false),
smooth_profile (1),
@@ -184,6 +185,7 @@ SExpDesignUI (aghui::SSessionChooser *parent,
config_keys_g ({
confval::SValidator<double>("UltradianCycleDetectionAccuracy", &uc_accuracy_factor, confval::SValidator<double>::SVFRangeIn (0.5, 20.)),
confval::SValidator<double>("Measurements.ProfileScalePSD", &profile_scale_psd, confval::SValidator<double>::SVFRangeIn (0., 1e10)), // can be 0, will trigger autoscale
+ confval::SValidator<double>("Measurements.ProfileScaleSWU", &profile_scale_swu, confval::SValidator<double>::SVFRangeIn (0., 1e10)),
confval::SValidator<double>("Measurements.ProfileScaleMC", &profile_scale_mc, confval::SValidator<double>::SVFRangeIn (0., 1e10)),
confval::SValidator<double>("Profiles.PSD.FreqFrom", &active_profile_psd_freq_from, confval::SValidator<double>::SVFRangeIn (0., 20.)),
confval::SValidator<double>("Profiles.PSD.FreqUpto", &active_profile_psd_freq_upto, confval::SValidator<double>::SVFRangeIn (0., 20.)),
@@ -226,13 +228,17 @@ SExpDesignUI (aghui::SSessionChooser *parent,
W_V1.reg( eMCParamIIRBackpolate, &ED->mc_params.iir_backpolate);
W_V1.reg( eMCParamMCGain, &ED->mc_params.mc_gain);
W_V1.reg( eMCParamBandWidth, &ED->mc_params.bandwidth);
+ W_V1.reg( eMCParamFreqInc, &ED->mc_params.freq_inc);
+ W_V1.reg( eMCParamNBins, &ED->mc_params.n_bins);
+ W_V1.reg( eSWUParamMinUpswingDuration, &ED->swu_params.min_upswing_duration);
W_V1.reg( eFFTParamsPageSize, &pagesize_item);
W_V1.reg( eFFTParamsBinSize, &binsize_item);
+ W_V1.reg( eFFTParamsPlanType, (int*)&ED->fft_params.plan_type);
W_V1.reg( eUltradianCycleDetectionAccuracy, &uc_accuracy_factor);
- for ( size_t i = 0; i < sigfile::SPage::TScore::_total; ++i )
+ for ( size_t i = 0; i < sigfile::SPage::TScore::TScore_total; ++i )
W_V1.reg( eScoreCode[i], &ext_score_codes[i]);
- for ( size_t i = 0; i < metrics::psd::TBand::_total; ++i ) {
+ for ( size_t i = 0; i < metrics::psd::TBand::TBand_total; ++i ) {
W_V1.reg( eBand[i][0], &freq_bands[i][0]);
W_V1.reg( eBand[i][1], &freq_bands[i][1]);
}
@@ -245,6 +251,7 @@ SExpDesignUI (aghui::SSessionChooser *parent,
// set _saved, too
fft_params_welch_window_type_saved = ED->fft_params.welch_window_type;
+ fft_params_plan_type_saved = ED->fft_params.plan_type;
af_dampen_window_type_saved = ED->af_dampen_window_type;
af_dampen_factor_saved = ED->af_dampen_factor;
mc_params_saved = ED->mc_params;
@@ -457,22 +464,18 @@ adjust_op_freq_spinbuttons()
{
suppress_redraw = true;
- switch ( display_profile_type ) {
- case metrics::TType::psd:
- gtk_adjustment_set_step_increment( jMsmtProfileParamsPSDFreqFrom, ED->fft_params.binsize);
- gtk_adjustment_set_step_increment( jMsmtProfileParamsPSDFreqWidth, ED->fft_params.binsize);
- if ( not used_eeg_samplerates.empty() )
- gtk_adjustment_set_upper(
- jMsmtProfileParamsPSDFreqFrom,
- ED->fft_params.binsize * (ED->fft_params.compute_n_bins( used_eeg_samplerates.back()) - 1));
- break;
- case metrics::TType::swu:
- break;
- case metrics::TType::mc:
- break;
- default:
- break;
- }
+ gtk_adjustment_set_step_increment( jMsmtProfileParamsPSDFreqFrom, ED->fft_params.binsize);
+ gtk_adjustment_set_step_increment( jMsmtProfileParamsPSDFreqWidth, ED->fft_params.binsize);
+ if ( not used_eeg_samplerates.empty() )
+ gtk_adjustment_set_upper(
+ jMsmtProfileParamsPSDFreqFrom,
+ ED->fft_params.binsize * (ED->fft_params.compute_n_bins( used_eeg_samplerates.back()) - 1));
+
+ gtk_adjustment_set_step_increment( jMsmtProfileParamsMCF0,
+ ED->mc_params.freq_inc); // matches the default in metrics/mc.cc
+ gtk_adjustment_set_upper( jMsmtProfileParamsMCF0,
+ ED->mc_params.compute_n_bins(pagesize()) *
+ ED->mc_params.freq_inc);
suppress_redraw = false;
}
diff --git a/src/ui/mw/mw.hh b/src/ui/mw/mw.hh
index 2a3a8fb..c2d51f6 100644
--- a/src/ui/mw/mw.hh
+++ b/src/ui/mw/mw.hh
@@ -253,8 +253,8 @@ class SExpDesignUI
ext_score_codes;
static const char
- *const FreqBandNames[metrics::psd::TBand::_total];
- double freq_bands[metrics::psd::TBand::_total][2];
+ *const FreqBandNames[metrics::psd::TBand::TBand_total];
+ double freq_bands[metrics::psd::TBand::TBand_total][2];
double profile_scale_psd,
profile_scale_swu,
@@ -293,6 +293,8 @@ class SExpDesignUI
sigproc::TWinType
fft_params_welch_window_type_saved,
af_dampen_window_type_saved;
+ metrics::psd::TFFTWPlanType
+ fft_params_plan_type_saved;
double af_dampen_factor_saved;
// sigfile::SFFTParamSet
diff --git a/src/ui/mw/mw_cb.cc b/src/ui/mw/mw_cb.cc
index 13e63ed..e96001a 100644
--- a/src/ui/mw/mw_cb.cc
+++ b/src/ui/mw/mw_cb.cc
@@ -121,11 +121,6 @@ eMsmtProfileType_changed_cb( GtkComboBox* b, gpointer userdata)
gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParamsPSD, FALSE);
gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParamsSWU, FALSE);
gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParamsMC, TRUE);
- gtk_adjustment_set_step_increment( ED.jMsmtProfileParamsMCF0,
- ED.ED->mc_params.freq_inc); // matches the default in metrics/mc.cc
- gtk_adjustment_set_upper( ED.jMsmtProfileParamsMCF0,
- ED.ED->mc_params.compute_n_bins(ED.pagesize()) *
- ED.ED->mc_params.freq_inc);
ED.display_profile_type = metrics::TType::mc;
break;
}
@@ -141,7 +136,7 @@ eMsmtProfileType_changed_cb( GtkComboBox* b, gpointer userdata)
if ( J.cprofile )
J.cprofile->create_timeline( params);
- if ( ED.profile_scale_psd == 0. || ED.profile_scale_mc == 0. || // don't know which
+ if ( ED.profile_scale_psd == 0. || ED.profile_scale_swu == 0. || ED.profile_scale_mc == 0. || // don't know which
ED.autoscale )
ED.calculate_profile_scale();
diff --git a/src/ui/sf/sf-channel.cc b/src/ui/sf/sf-channel.cc
index 28e0bb8..ea2f233 100644
--- a/src/ui/sf/sf-channel.cc
+++ b/src/ui/sf/sf-channel.cc
@@ -43,6 +43,7 @@ SChannel( agh::CRecording& r,
draw_filtered_signal (true),
zeromean_original (true),
draw_psd (true),
+ draw_swu (false),
draw_mc (false),
draw_emg (true),
draw_bands (true),
@@ -105,7 +106,7 @@ SChannel( agh::CRecording& r,
// power in bands
size_t n_bands = 0;
- while ( n_bands != metrics::psd::TBand::_total )
+ while ( n_bands != metrics::psd::TBand::TBand_total )
if ( _p._p.freq_bands[n_bands][0] >= spectrum_upper_freq )
break;
else
@@ -454,6 +455,8 @@ update_channel_check_menu_items()
(gboolean)draw_spectrum);
gtk_check_menu_item_set_active( _p.iSFPageDrawMCProfile,
(gboolean)draw_mc);
+ gtk_check_menu_item_set_active( _p.iSFPageDrawSWUProfile,
+ (gboolean)draw_swu);
gtk_check_menu_item_set_active( _p.iSFPageSelectionDrawCourse,
(gboolean)draw_selection_course);
diff --git a/src/ui/sf/sf-construct.cc b/src/ui/sf/sf-construct.cc
index 3bf2e1f..c2224bf 100644
--- a/src/ui/sf/sf-construct.cc
+++ b/src/ui/sf/sf-construct.cc
@@ -59,57 +59,29 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
!(AGH_GBGETOBJ (GtkButton, bSFRunICA)) )
throw runtime_error ("Failed to construct SF widgets");
- g_signal_connect( wScoringFacility, "delete-event",
- (GCallback)wScoringFacility_delete_event_cb,
- this);
+ G_CONNECT_2 (wScoringFacility, delete, event);
gtk_combo_box_set_model_properly(
eSFPageSize, mScoringPageSize);
- g_signal_connect( eSFPageSize, "changed",
- (GCallback)eSFPageSize_changed_cb,
- this);
- g_signal_connect( eSFCurrentPage, "value-changed",
- (GCallback)eSFCurrentPage_value_changed_cb,
- this);
+ G_CONNECT_1 (eSFPageSize, changed);
+ G_CONNECT_2 (eSFCurrentPage, value, changed);
- g_signal_connect( eSFCurrentPos, "clicked",
- (GCallback)eSFCurrentPos_clicked_cb,
- this);
+ G_CONNECT_1 (eSFCurrentPos, clicked);
- g_signal_connect( bSFForward, "clicked",
- (GCallback)bSFForward_clicked_cb,
- this);
- g_signal_connect( bSFBack, "clicked",
- (GCallback)bSFBack_clicked_cb,
- this);
+ G_CONNECT_1 (bSFForward, clicked);
+ G_CONNECT_1 (bSFBack, clicked);
- g_signal_connect( bScoreGotoNextUnscored, "clicked",
- (GCallback)bScoreGotoNextUnscored_clicked_cb,
- this);
- g_signal_connect( bScoreGotoPrevUnscored, "clicked",
- (GCallback)bScoreGotoPrevUnscored_clicked_cb,
- this);
+ G_CONNECT_1 (bScoreGotoNextUnscored, clicked);
+ G_CONNECT_1 (bScoreGotoPrevUnscored, clicked);
- g_signal_connect( bScoreGotoNextArtifact, "clicked",
- (GCallback)bScoreGotoNextArtifact_clicked_cb,
- this);
- g_signal_connect( bScoreGotoPrevArtifact, "clicked",
- (GCallback)bScoreGotoPrevArtifact_clicked_cb,
- this);
+ G_CONNECT_1 (bScoreGotoNextArtifact, clicked);
+ G_CONNECT_1 (bScoreGotoPrevArtifact, clicked);
- g_signal_connect( bSFDrawCrosshair, "toggled",
- (GCallback)bSFDrawCrosshair_toggled_cb,
- this);
- g_signal_connect( bSFShowFindDialog, "toggled",
- (GCallback)bSFShowFindDialog_toggled_cb,
- this);
- g_signal_connect( bSFShowPhaseDiffDialog, "toggled",
- (GCallback)bSFShowPhaseDiffDialog_toggled_cb,
- this);
- g_signal_connect( bSFRunICA, "clicked",
- (GCallback)bSFRunICA_clicked_cb,
- this);
+ G_CONNECT_1 (bSFDrawCrosshair, toggled);
+ G_CONNECT_1 (bSFShowFindDialog, toggled);
+ G_CONNECT_1 (bSFShowPhaseDiffDialog, toggled);
+ G_CONNECT_1 (bSFRunICA, clicked);
if ( !(AGH_GBGETOBJ (GtkButton, bScoreClear)) ||
!(AGH_GBGETOBJ (GtkButton, bScoreNREM1)) ||
@@ -125,27 +97,13 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
!(AGH_GBGETOBJ (GtkLabel, lScoreStatsWakePercent)) )
throw runtime_error ("Failed to construct SF widgets");
- g_signal_connect( bScoreClear, "clicked",
- (GCallback)bScoreClear_clicked_cb,
- this);
- g_signal_connect( bScoreNREM1, "clicked",
- (GCallback)bScoreNREM1_clicked_cb,
- this);
- g_signal_connect( bScoreNREM2, "clicked",
- (GCallback)bScoreNREM2_clicked_cb,
- this);
- g_signal_connect( bScoreNREM3, "clicked",
- (GCallback)bScoreNREM3_clicked_cb,
- this);
- g_signal_connect( bScoreNREM4, "clicked",
- (GCallback)bScoreNREM4_clicked_cb,
- this);
- g_signal_connect( bScoreREM, "clicked",
- (GCallback)bScoreREM_clicked_cb,
- this);
- g_signal_connect( bScoreWake, "clicked",
- (GCallback)bScoreWake_clicked_cb,
- this);
+ G_CONNECT_1 (bScoreClear, clicked);
+ G_CONNECT_1 (bScoreNREM1, clicked);
+ G_CONNECT_1 (bScoreNREM2, clicked);
+ G_CONNECT_1 (bScoreNREM3, clicked);
+ G_CONNECT_1 (bScoreNREM4, clicked);
+ G_CONNECT_1 (bScoreREM, clicked);
+ G_CONNECT_1 (bScoreWake, clicked);
if ( !(AGH_GBGETOBJ (GtkDrawingArea, daSFMontage)) ||
!(AGH_GBGETOBJ (GtkDrawingArea, daSFHypnogram)) ||
@@ -157,49 +115,23 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
sbSFContextIdGeneral = gtk_statusbar_get_context_id( sbSF, "General context");
- g_signal_connect( daSFMontage, "draw",
- (GCallback)daSFMontage_draw_cb,
- this);
- g_signal_connect( daSFMontage, "configure-event",
- (GCallback)daSFMontage_configure_event_cb,
- this);
- g_signal_connect( daSFMontage, "button-press-event",
- (GCallback)daSFMontage_button_press_event_cb,
- this);
- g_signal_connect( daSFMontage, "button-release-event",
- (GCallback)daSFMontage_button_release_event_cb,
- this);
- g_signal_connect( daSFMontage, "scroll-event",
- (GCallback)daSFMontage_scroll_event_cb,
- this);
- g_signal_connect( daSFMontage, "motion-notify-event",
- (GCallback)daSFMontage_motion_notify_event_cb,
- this);
- g_signal_connect( daSFMontage, "leave-notify-event",
- (GCallback)daSFMontage_leave_notify_event_cb,
- this);
+ G_CONNECT_1 (daSFMontage, draw);
+ G_CONNECT_2 (daSFMontage, configure, event);
+ G_CONNECT_3 (daSFMontage, button, press, event);
+ G_CONNECT_3 (daSFMontage, button, release, event);
+ G_CONNECT_2 (daSFMontage, scroll, event);
+ G_CONNECT_3 (daSFMontage, motion, notify, event);
+ G_CONNECT_3 (daSFMontage, leave, notify, event);
- g_signal_connect( daSFHypnogram, "draw",
- (GCallback)daSFHypnogram_draw_cb,
- this);
- g_signal_connect( daSFHypnogram, "button-press-event",
- (GCallback)daSFHypnogram_button_press_event_cb,
- this);
- g_signal_connect( daSFHypnogram, "button-release-event",
- (GCallback)daSFHypnogram_button_release_event_cb,
- this);
- g_signal_connect( daSFHypnogram, "motion-notify-event",
- (GCallback)daSFHypnogram_motion_notify_event_cb,
- this);
+ G_CONNECT_1 (daSFHypnogram, draw);
+ G_CONNECT_3 (daSFHypnogram, button, press, event);
+ G_CONNECT_3 (daSFHypnogram, button, release, event);
+ G_CONNECT_3 (daSFHypnogram, motion, notify, event);
gtk_menu_tool_button_set_menu( bSFAccept, (GtkWidget*)iiSFAccept);
- g_signal_connect( bSFAccept, "clicked",
- (GCallback)bSFAccept_clicked_cb,
- this);
- g_signal_connect( iSFAcceptAndTakeNext, "activate",
- (GCallback)iSFAcceptAndTakeNext_activate_cb,
- this);
+ G_CONNECT_1 (bSFAccept, clicked);
+ G_CONNECT_1 (iSFAcceptAndTakeNext, activate);
// ICA
if ( !(AGH_GBGETOBJ (GtkComboBox, eSFICARemixMode)) ||
@@ -242,68 +174,28 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
"tabs", tabarray,
NULL);
- g_signal_connect( eSFICARemixMode, "changed",
- (GCallback)eSFICARemixMode_changed_cb,
- this);
- g_signal_connect( eSFICANonlinearity, "changed",
- (GCallback)eSFICANonlinearity_changed_cb,
- this);
- g_signal_connect( eSFICAApproach, "changed",
- (GCallback)eSFICAApproach_changed_cb,
- this);
- g_signal_connect( eSFICAFineTune, "toggled",
- (GCallback)eSFICAFineTune_toggled_cb,
- this);
- g_signal_connect( eSFICAStabilizationMode, "toggled",
- (GCallback)eSFICAStabilizationMode_toggled_cb,
- this);
- g_signal_connect( eSFICAa1, "value-changed",
- (GCallback)eSFICAa1_value_changed_cb,
- this);
- g_signal_connect( eSFICAa2, "value-changed",
- (GCallback)eSFICAa2_value_changed_cb,
- this);
- g_signal_connect( eSFICAmu, "value-changed",
- (GCallback)eSFICAmu_value_changed_cb,
- this);
- g_signal_connect( eSFICAepsilon, "value-changed",
- (GCallback)eSFICAepsilon_value_changed_cb,
- this);
- g_signal_connect( eSFICANofICs, "value-changed",
- (GCallback)eSFICANofICs_value_changed_cb,
- this);
- g_signal_connect( eSFICAEigVecFirst, "value-changed",
- (GCallback)eSFICAEigVecFirst_value_changed_cb,
- this);
- g_signal_connect( eSFICAEigVecLast, "value-changed",
- (GCallback)eSFICAEigVecLast_value_changed_cb,
- this);
- g_signal_connect( eSFICASampleSizePercent, "value-changed",
- (GCallback)eSFICASampleSizePercent_value_changed_cb,
- this);
- g_signal_connect( eSFICAMaxIterations, "value-changed",
- (GCallback)eSFICAMaxIterations_value_changed_cb,
- this);
-
- g_signal_connect( bSFICATry, "clicked",
- (GCallback)bSFICATry_clicked_cb,
- this);
- g_signal_connect( bSFICAPreview, "toggled",
- (GCallback)bSFICAPreview_toggled_cb,
- this);
- g_signal_connect( bSFICAShowMatrix, "toggled",
- (GCallback)bSFICAShowMatrix_toggled_cb,
- this);
- g_signal_connect( wSFICAMatrix, "hide",
- G_CALLBACK (wSFICAMatrix_hide_cb),
- this);
-
- g_signal_connect( bSFICAApply, "clicked",
- (GCallback)bSFICAApply_clicked_cb,
- this);
- g_signal_connect( bSFICACancel, "clicked",
- (GCallback)bSFICACancel_clicked_cb,
- this);
+ G_CONNECT_1 (eSFICARemixMode, changed);
+ G_CONNECT_1 (eSFICANonlinearity, changed);
+ G_CONNECT_1 (eSFICAApproach, changed);
+ G_CONNECT_1 (eSFICAFineTune, toggled);
+ G_CONNECT_1 (eSFICAStabilizationMode, toggled);
+ G_CONNECT_2 (eSFICAa1, value, changed);
+ G_CONNECT_2 (eSFICAa2, value, changed);
+ G_CONNECT_2 (eSFICAmu, value, changed);
+ G_CONNECT_2 (eSFICAepsilon, value, changed);
+ G_CONNECT_2 (eSFICANofICs, value, changed);
+ G_CONNECT_2 (eSFICAEigVecFirst, value, changed);
+ G_CONNECT_2 (eSFICAEigVecLast, value, changed);
+ G_CONNECT_2 (eSFICASampleSizePercent, value, changed);
+ G_CONNECT_2 (eSFICAMaxIterations, value, changed);
+
+ G_CONNECT_1 (bSFICATry, clicked);
+ G_CONNECT_1 (bSFICAPreview, toggled);
+ G_CONNECT_1 (bSFICAShowMatrix, toggled);
+ G_CONNECT_1 (wSFICAMatrix, hide);
+
+ G_CONNECT_1 (bSFICAApply, clicked);
+ G_CONNECT_1 (bSFICACancel, clicked);
// ------- menus
if ( !(AGH_GBGETOBJ (GtkLabel, lSFOverChannel)) ||
@@ -364,126 +256,54 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
gtk_menu_item_set_submenu( iSFPageHidden, (GtkWidget*)iiSFPageHidden);
- g_signal_connect( iSFPageShowOriginal, "toggled",
- (GCallback)iSFPageShowOriginal_toggled_cb,
- this);
- g_signal_connect( iSFPageShowProcessed, "toggled",
- (GCallback)iSFPageShowProcessed_toggled_cb,
- this);
- g_signal_connect( iSFPageUseResample, "toggled",
- (GCallback)iSFPageUseResample_toggled_cb,
- this);
- g_signal_connect( iSFPageDrawZeroline, "toggled",
- (GCallback)iSFPageDrawZeroline_toggled_cb,
- this);
+ G_CONNECT_1 (iSFPageShowOriginal, toggled);
+ G_CONNECT_1 (iSFPageShowProcessed, toggled);
+ G_CONNECT_1 (iSFPageUseResample, toggled);
+ G_CONNECT_1 (iSFPageDrawZeroline, toggled);
+
+ G_CONNECT_1 (iSFPageAnnotationDelete, activate);
+ G_CONNECT_1 (iSFPageAnnotationEdit, activate);
+
+ G_CONNECT_1 (iSFPageSelectionMarkArtifact, activate);
+ G_CONNECT_1 (iSFPageSelectionClearArtifact, activate);
+ G_CONNECT_1 (iSFPageSelectionFindPattern, activate);
+ G_CONNECT_1 (iSFPageSelectionAnnotate, activate);
+
+ G_CONNECT_1 (iSFPageSelectionDrawCourse, toggled);
+ G_CONNECT_1 (iSFPageSelectionDrawEnvelope, toggled);
+ G_CONNECT_1 (iSFPageSelectionDrawDzxdf, toggled);
+
+
+ G_CONNECT_1 (iSFPageFilter, activate);
+ G_CONNECT_1 (iSFPageSaveChannelAsSVG, activate);
+ G_CONNECT_1 (iSFPageSaveMontageAsSVG, activate);
+ G_CONNECT_1 (iSFPageExportSignal, activate);
+ G_CONNECT_1 (iSFPageUseThisScale, activate);
+ G_CONNECT_1 (iSFPageDetectArtifacts, activate);
+ G_CONNECT_1 (iSFPageClearArtifacts, activate);
+ G_CONNECT_1 (iSFPageHide, activate);
+
+ G_CONNECT_1 (iSFPageSpaceEvenly, activate);
+ G_CONNECT_1 (iSFPageLocateSelection, activate);
+
+ G_CONNECT_1 (iSFPageDrawPSDProfile, toggled);
+ G_CONNECT_1 (iSFPageDrawPSDSpectrum, toggled);
+ G_CONNECT_1 (iSFPageDrawMCProfile, toggled);
+ G_CONNECT_1 (iSFPageDrawSWUProfile, toggled);
+ G_CONNECT_1 (iSFPageDrawEMGProfile, toggled);
+
+ G_CONNECT_1 (iSFPowerExportRange, activate);
+ G_CONNECT_1 (iSFPowerExportAll, activate);
+ G_CONNECT_1 (iSFPowerSmooth, toggled);
+ G_CONNECT_1 (iSFPowerDrawBands, toggled);
+ G_CONNECT_1 (iSFPowerUseThisScale, activate);
+ G_CONNECT_1 (iSFPowerAutoscale, toggled);
+
+ G_CONNECT_1 (iSFScoreAssist, activate);
+ G_CONNECT_1 (iSFScoreExport, activate);
+ G_CONNECT_1 (iSFScoreImport, activate);
+ G_CONNECT_1 (iSFScoreClear, activate);
- g_signal_connect( iSFPageAnnotationDelete, "activate",
- (GCallback)iSFPageAnnotationDelete_activate_cb,
- this);
- g_signal_connect( iSFPageAnnotationEdit, "activate",
- (GCallback)iSFPageAnnotationEdit_activate_cb,
- this);
-
- g_signal_connect( iSFPageSelectionMarkArtifact, "activate",
- (GCallback)iSFPageSelectionMarkArtifact_activate_cb,
- this);
- g_signal_connect( iSFPageSelectionClearArtifact, "activate",
- (GCallback)iSFPageSelectionClearArtifact_activate_cb,
- this);
- g_signal_connect( iSFPageSelectionFindPattern, "activate",
- (GCallback)iSFPageSelectionFindPattern_activate_cb,
- this);
- g_signal_connect( iSFPageSelectionAnnotate, "activate",
- (GCallback)iSFPageSelectionAnnotate_activate_cb,
- this);
-
- g_signal_connect( iSFPageSelectionDrawCourse, "toggled",
- (GCallback)iSFPageSelectionDrawCourse_toggled_cb,
- this);
- g_signal_connect( iSFPageSelectionDrawEnvelope, "toggled",
- (GCallback)iSFPageSelectionDrawEnvelope_toggled_cb,
- this);
- g_signal_connect( iSFPageSelectionDrawDzxdf, "toggled",
- (GCallback)iSFPageSelectionDrawDzxdf_toggled_cb,
- this);
-
-
- g_signal_connect( iSFPageFilter, "activate",
- (GCallback)iSFPageFilter_activate_cb,
- this);
- g_signal_connect( iSFPageSaveChannelAsSVG, "activate",
- (GCallback)iSFPageSaveChannelAsSVG_activate_cb,
- this);
- g_signal_connect( iSFPageSaveMontageAsSVG, "activate",
- (GCallback)iSFPageSaveMontageAsSVG_activate_cb,
- this);
- g_signal_connect( iSFPageExportSignal, "activate",
- (GCallback)iSFPageExportSignal_activate_cb,
- this);
- g_signal_connect( iSFPageUseThisScale, "activate",
- (GCallback)iSFPageUseThisScale_activate_cb,
- this);
- g_signal_connect( iSFPageDetectArtifacts, "activate",
- (GCallback)iSFPageDetectArtifacts_activate_cb,
- this);
- g_signal_connect( iSFPageClearArtifacts, "activate",
- (GCallback)iSFPageClearArtifacts_activate_cb,
- this);
- g_signal_connect( iSFPageHide, "activate",
- (GCallback)iSFPageHide_activate_cb,
- this);
-
- g_signal_connect( iSFPageSpaceEvenly, "activate",
- (GCallback)iSFPageSpaceEvenly_activate_cb,
- this);
- g_signal_connect( iSFPageLocateSelection, "activate",
- (GCallback)iSFPageLocateSelection_activate_cb,
- this);
-
- g_signal_connect( iSFPageDrawPSDProfile, "toggled",
- (GCallback)iSFPageDrawPSDProfile_toggled_cb,
- this);
- g_signal_connect( iSFPageDrawPSDSpectrum, "toggled",
- (GCallback)iSFPageDrawPSDSpectrum_toggled_cb,
- this);
- g_signal_connect( iSFPageDrawMCProfile, "toggled",
- (GCallback)iSFPageDrawMCProfile_toggled_cb,
- this);
- g_signal_connect( iSFPageDrawEMGProfile, "toggled",
- (GCallback)iSFPageDrawEMGProfile_toggled_cb,
- this);
-
- g_signal_connect( iSFPowerExportRange, "activate",
- (GCallback)iSFPowerExportRange_activate_cb,
- this);
- g_signal_connect( iSFPowerExportAll, "activate",
- (GCallback)iSFPowerExportAll_activate_cb,
- this);
- g_signal_connect( iSFPowerSmooth, "toggled",
- (GCallback)iSFPowerSmooth_toggled_cb,
- this);
- g_signal_connect( iSFPowerDrawBands, "toggled",
- (GCallback)iSFPowerDrawBands_toggled_cb,
- this);
- g_signal_connect( iSFPowerUseThisScale, "activate",
- (GCallback)iSFPowerUseThisScale_activate_cb,
- this);
- g_signal_connect( iSFPowerAutoscale, "toggled",
- (GCallback)iSFPowerAutoscale_toggled_cb,
- this);
-
- g_signal_connect( iSFScoreAssist, "activate",
- (GCallback)iSFScoreAssist_activate_cb,
- this);
- g_signal_connect( iSFScoreExport, "activate",
- (GCallback)iSFScoreExport_activate_cb,
- this);
- g_signal_connect( iSFScoreImport, "activate",
- (GCallback)iSFScoreImport_activate_cb,
- this);
- g_signal_connect( iSFScoreClear, "activate",
- (GCallback)iSFScoreClear_activate_cb,
- this);
// petty dialogs
// annotations
if ( !(AGH_GBGETOBJ (GtkDialog, wAnnotationLabel)) ||
@@ -533,37 +353,17 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
// haunting GTK+ forbids reuse of _p.mGlobalArtifactDetectionProfiles
gtk_combo_box_set_model_properly( eSFADProfiles, mSFADProfiles);
- g_signal_connect( wSFArtifactDetection, "close",
- (GCallback)wSFArtifactDetection_close_cb,
- this);
- g_signal_connect( wSFArtifactDetection, "delete-event",
- (GCallback)wSFArtifactDetection_delete_event_cb,
- this);
+ G_CONNECT_1 (wSFArtifactDetection, close);
+ G_CONNECT_2 (wSFArtifactDetection, delete, event);
eSFADProfiles_changed_cb_handler_id =
- g_signal_connect( eSFADProfiles, "changed",
- (GCallback)eSFADProfiles_changed_cb,
- this);
- g_signal_connect( bSFADProfileSave, "clicked",
- (GCallback)bSFADProfileSave_clicked_cb,
- this);
- g_signal_connect( bSFADProfileDelete, "clicked",
- (GCallback)bSFADProfileDelete_clicked_cb,
- this);
- g_signal_connect( eSFADEstimateE, "toggled",
- (GCallback)eSFADEstimateE_toggled_cb,
- this);
- g_signal_connect( eSFADUseThisRange, "toggled",
- (GCallback)eSFADUseThisRange_toggled_cb,
- this);
- g_signal_connect( bSFADPreview, "toggled",
- (GCallback)bSFADPreview_toggled_cb,
- this);
- g_signal_connect( bSFADApply, "clicked",
- (GCallback)bSFADApply_clicked_cb,
- this);
- g_signal_connect( bSFADCancel, "clicked",
- (GCallback)bSFADCancel_clicked_cb,
- this);
+ G_CONNECT_1 (eSFADProfiles, changed);
+ G_CONNECT_1 (bSFADProfileSave, clicked);
+ G_CONNECT_1 (bSFADProfileDelete, clicked);
+ G_CONNECT_1 (eSFADEstimateE, toggled);
+ G_CONNECT_1 (eSFADUseThisRange, toggled);
+ G_CONNECT_1 (bSFADPreview, toggled);
+ G_CONNECT_1 (bSFADApply, clicked);
+ G_CONNECT_1 (bSFADCancel, clicked);
@@ -599,34 +399,22 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
gtk_combo_box_set_model_properly( ePatternList, mPatterns);
ePatternList_changed_cb_handler_id =
- g_signal_connect( ePatternList, "changed",
- G_CALLBACK (ePatternList_changed_cb),
- this);
+ G_CONNECT_1 (ePatternList, changed);
gtk_combo_box_set_model_properly( ePatternChannel, _p.mAllChannels);
ePatternChannel_changed_cb_handler_id =
- g_signal_connect( ePatternChannel, "changed",
- G_CALLBACK (ePatternChannel_changed_cb),
- this);
+ G_CONNECT_1 (ePatternChannel, changed);
- g_signal_connect( daPatternSelection, "draw",
- G_CALLBACK (daPatternSelection_draw_cb),
- this);
- g_signal_connect( daPatternSelection, "scroll-event",
- G_CALLBACK (daPatternSelection_scroll_event_cb),
- this);
+ G_CONNECT_1 (daPatternSelection, draw);
+ G_CONNECT_2( daPatternSelection, scroll, event);
g_signal_connect( bPatternFindNext, "clicked",
G_CALLBACK (bPatternFind_clicked_cb),
this);
g_signal_connect( bPatternFindPrevious, "clicked",
G_CALLBACK (bPatternFind_clicked_cb),
this);
- g_signal_connect( bPatternSave, "clicked",
- G_CALLBACK (bPatternSave_clicked_cb),
- this);
- g_signal_connect( bPatternDiscard, "clicked",
- G_CALLBACK (bPatternDiscard_clicked_cb),
- this);
+ G_CONNECT_1 (bPatternSave, clicked);
+ G_CONNECT_1 (bPatternDiscard, clicked);
g_signal_connect( ePatternEnvTightness, "value-changed",
G_CALLBACK (ePattern_any_value_changed_cb),
@@ -656,12 +444,8 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
G_CALLBACK (ePattern_any_value_changed_cb),
this);
- g_signal_connect( wPattern, "show",
- G_CALLBACK (wPattern_show_cb),
- this);
- g_signal_connect( wPattern, "hide",
- G_CALLBACK (wPattern_hide_cb),
- this);
+ G_CONNECT_1 (wPattern, show);
+ G_CONNECT_1 (wPattern, hide);
// aghui::SScoringFacility::SFiltersDialog::
@@ -714,30 +498,14 @@ SScoringFacilityWidgets (SExpDesignUI& _p)
g_signal_connect( daSFPD, "draw",
G_CALLBACK (daSFPD_draw_cb),
this);
- g_signal_connect( daSFPD, "scroll-event",
- G_CALLBACK (daSFPD_scroll_event_cb),
- this);
- g_signal_connect( eSFPDChannelA, "changed",
- G_CALLBACK (eSFPDChannelA_changed_cb),
- this);
- g_signal_connect( eSFPDChannelB, "changed",
- G_CALLBACK (eSFPDChannelB_changed_cb),
- this);
- g_signal_connect( eSFPDFreqFrom, "value-changed",
- G_CALLBACK (eSFPDFreqFrom_value_changed_cb),
- this);
- g_signal_connect( eSFPDBandwidth, "value-changed",
- G_CALLBACK (eSFPDBandwidth_value_changed_cb),
- this);
- g_signal_connect( eSFPDSmooth, "value-changed",
- G_CALLBACK (eSFPDSmooth_value_changed_cb),
- this);
- g_signal_connect( wSFPD, "show",
- G_CALLBACK (wSFPD_show_cb),
- this);
- g_signal_connect( wSFPD, "hide",
- G_CALLBACK (wSFPD_hide_cb),
- this);
+ G_CONNECT_2 (daSFPD, scroll, event);
+ G_CONNECT_1 (eSFPDChannelA, changed);
+ G_CONNECT_1 (eSFPDChannelB, changed);
+ G_CONNECT_2 (eSFPDFreqFrom, value, changed);
+ G_CONNECT_2 (eSFPDBandwidth, value, changed);
+ G_CONNECT_2 (eSFPDSmooth, value, changed);
+ G_CONNECT_1 (wSFPD, show);
+ G_CONNECT_1 (wSFPD, hide);
}
diff --git a/src/ui/sf/sf-hypnogram.cc b/src/ui/sf/sf-hypnogram.cc
index 4b8e965..372d216 100644
--- a/src/ui/sf/sf-hypnogram.cc
+++ b/src/ui/sf/sf-hypnogram.cc
@@ -34,7 +34,7 @@ aghui::SScoringFacility::
draw_hypnogram( cairo_t *cr)
{
// bg
- _p.CwB[SExpDesignUI::TColour::hypnogram].set_source_rgb( cr);
+ _p.CwB[SExpDesignUI::TColour::sf_hypnogram].set_source_rgb( cr);
cairo_rectangle( cr, 0., 0., da_wd, HypnogramHeight);
cairo_fill( cr);
cairo_stroke( cr);
@@ -52,16 +52,16 @@ draw_hypnogram( cairo_t *cr)
}
}
} else {
- _p.CwB[SExpDesignUI::TColour::hypnogram_scoreline].set_source_rgba( cr, .5);
+ _p.CwB[SExpDesignUI::TColour::sf_hypnogram].set_source_rgba_contrasting( cr, .4);
cairo_set_line_width( cr, .4);
- for ( size_t i = 1; i < (size_t)sigfile::SPage::TScore::_total; ++i ) {
+ for ( size_t i = 1; i < (size_t)sigfile::SPage::TScore::TScore_total; ++i ) {
cairo_move_to( cr, 0, __score_hypn_depth[i]);
cairo_line_to( cr, da_wd, __score_hypn_depth[i]);
}
cairo_stroke( cr);
// scores
- _p.CwB[SExpDesignUI::TColour::hypnogram_scoreline].set_source_rgba( cr, 1.);
+ _p.CwB[SExpDesignUI::TColour::sf_hypnogram].set_source_rgba_contrasting( cr, 1.);
cairo_set_line_width( cr, 3.);
// these lines can be discontinuous
for ( size_t i = 0; i < total_pages(); ++i ) {
@@ -77,7 +77,7 @@ draw_hypnogram( cairo_t *cr)
// extra: annotations
{
- _p.CwB[SExpDesignUI::TColour::annotations].set_source_rgba( cr, .6);
+ _p.CwB[SExpDesignUI::TColour::sf_annotations].set_source_rgba( cr);
cairo_set_line_width( cr, 18.);
auto total_seconds = total_pages() * pagesize();
@@ -93,7 +93,7 @@ draw_hypnogram( cairo_t *cr)
// extra: artifacts
{
- _p.CwB[SExpDesignUI::TColour::artifact].set_source_rgba( cr, .6);
+ _p.CwB[SExpDesignUI::TColour::sf_artifact].set_source_rgba( cr);
cairo_set_line_width( cr, 12.);
auto total_seconds = total_pages() * pagesize();
diff --git a/src/ui/sf/sf-montage.cc b/src/ui/sf/sf-montage.cc
index dda91a5..d9a75b2 100644
--- a/src/ui/sf/sf-montage.cc
+++ b/src/ui/sf/sf-montage.cc
@@ -231,7 +231,7 @@ draw_page( cairo_t *cr,
double pre = _p.skirting_run_per1 * _p.vpagesize(),
ma = (selection_start_time - _p.cur_xvpage_start()) / _p.xvpagesize() * wd,
me = (selection_end_time - _p.cur_xvpage_start()) / _p.xvpagesize() * wd;
- _p._p.CwB[SExpDesignUI::TColour::selection].set_source_rgba( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_selection].set_source_rgba( cr);
cairo_rectangle( cr,
ma, ptop, me - ma, _p.interchannel_gap);
cairo_fill( cr);
@@ -240,7 +240,7 @@ draw_page( cairo_t *cr,
// start timestamp
cairo_set_font_size( cr, 10);
cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
- _p._p.CwB[SExpDesignUI::TColour::cursor].set_source_rgba( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_cursor].set_source_rgba( cr);
cairo_text_extents_t extents;
snprintf_buf( "%5.2fs",
@@ -331,7 +331,7 @@ draw_page( cairo_t *cr,
}
// labels
- _p._p.CwB[SExpDesignUI::TColour::cursor].set_source_rgba( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_cursor].set_source_rgba( cr);
snprintf_buf( "%5.2fs",
selection_end_time - _p.cur_xvpage_start() - pre);
cairo_text_extents( cr, __buf__, &extents);
@@ -369,7 +369,7 @@ draw_page( cairo_t *cr,
// zeroline
if ( draw_zeroline ) {
cairo_set_line_width( cr, fine_line());
- _p._p.CwB[SExpDesignUI::TColour::ticks_sf].set_source_rgba( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_ticks].set_source_rgba( cr);
cairo_move_to( cr, 0, y0);
cairo_rel_line_to( cr, wd, 0);
cairo_stroke( cr);
@@ -385,7 +385,7 @@ draw_page( cairo_t *cr,
cairo_stroke( cr);
if ( _p.mode == aghui::SScoringFacility::TMode::scoring ) {
- _p._p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgb( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgb( cr);
cairo_move_to( cr, wd-88, y0 - 15);
cairo_set_font_size( cr, 10);
snprintf_buf( "filt");
@@ -408,7 +408,7 @@ draw_page( cairo_t *cr,
cairo_stroke( cr);
if ( _p.mode == aghui::SScoringFacility::TMode::scoring ) {
- _p._p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgb( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgb( cr);
cairo_move_to( cr, wd-88, y0 - 25);
cairo_set_font_size( cr, 10);
snprintf_buf( "orig");
@@ -452,8 +452,8 @@ draw_page( cairo_t *cr,
{
auto& Aa = crecording.F().artifacts(name);
if ( not Aa.obj.empty() ) {
- _p._p.CwB[SExpDesignUI::TColour::artifact].set_source_rgba( cr, // do some gradients perhaps?
- .4);
+ _p._p.CwB[SExpDesignUI::TColour::sf_artifact].set_source_rgba( cr, // do some gradients perhaps?
+ .4);
for ( auto &A : Aa() ) {
if ( agh::alg::overlap(
(int)A.a, (int)A.z,
@@ -470,7 +470,7 @@ draw_page( cairo_t *cr,
} else if ( (int)A.a > cvpe ) // no more artifacts up to and on current page
break;
}
- _p._p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgb( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgb( cr);
cairo_move_to( cr, ef-70, y0 + 15);
cairo_set_font_size( cr, 8);
snprintf_buf( "%4.2f %% dirty", percent_dirty);
@@ -488,9 +488,9 @@ draw_page( cairo_t *cr,
if ( agh::alg::overlap( (int)A.span.a, (int)A.span.z, cvpa, cvpe) ) {
int disp = ptop + ++on_this_page * 5;
cairo_pattern_t *cp = cairo_pattern_create_linear( 0., disp, 0., pbot);
- _p._p.CwB[SExpDesignUI::TColour::annotations].pattern_add_color_stop_rgba( cp, 0., 1.);
- _p._p.CwB[SExpDesignUI::TColour::annotations].pattern_add_color_stop_rgba( cp, .1, 0.3);
- _p._p.CwB[SExpDesignUI::TColour::annotations].pattern_add_color_stop_rgba( cp, 1., 0.);
+ _p._p.CwB[SExpDesignUI::TColour::sf_annotations].pattern_add_color_stop_rgba( cp, 0., 1.);
+ _p._p.CwB[SExpDesignUI::TColour::sf_annotations].pattern_add_color_stop_rgba( cp, .1, 0.3);
+ _p._p.CwB[SExpDesignUI::TColour::sf_annotations].pattern_add_color_stop_rgba( cp, 1., 0.);
cairo_set_source( cr, cp);
int aa = (int)A.span.a - cvpa,
@@ -535,7 +535,7 @@ draw_page( cairo_t *cr,
cairo_stroke( cr);
}
- _p._p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgb( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgb( cr);
// uV scale
{
@@ -633,7 +633,7 @@ draw_overlays( cairo_t* cr,
cairo_stroke( cr);
}
} else {
- _p._p.CwB[SExpDesignUI::TColour::profile_psd_sf].set_source_rgba( cr, .5);
+ _p._p.CwB[SExpDesignUI::TColour::sf_profile_psd].set_source_rgba( cr, .5);
double zero = 0.5 / psd.course.size() * _p.da_wd;
cairo_move_to( cr, zero,
psd.course[0]);
@@ -684,7 +684,7 @@ draw_overlays( cairo_t* cr,
cairo_fill( cr);
// grid lines
- _p._p.CwB[SExpDesignUI::TColour::spectrum_grid].set_source_rgba( cr, .1);
+ _p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgba( cr, .1);
cairo_set_line_width( cr, .3);
for ( size_t i = 1; i < last_spectrum_bin; ++i ) {
cairo_move_to( cr, gx + (float)i/last_spectrum_bin * gw, gy);
@@ -693,7 +693,7 @@ draw_overlays( cairo_t* cr,
cairo_stroke( cr);
// spectrum
- _p._p.CwB[SExpDesignUI::TColour::spectrum].set_source_rgba( cr, .8);
+ _p._p.CwB[SExpDesignUI::TColour::sf_ticks].set_source_rgba( cr, .8);
cairo_set_line_width( cr, 2);
float factor = psd.display_scale / crecording.psd_profile.Pp.binsize;
cairo_move_to( cr,
@@ -706,7 +706,7 @@ draw_overlays( cairo_t* cr,
cairo_stroke( cr);
// axes
- _p._p.CwB[SExpDesignUI::TColour::spectrum_axes].set_source_rgba( cr, .5);
+ _p._p.CwB[SExpDesignUI::TColour::sf_ticks].set_source_rgba( cr, .5);
cairo_set_line_width( cr, .5);
cairo_move_to( cr, gx, gy);
cairo_rel_line_to( cr, 0, gh);
@@ -722,7 +722,7 @@ draw_overlays( cairo_t* cr,
// labels
cairo_text_extents_t extents;
- _p._p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgba( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgba( cr);
cairo_set_font_size( cr, 8);
snprintf_buf( "%g Hz",
@@ -745,7 +745,7 @@ draw_overlays( cairo_t* cr,
cairo_set_font_size( cr, 10);
guint i;
- _p._p.CwB[SExpDesignUI::TColour::profile_mc_sf].set_source_rgba( cr, .5);
+ _p._p.CwB[SExpDesignUI::TColour::sf_profile_mc].set_source_rgba( cr, .5);
double zero = 0.5 / mc.course.size() * _p.da_wd;
cairo_move_to( cr, zero,
mc.course[0]);
@@ -758,9 +758,7 @@ draw_overlays( cairo_t* cr,
cairo_stroke( cr);
cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
- snprintf_buf( "%g–%g Hz",
- crecording.mc_profile.Pp.freq_from + crecording.mc_profile.Pp.bandwidth,
- crecording.mc_profile.Pp.freq_from + crecording.mc_profile.Pp.bandwidth);
+ snprintf_buf( "f0:%g", mc.f0);
cairo_move_to( cr, _p.da_wd - 70, pbot - 30);
cairo_show_text( cr, __buf__);
cairo_stroke( cr);
@@ -787,12 +785,54 @@ draw_overlays( cairo_t* cr,
}
+ if ( _p.mode == TMode::scoring and
+ draw_swu and type == sigfile::SChannel::TType::eeg ) {
+ overlay = true;
+
+ cairo_set_line_width( cr, 1.);
+ cairo_set_font_size( cr, 10);
+ guint i;
+
+ _p._p.CwB[SExpDesignUI::TColour::sf_profile_swu].set_source_rgba( cr, .5);
+ double zero = 0.5 / swu.course.size() * _p.da_wd;
+ cairo_move_to( cr, zero,
+ swu.course[0]);
+ for ( i = 0; i < swu.course.size(); ++i )
+ cairo_line_to( cr, ((double)i+.5) / swu.course.size() * _p.da_wd,
+ - swu.course[i] * swu.display_scale + pbot);
+ cairo_line_to( cr, _p.da_wd, pbot);
+ cairo_line_to( cr, zero, pbot);
+ cairo_fill( cr);
+ cairo_stroke( cr);
+
+ // scale
+ {
+ cairo_set_source_rgb( cr, 0., 0., 0.);
+ cairo_set_line_width( cr, 1.5);
+ double dpuf =
+ agh::alg::sensible_scale_reduction_factor(
+ swu.display_scale, _p.interchannel_gap/2);
+ int x = 140;
+ cairo_move_to( cr, x, pbot - 5);
+ cairo_rel_line_to( cr, 0, -dpuf * swu.display_scale);
+ cairo_stroke( cr);
+
+ cairo_set_font_size( cr, 9);
+ //cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
+ cairo_move_to( cr, x + 5, pbot - 20);
+ snprintf_buf( "%g a.u.", dpuf);
+ cairo_show_text( cr, __buf__);
+ cairo_stroke( cr);
+ }
+
+ }
+
// EMG profile
if ( _p.mode == TMode::scoring and draw_emg and
type == sigfile::SChannel::TType::emg ) {
overlay = true;
- _p._p.CwB[SExpDesignUI::TColour::emg].set_source_rgba( cr, .7);
+ _p._p.CwB[SExpDesignUI::TColour::sf_emg].set_source_rgba( cr);
cairo_set_line_width( cr, .3);
double dps = (double)emg_profile.size() / _p.da_wd;
cairo_move_to( cr, 0., pbot - EMGProfileHeight/2);
@@ -814,7 +854,7 @@ draw_overlays( cairo_t* cr,
if ( _p.draw_crosshair ) {
cairo_set_font_size( cr, 10);
cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
- _p._p.CwB[SExpDesignUI::TColour::cursor].set_source_rgb( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_cursor].set_source_rgb( cr);
if ( this == &_p.channels.front() )
snprintf_buf( "%4.2f (%5.2fs)",
(draw_filtered_signal ? signal_filtered : signal_original)
@@ -832,7 +872,7 @@ draw_overlays( cairo_t* cr,
// samples per pixel
if ( _p.mode == TMode::scoring and resample_signal ) {
- _p._p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgb( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgb( cr);
cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size( cr, 8);
cairo_move_to( cr, _p.da_wd-40, ptop + 11);
@@ -852,12 +892,12 @@ _draw_hour_ticks( cairo_t *cr, int htop, int hbot, bool with_cursor)
float hours4 = (float)total_pages() * pagesize() / 3600 * 4;
for ( size_t i = 1; i < hours4; ++i ) {
guint tick_pos = (float)i / hours4 * da_wd;
- _p.CwB[SExpDesignUI::TColour::ticks_sf].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::sf_ticks].set_source_rgba( cr);
cairo_move_to( cr, tick_pos, hbot);
cairo_rel_line_to( cr, 0, -((i%4 == 0) ? 20 : (i%2 == 0) ? 12 : 5));
if ( i % 4 == 0 ) {
snprintf_buf( "%2zuh", i/4);
- _p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgba( cr);
cairo_move_to( cr, tick_pos+5, hbot - 2);
cairo_show_text( cr, __buf__);
}
@@ -865,7 +905,7 @@ _draw_hour_ticks( cairo_t *cr, int htop, int hbot, bool with_cursor)
cairo_stroke( cr);
if ( with_cursor ) {
- _p.CwB[SExpDesignUI::TColour::cursor].set_source_rgba( cr, .3);
+ _p.CwB[SExpDesignUI::TColour::sf_cursor].set_source_rgba( cr);
cairo_rectangle( cr,
(double)cur_vpage() / total_vpages() * da_wd, htop,
max( .5, 1. / total_vpages() * da_wd), hbot - htop);
@@ -1015,12 +1055,12 @@ draw_montage( cairo_t* cr)
cairo_set_font_size( cr, 9);
cairo_set_line_width( cr, .2);
for ( size_t i = 0; i <= PageTicks[pagesize_item]; ++i ) {
- _p.CwB[SExpDesignUI::TColour::ticks_sf].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::sf_ticks].set_source_rgba( cr);
double tick_pos = (double)i * vpagesize() / PageTicks[pagesize_item];
cairo_move_to( cr, half_pad + i * ef / PageTicks[pagesize_item], 0);
cairo_rel_line_to( cr, 0, da_ht);
- _p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgba( cr);
+ _p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgba( cr);
cairo_move_to( cr, half_pad + i * ef / PageTicks[pagesize_item] + 5, da_ht-2);
snprintf_buf_ts_s( tick_pos);
cairo_show_text( cr, __buf__);
@@ -1032,7 +1072,7 @@ draw_montage( cairo_t* cr)
// crosshair line
if ( draw_crosshair ) {
- _p.CwB[SExpDesignUI::TColour::cursor].set_source_rgba( cr, .5);
+ _p.CwB[SExpDesignUI::TColour::sf_cursor].set_source_rgba( cr);
cairo_set_line_width( cr, .2);
cairo_move_to( cr, crosshair_at, 0);
cairo_rel_line_to( cr, 0, da_ht);
diff --git a/src/ui/sf/sf-montage_cb.cc b/src/ui/sf/sf-montage_cb.cc
index fbb2307..72358fa 100644
--- a/src/ui/sf/sf-montage_cb.cc
+++ b/src/ui/sf/sf-montage_cb.cc
@@ -395,10 +395,12 @@ daSFMontage_scroll_event_cb( GtkWidget *wid, GdkEventScroll *event, gpointer use
switch ( event->direction ) {
case GDK_SCROLL_DOWN:
Ch->psd.display_scale /= 1.1;
+ Ch->swu.display_scale /= 1.1;
Ch->mc.display_scale /= 1.1;
break;
case GDK_SCROLL_UP:
Ch->psd.display_scale *= 1.1;
+ Ch->swu.display_scale *= 1.1;
Ch->mc.display_scale *= 1.1;
break;
case GDK_SCROLL_LEFT:
@@ -597,6 +599,16 @@ iSFPageDrawMCProfile_toggled_cb( GtkCheckMenuItem *checkmenuitem, gpointer userd
}
void
+iSFPageDrawSWUProfile_toggled_cb( GtkCheckMenuItem *checkmenuitem, gpointer userdata)
+{
+ auto& SF = *(SScoringFacility*)userdata;
+ if ( SF.suppress_redraw )
+ return;
+ SF.using_channel->draw_swu = (bool)gtk_check_menu_item_get_active( checkmenuitem);
+ gtk_widget_queue_draw( (GtkWidget*)SF.daSFMontage);
+}
+
+void
iSFPageDrawEMGProfile_toggled_cb( GtkCheckMenuItem *checkmenuitem, gpointer userdata)
{
auto& SF = *(SScoringFacility*)userdata;
@@ -995,9 +1007,11 @@ iSFPowerUseThisScale_activate_cb( GtkMenuItem *menuitem, gpointer userdata)
auto& SF = *(SScoringFacility*)userdata;
auto sane_psd_display_scale = SF.using_channel->psd.display_scale,
+ sane_swu_display_scale = SF.using_channel->swu.display_scale,
sane_mc_display_scale = SF.using_channel->mc.display_scale;
for ( auto& H : SF.channels ) {
H.psd.display_scale = sane_psd_display_scale;
+ H.swu.display_scale = sane_swu_display_scale;
H.mc.display_scale = sane_mc_display_scale;
}
SF.queue_redraw_all();
diff --git a/src/ui/sf/sf-patterns.cc b/src/ui/sf/sf-patterns.cc
index 50371f7..52efc74 100644
--- a/src/ui/sf/sf-patterns.cc
+++ b/src/ui/sf/sf-patterns.cc
@@ -91,7 +91,7 @@ draw( cairo_t *cr)
cairo_set_font_size( cr, 9);
float seconds = (float)pattern.size() / samplerate;
for ( size_t i8 = 0; (float)i8 / 8 < seconds; ++i8 ) {
- _p._p.CwB[SExpDesignUI::TColour::ticks_sf].set_source_rgba( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_ticks].set_source_rgba( cr);
cairo_set_line_width( cr, (i8%8 == 0) ? 1. : (i8%4 == 0) ? .6 : .3);
guint x = (float)i8/8 / seconds * da_wd;
cairo_move_to( cr, x, 0);
@@ -99,7 +99,7 @@ draw( cairo_t *cr)
cairo_stroke( cr);
if ( i8 % 8 == 0 ) {
- _p._p.CwB[SExpDesignUI::TColour::labels_sf].set_source_rgba( cr);
+ _p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgba( cr);
cairo_move_to( cr, x + 5, da_ht-2);
snprintf_buf( "%g", (float)i8/8);
cairo_show_text( cr, __buf__);
@@ -361,11 +361,12 @@ aghui::SScoringFacility::SFindDialog::
search( ssize_t from)
{
if ( field_channel && pattern.size() > 0 ) {
- if ( !(params == params_saved) ) {
+ if ( !(params == params_saved) || field_channel != field_channel_saved) {
field_channel->compute_lowpass( params.bwf_cutoff, params.bwf_order);
field_channel->compute_tightness( params.env_tightness);
field_channel->compute_dzcdf( params.dzcdf_step, params.dzcdf_sigma, params.dzcdf_smooth);
params_saved = params;
+ field_channel_saved = field_channel;
}
cpattern = new sigproc::CPattern<TFloat>
(pattern, context_before, context_after,
@@ -409,11 +410,11 @@ enable_controls( bool indeed)
inline namespace {
- int
- scandir_filter( const struct dirent *e)
- {
- return strcmp( e->d_name, ".") && strcmp( e->d_name, "..");
- }
+int
+scandir_filter( const struct dirent *e)
+{
+ return strcmp( e->d_name, ".") && strcmp( e->d_name, "..");
+}
}
const char
diff --git a/src/ui/sf/sf-patterns_cb.cc b/src/ui/sf/sf-patterns_cb.cc
index 07279d0..20f74e6 100644
--- a/src/ui/sf/sf-patterns_cb.cc
+++ b/src/ui/sf/sf-patterns_cb.cc
@@ -201,7 +201,7 @@ ePatternChannel_changed_cb( GtkComboBox *combo, gpointer userdata)
if ( gtk_combo_box_get_active_iter( combo, &iter) == FALSE )
return;
- char *label;
+ gchar *label;
gtk_tree_model_get( gtk_combo_box_get_model( combo), &iter,
0, &label,
-1);
@@ -211,7 +211,7 @@ ePatternChannel_changed_cb( GtkComboBox *combo, gpointer userdata)
break;
}
}
- free( label);
+ g_free( label);
}
void
@@ -233,9 +233,9 @@ wPattern_show_cb( GtkWidget *widget, gpointer userdata)
FD.W_V.up();
FD.enumerate_patterns_to_combo();
- if ( FD._p.using_channel == NULL ) // not invoked for a preselected signal via a menu
+ if ( FD._p.using_channel == nullptr ) // not invoked for a preselected signal via a menu
FD._p.using_channel = &FD._p.channels.front();
- FD.field_channel = FD._p.using_channel;
+ FD.field_channel = FD.field_channel_saved = FD._p.using_channel;
FD.samplerate = FD.field_channel->samplerate();
FD.preselect_channel( FD.field_channel->name);
}
diff --git a/src/ui/sf/sf-phasediff.cc b/src/ui/sf/sf-phasediff.cc
index 454af52..70a6c38 100644
--- a/src/ui/sf/sf-phasediff.cc
+++ b/src/ui/sf/sf-phasediff.cc
@@ -123,7 +123,7 @@ draw( cairo_t* cr, int wd, int ht)
auto& SF = _p;
auto& ED = SF._p;
- ED.CwB[SExpDesignUI::TColour::hypnogram].set_source_rgb( cr);
+ ED.CwB[SExpDesignUI::TColour::sf_hypnogram].set_source_rgb( cr);
cairo_rectangle( cr, 0, 0, wd, ht);
cairo_fill( cr);
cairo_stroke( cr);
@@ -154,7 +154,7 @@ draw( cairo_t* cr, int wd, int ht)
auto C1 = channel1->crecording.psd_profile.course( from, upto);
// C2 = channel2->crecording.psd_profile.course( from, upto) * display_scale + ht/2;
- ED.CwB[SExpDesignUI::TColour::profile_psd_sf].set_source_rgba( cr, .5);
+ ED.CwB[SExpDesignUI::TColour::sf_profile_psd].set_source_rgba( cr, .5);
auto scale =
agh::alg::calibrate_display_scale( C1, C1.size(), ht/2.);
cairo_move_to( cr, 0, ht - C1[0]);
@@ -169,7 +169,7 @@ draw( cairo_t* cr, int wd, int ht)
// zeroline and hour ticks
{
- ED.CwB[SExpDesignUI::TColour::ticks_sf].set_source_rgb( cr);
+ ED.CwB[SExpDesignUI::TColour::sf_ticks].set_source_rgb( cr);
cairo_set_line_width( cr, 1);
cairo_move_to( cr, 0, ht/2);
cairo_line_to( cr, wd, ht/2);
diff --git a/src/ui/sf/sf.cc b/src/ui/sf/sf.cc
index d1583dd..0dac616 100644
--- a/src/ui/sf/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -168,6 +168,12 @@ SScoringFacility (agh::CSubject& J,
h.mc.course,
h.mc.course.size(),
interchannel_gap / 4);
+ if ( not isfinite(h.swu.display_scale) || h.swu.display_scale <= DBL_MIN )
+ h.swu.display_scale =
+ agh::alg::calibrate_display_scale(
+ h.swu.course,
+ h.swu.course.size(),
+ interchannel_gap / 4);
}
h._put_selection();
}
@@ -683,14 +689,13 @@ const char* const
" Alt+Move1: move channel around\n"
" in montage;\n"
" Alt+Wheel: change montage height;\n"
- " <i>on PSD/uC profile:</i>\n"
+ " <i>on profile:</i>\n"
" Click1: position cursor;\n"
" Click2: bands/discrete 1Hz bins.\n"
" Shift+Wheel: cycle focused PSD band\n"
" / in-/decrement bin;\n"
- " Shift+Alt+Wheel:\n"
- " in-/decrement uC bin;\n"
- " Wheel: in-/decrement scale.\n"
+ " Wheel: in-/decrement scale;\n"
+ " Ctrl+Wheel: in-/decrement scale for all.\n"
"\n"
"<b>Hypnogram:</b>\n"
" Click1: position cursor;\n"
diff --git a/src/ui/sf/sf.hh b/src/ui/sf/sf.hh
index 347c4cf..4a24f01 100644
--- a/src/ui/sf/sf.hh
+++ b/src/ui/sf/sf.hh
@@ -157,7 +157,7 @@ class SScoringFacility
course;
double from, upto;
double display_scale; // saved via libconfig, requiring it to be double
- array<valarray<TFloat>, metrics::psd::TBand::_total>
+ array<valarray<TFloat>, metrics::psd::TBand::TBand_total>
course_in_bands;
size_t focused_band,
uppermost_band;
@@ -531,7 +531,8 @@ class SScoringFacility
int increment;
SScoringFacility::SChannel
- *field_channel;
+ *field_channel,
+ *field_channel_saved;
bool search( ssize_t from);
float match_a,
diff --git a/src/ui/sf/sf_cb.hh b/src/ui/sf/sf_cb.hh
index bd2d747..60f385c 100644
--- a/src/ui/sf/sf_cb.hh
+++ b/src/ui/sf/sf_cb.hh
@@ -101,6 +101,7 @@ void iSFPageSpaceEvenly_activate_cb( GtkMenuItem*, gpointer);
void iSFPageLocateSelection_activate_cb( GtkMenuItem*, gpointer);
void iSFPageDrawPSDProfile_toggled_cb( GtkCheckMenuItem*, gpointer);
void iSFPageDrawPSDSpectrum_toggled_cb( GtkCheckMenuItem*, gpointer);
+void iSFPageDrawSWUProfile_toggled_cb( GtkCheckMenuItem*, gpointer);
void iSFPageDrawMCProfile_toggled_cb( GtkCheckMenuItem*, gpointer);
void iSFPageDrawEMGProfile_toggled_cb( GtkCheckMenuItem*, gpointer);
diff --git a/src/ui/ui++.hh b/src/ui/ui++.hh
index 3bfc4f8..034e587 100644
--- a/src/ui/ui++.hh
+++ b/src/ui/ui++.hh
@@ -114,6 +114,19 @@ template <> inline void
SUIVar_<GtkSpinButton, int>::down() const { *v = (int)round(gtk_spin_button_get_value( w)); }
template <> inline void
+SUIVar_<GtkSpinButton, size_t>::up() const { gtk_spin_button_set_value( w, (double)*v); }
+template <> inline void
+SUIVar_<GtkSpinButton, size_t>::down() const
+{
+ auto t = (long int)round(gtk_spin_button_get_value( w));
+ if ( t < 0 ) {
+ fprintf( stderr, "SUIVar_<size_t> got a negative value (%ld) from your spinbutton; value has been clamped at 0\n", t);
+ *v = 0;
+ } else
+ *v = t;
+}
+
+template <> inline void
SUIVar_<GtkComboBox, int>::up() const { gtk_combo_box_set_active( w, *v); }
template <> inline void
SUIVar_<GtkComboBox, int>::down() const { *v = gtk_combo_box_get_active( w); }
@@ -151,6 +164,10 @@ class SUIVarCollection {
{
c.push_back( new SUIVar_<GtkSpinButton, int> (w, v));
}
+ void reg( GtkSpinButton *w, size_t* v)
+ {
+ c.push_back( new SUIVar_<GtkSpinButton, size_t> (w, v));
+ }
void reg( GtkComboBox *w, int* v)
{
c.push_back( new SUIVar_<GtkComboBox, int> (w, v));
diff --git a/src/ui/ui.hh b/src/ui/ui.hh
index 0d40a18..0f8d10c 100644
--- a/src/ui/ui.hh
+++ b/src/ui/ui.hh
@@ -114,6 +114,7 @@ gtk_flush()
}
void gtk_combo_box_set_model_properly( GtkComboBox*, GtkListStore*);
+void gtk_cell_layout_set_renderer( GtkComboBox*);
--
Sleep experiment manager
More information about the debian-med-commit
mailing list