StatGrapher Specs
program functions (high-level overview):
- configure categories
- category name
- measurement name (degrees, pounds, score)
- low value
- high value
- enter data
- select category
- enter value
- accept current date/time or specify alternate
- enter notes
- register
- review data
- scrolling list ordered by date/time
- allow edit/delete of an entry
- as a line chart on a graph by day/week/other amount specified
- export data as CSV file to filesystem
- activate help
- read about box/version
- exit program
program functions (detailed):
- draw user interface
- titlebar (program name, version, help icon)
- menu bar
- main window
- window contents/widgets
- display help file
- launch help browser
- pass help filename
- read in existing settings file/db
- if no settings file, assume first run:
- prompt for or populate defaults (if needed)
- prompt to display help (if needed)
- display category configuration screen
- save first complete settings
- if settings found, populate globals:
- check settings version, update if necessary
- compare settings checksum, warn if necessary
- create new category needs:
- category name (req'd, 50 chars)
- value label (req'd, 50 chars)
- high (opt, real number -32767.00 to 32767.00)
- low (opt, real number -32767.00 to 32767.00)
- default timeframe (hour, day, week, month, year)
- log a new entry needs:
- date (allow entry, default = now)
- time (allow entry, default = now)
- value (allow entry, display last [5|10] in drop-down)
- exception (checkbox, default = off)
- notes (allow entry, 255 chars)
- show entries needs:
- start date (allow entry, default = timeframe ago)
- start time (allow entry, default = now)
- end date (allow entry, default = now)
- end time (allow entry, default = now)
- display (*all, normal only, exceptions only)
- graph range of values needs:
- start date (allow entry, default = timeframe ago)
- start time (allow entry, default = now)
- end date (allow entry, default = now)
- end time (allow entry, default = now)
- minimum value (opt, real number -32767.00 to 32767.00)
- maximum value (opt, real number -32767.00 to 32767.00)
- group (*none, normal together, exceptions together)
- graph on top of (overlay) an existing graph
- [v2] consolidate/average by day/week/month
- view graph results needs:
- graph name (if saving for re-use)
- graph notes (to accompany name, 255 chars)
- graph scale (-4 to 4)
- export data needs:
- category to export
- export format (*csv, tab-delimited, xml)
- file name and extension, file path
- delete category needs:
- category name
- confirmation dialog
- delete single entry needs:
- entry id
- confirmation dialog
- delete entry range needs:
- start date (allow entry, default = timeframe ago)
- start time (allow entry, default = now)
- end date (allow entry, default = now)
- end time (allow entry, default = now)
- minimum value (opt, real number -32767.00 to 32767.00)
- maximum value (opt, real number -32767.00 to 32767.00)
- delete (*all, normal only, exceptions only)
- confirmation dialog
- display about box needs:
- authors
- version
- GPL info
- web page link
- quit needs:
- nothing
programming operations:
- draw main window
- draw menus
- draw tabs
- link help icon to help browser/file
- accept text strings in fields
- accept numeric values in fields w/spinbox
- structure sqlite database
- perform insert queries on data
- perform select queries on data
- perform update queries on data
- peform delete queries on data
- display columns [entry date/time, value] in selectable scrolling list
- plot selected points to a graph
- draw lines between points
- draw lines representing high/low to graph
- scroll/pan across graph wider than the screen
- alter graph zoom
- display confirmation dialog (message plus OK/cancel)
- display date selector (day/mon/yr drop downs or calendar?)
- display time selector (hour/min drop downs)
- display drop-down list populated with previous values
- write to filesystem for data export
- exit
table definitions:
- settings:
- version
- data checksum (to determine if externally altered)
- categories:
- id (int, 10)
- name (char, 50)
- label (char, 50)
- high (real, 8)
- low (real, 8)
- timeframe (integer, 8)
- entries:
- id (int, 10)
- categoryid (int, 10)
- date (integer, 12; seconds since epoch)
- value (real, 8)
- exception (boolean, default 0)
- notes (char, 255)
- graphs:
- id (int, 10)
- name (char, 50)
- category (int, 10, categories.id)
- startdate (integer, 12)
- enddate (integer, 12)
- lastzoom (int, 4)
- show (all, normal only, exceptions only)
- notes (char, 255)
- lastdata:
- id (int, 10)
- category (int, 10, categories.id)
- value (real,8)
|