WIP: measures process VII
This commit is contained in:
parent
1508ffc620
commit
a2830fdca8
|
@ -146,4 +146,6 @@ 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_depends_on_two_events (GtkWidget *btt, gpointer data);
|
||||||
void on_measure_single_event_occurences_nb (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_dates (GtkWidget *btt, gpointer data);
|
||||||
|
void on_measure_single_event_occurences_situations (GtkWidget *btt, gpointer data);
|
||||||
|
void on_measure_time_elapsed_between_two_events (GtkWidget *btt, gpointer data);
|
||||||
|
void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data);
|
||||||
|
|
|
@ -257,5 +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_one_or_two_events();
|
||||||
void *widget_measure_do_depends_on_a_single_event();
|
void *widget_measure_do_depends_on_a_single_event();
|
||||||
void *widget_measure_do_depends_on_two_events();
|
void *widget_measure_do_depends_on_two_events();
|
||||||
void *widget_measure_single_event_occurences_nb();
|
void *widget_measure_event_occurences_nb();
|
||||||
void *widget_measure_single_event_occurences_dates();
|
void *widget_measure_event_occurences_dates();
|
||||||
|
void *widget_measure_event_occurences_situations();
|
||||||
|
void *widget_measure_time_elapsed_between_two_events();
|
||||||
|
void *widget_measure_third_event_occurences_in_between();
|
||||||
|
|
22
src/signal.c
22
src/signal.c
|
@ -397,13 +397,31 @@ void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data)
|
||||||
void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data)
|
void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data)
|
||||||
{
|
{
|
||||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
GTK_WIDGET (widget_measure_single_event_occurences_nb()));
|
GTK_WIDGET (widget_measure_event_occurences_nb()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data)
|
void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data)
|
||||||
{
|
{
|
||||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
GTK_WIDGET (widget_measure_single_event_occurences_dates()));
|
GTK_WIDGET (widget_measure_event_occurences_dates()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void on_measure_single_event_occurences_situations (GtkWidget *btt, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
|
GTK_WIDGET (widget_measure_event_occurences_situations()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void on_measure_time_elapsed_between_two_events (GtkWidget *btt, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
|
GTK_WIDGET (widget_measure_time_elapsed_between_two_events()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
|
GTK_WIDGET (widget_measure_third_event_occurences_in_between()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,17 @@ static GtkWidget *balance;
|
||||||
static GtkWidget *btt_select_first_of_two;
|
static GtkWidget *btt_select_first_of_two;
|
||||||
static GtkWidget *btt_select_second_of_two;
|
static GtkWidget *btt_select_second_of_two;
|
||||||
|
|
||||||
static GtkBox *select_nb_or_date_box;
|
static GtkBox *one_rule_measures_box;
|
||||||
static GtkWidget *scale;
|
static GtkWidget *scale;
|
||||||
static GtkWidget *btt_select_nb;
|
static GtkWidget *btt_select_nb;
|
||||||
static GtkWidget *btt_select_date;
|
static GtkWidget *btt_select_date;
|
||||||
|
static GtkWidget *btt_select_situation;
|
||||||
|
|
||||||
|
static GtkBox *two_rules_measures_box;
|
||||||
|
static GtkWidget *bridge;
|
||||||
|
static GtkWidget *btt_time_elapsed;
|
||||||
|
static GtkWidget *btt_event_in_between;
|
||||||
|
|
||||||
|
|
||||||
// Measure concerns
|
// Measure concerns
|
||||||
// - nb of occurences of the rule
|
// - nb of occurences of the rule
|
||||||
|
@ -70,46 +77,85 @@ static GtkWidget *btt_select_date;
|
||||||
// Is this measure to be correlated to some others ?
|
// Is this measure to be correlated to some others ?
|
||||||
|
|
||||||
|
|
||||||
void *widget_measure_single_event_occurences_nb()
|
void *widget_measure_event_occurences_nb()
|
||||||
{
|
{
|
||||||
printf("measure single_event_occurences_nb\n");
|
// printf("measure event_occurences_nb\n");
|
||||||
|
prefer_add_measure ("new measure count one event occurences");
|
||||||
return measure_page;
|
return measure_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *widget_measure_single_event_occurences_dates()
|
void *widget_measure_event_occurences_dates()
|
||||||
{
|
{
|
||||||
printf("measure single_event_occurences_dates\n");
|
// printf("measure event_occurences_dates\n");
|
||||||
|
prefer_add_measure ("new measure one event occurences dates");
|
||||||
|
return measure_page;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *widget_measure_event_occurences_situations()
|
||||||
|
{
|
||||||
|
// printf("measure event_occurences_situations\n");
|
||||||
|
prefer_add_measure ("new measure one event occurences situations");
|
||||||
|
return measure_page;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *widget_measure_time_elapsed_between_two_events()
|
||||||
|
{
|
||||||
|
// printf("measure time_elapsed_between_two_events\n");
|
||||||
|
prefer_add_measure ("new measure time elapsed between two events");
|
||||||
|
return measure_page;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *widget_measure_third_event_occurences_in_between()
|
||||||
|
{
|
||||||
|
// printf("measure third_event_occurences_in_between\n");
|
||||||
|
prefer_add_measure ("new measure of the frequency of a third event\
|
||||||
|
occurring between two other events");
|
||||||
return measure_page;
|
return measure_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *widget_measure_do_depends_on_a_single_event()
|
void *widget_measure_do_depends_on_a_single_event()
|
||||||
{
|
{
|
||||||
prefer_add_measure ("new measure from a single event");
|
|
||||||
gtk_box_remove (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_second_of_two));
|
gtk_box_remove (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_second_of_two));
|
||||||
select_nb_or_date_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
// ici, il faut inactiver le btt_select_first_of_two
|
||||||
|
one_rule_measures_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
scale = gtk_picture_new_for_filename
|
scale = gtk_picture_new_for_filename
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/camera icon.png");
|
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/camera icon.png");
|
||||||
btt_select_nb = gtk_toggle_button_new_with_label ("count the number of occurences");
|
btt_select_nb = gtk_toggle_button_new_with_label ("count the number of occurences");
|
||||||
btt_select_date = gtk_toggle_button_new_with_label ("save occurences dates");
|
btt_select_date = gtk_toggle_button_new_with_label ("save occurences dates");
|
||||||
|
btt_select_situation = gtk_toggle_button_new_with_label ("save occurences situations");
|
||||||
g_signal_connect (btt_select_nb, "toggled",
|
g_signal_connect (btt_select_nb, "toggled",
|
||||||
G_CALLBACK (on_measure_single_event_occurences_nb), NULL);
|
G_CALLBACK (on_measure_single_event_occurences_nb), NULL);
|
||||||
g_signal_connect (btt_select_date, "toggled",
|
g_signal_connect (btt_select_date, "toggled",
|
||||||
G_CALLBACK (on_measure_single_event_occurences_dates), NULL);
|
G_CALLBACK (on_measure_single_event_occurences_dates), NULL);
|
||||||
|
g_signal_connect (btt_select_date, "toggled",
|
||||||
|
G_CALLBACK (on_measure_single_event_occurences_situations), NULL);
|
||||||
|
|
||||||
gtk_box_append (select_nb_or_date_box, GTK_WIDGET (scale));
|
gtk_box_append (one_rule_measures_box, GTK_WIDGET (scale));
|
||||||
gtk_box_append (select_nb_or_date_box, GTK_WIDGET (btt_select_nb));
|
gtk_box_append (one_rule_measures_box, GTK_WIDGET (btt_select_nb));
|
||||||
gtk_box_append (select_nb_or_date_box, GTK_WIDGET (btt_select_date));
|
gtk_box_append (one_rule_measures_box, GTK_WIDGET (btt_select_date));
|
||||||
gtk_box_append (measure_page, GTK_WIDGET (select_nb_or_date_box));
|
gtk_box_append (one_rule_measures_box, GTK_WIDGET (btt_select_situation));
|
||||||
|
gtk_box_append (measure_page, GTK_WIDGET (one_rule_measures_box));
|
||||||
return measure_page;
|
return measure_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *widget_measure_do_depends_on_two_events()
|
void *widget_measure_do_depends_on_two_events()
|
||||||
{
|
{
|
||||||
printf("measure depends on two events\n");
|
|
||||||
prefer_add_measure ("new measure from two events");
|
|
||||||
gtk_box_remove (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_first_of_two));
|
gtk_box_remove (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_first_of_two));
|
||||||
scale = gtk_picture_new_for_filename
|
// ici, il faut inactiver le btt_select_second_of_two
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure tool scale icon.png");
|
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");
|
||||||
|
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",
|
||||||
|
G_CALLBACK (on_measure_time_elapsed_between_two_events), NULL);
|
||||||
|
g_signal_connect (btt_event_in_between, "toggled",
|
||||||
|
G_CALLBACK (on_measure_third_event_occurences_in_between), NULL);
|
||||||
|
|
||||||
|
gtk_box_append (two_rules_measures_box, GTK_WIDGET (bridge));
|
||||||
|
gtk_box_append (two_rules_measures_box, GTK_WIDGET (btt_time_elapsed));
|
||||||
|
gtk_box_append (two_rules_measures_box, GTK_WIDGET (btt_event_in_between));
|
||||||
|
gtk_box_append (measure_page, GTK_WIDGET (two_rules_measures_box));
|
||||||
return measure_page;
|
return measure_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,6 +163,7 @@ void *widget_measure_do_depends_on_one_or_two_events()
|
||||||
{
|
{
|
||||||
gtk_box_append (select_rules_first_box,
|
gtk_box_append (select_rules_first_box,
|
||||||
gtk_toggle_button_new_with_label ("< done > a set of rules was selected"));
|
gtk_toggle_button_new_with_label ("< done > a set of rules was selected"));
|
||||||
|
// ici, il faut inactiver le btt_select_rules_first
|
||||||
select_one_or_two_rules_events_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
select_one_or_two_rules_events_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
balance = gtk_picture_new_for_filename
|
balance = gtk_picture_new_for_filename
|
||||||
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/balance icon.png");
|
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/balance icon.png");
|
||||||
|
|
Loading…
Reference in New Issue