Commit Graph

5 Commits

Author SHA1 Message Date
Anna Schumaker 4235e794bd db: Convert the UserTable to a playlist.Model
Implements: Issue #11 (Cache database items fields)
Implements: Issue #14 (Convert Tables into Gio.ListModels)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-15 16:09:58 -04:00
Anna Schumaker 4141ca211c db: Convert the YearTable into a playlist.ChildModel
Implements: Issue #11 (Cache database items fields)
Implements: Issue #14 (Convert Tables into Gio.ListModels)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-14 13:22:57 -04:00
Anna Schumaker 658be5bef1 db: Create a new Child class
This inherites from the Table, but takes a parent instance for some
functions and calculates offsets for items that descend from this
parent.

Implements: Issue #1 (Have SQLite sort our sidebar tables)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-11 11:58:43 -04:00
Anna Schumaker feeee8809d db: Create a new Model class
This inherits from the Table, but also implements the Gio.ListModel
interface with sorting for use in the sidebar Gtk.ListView

Implements: Issue #1 (Have SQLite sort our sidebar tables)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-11 11:58:43 -04:00
Anna Schumaker 427b9fb925 db: Create a new Table class
This is a simlified Table that can be inherited from to implement a
Table-based Gio.ListModel. This gives us the chance to have some tables
that aren't ListModel's, since not everything will need that interface
and unnecessary position-finding slows everything down.

Implements: Issue #8 (Split up db/objects.py)
Implements: Issue #12 (Make database items unique)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-11 11:58:27 -04:00