Commit c135e3ad authored by Xavier de Blas's avatar Xavier de Blas

new test Gesell-DBT test new db: 0.69

new runType allows to put decimals at distance (fixes bug)
parent e7a3982c
......@@ -70,6 +70,7 @@ RESOURCES_IMAGES = -resource:images/mini/no_image.png,mini/no_image.png \
-resource:images/run_simple.png,run_simple.png -resource:images/mini/run_simple.png,mini/run_simple.png \
-resource:images/run_interval.png,run_interval.png -resource:images/mini/run_interval.png,mini/run_interval.png \
-resource:images/margaria.png,margaria.png -resource:images/mini/margaria.png,mini/margaria.png \
-resource:images/gesell_dbt.png,gesell_dbt.png -resource:images/mini/gesell_dbt.png,mini/gesell_dbt.png \
-resource:images/pulse_free.png,pulse_free.png -resource:images/mini/pulse_free.png,mini/pulse_free.png \
-resource:images/pulse_custom.png,pulse_custom.png -resource:images/mini/pulse_custom.png,mini/pulse_custom.png \
-resource:images/mtgug.png,mtgug.png -resource:images/mini/mtgug.png,mini/mtgug.png \
......
CHANGELOG.txt
30 apr 2009
new test Gesell-DBT test new db: 0.69
new runType allows to put decimals at distance (fixes bug)
28 apr 2009
0.8.3.2
multiChronopic:
......
This diff is collapsed.
......@@ -299,7 +299,8 @@ Log.WriteLine("MANAGE(3)!!!!");
double weight = SqlitePersonSession.SelectPersonWeight(personID, sessionID);
double distanceMeters = distance / 1000;
description = "P = " + Util.TrimDecimals ( (weight * 9.8 * distanceMeters / time).ToString(), pDN) + " (Watts)";
}
} else if(type == "Gesell-DBT")
description = "0";
uniqueID = SqliteRun.Insert(false, Constants.RunTable, "NULL", personID, sessionID,
type, distance, time, description,
......
......@@ -119,6 +119,7 @@ public class ChronoJumpWindow
[Widget] Gtk.Button button_run_100m;
[Widget] Gtk.Button button_run_200m;
[Widget] Gtk.Button button_run_400m;
[Widget] Gtk.Button button_run_gesell;
[Widget] Gtk.Button button_run_20yard;
[Widget] Gtk.Button button_run_505;
[Widget] Gtk.Button button_run_illinois;
......@@ -191,6 +192,7 @@ public class ChronoJumpWindow
[Widget] Gtk.MenuItem menuitem_100m;
[Widget] Gtk.MenuItem menuitem_200m;
[Widget] Gtk.MenuItem menuitem_400m;
[Widget] Gtk.MenuItem menuitem_run_gesell;
[Widget] Gtk.MenuItem menuitem_run_20yard;
[Widget] Gtk.MenuItem menuitem_run_505;
[Widget] Gtk.MenuItem menuitem_run_illinois;
......@@ -2852,6 +2854,8 @@ Console.WriteLine("X");
currentEventType = new RunType("200m");
} else if(o == (object) button_run_400m) {
currentEventType = new RunType("400m");
} else if(o == (object) button_run_gesell) {
currentEventType = new RunType("Gesell-DBT");
} else if(o == (object) button_run_20yard) {
currentEventType = new RunType("Agility-20Yard");
} else if(o == (object) button_run_505) {
......@@ -3451,6 +3455,8 @@ Console.WriteLine("X");
currentRunType = new RunType("200m");
} else if (o == (object) button_run_400m || o == (object) menuitem_400m) {
currentRunType = new RunType("400m");
} else if (o == (object) button_run_gesell || o == (object) menuitem_run_gesell) {
currentRunType = new RunType("Gesell-DBT");
} else if (o == (object) button_run_20yard || o == (object) menuitem_run_20yard) {
currentRunType = new RunType("Agility-20Yard");
} else if (o == (object) button_run_505 || o == (object) menuitem_run_505) {
......
......@@ -66,6 +66,9 @@ public class EditEventWindow
[Widget] protected Gtk.Box hbox_combo_person;
[Widget] protected Gtk.ComboBox combo_persons;
[Widget] protected Gtk.Label label_mistakes;
[Widget] protected Gtk.SpinButton spin_mistakes;
[Widget] protected Gtk.Entry entry_description;
//[Widget] protected Gtk.TextView textview_description;
......@@ -93,6 +96,7 @@ public class EditEventWindow
protected bool showWeight;
protected bool showLimited;
protected bool showAngle;
protected bool showMistakes;
protected string eventBigTypeString = "a test";
protected bool headerShowDecimal = true;
......@@ -139,6 +143,7 @@ public class EditEventWindow
showWeight = true;
showLimited = true;
showAngle = true;
showMistakes = false;
label_simulated.Hide();
}
......@@ -216,6 +221,12 @@ public class EditEventWindow
label_angle_title.Hide();
entry_angle_value.Hide();
}
if(! showMistakes) {
label_mistakes.Hide();
spin_mistakes.Hide();
}
//also remove new line for old descriptions that used a textview
string temp = Util.RemoveTildeAndColonAndDot(myEvent.Description);
......@@ -415,6 +426,10 @@ public class EditEventWindow
} else
button_accept.Sensitive = false;
}
protected virtual void on_spin_mistakes_changed (object o, EventArgs args) {
}
private void on_entry_description_changed (object o, EventArgs args) {
entry_description.Text = Util.RemoveTildeAndColonAndDot(entry_description.Text.ToString());
......
......@@ -90,6 +90,7 @@ public class EditJumpWindow : EditEventWindow
showWeight = true;
showLimited = false;
showAngle = true;
showMistakes = false;
if(weightPercentPreferred)
label_weight_title.Text = label_weight_title.Text.ToString() + " %";
......@@ -312,6 +313,7 @@ public class EditJumpRjWindow : EditJumpWindow
showSpeed = false;
showWeight = true;
showLimited = true;
showMistakes = false;
if(weightPercentPreferred)
label_weight_title.Text = label_weight_title.Text.ToString() + " %";
......
......@@ -78,6 +78,7 @@ public class EditMultiChronopicWindow : EditEventWindow
showSpeed = false;
showWeight = false;
showLimited = false;
showMistakes = false;
}
protected override void updateEvent(int eventID, int personID, string description) {
......
......@@ -77,6 +77,7 @@ public class EditPulseWindow : EditEventWindow
showSpeed = false;
showWeight = false;
showLimited = false;
showMistakes = false;
}
protected override string [] findTypes(Event myEvent) {
......
......@@ -79,6 +79,7 @@ public class EditReactionTimeWindow : EditEventWindow
showSpeed = false;
showWeight = false;
showLimited = false;
showMistakes = false;
}
protected override string [] findTypes(Event myEvent) {
......
......@@ -34,6 +34,7 @@ using Mono.Unix;
public class EditRunWindow : EditEventWindow
{
static EditRunWindow EditRunWindowBox;
private int mistakes;
//for inheritance
protected EditRunWindow () {
......@@ -61,10 +62,17 @@ public class EditRunWindow : EditEventWindow
EditRunWindowBox.initializeValues();
EditRunWindowBox.fillDialog (myEvent);
if(myEvent.Type == "Margaria")
EditRunWindowBox.entry_description.Sensitive = false;
EditRunWindowBox.fillDialog (myEvent);
if(myEvent.Type == "Gesell-DBT") {
EditRunWindowBox.showMistakes = true;
EditRunWindowBox.combo_eventType.Sensitive=false;
EditRunWindowBox.entry_description.Sensitive = false;
EditRunWindowBox.mistakes = Convert.ToInt32(myEvent.Description);
EditRunWindowBox.spin_mistakes.Value = Convert.ToInt32(myEvent.Description);
}
EditRunWindowBox.edit_event.Show ();
......@@ -81,6 +89,7 @@ public class EditRunWindow : EditEventWindow
showSpeed = true;
showWeight = false;
showLimited = false;
showMistakes = false;
}
protected override string [] findTypes(Event myEvent) {
......@@ -137,6 +146,21 @@ public class EditRunWindow : EditEventWindow
label_speed_value.Text = Util.TrimDecimals(
Util.GetSpeed (entryDistance, entryTime, metersSecondsPreferred) , pDN);
}
protected override void on_spin_mistakes_changed (object o, EventArgs args) {
if(Util.IsNumber(spin_mistakes.Value.ToString(), true) && entry_time_value.Text.ToString().Length > 0) {
Console.WriteLine("A");
Console.WriteLine(entry_time_value.Text.ToString());
double timeWithoutMistakes = Convert.ToDouble(entry_time_value.Text.ToString()) - 2 * mistakes;
entry_time_value.Text = (timeWithoutMistakes + 2 * spin_mistakes.Value).ToString();
entryTime = entry_time_value.Text.ToString();
mistakes = Convert.ToInt32(spin_mistakes.Value);
entry_description.Text = mistakes.ToString();
}
}
protected override void updateEvent(int eventID, int personID, string description) {
SqliteRun.Update(eventID, UtilGtk.ComboGetActive(combo_eventType), entryDistance, entryTime, personID, description);
......@@ -254,6 +278,7 @@ public class EditRunIntervalWindow : EditRunWindow
showSpeed = true;
showWeight = false;
showLimited = true;
showMistakes = false;
}
//this disallows loops on radio actions
......
......@@ -47,6 +47,7 @@ public class RunTypeAddWindow
[Widget] Gtk.SpinButton spin_fixed_tracks_or_time;
[Widget] Gtk.Label label_distance;
[Widget] Gtk.Label label_decimal;
[Widget] Gtk.RadioButton radiobutton_dist_variable;
[Widget] Gtk.RadioButton radiobutton_dist_fixed;
[Widget] Gtk.RadioButton radiobutton_dist_different;
......@@ -108,6 +109,8 @@ public class RunTypeAddWindow
button_accept.Sensitive = false;
spin_fixed_tracks_or_time.Sensitive = false;
label_distance.Text = Catalog.GetString("Distance");
System.Globalization.NumberFormatInfo localeInfo = new System.Globalization.NumberFormatInfo();
label_decimal.Text = string.Format(Catalog.GetString("\n(decimal separator: '{0}')"), localeInfo.NumberDecimalSeparator);
radiobutton_dist_different.Sensitive = false;
hbox_distance_fixed.Hide();
......
......@@ -127,6 +127,49 @@ public class RunType : EventType
isPredefined = true;
description = Catalog.GetString("Run 2000 meters");
imageFileName = "run_simple.png";
} //balance
else if(name == "Gesell-DBT") {
hasIntervals = false;
distance = 2.5;
tracksLimited = false;
fixedValue = 0;
isPredefined = true;
imageFileName = "gesell_dbt.png";
description = "Gesell Dynamic Balance Test";
longDescription =
"<b>" + Catalog.GetString("Short description") + "</b>: \n" +
Catalog.GetString("Subjects had to walk over the bar as fast as possible.") + "\n" +
Catalog.GetString("From one platform to another without falling down.") + "\n" +
Catalog.GetString("If they touched the ground they had to continue.") + "\n" +
Catalog.GetString("The hands were on their waist.") + "\n" +
Catalog.GetString("Without shoes.") + "\n" +
Catalog.GetString("Every ground contact is penalized with 2 seconds.") + "\n" +
Catalog.GetString("The best of 2 attempts were recorded.") + "\n\n" +
"<b>" + Catalog.GetString("Gesell's Bar") + "</b>: " +
Catalog.GetString("Length: 2.5 m.") + "\n" +
Catalog.GetString("Wide: 4 cm.") + "\n\n" +
"<b>" + Catalog.GetString("Protocol") + "</b>: " +
Catalog.GetString("CONDITIONS: ") + "\n" +
"- " + Catalog.GetString("Without shoes.") + "\n" +
"- " + Catalog.GetString("Hands on their waist.") + "\n" +
"- " + Catalog.GetString("In front of a wall in order to avoid distractions.") + "\n\n" +
Catalog.GetString("INSTRUCTIONS AND DEMONSTRATION: ") + "\n" +
"- " + Catalog.GetString("You have to walk on this bar as fast as possible \'like this\', if you touch the ground just continue.") + "\n" +
Catalog.GetString("\'Like this\' means normal, with a foot in front of the other, not side by side.") + "\n\n" +
Catalog.GetString("SCORE: ") + "\n" +
"- " + Catalog.GetString("Time will start since first platform is touched, and will stop when second platform is reached.") + "\n" +
"- " + Catalog.GetString("Every ground contact is penalized with 2 seconds.") + "\n" +
"- " + Catalog.GetString("The best of 2 attempts will be recorded.") + "\n\n" +
"<b>" + Catalog.GetString("Reference:") + "</b>\n" +
"Cabedo, J. (2005) L'evolució de l'equilibri durant el cicle vital. En Liceu Psicològic. Accessible a http://www.liceupsicologic.org/tesis/Tesi. Pep Cabedo.pdf (Consulted Apr 30 2009).";
/*
"<b>" + Catalog.GetString("Abstract:") + "</b>\n" +
"http://www.revista-apunts.com/apunts.php?id_pagina=7&id_post=837&lang=en";
*/
} //agility
else if(name == "Agility-20Yard") {
hasIntervals = false;
......
......@@ -72,7 +72,7 @@ class Sqlite
* Important, change this if there's any update to database
* Important2: if database version get numbers higher than 1, check if the comparisons with currentVersion works ok
*/
static string lastChronojumpDatabaseVersion = "0.68";
static string lastChronojumpDatabaseVersion = "0.69";
public Sqlite() {
}
......@@ -873,6 +873,22 @@ class Sqlite
dbcon.Close();
currentVersion = "0.68";
}
if(currentVersion == "0.68") {
dbcon.Open();
RunType type = new RunType();
type.Name = "Gesell-DBT";
type.Distance = 2.5;
type.Description = "Gesell Dynamic Balance Test";
SqliteRunType.Insert(type, Constants.RunTypeTable, true);
SqliteEvent.GraphLinkInsert (Constants.RunTable, "Gesell-DBT", "gesell_dbt.png", true);
SqlitePreferences.Update ("databaseVersion", "0.69", true);
Log.WriteLine("Converted DB to 0.69 (added Gesell-DBT test)");
dbcon.Close();
currentVersion = "0.69";
}
}
......@@ -997,6 +1013,7 @@ class Sqlite
SqliteCountry.initialize();
//changes [from - to - desc]
//0.68 - 0.69 added Gesell-DBT test
//0.67 - 0.68 added multiChronopic tests table
//0.66 - 0.67 added TakeOff jumps
//0.65 - 0.66 added run analysis (JumpRj test (masked as run interval))
......
......@@ -66,6 +66,7 @@ class SqliteRunType : Sqlite
"1000m:1000:run 1000 meters",
"2000m:2000:run 2000 meters",
"Margaria:0:Margaria-Kalamen test",
"Gesell-DBT:2.5:Gesell Dynamic Balance Test",
//also simple agility tests
"Agility-20Yard:18.28:20Yard Agility test",
......@@ -109,7 +110,7 @@ class SqliteRunType : Sqlite
myStr[0] + "', " + myStr[1] + ", '" + //name, distance
myStr[2] + "')" ; //description
*/
t.Name + "', " + t.Distance + ", '" + t.Description + "')" ;
t.Name + "', " + Util.ConvertToPoint(t.Distance) + ", '" + t.Description + "')" ;
Log.WriteLine(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
int myLast = dbcon.LastInsertRowId;
......@@ -245,6 +246,7 @@ class SqliteRunType : Sqlite
SqliteEvent.GraphLinkInsert (Constants.RunTable, "Agility-Shuttle-Run", "agility_shuttle.png", true);
SqliteEvent.GraphLinkInsert (Constants.RunTable, "Agility-ZigZag", "agility_zigzag.png", true);
SqliteEvent.GraphLinkInsert (Constants.RunTable, "Margaria", "margaria.png", true);
SqliteEvent.GraphLinkInsert (Constants.RunTable, "Gesell-DBT", "gesell_dbt.png", true);
}
......@@ -442,6 +444,7 @@ class SqliteRunIntervalType : SqliteRunType
SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "20m10times", "run_interval.png", true);
SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "7m30seconds", "run_interval.png", true);
SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "20m endurance", "run_interval.png", true);
SqliteEvent.GraphLinkInsert (Constants.RunIntervalTable, "MTGUG", "mtgug.png", true);
}
......
......@@ -34,14 +34,6 @@ public class TreeViewMultiChronopic : TreeViewEvent
{
}
/*
//session is not created or loaded yet, graph multiChronopic treeview with columns for two chronopics
public TreeViewMultiChronopic (Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState)
{
TreeViewMultiChronopic (treeview, newPrefsDigitsNumber, expandState, 2);
}
*/
//session is created or loaded, we know maxCPs will be written
public TreeViewMultiChronopic (Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState, int maxCPs)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment