displayed results list should be defined and maintained in prefer.c

This commit is contained in:
Jean Sirmai 2024-08-18 22:16:46 +02:00
parent 154e2ad57b
commit 06b57458c6
Signed by: jean
GPG Key ID: FB3115C340E057E3
4 changed files with 46 additions and 16 deletions

View File

@ -37,4 +37,4 @@ const char get_button_icon_name (int n);
void fsm_reset_all_situations_transparencies_at_value (int value); // provisoire... void fsm_reset_all_situations_transparencies_at_value (int value); // provisoire...
void *prefer_add_measure (char *measure_name); void *fsm_add_measure (char *measure_name);

View File

@ -35,12 +35,12 @@
/******************************************************************************/ /******************************************************************************/
/* Each state of the finite state machine (fsm) must be */ /* Each state of the finite state machine (fsm) must be */
/* - saved at the end of a work session and */ /* - saved at the end of a work session and */
/* - reread at the start of a new session. */ /* - reread at the start of a new session. */
/* */ /* */
/* No state of the fsm should be stored elsewhere. */ /* No state of the fsm should be defined in another module. */
/* No fsm transition needs to be executed elsewhere. */ /* No fsm transition needs to be executed in another module. */
/******************************************************************************/ /******************************************************************************/
@ -93,11 +93,11 @@ void fsm_set_state_rules_data (int choice)
/******************************************************************************/ /******************************************************************************/
/* M E A S U R E M E N T S */ /* M E A S U R E M E N T S */
/******************************************************************************/ /******************************************************************************/
// An editable list of measurements is maintained. (add, remove) // An editable list of measurements is defined and maintained here.
// Each measurement can be activated or silenced. // Each measurement can be activated or silenced.
// The measures relate to // The measures relate to
// - the number of occurrences of the rule, // - the number of occurrences of a rule or group of rules,
// - the number of objects or situations before/after the rule was applied, // - the number of objects or situations before/after the rule was applied,
// - the time (date) of the event, // - the time (date) of the event,
// - the time elapsed between two events, // - the time elapsed between two events,
@ -107,6 +107,18 @@ void fsm_set_state_rules_data (int choice)
// if the results of a measurement are correlated with some other results. // if the results of a measurement are correlated with some other results.
// structure de données : tableau ?
// - identifiant (clé)
// - pointeur vers une liste de mesures similaires
// - active ? + / -
// - type de mesure (les 6 items suivants "couvrent" tous les types possibles)
// - pointeur vers le premier groupe de règles (une au moins)
// - pointeur vers le second groupe de règles (une au moins)
// - pointeur vers les objets ou situations (un au moins)
// - date
// - durée
// - pointeur vers un ensemble d'évènements intercurrents
@ -118,6 +130,19 @@ void fsm_set_state_rules_data (int choice)
// A preferred presentation should be available for each result. // A preferred presentation should be available for each result.
// NB : "graph", "chart", "plot" and "diagram" are ambiguous terms. // NB : "graph", "chart", "plot" and "diagram" are ambiguous terms.
// The list of results currently displayed is defined in : prefer.c
// structure de données : tableau ?
// - identifiant (clé))
// - type de données 1
// - type de données 2
// - ... ?
// - pointeur vers le premier groupe de données
// - pointeur vers le second groupe de données
// - ... ?
// - pointeur vers une liste de données similaires
// - concat ?

View File

@ -58,6 +58,11 @@ static const char *icon_name [3] = {
// transtypage vers un pointeur depuis un entier de taille différente vvv TODO // transtypage vers un pointeur depuis un entier de taille différente vvv TODO
const char *get_button_icon_name (int n) {return (const char*) icon_name [n];} const char *get_button_icon_name (int n) {return (const char*) icon_name [n];}
/******************************************************************************/
/* S T A T E A P P E A R A N C E */
/******************************************************************************/
// ------------------------- O B J E C T S ------------------------------// // ------------------------- O B J E C T S ------------------------------//
struct preferences { int transparency [n_objects]; }; // may become a long, long list... struct preferences { int transparency [n_objects]; }; // may become a long, long list...
@ -109,13 +114,13 @@ void fsm_reset_all_situations_transparencies_at_value (int value)
/******************************************************************************/ /******************************************************************************/
/* M E A S U R E S */ /* D I S P L A Y E D R E S U L T S */
/******************************************************************************/ /******************************************************************************/
static void *list_measures; static void *list_measures;
void *prefer_add_measure (char *measure_name) void *fsm_add_measure (char *measure_name)
{ {
printf("prefer_add_measure %p <<< %s (see prefer.c)\n", list_measures, measure_name); printf("fsm_add_measure %p <<< %s (see prefer.c)\n", list_measures, measure_name);
return NULL; return NULL;
} }

View File

@ -53,31 +53,31 @@ static GtkBox *measure_page;
void *widget_measure_event_occurences_nb() void *widget_measure_event_occurences_nb()
{ {
prefer_add_measure ("new measure count one event occurences"); fsm_add_measure ("new measure count one event occurences");
return measure_page; return measure_page;
} }
void *widget_measure_event_occurences_dates() void *widget_measure_event_occurences_dates()
{ {
prefer_add_measure ("new measure one event occurences dates"); fsm_add_measure ("new measure one event occurences dates");
return measure_page; return measure_page;
} }
void *widget_measure_event_occurences_situations() void *widget_measure_event_occurences_situations()
{ {
prefer_add_measure ("new measure one event occurences situations"); fsm_add_measure ("new measure one event occurences situations");
return measure_page; return measure_page;
} }
void *widget_measure_time_elapsed_between_two_events() void *widget_measure_time_elapsed_between_two_events()
{ {
prefer_add_measure ("new measure time elapsed between two events"); fsm_add_measure ("new measure time elapsed between two events");
return measure_page; return measure_page;
} }
void *widget_measure_third_event_occurences_in_between() void *widget_measure_third_event_occurences_in_between()
{ {
prefer_add_measure ("new measure of the frequency of a third event\ fsm_add_measure ("new measure of the frequency of a third event\
occurring between two other events"); occurring between two other events");
return measure_page; return measure_page;
} }