Changeset 175
- Timestamp:
- 02/02/08 00:41:52 (1 year ago)
- Files:
-
- pytrainer/trunk/glade/pytrainer.glade (modified) (1 diff)
- pytrainer/trunk/pytrainer/gui/windowrecord.py (modified) (3 diffs)
- pytrainer/trunk/pytrainer/lib/ddbb.py (modified) (1 diff)
- pytrainer/trunk/pytrainer/lib/mysqlUtils.py (modified) (1 diff)
- pytrainer/trunk/pytrainer/lib/sqliteUtils.py (modified) (1 diff)
- pytrainer/trunk/pytrainer/main.py (modified) (1 diff)
- pytrainer/trunk/pytrainer/record.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
pytrainer/trunk/glade/pytrainer.glade
r173 r175 6648 6648 6649 6649 <child> 6650 <widget class="GtkEntry" id=" entry335">6650 <widget class="GtkEntry" id="rcd_maxpace"> 6651 6651 <property name="visible">True</property> 6652 6652 <property name="can_focus">True</property> pytrainer/trunk/pytrainer/gui/windowrecord.py
r174 r175 42 42 "rcd_gpxfile", 43 43 "rcd_upositive", 44 "rcd_unegative" 44 "rcd_unegative", 45 "rcd_maxbeats", 46 "rcd_pace", 47 "rcd_maxpace", 48 "rcd_maxvel" 45 49 ] 46 50 count = 0 … … 125 129 126 130 def setValues(self,values): 127 #(50, u'2006-10-13', 1, 25.0, u'5625', 0.0, 16.0, 0, u'', gpsfile, title,upositive,unegative )131 #(50, u'2006-10-13', 1, 25.0, u'5625', 0.0, 16.0, 0, u'', gpsfile, title,upositive,unegative,maxspeed|maxpace|pace|maxbeats 128 132 self.id_record = values[0] 129 133 self.setTime(values[4]) … … 135 139 self.setValue("rcd_upositive",values[11]) 136 140 self.setValue("rcd_unegative",values[12]) 141 self.setValue("rcd_maxspeed",values[13]) 142 self.setValue("rcd_maxpace",values[14]) 143 self.setValue("rcd_pace",values[15]) 144 self.setValue("rcd_maxbeats",values[16]) 137 145 self.rcd_title.set_text("%s"%values[10]) 138 146 self.rcd_sport.set_active(int(values[2])-1) pytrainer/trunk/pytrainer/lib/ddbb.py
r155 r175 126 126 sql = "alter table sports add met float" 127 127 self.ddbbObject.freeExec(sql) 128 128 129 def checkmettable(self): 130 try: 131 sql = "alter table sports add met float" 132 self.ddbbObject.freeExec(sql) 133 except: 134 pass 135 def addpaceandmax2ddbb(self): 136 sql = "alter table records add maxspeed float" 137 self.ddbbObject.freeExec(sql) 138 sql = "alter table records add maxpace float" 139 self.ddbbObject.freeExec(sql) 140 sql = "alter table records add pace float" 141 self.ddbbObject.freeExec(sql) 142 sql = "alter table records add maxbeats float" 143 self.ddbbObject.freeExec(sql) 144 pytrainer/trunk/pytrainer/lib/mysqlUtils.py
r155 r175 81 81 `upositive` FLOAT NOT NULL , 82 82 `unegative` FLOAT NOT NULL , 83 `maxspeed` FLOAT, NOT NULL, 84 maxpace FLOAT NOT NULL, 85 pace FLOAT NOT NULL, 86 maxbeats FLOAT NOT NULL, 83 87 INDEX ( `id_record` ) 84 88 ) ENGINE = MYISAM ;""") pytrainer/trunk/pytrainer/lib/sqliteUtils.py
r155 r175 72 72 title varchar(200), 73 73 upositive float, 74 unegative float 74 unegative float, 75 maxspeed float, 76 maxpace float, 77 pace float, 78 maxbeats float 75 79 ) ;""" 76 80 cur.execute(sql) pytrainer/trunk/pytrainer/main.py
r161 r175 52 52 self.data_path = data_path 53 53 #configuration 54 self.version ="1.5.0. 1"54 self.version ="1.5.0.3" 55 55 self.conf = checkConf() 56 56 #preparamos la ventana principal pytrainer/trunk/pytrainer/record.py
r174 r175 56 56 if self.configuration.getOption("version")<="1.5.0": 57 57 self.ddbb.addweightandmet2ddbb() 58 if self.configuration.getOption("version")<="1.5.0.1": 59 self.ddbb.checkmettable() 60 if self.configuration.getOption("version")<="1.5.0.2": 61 self.ddbb.addpaceandmax2ddbb() 58 62 if self.configuration.getOption("version")<version: 59 63 self.configuration.setVersion(version) … … 81 85 time = self.date.time2second(list_options["rcd_time"]) 82 86 average = self.parseFloatRecord(list_options["rcd_average"]) 83 cells= "date,sport,distance,time,beats,comments,average,calories,title,upositive,unegative "87 cells= "date,sport,distance,time,beats,comments,average,calories,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats" 84 88 if (list_options["rcd_beats"] == ""): 85 89 list_options["rcd_beats"] = 0 … … 99 103 list_options["rcd_title"], 100 104 self.parseFloatRecord(list_options["rcd_upositive"]), 101 self.parseFloatRecord(list_options["rcd_unegative"]) 105 self.parseFloatRecord(list_options["rcd_unegative"]), 106 self.parseFloatRecord(list_options["rcd_maxvel"]), 107 self.parseFloatRecord(list_options["rcd_maxpace"]), 108 self.parseFloatRecord(list_options["rcd_pace"]), 109 self.parseFloatRecord(list_options["rcd_maxbeats"]) 102 110 103 111 ) … … 220 228 self.recordwindow.on_calcpace_clicked(None) 221 229 self.recordwindow.on_calccalories_clicked(None) 230 self.recordwindow.rcd_maxpace.set_text("%0.2f" %(60/maxspeed)) 222 231 223 232 def __actualize_fromgpx(self, gpxfile, name=None):
