The table name is used as the container type in the resulting metadata, so we need to use the container type string as table name correctly, or none of the profiles can be found.
Contributes to issue CURA-6096.
This mistake caused all of the container types to end up as either None or the actual instance itself, which was causing crashes.
Contributes to issue CURA-6096.
Needed to add a Filter possibility to facilitate that
Created a Simple UserString class which can be used as:
```py
sql_filter = SQLFilter(f"SELECT {{}} FROM table_name WHERE id = ?")
cursor.execute(sql_filter) # Will execute: SELECT * FROM table_name WHERE id = ?
cursor.execute(sql_filter["id", "name"]) # Will execute: SELECT id, name FROM table_name WHERE id = ?
```
Contributes to CURA-6096
This greatly reduced the amount of duplicate code in the DataBaseHandlers
Not sure how secure this is SQL injections. Need to check that and maybe
put in some guards. Using double underscores for now and only provide a
getter. But then again why bother with an SQL injection as
you can just as easily modify the Python code, and we still have the old
Containers to fallback to if the Database gets corrupted.
Contributes to CURA-6096
Instead of relying on the filename emitted when the workspace is changed. This is done so the user can also change the project name when saving to an output device, such as a local file, or the digital library, that supports changeing the (file)name.
CURA-8358
Polygons don't change when in layer-view. There's already an analogous elementCount property anyway, so a vertexCount property can't do much harm. Just keep in mind that when the polygons are altered, it should be either done via build, or the lineMeshXXXCount methods should be used instead.
See also the backend (Uranium) fix/PR (needed for this to work properly). If the context menu is opened over the slice button, then it _may_ on some cases (on Windows) fail on the creation of the snapshot. Within this fix, the snapshot is then still not created, but at least it doesn't crash any more. (Also the snapshot _will_ be there if a reslice is done.)
part of CURA-8412