This class will be used to push queue changes directly to the GUI.
Currently changes get mapped through the old callbacks system, which can
lead to several inefficiencies because the GUI has to look up each queue
structure in a list.
This patch implements a basic QNotifier class and provides a function
for setting a Queue's notifier.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This function converts unsigned ints into strings. This allows me to
replace several almost identical functions with one function call.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I move the code into a new cpp file, so it is no longer a header-only
library. I also take the chance to add a for-each function for testing
iterators.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I provide an accessor function to keep this value from ever getting
changed outside of the Track class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This variable should only be set by the Database when a DatabaseItem is
first created. This means I should hide _index from the rest of the
world to prevent accidental modifications. I also add an accessor
function for other code that needs to read _index.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I move all of the core tests into the core/ directory to keep them
together. Gui unit tests will be put in new directories.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>