WIP: measures process VI
This commit is contained in:
parent
71e2e84d27
commit
1508ffc620
|
@ -144,3 +144,6 @@ void on_start_new_measure (GtkWidget *btt_new_measure, gpointer data);
|
||||||
void on_select_rules_first (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_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_dates (GtkWidget *btt, gpointer data);
|
||||||
|
|
||||||
|
|
|
@ -257,3 +257,5 @@ 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_single_event_occurences_dates();
|
||||||
|
|
14
src/signal.c
14
src/signal.c
|
@ -393,3 +393,17 @@ void on_measure_depends_on_two_events (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_do_depends_on_two_events()));
|
GTK_WIDGET (widget_measure_do_depends_on_two_events()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
|
GTK_WIDGET (widget_measure_single_event_occurences_nb()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||||
|
GTK_WIDGET (widget_measure_single_event_occurences_dates()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,6 @@
|
||||||
/* M E A S U R E S */
|
/* M E A S U R E S */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
#define PARTITION_MEASURE 40
|
|
||||||
|
|
||||||
static GtkBox *measure_page;
|
static GtkBox *measure_page;
|
||||||
|
|
||||||
static GtkBox *edit_a_new_measure_box;
|
static GtkBox *edit_a_new_measure_box;
|
||||||
|
@ -55,6 +53,11 @@ 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 GtkWidget *scale;
|
||||||
|
static GtkWidget *btt_select_nb;
|
||||||
|
static GtkWidget *btt_select_date;
|
||||||
|
|
||||||
// Measure concerns
|
// Measure concerns
|
||||||
// - nb of occurences of the rule
|
// - nb of occurences of the rule
|
||||||
// - nb of objects / situations before / after > select target
|
// - nb of objects / situations before / after > select target
|
||||||
|
@ -66,21 +69,54 @@ static GtkWidget *btt_select_second_of_two;
|
||||||
|
|
||||||
// Is this measure to be correlated to some others ?
|
// Is this measure to be correlated to some others ?
|
||||||
|
|
||||||
void *widget_measure_do_depends_on_a_single_event()
|
|
||||||
|
void *widget_measure_single_event_occurences_nb()
|
||||||
{
|
{
|
||||||
printf("measure depends on a single event\n");
|
printf("measure single_event_occurences_nb\n");
|
||||||
prefer_add_measure ("new measure from a single event");
|
|
||||||
return measure_page;
|
return measure_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *widget_measure_single_event_occurences_dates()
|
||||||
|
{
|
||||||
|
printf("measure single_event_occurences_dates\n");
|
||||||
|
return measure_page;
|
||||||
|
}
|
||||||
|
|
||||||
|
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));
|
||||||
|
select_nb_or_date_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2));
|
||||||
|
scale = gtk_picture_new_for_filename
|
||||||
|
("/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_date = gtk_toggle_button_new_with_label ("save occurences dates");
|
||||||
|
g_signal_connect (btt_select_nb, "toggled",
|
||||||
|
G_CALLBACK (on_measure_single_event_occurences_nb), NULL);
|
||||||
|
g_signal_connect (btt_select_date, "toggled",
|
||||||
|
G_CALLBACK (on_measure_single_event_occurences_dates), NULL);
|
||||||
|
|
||||||
|
gtk_box_append (select_nb_or_date_box, GTK_WIDGET (scale));
|
||||||
|
gtk_box_append (select_nb_or_date_box, GTK_WIDGET (btt_select_nb));
|
||||||
|
gtk_box_append (select_nb_or_date_box, GTK_WIDGET (btt_select_date));
|
||||||
|
gtk_box_append (measure_page, GTK_WIDGET (select_nb_or_date_box));
|
||||||
|
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");
|
printf("measure depends on two events\n");
|
||||||
prefer_add_measure ("new measure from two events");
|
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));
|
||||||
|
scale = gtk_picture_new_for_filename
|
||||||
|
("/home/jean/Gem-Graph/gem-graph-client/data/stamp/measure tool scale icon.png");
|
||||||
return measure_page;
|
return measure_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *widget_measure_do_depends_on_one_or_two_events()
|
void *widget_measure_do_depends_on_one_or_two_events()
|
||||||
{
|
{
|
||||||
|
gtk_box_append (select_rules_first_box,
|
||||||
|
gtk_toggle_button_new_with_label ("< done > a set of rules was selected"));
|
||||||
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");
|
||||||
|
@ -94,7 +130,6 @@ void *widget_measure_do_depends_on_one_or_two_events()
|
||||||
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (balance));
|
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (balance));
|
||||||
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_first_of_two));
|
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_first_of_two));
|
||||||
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_second_of_two));
|
gtk_box_append (select_one_or_two_rules_events_box, GTK_WIDGET (btt_select_second_of_two));
|
||||||
measure_page = widget_get_measure_page();
|
|
||||||
gtk_box_append (measure_page, GTK_WIDGET (select_one_or_two_rules_events_box));
|
gtk_box_append (measure_page, GTK_WIDGET (select_one_or_two_rules_events_box));
|
||||||
|
|
||||||
return measure_page;
|
return measure_page;
|
||||||
|
@ -111,7 +146,6 @@ void *widget_measure_do_select_rules_first ()
|
||||||
|
|
||||||
gtk_box_append (select_rules_first_box, GTK_WIDGET (pressure));
|
gtk_box_append (select_rules_first_box, GTK_WIDGET (pressure));
|
||||||
gtk_box_append (select_rules_first_box, GTK_WIDGET (btt_select_rules_first));
|
gtk_box_append (select_rules_first_box, GTK_WIDGET (btt_select_rules_first));
|
||||||
measure_page = widget_get_measure_page();
|
|
||||||
gtk_box_append (measure_page, GTK_WIDGET (select_rules_first_box));
|
gtk_box_append (measure_page, GTK_WIDGET (select_rules_first_box));
|
||||||
|
|
||||||
return measure_page;
|
return measure_page;
|
||||||
|
|
|
@ -36,8 +36,7 @@
|
||||||
void *widget_get_rule_analyse()
|
void *widget_get_rule_analyse()
|
||||||
{
|
{
|
||||||
return gtk_label_new (" ______________________\n RULE INVESTIGATION\n\
|
return gtk_label_new (" ______________________\n RULE INVESTIGATION\n\
|
||||||
tools\n '''''''''''''''''''''''''''''''''''''''\n\
|
tools\n '''''''''''''''''''''''''''''''''''''''");
|
||||||
(camera, transparencies)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue