10 #ifndef YATISHDBSQLITE_H
11 #define YATISHDBSQLITE_H
68 bool ReadDates (
long, wxDateTime&, wxDateTime&);
72 bool RecordTimeslot (
long,
const wxDateTime&,
const wxDateTime&,
int,
int,
int);
Provides a few basic methods and (static) members to interact with yatish tables.
Interacts with yatish tables in a SQLite database.
bool ReadDates(long, wxDateTime &, wxDateTime &)
Reads the start and stop fields of a yatish_timeslot record.
bool FillChoice(wxChoice *, tableID)
Fills a wxChoice.
void SetLimit(bool b, int i)
bool RecordActivity(long, int, int, int)
Modifies or creates a record in the yatish_activity table.
void SetFirstDay(const wxDateTime &)
Sets private member firstDay (for future SQL queries).
wxString GetFilter() const
bool RecordTimeslot(long, const wxDateTime &, const wxDateTime &, int, int, int)
Modifies or creates a record in the yatish_timeslot table.
bool FillList(wxListCtrl *, tableID)
Fills a wxListCtrl.
long FilteredTotal(wxTimeSpan &) const
Returns the total duration of currently viewed timeslots (and their count).
bool FillPlotData(RawData &)
Fills a RawData (typedefined in yatishTypes.h).
bool RecordName(tableID, long, const wxString &)
Modifies or creates a record with only one field (called name).
wxString FilteredTotalFormatted()
Writes the total and average durations of currently viewed timeslots.
yatishDBsqlite()
Mainly connects to the yatish.sqlite database.
wxString ReadName(tableID, long)
Reads a wxString from the name column.
wxDateTime Last()
Obtains the maximum time in column start from currently selected rows of table yatish_timeslot.
int RunningTimeslots()
Determines the number n of unfinished timeslots.
wxDateTime First()
Obtains the minimum time in column start from currently selected rows of table yatish_timeslot.
void SetLastDay(const wxDateTime &)
Sets private member lastDay (for future SQL queries).
bool Delete(tableID, long)
Marks a local record for deletion.
wxDateTime GetFirstDay() const
void AddToFilter(tableID, int)
Adds a condition to the WHERE clause of FillList().
bool RecordProject(long, const wxString &, int)
Modifies or creates a record in the yatish_project table.
bool StartTimeslot(int, int, int)
Starts a new row in the timeslot table.
int ChoiceSelector(tableID, long)
Finds the proper index for selection in a wxChoice.
long Activity(long)
Reads the activity_id in a record of yatish_timeslot.
bool StopTimeslot()
Stops current timeslot.
wxDateTime GetLastDay() const
long LastActivity()
Reads the last activity_id in yatish_timeslot.
vector< RawRecord > RawData