diff --git a/include/signal.h b/include/signal.h index 8d6a426..f34e7f4 100644 --- a/include/signal.h +++ b/include/signal.h @@ -144,6 +144,7 @@ void on_start_new_measure (GtkWidget *btt_new_measure, gpointer data); void on_select_rules_first (GtkWidget *btt_new_measure, gpointer data); void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data); void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data); +void on_measure_do_select_a_second_rules_set (GtkWidget *btt, gpointer data); void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data); void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data); void on_measure_single_event_occurences_situations (GtkWidget *btt, gpointer data); diff --git a/include/widget.h b/include/widget.h index 4d42f5a..9fec4e4 100644 --- a/include/widget.h +++ b/include/widget.h @@ -257,6 +257,8 @@ void *widget_measure_do_select_rules_first(); void *widget_measure_do_depends_on_one_or_two_events(); void *widget_measure_do_depends_on_a_single_event(); void *widget_measure_do_depends_on_two_events(); +void *widget_measure_do_select_a_second_rules_set(); +void *widget_measure_do_choose_an_event_type(); void *widget_measure_event_occurences_nb(); void *widget_measure_event_occurences_dates(); void *widget_measure_event_occurences_situations(); diff --git a/src/signal.c b/src/signal.c index 43a996b..31c5fc2 100644 --- a/src/signal.c +++ b/src/signal.c @@ -391,9 +391,26 @@ void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data) void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data) { gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), - GTK_WIDGET (widget_measure_do_depends_on_two_events())); + GTK_WIDGET (widget_measure_do_select_a_second_rules_set())); } + + + + + +void on_measure_do_select_a_second_rules_set (GtkWidget *btt, gpointer data) +{ + gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), + GTK_WIDGET (widget_measure_do_choose_an_event_type())); +} + + + + + + + void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data) { gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), diff --git a/src/widget/measure/dispatch.c b/src/widget/measure/dispatch.c index 2655eba..385ff96 100644 --- a/src/widget/measure/dispatch.c +++ b/src/widget/measure/dispatch.c @@ -48,6 +48,10 @@ static GtkBox *select_rules_first_box; static GtkWidget *pressure; static GtkWidget *btt_select_rules_first; +static GtkBox *select_second_rules_set_box; +static GtkWidget *sizes_xy; +static GtkWidget *btt_select_rules_second; + static GtkBox *select_one_or_two_rules_events_box; static GtkWidget *balance; static GtkWidget *btt_select_first_of_two; @@ -64,6 +68,7 @@ static GtkWidget *bridge; static GtkWidget *btt_time_elapsed; static GtkWidget *btt_event_in_between; +static GtkBox *correlation_measures_box; //TODO // Measure concerns // - nb of occurences of the rule @@ -138,13 +143,37 @@ void *widget_measure_do_depends_on_a_single_event() return measure_page; } -void *widget_measure_do_depends_on_two_events() + + + + +void *widget_measure_do_select_a_second_rules_set() { +// printf("do_select_a_second_rules_set \n"); + select_second_rules_set_box= GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); + sizes_xy = gtk_picture_new_for_filename + ("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure compass icon.png"); + btt_select_rules_second = gtk_toggle_button_new_with_label ("select a second rules set"); + g_signal_connect (btt_select_rules_second, "toggled", + G_CALLBACK (on_measure_do_select_a_second_rules_set), NULL); + + gtk_box_append (select_second_rules_set_box, GTK_WIDGET (sizes_xy)); + gtk_box_append (select_second_rules_set_box, GTK_WIDGET (btt_select_rules_second)); + gtk_box_append (measure_page, GTK_WIDGET (select_second_rules_set_box)); + + return measure_page; +} + +void *widget_measure_do_choose_an_event_type() +{ +// printf("do_choose_an_event_type \n"); gtk_box_remove (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_first_of_two)); // ici, il faut inactiver le btt_select_second_of_two + gtk_box_append (select_second_rules_set_box, + gtk_toggle_button_new_with_label ("< done > a second set of rules was selected")); two_rules_measures_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); bridge = gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/stamp/bridge icon.png"); + ("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure temperature icon.png"); btt_time_elapsed = gtk_toggle_button_new_with_label ("time_elapsed"); btt_event_in_between = gtk_toggle_button_new_with_label ("event_in_between"); g_signal_connect (btt_time_elapsed, "toggled", @@ -159,6 +188,12 @@ void *widget_measure_do_depends_on_two_events() return measure_page; } + + + + + + void *widget_measure_do_depends_on_one_or_two_events() { gtk_box_append (select_rules_first_box,