I am currently developing an application for my Linux desktop that reads data from my Garmin Forerunner sports watch, parses a not-so-well-formed XML file, and writes data to a MySQL database table. I am not too experienced with Python or GTK, so the graphic material that I processed used the graphic designer Glade. Here is the problem. There is some data that does not come from a watch that I would like to add before writing to the database. I read and / or count the number of laps, lap distance, lap speed and lap duration. However, I would like to be able to view each circle on interace and classify the circle as Speedwork, Easy Run, etc. Using combobox. From what I read, a list is the way to go.
However, all the examples and documentation I have seen so far build Listview from code (as opposed to creating it through Glade). I would like to go through my lists (lap [type: int], duration [type: string], distance [type: float] and pace [type: string] --- note, I save time as strings for writing them to the fields time / date in my db), and fill in the fields in the list (which I assume is the right way for this - correct me if I'm wrong) along with the list for categorization. Then I take each line from the list and write it in db.
Does anyone know any examples that might help, or does anyone have any specific thoughts?
Update:
I basically want to know how, if I put a listview or treeview in the GUI via Glade, how I will pack it with the following columns: LapID (int), Distance (float), Duration (String) and combobox, where I could choose, what type of circle was. This is the first part of the battle.
Once I populate the list, how can I refer to each row to write it to the db table?
source
share