[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461
andrei zavada
johnhommer at gmail.com
Fri Nov 16 00:50:33 UTC 2012
The following commit has been merged in the master branch:
commit cba44fa5980d12a42022f0a2094d4687d36b4e54
Author: andrei zavada <johnhommer at gmail.com>
Date: Fri Oct 26 02:13:38 2012 +0300
rename and move files part 2, with some -Wall surprise
gource-inspired
diff --git a/ChangeLog b/ChangeLog
index 7b9ace7..965516a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,12 @@
-v. 0.7.2 (2012-..-..)
+v. 0.7.2 (2012-10-..)
* Enable SMP for mass profile constructions and most other heavy
operations.
+ * Artifact detection profiles.
+ * Globally set filters, detect artifacts.
* SF: Transient, reversible detected artifacts in preview.
* MF: preserve tunables when reopening a previous model run.
- * Correctly do status bar updates on tree rescan.
- * Ensure get_signal_filtered.size() == get_signal_original.size(): else
- ICA crashes seemingly at random.
+ * Allow freq_from == 0 for profiles.
+ * Distinguish full_pages and total_pages in EDF sources (fixed many a crash).
* Run ICA on original signal (not filtered).
* configure: don't require gcc >= 4.7.1.
diff --git a/configure.ac b/configure.ac
index 544059a..d94d552 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,6 +198,10 @@ AC_OUTPUT([
src/expdesign/Makefile
src/model/Makefile
src/ui/Makefile
+ src/ui/sm/Makefile
+ src/ui/mw/Makefile
+ src/ui/sf/Makefile
+ src/ui/mf/Makefile
src/tools/Makefile
data/Makefile
data/aghermann.desktop
diff --git a/src/Makefile.am b/src/Makefile.am
index 969d275..8e48cfa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,21 +1,25 @@
-SUBDIRS = \
+SUBDIRS := \
common sigproc libsigfile ica \
expdesign model \
ui tools
-AM_CXXFLAGS = \
+AM_CXXFLAGS := \
-Wall -std=c++0x \
$(GTK_CFLAGS) $(OPENMP_CXXFLAGS) \
-DBUILT_BY=\"@user@\"
-bin_PROGRAMS = aghermann
+bin_PROGRAMS := aghermann
-aghermann_SOURCES = \
+aghermann_SOURCES := \
main.cc \
ui/expdesign.hh
-aghermann_LDADD = \
- ui/libaghui.a \
+aghermann_LDADD := \
+ ui/sm/liba.a \
+ ui/mw/liba.a \
+ ui/sf/liba.a \
+ ui/mf/liba.a \
+ ui/liba.a \
model/libmodel.a \
expdesign/libexpdesign.a \
libsigfile/libsigfile.a \
@@ -24,7 +28,7 @@ aghermann_LDADD = \
$(FFTW3_LIBS) $(ITPP_LIBS) $(SAMPLERATE_LIBS) $(GTK_LIBS) $(GSL_LIBS) $(LIBCONFIGXX_LIBS) \
$(OPENMP_LDADD) $(LIBFFTW3_LDADD)
-CLEANFILES = \
+CLEANFILES := \
*/*.la */*.gch
install-exec-hook:
diff --git a/src/expdesign/primaries.hh b/src/expdesign/primaries.hh
index c1a81b1..00b2070 100644
--- a/src/expdesign/primaries.hh
+++ b/src/expdesign/primaries.hh
@@ -355,7 +355,7 @@ class CExpDesign {
int setup_modrun( const char* j, const char* d, const char* h,
sigfile::TMetricType,
float freq_from, float freq_upto,
- ach::CModelRun*&);
+ ach::CModelRun**);
void remove_all_modruns();
void remove_untried_modruns();
void export_all_modruns( const string& fname) const;
diff --git a/src/ica/ica.hh b/src/ica/ica.hh
index aaac937..dc8687f 100644
--- a/src/ica/ica.hh
+++ b/src/ica/ica.hh
@@ -110,7 +110,7 @@ class CFastICA {
for ( int r = 0; r < (int)source.size(); ++r ) {
auto tmp = source[r]();
tmp -= tmp.sum() / tmp.size();
- for ( int c = 0; c < cols; ++c )
+ for ( int c = 0; c < (int)cols; ++c )
_source_mat( r, c) = tmp[c];
}
_obj = new itpp::Fast_ICA (_source_mat);
diff --git a/src/main.cc b/src/main.cc
index daa41d0..64658e7 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -22,7 +22,7 @@
#include "common/globals.hh"
#include "ui/globals.hh"
#include "ui/ui.hh"
-#include "ui/sc.hh"
+#include "ui/sm/sm.hh"
diff --git a/src/model/achermann.cc b/src/model/achermann.cc
index e40ba30..70992af 100644
--- a/src/model/achermann.cc
+++ b/src/model/achermann.cc
@@ -85,7 +85,7 @@ agh::CExpDesign::
setup_modrun( const char* j, const char* d, const char* h,
sigfile::TMetricType metric_type,
float freq_from, float freq_upto,
- agh::ach::CModelRun* &R_ref)
+ agh::ach::CModelRun** Rpp)
{
try {
CSubject& J = subject_by_x(j);
@@ -103,8 +103,9 @@ setup_modrun( const char* j, const char* d, const char* h,
(freq_idx, agh::ach::CModelRun (J, d, h,
metric_type, freq_from, freq_upto,
ctl_params0, tunables0)));
- R_ref = &J.measurements[d]
- . modrun_sets[metric_type][h][freq_idx];
+ if ( Rpp )
+ *Rpp = &J.measurements[d]
+ . modrun_sets[metric_type][h][freq_idx];
} catch (invalid_argument ex) { // thrown by CSCourse ctor
fprintf( stderr, "CExpDesign::setup_modrun( %s, %s, %s): %s\n", j, d, h, ex.what());
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
index da0a303..1347d14 100644
--- a/src/tools/Makefile.am
+++ b/src/tools/Makefile.am
@@ -31,7 +31,7 @@ edfhed_gtk_LDADD = \
../libsigfile/libsigfile.a \
../sigproc/libsigproc.a \
../common/libcommon.a \
- ../ui/libaghui.a \
+ ../ui/liba.a \
$(FFTW3_LIBS) $(ITPP_LIBS) $(SAMPLERATE_LIBS) $(GTK_LIBS) $(GSL_LIBS) \
$(OPENMP_LDADD) $(LIBFFTW3_LDADD)
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 423f914..457bd9e 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -1,81 +1,28 @@
-AM_CXXFLAGS = \
+SUBDIRS := sm mw sf mf
+AM_CXXFLAGS := \
-std=c++0x -Wdeprecated-declarations \
$(GTK_CFLAGS) $(LIBCONFIGXX_CFLAGS) \
-DPACKAGE_DATADIR=\"$(datadir)\" \
- $(OPENMP_CXXFLAGS)
+ $(OPENMP_CXXFLAGS) \
+ -I..
-noinst_LIBRARIES = libaghui.a
+noinst_LIBRARIES := liba.a
-libaghui_a_SOURCES = \
+liba_a_SOURCES = \
forward-decls.hh \
ui.hh \
ui++.hh \
misc.hh \
- libcommon.cc \
globals.hh \
- sc.cc \
- sc-construct.cc \
- sc.hh \
- sc_cb.cc \
- sc_cb.hh \
- ed.hh \
- ed-widgets.hh \
- ed_cb.hh \
- ed.cc \
- ed_cb.cc \
- ed-construct.cc \
- ed-populate.cc \
- ed-measurements.cc \
- ed-measurements_cb.cc \
- ed-loadsave.cc \
- ed-admit-one.cc \
- ed-settings_cb.cc \
- ed-simulations.cc \
- ed-simulations_cb.cc \
- sf.hh \
- sf-widgets.hh \
- sf_cb.hh \
- sf.cc \
- sf-construct.cc \
- sf-channel.cc \
- sf-artifacts.cc \
- sf-artifacts_cb.cc \
- sf-ica.cc \
- sf-ica_cb.cc \
- sf_cb.cc \
- sf-montage.cc \
- sf-montage_cb.cc \
- sf-hypnogram.cc \
- sf-hypnogram_cb.cc \
- sf-patterns.cc \
- sf-patterns_cb.cc \
- sf-filter.cc \
- sf-filter_cb.cc \
- sf-phasediff.cc \
- sf-phasediff_cb.cc \
- mf.hh \
- mf_cb.hh \
- mf.cc \
- mf-construct.cc \
- mf_cb.cc
+ libcommon.cc
if DO_PCH
-BUILT_SOURCES = \
+BUILT_SOURCES := \
ui.hh.gch \
ui++.hh.gch \
misc.hh.gch \
globals.hh.gch \
- forward-decls.hh.gch \
- sc.hh.gch \
- sc_cb.hh.gch \
- ed.hh.gch \
- ed-widgets.hh.gch \
- ed_cb.hh.gch \
- sf.hh.gch \
- sf-widgets.hh.gch \
- sf_cb.hh.gch \
- mf.hh.gch \
- mf_cb.hh.gch
+ forward-decls.hh.gch
%.hh.gch: %.hh
$(CXXCOMPILE) -c $<
CLEANFILES := \
diff --git a/src/ui/libcommon.cc b/src/ui/libcommon.cc
index 578e178..52582d7 100644
--- a/src/ui/libcommon.cc
+++ b/src/ui/libcommon.cc
@@ -10,9 +10,9 @@
* License: GPL
*/
-
#include <cassert>
#include <gtk/gtk.h>
+
#include "globals.hh"
#include "misc.hh"
#include "ui.hh"
diff --git a/src/ui/mf/Makefile.am b/src/ui/mf/Makefile.am
new file mode 100644
index 0000000..d80abb0
--- /dev/null
+++ b/src/ui/mf/Makefile.am
@@ -0,0 +1,25 @@
+AM_CXXFLAGS = \
+ -std=c++0x -Wdeprecated-declarations -Wall \
+ $(GTK_CFLAGS) $(LIBCONFIGXX_CFLAGS) \
+ -DPACKAGE_DATADIR=\"$(datadir)\" \
+ $(OPENMP_CXXFLAGS) \
+ -I../..
+
+noinst_LIBRARIES = liba.a
+
+liba_a_SOURCES = \
+ mf.hh \
+ mf_cb.hh \
+ mf.cc \
+ mf-construct.cc \
+ mf_cb.cc
+
+if DO_PCH
+BUILT_SOURCES = \
+ mf.hh.gch \
+ mf_cb.hh.gch
+%.hh.gch: %.hh
+ $(CXXCOMPILE) -c $<
+CLEANFILES := \
+ $(BUILT_SOURCES)
+endif
diff --git a/src/ui/mf-construct.cc b/src/ui/mf/mf-construct.cc
similarity index 99%
rename from src/ui/mf-construct.cc
rename to src/ui/mf/mf-construct.cc
index 1d9de89..02e341e 100644
--- a/src/ui/mf-construct.cc
+++ b/src/ui/mf/mf-construct.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/mf-construct.cc
+ * File name: ui/mf/mf-construct.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-07-11
diff --git a/src/ui/mf.cc b/src/ui/mf/mf.cc
similarity index 99%
rename from src/ui/mf.cc
rename to src/ui/mf/mf.cc
index fb42b82..74ac642 100644
--- a/src/ui/mf.cc
+++ b/src/ui/mf/mf.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/mf.cc
+ * File name: ui/mf/mf.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2008-07-01
@@ -10,10 +10,9 @@
* License: GPL
*/
-
-#include "../model/achermann.hh"
-#include "misc.hh"
-#include "ed.hh"
+#include "model/achermann.hh"
+#include "ui/misc.hh"
+#include "ui/mw/mw.hh"
#include "mf.hh"
#include "mf_cb.hh"
diff --git a/src/ui/mf.hh b/src/ui/mf/mf.hh
similarity index 95%
rename from src/ui/mf.hh
rename to src/ui/mf/mf.hh
index 61a924c..499dc8c 100644
--- a/src/ui/mf.hh
+++ b/src/ui/mf/mf.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/mf.hh
+ * File name: ui/mf/mf.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-05-14
@@ -13,8 +13,8 @@
#ifndef _AGH_UI_MODELRUN_FACILITY_H
#define _AGH_UI_MODELRUN_FACILITY_H
-#include "../model/forward-decls.hh"
-#include "ed.hh"
+#include "model/forward-decls.hh"
+#include "ui/mw/mw.hh"
#if HAVE_CONFIG_H && !defined(VERSION)
# include "config.h"
diff --git a/src/ui/mf_cb.cc b/src/ui/mf/mf_cb.cc
similarity index 98%
rename from src/ui/mf_cb.cc
rename to src/ui/mf/mf_cb.cc
index e086914..e8873f6 100644
--- a/src/ui/mf_cb.cc
+++ b/src/ui/mf/mf_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/mf_cb.cc
+ * File name: ui/mf/mf_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-07-03
@@ -10,11 +10,10 @@
* License: GPL
*/
-
#include <cairo-svg.h>
-#include "../model/beersma.hh"
-#include "misc.hh"
+#include "model/beersma.hh"
+#include "ui/misc.hh"
#include "mf.hh"
using namespace std;
@@ -125,6 +124,8 @@ daMFProfile_scroll_event_cb( GtkWidget *wid, GdkEventScroll *event, gpointer use
break;
case GDK_SCROLL_RIGHT:
break;
+ case GDK_SCROLL_SMOOTH: // wow
+ break;
}
// if ( event->state & GDK_CONTROL_MASK ) {
diff --git a/src/ui/mf_cb.hh b/src/ui/mf/mf_cb.hh
similarity index 97%
rename from src/ui/mf_cb.hh
rename to src/ui/mf/mf_cb.hh
index 72996d0..f411dbe 100644
--- a/src/ui/mf_cb.hh
+++ b/src/ui/mf/mf_cb.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/mf_cb.hh
+ * File name: ui/mf/mf_cb.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-06-25
diff --git a/src/ui/mw/Makefile.am b/src/ui/mw/Makefile.am
new file mode 100644
index 0000000..f7bd33f
--- /dev/null
+++ b/src/ui/mw/Makefile.am
@@ -0,0 +1,35 @@
+AM_CXXFLAGS = \
+ -std=c++0x -Wdeprecated-declarations -Wall \
+ $(GTK_CFLAGS) $(LIBCONFIGXX_CFLAGS) \
+ -DPACKAGE_DATADIR=\"$(datadir)\" \
+ $(OPENMP_CXXFLAGS) \
+ -I../..
+
+noinst_LIBRARIES = liba.a
+
+liba_a_SOURCES = \
+ mw.hh \
+ mw-widgets.hh \
+ mw_cb.hh \
+ mw.cc \
+ mw_cb.cc \
+ mw-construct.cc \
+ mw-populate.cc \
+ mw-measurements.cc \
+ mw-measurements_cb.cc \
+ mw-loadsave.cc \
+ mw-admit-one.cc \
+ mw-settings_cb.cc \
+ mw-simulations.cc \
+ mw-simulations_cb.cc
+
+if DO_PCH
+BUILT_SOURCES = \
+ mw.hh.gch \
+ mw-widgets.hh.gch \
+ mw_cb.hh.gch
+%.hh.gch: %.hh
+ $(CXXCOMPILE) -c $<
+CLEANFILES := \
+ $(BUILT_SOURCES)
+endif
diff --git a/src/ui/ed-admit-one.cc b/src/ui/mw/mw-admit-one.cc
similarity index 97%
rename from src/ui/ed-admit-one.cc
rename to src/ui/mw/mw-admit-one.cc
index 9e0572d..21b1e0a 100644
--- a/src/ui/ed-admit-one.cc
+++ b/src/ui/mw/mw-admit-one.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-admit-one.cc
+ * File name: ui/mw/mw-admit-one.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-04-18
@@ -11,17 +11,17 @@
*/
-#include "../libsigfile/edf.hh"
-#include "misc.hh"
-#include "ed.hh"
+#include "libsigfile/edf.hh"
+#include "ui/misc.hh"
+#include "mw.hh"
using namespace std;
using namespace aghui;
-
int
-aghui::SExpDesignUI::dnd_maybe_admit_one( const char* fname)
+aghui::SExpDesignUI::
+dnd_maybe_admit_one( const char* fname)
{
using namespace sigfile;
CSource *F;
diff --git a/src/ui/ed-construct.cc b/src/ui/mw/mw-construct.cc
similarity index 96%
rename from src/ui/ed-construct.cc
rename to src/ui/mw/mw-construct.cc
index 2427863..733d85a 100644
--- a/src/ui/ed-construct.cc
+++ b/src/ui/mw/mw-construct.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-construct.cc
+ * File name: ui/mw/mw-construct.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-07-02
@@ -11,12 +11,11 @@
*/
-#include "ui.hh"
-#include "ed-widgets.hh"
-#include "ed_cb.hh"
+#include "ui/ui.hh"
+#include "mw-widgets.hh"
+#include "mw_cb.hh"
using namespace std;
-
using namespace aghui;
const char* const
@@ -652,10 +651,9 @@ SExpDesignUIWidgets ()
gtk_widget_override_font( (GtkWidget*)lEdfImportFileInfo, font_desc);
g_object_set( lEdfImportFileInfo,
- "tabs", pango_tab_array_new_with_positions(
- 2, TRUE,
- PANGO_TAB_LEFT, 130,
- PANGO_TAB_LEFT, 190),
+ "tabs", pango_tab_array_new_with_positions( 2, TRUE,
+ PANGO_TAB_LEFT, 130,
+ PANGO_TAB_LEFT, 190),
NULL);
g_signal_connect( eEdfImportGroupEntry,
@@ -668,7 +666,7 @@ SExpDesignUIWidgets ()
"changed", (GCallback)check_gtk_entry_nonempty_cb,
this);
- // ------- wSubjectDetails
+ // ------- wEdfImport
if ( !AGH_GBGETOBJ (GtkDialog, wSubjectDetails) ||
!AGH_GBGETOBJ (GtkEntry, eSubjectDetailsName) ||
!AGH_GBGETOBJ (GtkSpinButton, eSubjectDetailsAge) ||
@@ -694,30 +692,10 @@ SExpDesignUIWidgets ()
!AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowPSD) ||
!AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowPSDSpectrum) ||
!AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowMC) ||
- !AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowEMG) )
+ !AGH_GBGETOBJ (GtkCheckButton, eMontageDefaultsShowEMG) )
throw runtime_error ("Failed to construct widgets");
- // ------------- wGlobalFilters
- if ( !AGH_GBGETOBJ (GtkDialog, wGlobalFilters) ||
- !AGH_GBGETOBJ (GtkSpinButton, eGlobalFiltersHighPassCutoff) ||
- !AGH_GBGETOBJ (GtkSpinButton, eGlobalFiltersLowPassCutoff) ||
- !AGH_GBGETOBJ (GtkSpinButton, eGlobalFiltersHighPassOrder) ||
- !AGH_GBGETOBJ (GtkSpinButton, eGlobalFiltersLowPassOrder) ||
- !AGH_GBGETOBJ (GtkComboBox, eGlobalFiltersNotchFilter) ||
- !AGH_GBGETOBJ (GtkListStore, mNotchFilter) )
- throw runtime_error ("Failed to construct widgets");
-
- gtk_combo_box_set_model( eGlobalFiltersNotchFilter,
- (GtkTreeModel*)mNotchFilter);
- gtk_combo_box_set_id_column( eGlobalFiltersNotchFilter, 0);
- renderer = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start( (GtkCellLayout*)eGlobalFiltersNotchFilter, renderer, FALSE);
- gtk_cell_layout_set_attributes( (GtkCellLayout*)eGlobalFiltersNotchFilter, renderer,
- "text", 0,
- NULL);
- gtk_combo_box_set_active( eGlobalFiltersNotchFilter, 0);
-
- // ----------- wGlobalAnnotations
+ // ----------- annotations
if ( !AGH_GBGETOBJ (GtkDialog, wGlobalAnnotations) ||
!AGH_GBGETOBJ (GtkTreeView, tvGlobalAnnotations) )
throw runtime_error ("Failed to construct widgets");
@@ -751,7 +729,7 @@ SExpDesignUIWidgets ()
gtk_tree_view_append_column( tvGlobalAnnotations,
gtk_tree_view_column_new());
- // ------------- wGlobalArtifactDetection
+ // ------------- artifact detection profiles
if ( !AGH_GBGETOBJ (GtkDialog, wGlobalArtifactDetection) ||
!AGH_GBGETOBJ (GtkComboBox, eGlobalADProfiles) ||
!AGH_GBGETOBJ (GtkCheckButton, eGlobalADKeepExisting) ||
diff --git a/src/ui/ed-loadsave.cc b/src/ui/mw/mw-loadsave.cc
similarity index 95%
rename from src/ui/ed-loadsave.cc
rename to src/ui/mw/mw-loadsave.cc
index 2f83319..0b91adb 100644
--- a/src/ui/ed-loadsave.cc
+++ b/src/ui/mw/mw-loadsave.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-loadsave.cc
+ * File name: ui/mw/mw-loadsave.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2008-04-28
@@ -11,11 +11,11 @@
*/
#include <forward_list>
-#include <initializer_list>
+//#include <initializer_list>
-#include "../common/config-validate.hh"
-#include "globals.hh"
-#include "ed.hh"
+#include "common/config-validate.hh"
+#include "ui/globals.hh"
+#include "mw.hh"
using namespace std;
using namespace aghui;
@@ -72,13 +72,13 @@ saving_colors()
} // inline namespace
int
-aghui::SExpDesignUI::load_settings()
+aghui::SExpDesignUI::
+load_settings()
{
libconfig::Config conf;
try {
conf.readFile( CONF_FILE);
- auto& cfroot = conf.getRoot();
confval::get( config_keys_s, conf);
confval::get( config_keys_d, conf);
confval::get( config_keys_g, conf);
@@ -161,7 +161,6 @@ int
aghui::SExpDesignUI::save_settings()
{
libconfig::Config conf;
- auto& cfroot = conf.getRoot();
_geometry_placeholder.assign(
to_string( geometry.w) + 'x'
diff --git a/src/ui/ed-measurements.cc b/src/ui/mw/mw-measurements.cc
similarity index 98%
rename from src/ui/ed-measurements.cc
rename to src/ui/mw/mw-measurements.cc
index 4cbafd9..3f17e0e 100644
--- a/src/ui/ed-measurements.cc
+++ b/src/ui/mw/mw-measurements.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-measurements.cc
+ * File name: ui/mw/mw-measurements.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-06-29
@@ -17,9 +17,9 @@
#include <cairo.h>
#include <cairo-svg.h>
-#include "misc.hh"
-#include "ed.hh"
-#include "../model/beersma.hh"
+#include "model/beersma.hh"
+#include "ui/misc.hh"
+#include "mw.hh"
using namespace std;
using namespace aghui;
diff --git a/src/ui/ed-measurements_cb.cc b/src/ui/mw/mw-measurements_cb.cc
similarity index 98%
rename from src/ui/ed-measurements_cb.cc
rename to src/ui/mw/mw-measurements_cb.cc
index f3d6164..a9bf970 100644
--- a/src/ui/ed-measurements_cb.cc
+++ b/src/ui/mw/mw-measurements_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-measurements_cb.cc
+ * File name: ui/mw/mw-measurements_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-06-29
@@ -10,17 +10,14 @@
* License: GPL
*/
-#include "misc.hh"
-#include "ed.hh"
-#include "sf.hh"
+#include "ui/misc.hh"
+#include "ui/sf/sf.hh"
+#include "mw.hh"
using namespace aghui;
extern "C" {
-
-
-
// individual channel callbacks
gboolean
diff --git a/src/ui/ed-populate.cc b/src/ui/mw/mw-populate.cc
similarity index 98%
rename from src/ui/ed-populate.cc
rename to src/ui/mw/mw-populate.cc
index de01266..38ada38 100644
--- a/src/ui/ed-populate.cc
+++ b/src/ui/mw/mw-populate.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-populate.cc
+ * File name: ui/mw/mw-populate.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-10-19
@@ -13,14 +13,13 @@
#include <cstring>
-#include "../expdesign/primaries.hh"
-#include "../model/beersma.hh"
-#include "misc.hh"
-#include "ed.hh"
-#include "ed_cb.hh"
+#include "expdesign/primaries.hh"
+#include "model/beersma.hh"
+#include "ui/misc.hh"
+#include "mw.hh"
+#include "mw_cb.hh"
using namespace std;
-
using namespace aghui;
diff --git a/src/ui/ed-settings_cb.cc b/src/ui/mw/mw-settings_cb.cc
similarity index 97%
rename from src/ui/ed-settings_cb.cc
rename to src/ui/mw/mw-settings_cb.cc
index 9a856ef..346840c 100644
--- a/src/ui/ed-settings_cb.cc
+++ b/src/ui/mw/mw-settings_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-settings_cb.cc
+ * File name: ui/mw/mw-settings_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2008-07-01
@@ -10,16 +10,15 @@
* License: GPL
*/
-
#ifdef _OPENMP
#include <omp.h>
#endif
-#include "../common/globals.hh"
-#include "../common/string.hh"
-#include "misc.hh"
-#include "ed.hh"
-#include "sf.hh"
+#include "common/globals.hh"
+#include "common/string.hh"
+#include "ui/misc.hh"
+#include "ui/sf/sf.hh"
+#include "mw.hh"
using namespace std;
using namespace aghui;
diff --git a/src/ui/ed-simulations.cc b/src/ui/mw/mw-simulations.cc
similarity index 96%
rename from src/ui/ed-simulations.cc
rename to src/ui/mw/mw-simulations.cc
index 2e0ad1f..62d2b3f 100644
--- a/src/ui/ed-simulations.cc
+++ b/src/ui/mw/mw-simulations.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-simulations.cc
+ * File name: ui/mw/mw-simulations.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2008-07-01
@@ -10,9 +10,8 @@
* License: GPL
*/
-
-#include "misc.hh"
-#include "ed.hh"
+#include "ui/misc.hh"
+#include "mw.hh"
using namespace std;
@@ -119,7 +118,7 @@ populate_2()
ED->setup_modrun( J.name(), AghD(), AghT(),
display_profile_type,
operating_range_from, operating_range_upto,
- virgin);
+ &virgin);
if ( retval ) {
gtk_tree_store_set( mSimulations, &iter_q,
1, agh::CSCourse::explain_status( retval).c_str(),
@@ -139,7 +138,8 @@ populate_2()
void
-aghui::SExpDesignUI::cleanup_2()
+aghui::SExpDesignUI::
+cleanup_2()
{
ED->remove_untried_modruns();
//populate( false);
diff --git a/src/ui/ed-simulations_cb.cc b/src/ui/mw/mw-simulations_cb.cc
similarity index 93%
rename from src/ui/ed-simulations_cb.cc
rename to src/ui/mw/mw-simulations_cb.cc
index bd7e54d..3e0c9c8 100644
--- a/src/ui/ed-simulations_cb.cc
+++ b/src/ui/mw/mw-simulations_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-simulations_cb.cc
+ * File name: ui/mw/mw-simulations_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-07-03
@@ -11,9 +11,9 @@
*/
-#include "misc.hh"
-#include "ed.hh"
-#include "mf.hh"
+#include "ui/misc.hh"
+#include "ui/mf/mf.hh"
+#include "mw.hh"
using namespace std;
using namespace aghui;
@@ -84,13 +84,11 @@ iSimulationsRunBatch_activate_cb( GtkMenuItem*, gpointer userdata)
float range_from = freq_from,
range_upto = freq_from + freq_width;
for ( size_t step = 0; step < freq_steps;
- ++step, range_from += freq_width, range_upto += freq_width ) {
- agh::ach::CModelRun *sim;
- int retval =
- ED.ED->setup_modrun( J.c_str(), D.c_str(), H.c_str(),
- ED.display_profile_type,
- range_from, range_upto,
- sim);
+ ++step, range_from += freq_inc, range_upto += freq_inc ) {
+ ED.ED->setup_modrun( J.c_str(), D.c_str(), H.c_str(),
+ ED.display_profile_type,
+ range_from, range_upto,
+ nullptr);
}
}
using namespace agh;
diff --git a/src/ui/ed-widgets.hh b/src/ui/mw/mw-widgets.hh
similarity index 97%
rename from src/ui/ed-widgets.hh
rename to src/ui/mw/mw-widgets.hh
index 8c50305..9b098a0 100644
--- a/src/ui/ed-widgets.hh
+++ b/src/ui/mw/mw-widgets.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed-widgets.hh
+ * File name: ui/mw/mw-widgets.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-10-06
@@ -15,10 +15,10 @@
#include <map>
#include <gtk/gtk.h>
-#include "../libsigfile/page.hh" // for various enums
-#include "../libsigfile/psd.hh"
-#include "../model/achermann-tunable.hh"
-#include "ui.hh" // for SManagedColor
+#include "libsigfile/page.hh" // for various enums
+#include "libsigfile/psd.hh"
+#include "model/achermann-tunable.hh"
+#include "ui/ui.hh" // for SManagedColor
#if HAVE_CONFIG_H && !defined(VERSION)
# include "config.h"
diff --git a/src/ui/ed.cc b/src/ui/mw/mw.cc
similarity index 98%
rename from src/ui/ed.cc
rename to src/ui/mw/mw.cc
index d65b283..07ee638 100644
--- a/src/ui/ed.cc
+++ b/src/ui/mw/mw.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed.cc
+ * File name: ui/mw/mw.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2008-07-01
@@ -10,26 +10,24 @@
* License: GPL
*/
-
#include <cstring>
#include <ctime>
#include <functional>
//#include <vte/vte.h>
-#include "../common/config-validate.hh"
-#include "../libsigfile/page-metrics-base.hh"
-#include "../expdesign/primaries.hh"
-#include "../libsigfile/artifacts.hh"
-#include "../model/beersma.hh"
-#include "misc.hh"
-#include "sf.hh"
-#include "mf.hh"
-#include "ed.hh"
-#include "ed_cb.hh"
+#include "common/config-validate.hh"
+#include "libsigfile/page-metrics-base.hh"
+#include "expdesign/primaries.hh"
+#include "libsigfile/artifacts.hh"
+#include "model/beersma.hh"
+#include "ui/misc.hh"
+#include "ui/sf/sf.hh"
+#include "ui/mf/mf.hh"
+#include "mw.hh"
+#include "mw_cb.hh"
using namespace std;
-
using namespace aghui;
@@ -120,10 +118,10 @@ SExpDesignUI (aghui::SSessionChooser *parent,
draw_nremrem_cycles (true),
finalize_ui (false),
suppress_redraw (false),
+ close_this_SF_now (nullptr),
display_profile_type (sigfile::TMetricType::Psd),
operating_range_from (2.),
operating_range_upto (3.),
- close_this_SF_now (nullptr),
uc_accuracy_factor (1.),
pagesize_item (2),
binsize_item (1),
@@ -457,6 +455,8 @@ adjust_op_freq_spinbuttons()
gtk_widget_set_sensitive( (GtkWidget*)eMsmtOpFreqWidth, FALSE);
break;
+ case sigfile::invalid:
+ break;
}
suppress_redraw = false;
@@ -485,6 +485,8 @@ calculate_profile_scale()
case sigfile::TMetricType::Mc:
profile_scale_mc = timeline_height / avg_profile_height * .3;
break;
+ case sigfile::invalid:
+ break;
}
}
diff --git a/src/ui/ed.hh b/src/ui/mw/mw.hh
similarity index 95%
rename from src/ui/ed.hh
rename to src/ui/mw/mw.hh
index e021eb5..fc9918f 100644
--- a/src/ui/ed.hh
+++ b/src/ui/mw/mw.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed.hh
+ * File name: ui/mw/mw.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-04-13
@@ -21,15 +21,15 @@
#include <cairo/cairo.h>
-#include "../common/lang.hh"
-#include "../common/config-validate.hh"
-#include "../libsigfile/artifacts.hh"
-#include "../model/forward-decls.hh"
-#include "../expdesign/primaries.hh"
-#include "ui.hh"
-#include "ui++.hh"
-#include "forward-decls.hh"
-#include "ed-widgets.hh"
+#include "common/lang.hh"
+#include "common/config-validate.hh"
+#include "libsigfile/artifacts.hh"
+#include "model/forward-decls.hh"
+#include "expdesign/primaries.hh"
+#include "ui/ui.hh"
+#include "ui/ui++.hh"
+#include "ui/forward-decls.hh"
+#include "mw-widgets.hh"
#if HAVE_CONFIG_H && !defined(VERSION)
# include "config.h"
@@ -119,9 +119,9 @@ class SExpDesignUI
}
SGroupPresentation (agh::CExpDesign::TJGroups::iterator& _g,
SExpDesignUI& parent)
- : cjgroup (_g),
- _p (parent),
- visible (true)
+ : _p (parent),
+ visible (true),
+ cjgroup (_g)
{}
SExpDesignUI&
@@ -280,7 +280,7 @@ class SExpDesignUI
size_t timeline_pph_saved,
timeline_height_saved;
- size_t pagesize_item_saved,
+ int pagesize_item_saved,
binsize_item_saved;
sigfile::SFFTParamSet::TWinType
fft_params_welch_window_type_saved,
diff --git a/src/ui/ed_cb.cc b/src/ui/mw/mw_cb.cc
similarity index 99%
rename from src/ui/ed_cb.cc
rename to src/ui/mw/mw_cb.cc
index d141dbd..00e5571 100644
--- a/src/ui/ed_cb.cc
+++ b/src/ui/mw/mw_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed_cb.cc
+ * File name: ui/mw_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-06-29
@@ -10,12 +10,11 @@
* License: GPL
*/
-#include "misc.hh"
-#include "sc.hh"
-#include "ed.hh"
-#include "ed_cb.hh"
-#include "sf.hh"
-
+#include "ui/misc.hh"
+#include "ui/sm/sm.hh"
+#include "ui/sf/sf.hh"
+#include "mw.hh"
+#include "mw_cb.hh"
using namespace aghui;
diff --git a/src/ui/ed_cb.hh b/src/ui/mw/mw_cb.hh
similarity index 99%
rename from src/ui/ed_cb.hh
rename to src/ui/mw/mw_cb.hh
index 981926c..5f690ae 100644
--- a/src/ui/ed_cb.hh
+++ b/src/ui/mw/mw_cb.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/ed_cb.hh
+ * File name: ui/mw_cb.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-06-25
diff --git a/src/ui/sf/Makefile.am b/src/ui/sf/Makefile.am
new file mode 100644
index 0000000..e9257a0
--- /dev/null
+++ b/src/ui/sf/Makefile.am
@@ -0,0 +1,42 @@
+AM_CXXFLAGS := \
+ -std=c++0x -Wdeprecated-declarations -Wall \
+ $(GTK_CFLAGS) $(LIBCONFIGXX_CFLAGS) \
+ -DPACKAGE_DATADIR=\"$(datadir)\" \
+ $(OPENMP_CXXFLAGS) \
+ -I../..
+
+noinst_LIBRARIES := liba.a
+
+liba_a_SOURCES := \
+ sf.hh \
+ sf-widgets.hh \
+ sf_cb.hh \
+ sf.cc \
+ sf-construct.cc \
+ sf-channel.cc \
+ sf-artifacts.cc \
+ sf-artifacts_cb.cc \
+ sf-ica.cc \
+ sf-ica_cb.cc \
+ sf_cb.cc \
+ sf-montage.cc \
+ sf-montage_cb.cc \
+ sf-hypnogram.cc \
+ sf-hypnogram_cb.cc \
+ sf-patterns.cc \
+ sf-patterns_cb.cc \
+ sf-filter.cc \
+ sf-filter_cb.cc \
+ sf-phasediff.cc \
+ sf-phasediff_cb.cc
+
+if DO_PCH
+BUILT_SOURCES = \
+ sf.hh.gch \
+ sf-widgets.hh.gch \
+ sf_cb.hh.gch
+%.hh.gch: %.hh
+ $(CXXCOMPILE) -c $<
+CLEANFILES := \
+ $(BUILT_SOURCES)
+endif
diff --git a/src/ui/sf-artifacts.cc b/src/ui/sf/sf-artifacts.cc
similarity index 97%
rename from src/ui/sf-artifacts.cc
rename to src/ui/sf/sf-artifacts.cc
index 212f695..4b99b87 100644
--- a/src/ui/sf-artifacts.cc
+++ b/src/ui/sf/sf-artifacts.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-artifacts.cc
+ * File name: ui/sf/sf-artifacts.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-10-05
@@ -10,7 +10,6 @@
* License: GPL
*/
-
#include "sf.hh"
#include "sf-widgets.hh"
diff --git a/src/ui/sf-artifacts_cb.cc b/src/ui/sf/sf-artifacts_cb.cc
similarity index 96%
rename from src/ui/sf-artifacts_cb.cc
rename to src/ui/sf/sf-artifacts_cb.cc
index e26fca8..e5b98f1 100644
--- a/src/ui/sf-artifacts_cb.cc
+++ b/src/ui/sf/sf-artifacts_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-artifacts_cb.cc
+ * File name: ui/sf/sf-artifacts_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-10-05
@@ -10,11 +10,10 @@
* License: GPL
*/
-#include "misc.hh"
+#include "ui/misc.hh"
#include "sf.hh"
#include "sf_cb.hh"
-
using namespace std;
using namespace aghui;
@@ -60,7 +59,6 @@ void
bSFADProfileDelete_clicked_cb( GtkButton*, gpointer userdata)
{
auto& SF = *(SScoringFacility*)userdata;
- auto& AD = SF.artifact_detection_dialog;
const gchar *deleting_id = gtk_combo_box_get_active_id( SF.eSFADProfiles);
int deleting = gtk_combo_box_get_active( SF.eSFADProfiles);
@@ -70,7 +68,7 @@ bSFADProfileDelete_clicked_cb( GtkButton*, gpointer userdata)
SF.populate_mSFADProfiles(); // stupid
if ( SF._p.global_artifact_detection_profiles.size() > 0 &&
- deleting > SF._p.global_artifact_detection_profiles.size()-1 )
+ deleting > (int)SF._p.global_artifact_detection_profiles.size()-1 )
gtk_combo_box_set_active( SF.eSFADProfiles, deleting-1);
g_signal_emit_by_name( SF.eSFADProfiles, "changed");
diff --git a/src/ui/sf-channel.cc b/src/ui/sf/sf-channel.cc
similarity index 98%
rename from src/ui/sf-channel.cc
rename to src/ui/sf/sf-channel.cc
index 343f24a..d01e7db 100644
--- a/src/ui/sf-channel.cc
+++ b/src/ui/sf/sf-channel.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-channel.cc
+ * File name: ui/sf/sf-channel.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-05-29
@@ -13,10 +13,10 @@
-#include "../common/lang.hh"
-#include "../common/config-validate.hh"
-#include "../sigproc/exstrom.hh"
-#include "globals.hh"
+#include "common/lang.hh"
+#include "common/config-validate.hh"
+#include "sigproc/exstrom.hh"
+#include "ui/globals.hh"
#include "sf.hh"
using namespace std;
diff --git a/src/ui/sf-construct.cc b/src/ui/sf/sf-construct.cc
similarity index 99%
rename from src/ui/sf-construct.cc
rename to src/ui/sf/sf-construct.cc
index 5095c1d..e667969 100644
--- a/src/ui/sf-construct.cc
+++ b/src/ui/sf/sf-construct.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-construct.cc
+ * File name: ui/sf/sf-construct.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-06-13
@@ -10,10 +10,10 @@
* License: GPL
*/
-
-#include "ed.hh"
#include <stdexcept>
-#include "ui.hh"
+
+#include "ui/mw/mw.hh"
+#include "ui/ui.hh"
#include "sf-widgets.hh"
#include "sf_cb.hh"
diff --git a/src/ui/sf-filter.cc b/src/ui/sf/sf-filter.cc
similarity index 91%
rename from src/ui/sf-filter.cc
rename to src/ui/sf/sf-filter.cc
index 5405c95..aeda277 100644
--- a/src/ui/sf-filter.cc
+++ b/src/ui/sf/sf-filter.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-filter.cc
+ * File name: ui/sf/sf-filter.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-01-30
@@ -15,9 +15,6 @@
using namespace std;
-
-
-
aghui::SScoringFacility::SFiltersDialog::
~SFiltersDialog()
{
diff --git a/src/ui/sf-filter_cb.cc b/src/ui/sf/sf-filter_cb.cc
similarity index 97%
rename from src/ui/sf-filter_cb.cc
rename to src/ui/sf/sf-filter_cb.cc
index b729189..e1dd911 100644
--- a/src/ui/sf-filter_cb.cc
+++ b/src/ui/sf/sf-filter_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-filter_cb.cc
+ * File name: ui/sf/sf-filter_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-06-25
@@ -11,7 +11,7 @@
*/
-#include "misc.hh"
+#include "ui/misc.hh"
#include "sf.hh"
#include "sf_cb.hh"
diff --git a/src/ui/sf-hypnogram.cc b/src/ui/sf/sf-hypnogram.cc
similarity index 98%
rename from src/ui/sf-hypnogram.cc
rename to src/ui/sf/sf-hypnogram.cc
index c8569a3..4b8e965 100644
--- a/src/ui/sf-hypnogram.cc
+++ b/src/ui/sf/sf-hypnogram.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-hypnogram.cc
+ * File name: ui/sf/sf-hypnogram.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-04-27
diff --git a/src/ui/sf-hypnogram_cb.cc b/src/ui/sf/sf-hypnogram_cb.cc
similarity index 97%
rename from src/ui/sf-hypnogram_cb.cc
rename to src/ui/sf/sf-hypnogram_cb.cc
index e25356b..a41fad6 100644
--- a/src/ui/sf-hypnogram_cb.cc
+++ b/src/ui/sf/sf-hypnogram_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-hypnogram_cb.cc
+ * File name: ui/sf/sf-hypnogram_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-06-15
@@ -10,23 +10,17 @@
* License: GPL
*/
-
-
-
#include <fstream>
-#include "globals.hh"
+#include "model/beersma.hh"
+#include "ui/globals.hh"
#include "sf.hh"
-#include "../model/beersma.hh"
using namespace std;
-
using namespace aghui;
extern "C" {
-
-
gboolean
daSFHypnogram_draw_cb( GtkWidget *wid, cairo_t *cr, gpointer userdata)
{
diff --git a/src/ui/sf-ica.cc b/src/ui/sf/sf-ica.cc
similarity index 97%
rename from src/ui/sf-ica.cc
rename to src/ui/sf/sf-ica.cc
index 83e441e..88750a7 100644
--- a/src/ui/sf-ica.cc
+++ b/src/ui/sf/sf-ica.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-ica.cc
+ * File name: ui/sf/sf-ica.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-10-25
@@ -10,11 +10,11 @@
* License: GPL
*/
-
#include <unistd.h>
#include <itpp/base/algebra/inv.h>
-#include "../ica/ica.hh"
-#include "misc.hh"
+
+#include "ica/ica.hh"
+#include "ui/misc.hh"
#include "sf.hh"
#include "sf_cb.hh"
@@ -53,7 +53,7 @@ setup_ica()
vector<TICASetupFun> src;
size_t checking_sr = 0,
- checking_total_samples = -1;
+ checking_total_samples = (size_t)-1;
for ( auto &H : channels ) {
size_t this_sr = H.crecording.F().samplerate(H.h()),
this_ts = H.crecording.total_samples();
@@ -64,7 +64,7 @@ setup_ica()
return 1;
} else
checking_sr = this_sr;
- if ( checking_total_samples != -1 and checking_total_samples != this_ts ) {
+ if ( checking_total_samples != (size_t)-1 and checking_total_samples != this_ts ) {
pop_ok_message( wScoringFacility,
"Unequal channel sizes",
"This is something that's never supposed to happen.");
diff --git a/src/ui/sf-ica_cb.cc b/src/ui/sf/sf-ica_cb.cc
similarity index 99%
rename from src/ui/sf-ica_cb.cc
rename to src/ui/sf/sf-ica_cb.cc
index 795f60d..538a04f 100644
--- a/src/ui/sf-ica_cb.cc
+++ b/src/ui/sf/sf-ica_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-ica_cb.cc
+ * File name: ui/sf/sf-ica_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-10-30
@@ -10,18 +10,15 @@
* License: GPL
*/
-
-#include "misc.hh"
+#include "ui/misc.hh"
#include "sf.hh"
#include "sf-widgets.hh"
using namespace std;
using namespace aghui;
-
extern "C" {
-
void
bSFRunICA_clicked_cb( GtkButton *button, gpointer userdata)
{
diff --git a/src/ui/sf-montage.cc b/src/ui/sf/sf-montage.cc
similarity index 99%
rename from src/ui/sf-montage.cc
rename to src/ui/sf/sf-montage.cc
index 004ad84..574edfb 100644
--- a/src/ui/sf-montage.cc
+++ b/src/ui/sf/sf-montage.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-montage.cc
+ * File name: ui/sf/sf-montage.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-04-23
@@ -10,11 +10,10 @@
* License: GPL
*/
-
#include <cairo/cairo-svg.h>
-#include "../common/lang.hh"
-#include "misc.hh"
+#include "common/lang.hh"
+#include "ui/misc.hh"
#include "sf.hh"
using namespace std;
diff --git a/src/ui/sf-montage_cb.cc b/src/ui/sf/sf-montage_cb.cc
similarity index 99%
rename from src/ui/sf-montage_cb.cc
rename to src/ui/sf/sf-montage_cb.cc
index bbba682..440a8ac 100644
--- a/src/ui/sf-montage_cb.cc
+++ b/src/ui/sf/sf-montage_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-montage_cb.cc
+ * File name: ui/sf/sf-montage_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-07-02
@@ -10,11 +10,10 @@
* License: GPL
*/
-
#include <sys/time.h>
#include <cairo/cairo.h>
-#include "misc.hh"
+#include "ui/misc.hh"
#include "sf.hh"
#include "sf_cb.hh"
diff --git a/src/ui/sf-patterns.cc b/src/ui/sf/sf-patterns.cc
similarity index 99%
rename from src/ui/sf-patterns.cc
rename to src/ui/sf/sf-patterns.cc
index a1f106f..50371f7 100644
--- a/src/ui/sf-patterns.cc
+++ b/src/ui/sf/sf-patterns.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-patterns.cc
+ * File name: ui/sf/sf-patterns.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-01-14
@@ -10,13 +10,10 @@
* License: GPL
*/
-
-
-
#include <dirent.h>
#include <sys/stat.h>
-#include "misc.hh"
+#include "ui/misc.hh"
#include "sf.hh"
using namespace std;
diff --git a/src/ui/sf-patterns_cb.cc b/src/ui/sf/sf-patterns_cb.cc
similarity index 98%
rename from src/ui/sf-patterns_cb.cc
rename to src/ui/sf/sf-patterns_cb.cc
index 88bc653..07279d0 100644
--- a/src/ui/sf-patterns_cb.cc
+++ b/src/ui/sf/sf-patterns_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-patterns_cb.cc
+ * File name: ui/sf/sf-patterns_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-07-03
@@ -10,10 +10,7 @@
* License: GPL
*/
-
-
-
-#include "misc.hh"
+#include "ui/misc.hh"
#include "sf.hh"
using namespace std;
diff --git a/src/ui/sf-phasediff.cc b/src/ui/sf/sf-phasediff.cc
similarity index 98%
rename from src/ui/sf-phasediff.cc
rename to src/ui/sf/sf-phasediff.cc
index 78bc920..e8867a3 100644
--- a/src/ui/sf-phasediff.cc
+++ b/src/ui/sf/sf-phasediff.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-phasediff.cc
+ * File name: ui/sf/sf-phasediff.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-01-29
@@ -10,17 +10,12 @@
* License: GPL
*/
-
-
-
-#include "../common/lang.hh"
-#include "misc.hh"
+#include "common/lang.hh"
+#include "ui/misc.hh"
#include "sf.hh"
-
using namespace std;
-
aghui::SScoringFacility::SPhasediffDialog::
SPhasediffDialog (aghui::SScoringFacility& parent)
: channel1 (nullptr),
diff --git a/src/ui/sf-phasediff_cb.cc b/src/ui/sf/sf-phasediff_cb.cc
similarity index 97%
rename from src/ui/sf-phasediff_cb.cc
rename to src/ui/sf/sf-phasediff_cb.cc
index e584051..7821d11 100644
--- a/src/ui/sf-phasediff_cb.cc
+++ b/src/ui/sf/sf-phasediff_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-phasediff_cb.cc
+ * File name: ui/sf/sf-phasediff_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-06-18
@@ -10,14 +10,10 @@
* License: GPL
*/
-
-
-
-#include "../common/lang.hh"
-#include "misc.hh"
+#include "common/lang.hh"
+#include "ui/misc.hh"
#include "sf.hh"
-
using namespace std;
using namespace aghui;
diff --git a/src/ui/sf-widgets.hh b/src/ui/sf/sf-widgets.hh
similarity index 98%
rename from src/ui/sf-widgets.hh
rename to src/ui/sf/sf-widgets.hh
index da59ffd..4a3a207 100644
--- a/src/ui/sf-widgets.hh
+++ b/src/ui/sf/sf-widgets.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf-widgets.hh
+ * File name: ui/sf/sf-widgets.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-10-06
@@ -14,7 +14,7 @@
#define _AGH_UI_SCORING_FACILITY_WIDGETS_H
#include <gtk/gtk.h>
-#include "forward-decls.hh"
+#include "ui/forward-decls.hh"
namespace aghui {
diff --git a/src/ui/sf.cc b/src/ui/sf/sf.cc
similarity index 98%
rename from src/ui/sf.cc
rename to src/ui/sf/sf.cc
index ba3f7e3..7b74c84 100644
--- a/src/ui/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf.cc
+ * File name: ui/sf/sf.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2008-07-01
@@ -10,14 +10,11 @@
* License: GPL
*/
-
-
-
#include <stdexcept>
-#include "../common/config-validate.hh"
-#include "../common/fs.hh"
-#include "misc.hh"
+#include "common/config-validate.hh"
+#include "common/fs.hh"
+#include "ui/misc.hh"
#include "sf.hh"
#include "sf_cb.hh"
@@ -57,7 +54,6 @@ SScoringFacility (agh::CSubject& J,
_csubject (J),
_session (D),
_sepisode (J.measurements.at(D)[E]),
- ica (nullptr),
hypnogram_button_down (false),
mode (TMode::scoring),
crosshair_at (10),
@@ -68,6 +64,7 @@ SScoringFacility (agh::CSubject& J,
_cur_page (0),
_cur_vpage (0),
skirting_run_per1 (.04),
+ ica (nullptr),
interchannel_gap (IntersignalSpace),
n_hidden (0),
config_keys_b ({
@@ -410,12 +407,12 @@ set_cur_vpage( size_t p, bool touch_self)
void
aghui::SScoringFacility::
-set_vpagesize_item( size_t item, bool touch_self)
+set_vpagesize_item( int item, bool touch_self)
{
if ( pagesize_item == item && !touch_self )
return;
- agh::alg::ensure_within( item, (size_t)0, DisplayPageSizeValues.size()-1 );
+ agh::alg::ensure_within( item, 0, (int)DisplayPageSizeValues.size()-1 );
pagesize_item = item;
gtk_adjustment_set_upper( jPageNo, total_vpages());
diff --git a/src/ui/sf.hh b/src/ui/sf/sf.hh
similarity index 98%
rename from src/ui/sf.hh
rename to src/ui/sf/sf.hh
index 3e4ccfa..ee43f2e 100644
--- a/src/ui/sf.hh
+++ b/src/ui/sf/sf.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf.hh
+ * File name: ui/sf/sf.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-01-14
@@ -17,14 +17,14 @@
#include <cairo/cairo-svg.h>
#include <gtk/gtk.h>
-#include "../common/config-validate.hh"
-#include "../sigproc/sigproc.hh"
-#include "../libsigfile/page-metrics-base.hh"
-#include "../expdesign/primaries.hh"
-#include "../ica/ica.hh"
-#include "globals.hh"
-#include "ui++.hh"
-#include "ed.hh"
+#include "common/config-validate.hh"
+#include "sigproc/sigproc.hh"
+#include "libsigfile/page-metrics-base.hh"
+#include "expdesign/primaries.hh"
+#include "ica/ica.hh"
+#include "ui/globals.hh"
+#include "ui/ui++.hh"
+#include "ui/mw/mw.hh"
#include "sf-widgets.hh"
#if HAVE_CONFIG_H && !defined(VERSION)
@@ -406,7 +406,7 @@ class SScoringFacility
double cur_xvpage_end() const;
double time_at_click( double) const;
- void set_vpagesize_item( size_t item, bool touch_self = true); // touches a few wisgets
+ void set_vpagesize_item( int item, bool touch_self = true); // touches a few wisgets
void set_vpagesize( size_t seconds, bool touch_self = true);
public:
diff --git a/src/ui/sf_cb.cc b/src/ui/sf/sf_cb.cc
similarity index 93%
rename from src/ui/sf_cb.cc
rename to src/ui/sf/sf_cb.cc
index a953165..449a37e 100644
--- a/src/ui/sf_cb.cc
+++ b/src/ui/sf/sf_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf_cb.cc
+ * File name: ui/sf/sf_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-06-29
@@ -10,16 +10,13 @@
* License: GPL
*/
-
-#include "ed.hh"
+#include "ui/mw/mw.hh"
#include "sf.hh"
#include "sf-widgets.hh"
-
using namespace std;
using namespace aghui;
-
extern "C" {
@@ -234,25 +231,23 @@ bSFAccept_clicked_cb( GtkToolButton *button, gpointer userdata)
void
iSFAcceptAndTakeNext_activate_cb( GtkMenuItem *menuitem, gpointer userdata)
{
- auto SFp = (SScoringFacility*)userdata;
-
- auto& ED = SFp->_p; // keep same parent
+ auto& SF = *(SScoringFacility*)userdata;
+ auto& ED = SF._p; // keep same parent
ED.using_subject->create_cscourse();
gtk_widget_queue_draw( (GtkWidget*)ED.using_subject->da);
- set_cursor_busy( true, (GtkWidget*)SFp->wScoringFacility);
+ SBusyBlock bb (SF.wScoringFacility);
// guaranteed to have next(E)
- auto& J = SFp->csubject();
- auto SFp2 = new SScoringFacility(
- J, SFp->session().c_str(),
- next( J.measurements[SFp->session()].episode_iter_by_name(SFp->sepisode().name())) -> name(),
+ auto& J = SF.csubject();
+ new SScoringFacility(
+ J, SF.session().c_str(),
+ next( J.measurements[SF.session()].episode_iter_by_name(SF.sepisode().name())) -> name(),
ED);
- delete SFp;
-
-// set_cursor_busy( false, (GtkWidget*)SFp2->wScoringFacility);
+ SF._p.close_this_SF_now = &SF;
+ g_signal_emit_by_name( SF._p.bMainCloseThatSF, "clicked");
}
diff --git a/src/ui/sf_cb.hh b/src/ui/sf/sf_cb.hh
similarity index 99%
rename from src/ui/sf_cb.hh
rename to src/ui/sf/sf_cb.hh
index 43598c5..bd2d747 100644
--- a/src/ui/sf_cb.hh
+++ b/src/ui/sf/sf_cb.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/sf_cb.hh
+ * File name: ui/sf/sf_cb.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-06-25
diff --git a/src/ui/sm/Makefile.am b/src/ui/sm/Makefile.am
new file mode 100644
index 0000000..c4d3db1
--- /dev/null
+++ b/src/ui/sm/Makefile.am
@@ -0,0 +1,25 @@
+AM_CXXFLAGS := \
+ -std=c++0x -Wdeprecated-declarations -Wall \
+ $(GTK_CFLAGS) $(LIBCONFIGXX_CFLAGS) \
+ -DPACKAGE_DATADIR=\"$(datadir)\" \
+ $(OPENMP_CXXFLAGS) \
+ -I../..
+
+noinst_LIBRARIES := liba.a
+
+liba_a_SOURCES := \
+ sm.cc \
+ sm-construct.cc \
+ sm.hh \
+ sm_cb.cc \
+ sm_cb.hh
+
+if DO_PCH
+BUILT_SOURCES := \
+ sm.hh.gch \
+ sm_cb.hh.gch
+%.hh.gch: %.hh
+ $(CXXCOMPILE) -c $<
+CLEANFILES := \
+ $(BUILT_SOURCES)
+endif
diff --git a/src/ui/sc-construct.cc b/src/ui/sm/sm-construct.cc
similarity index 94%
rename from src/ui/sc-construct.cc
rename to src/ui/sm/sm-construct.cc
index fd8f47f..1ebbf9c 100644
--- a/src/ui/sc-construct.cc
+++ b/src/ui/sm/sm-construct.cc
@@ -1,25 +1,24 @@
// ;-*-C++-*-
/*
- * File name: ui/session-chooser-construct.cc
+ * File name: ui/sm/sm-construct.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-09-10
*
- * Purpose: experiment design selector (construct widgets)
+ * Purpose: session manager (widgets)
*
* License: GPL
*/
-#include "ui.hh"
-#include "misc.hh"
-#include "sc.hh"
-#include "sc_cb.hh"
+#include "ui/ui.hh"
+#include "ui/misc.hh"
+#include "sm.hh"
+#include "sm_cb.hh"
using namespace std;
-
int
aghui::SSessionChooser::
construct_widgets()
diff --git a/src/ui/sc.cc b/src/ui/sm/sm.cc
similarity index 96%
rename from src/ui/sc.cc
rename to src/ui/sm/sm.cc
index 5991dfd..6e620e2 100644
--- a/src/ui/sc.cc
+++ b/src/ui/sm/sm.cc
@@ -1,11 +1,11 @@
// ;-*-C++-*-
/*
- * File name: ui/session-chooser.cc
+ * File name: ui/sm/sm.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-05-15
*
- * Purpose: experiment design selector
+ * Purpose: session manager
*
* License: GPL
*/
@@ -15,12 +15,12 @@
#include <ftw.h>
#include <libconfig.h++>
-#include "../common/fs.hh"
-#include "../expdesign/forward-decls.hh" // for edf_file_counter
-#include "misc.hh"
-#include "sc.hh"
-#include "sc_cb.hh"
-#include "ed.hh"
+#include "common/fs.hh"
+#include "expdesign/forward-decls.hh" // for edf_file_counter
+#include "ui/misc.hh"
+#include "ui/mw/mw.hh"
+#include "sm.hh"
+#include "sm_cb.hh"
using namespace std;
diff --git a/src/ui/sc.hh b/src/ui/sm/sm.hh
similarity index 93%
rename from src/ui/sc.hh
rename to src/ui/sm/sm.hh
index 2f9983a..a92ab4d 100644
--- a/src/ui/sc.hh
+++ b/src/ui/sm/sm.hh
@@ -1,11 +1,11 @@
// ;-*-C++-*-
/*
- * File name: ui/session-chooser.hh
+ * File name: ui/sm/sm.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2011-04-13
*
- * Purpose: session chooser
+ * Purpose: session manager
*
* License: GPL
*/
@@ -16,18 +16,16 @@
#include <string>
#include <list>
#include <gtk/gtk.h>
-#include "../common/lang.hh"
-#include "forward-decls.hh"
+#include "common/lang.hh"
+#include "ui/forward-decls.hh"
#if HAVE_CONFIG_H && !defined(VERSION)
# include "config.h"
#endif
-
using namespace std;
-
namespace aghui {
struct SSession : public string {
diff --git a/src/ui/sc_cb.cc b/src/ui/sm/sm_cb.cc
similarity index 96%
rename from src/ui/sc_cb.cc
rename to src/ui/sm/sm_cb.cc
index f58d1c4..cdde62b 100644
--- a/src/ui/sc_cb.cc
+++ b/src/ui/sm/sm_cb.cc
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/session-chooser_cb.cc
+ * File name: ui/sm/sm_cb.cc
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-09-09
@@ -11,11 +11,11 @@
*/
-#include "../common/string.hh"
-#include "ui.hh"
-#include "ui++.hh"
-#include "sc.hh"
-#include "sc_cb.hh"
+#include "common/string.hh"
+#include "ui/ui.hh"
+#include "ui/ui++.hh"
+#include "sm.hh"
+#include "sm_cb.hh"
using namespace std;
using namespace aghui;
diff --git a/src/ui/sc_cb.hh b/src/ui/sm/sm_cb.hh
similarity index 95%
rename from src/ui/sc_cb.hh
rename to src/ui/sm/sm_cb.hh
index e35cfc7..d67b485 100644
--- a/src/ui/sc_cb.hh
+++ b/src/ui/sm/sm_cb.hh
@@ -1,6 +1,6 @@
// ;-*-C++-*-
/*
- * File name: ui/session-chooser_cb.hh
+ * File name: ui/sm/sm_cb.hh
* Project: Aghermann
* Author: Andrei Zavada <johnhommer at gmail.com>
* Initial version: 2012-09-09
diff --git a/src/ui/ui++.hh b/src/ui/ui++.hh
index 20a56c5..3bfc4f8 100644
--- a/src/ui/ui++.hh
+++ b/src/ui/ui++.hh
@@ -18,7 +18,8 @@
#include <string>
#include <list>
#include <gtk/gtk.h>
-#include "../common/lang.hh"
+
+#include "common/lang.hh"
#include "ui.hh"
#if HAVE_CONFIG_H && !defined(VERSION)
diff --git a/src/ui/ui.hh b/src/ui/ui.hh
index 029563e..4afe8e5 100644
--- a/src/ui/ui.hh
+++ b/src/ui/ui.hh
@@ -21,7 +21,8 @@
#include <valarray>
#include <itpp/base/mat.h>
#include <gtk/gtk.h>
-#include "../common/lang.hh"
+
+#include "common/lang.hh"
#if HAVE_CONFIG_H && !defined(VERSION)
# include "config.h"
--
Sleep experiment manager
More information about the debian-med-commit
mailing list