A proxy to the treeview model that can handle both listore and treemodels and allows to switch easily from one to the other
A second purpouse is to allow reorderable treeviews (i.e.: those wehere you can set order by drag&drop) via self.order_store attribute/function. If position of rows need to be memorized in a visual way, a field must be set (order_store) that will be reset each time a new record is added or a row is dragged.
Clearly if that means something at all, entirely depends on the application. In these cases the order is set in the records currently handled by the model.
A modelproxy can be sorted via it’s order_by method. This sorting is done locally as opposed to the sorting done setting SqlWidget.order_by attribute on the table
a modelproxy emits signals:
model-pre-sort: | This signal is emitted just before sorting the model. Used to get rid of possible “total rows” in the liststore. |
---|---|
model-sorted: | When the model is sorted. Totals listen to this signal to be informed they must refresh data |
model-changed: | the model has changed the content |
Parameters: |
|
---|
Ceate another ModelProxy of class class_ with the same other values
Parameter: | class – class of the new ModelProxy, a descendent of ModelProxy. Used when you need to add a function to create a Header (see example 02a) |
---|
set order for the model if it’s a ListStore
Parameter: | order_list – fields to use to order, e.g.: +status -description to get an ascending ordering on status and descending on description implemented just for one attribute |
---|
Classes that implement creation of column and cell renderers This should allow to be as generic as possible while adding new renderers
Each Column widget need a ‘master’ argument that is the SqlWidget in editing_started_cb and edited_cb to set state variables on SqlWidget
A View is a set of columns of the SqlTable’s that offers a (possibly partial) view of the model. Each SqlTable has one mandatory view named main and possibly other views. Attribute sqlkit.widgets.SqlTable.views (a sqlkit.utils.Container) stores them.
It can be used to provide different way to look at the same data (e.g. different cell-renderers) or different columns for long ones
Add a column to the view.
Parameters: |
|
---|
Select path path. If path is null and obj is not null try finding path at which is obj
Parameters: |
|
---|
Edit a path/column. Column is passed by its field_name
Parameters: |
|
---|