Model
Object Hierarchy:
Description:
All known implementing classes:
Namespace: Dee
Package: dee-1.0
Content:
Methods:
- public void @get (ModelIter iter, ...)
Gets all the values across the entire row referenced by
iter
. - public void @set (ModelIter iter, ...)
Sets all values across the entire row referenced by
iter
. - public unowned ModelIter append (...)
Creates and appends a new row to the end of a Model , setting the row values upon creation.
- public abstract unowned ModelIter append_row (Variant[] row_members)
Like append but intended for language bindings or situations where you work with models on a meta level and may not have a prior knowledge of the column schemas of the models.
- public abstract void begin_changeset ()
Notify listeners that the model is about to be changed, which means that multiple row additions / changes / removals will follow.
- public Variant[] build_named_row (Variant[]? out_row_members, string first_column_name, ...)
- public unowned Variant[] build_named_row_static (Variant[] out_row_members, string first_column_name, ...)
Version of
dee_model_build_named_row
for language bindings - as opposed todee_model_build_named_row
, the returned variants will be strong references, therefore you always have to callg_variant_unref
on the items and g_free the array itself ifnull
was passed asout_row_members
. - public abstract void clear ()
Removes all rows in the model.
- public abstract void end_changeset ()
Notify listeners that all changes have been committed to the model.
- public abstract unowned ModelIter find_row_sorted (Variant[] row_spec, CompareRowFunc cmp_func, out bool out_was_found)
Finds a row in this according to the sorting specified by
cmp_func
. - public unowned ModelIter find_row_sorted_with_sizes (Variant[] row_spec, CompareRowSizedFunc cmp_func, out bool out_was_found)
Like find_row_sorted, but uses DeeCompareRowSizedFunc and therefore doesn't cause trouble when used from introspected languages.
- public unowned ModelIter find_sorted (CompareRowFunc cmp_func, out bool out_was_found, ...)
Finds a row in this according to the sorting specified by
cmp_func
. - public abstract bool get_bool (ModelIter iter, uint column)
- public abstract int get_column_index (string column_name)
Get the column index of a column.
- public abstract unowned string[] get_column_names ()
Get a
null
-terminated array of column names for the columns of this. - public abstract unowned string get_column_schema (uint column)
Get the Variant signature of a column
- public abstract double get_double (ModelIter iter, uint column)
- public abstract unowned string get_field_schema (string field_name, out uint out_column)
Get the Variant signature of field previously registered with register_vardict_schema.
- public abstract unowned ModelIter get_first_iter ()
Retrieves a ModelIter representing the first row in this.
- public abstract int32 get_int32 (ModelIter iter, uint column)
- public abstract int64 get_int64 (ModelIter iter, uint column)
- public abstract unowned ModelIter get_iter_at_row (uint row)
Retrieves a ModelIter representing the row at the given index.
- public abstract unowned ModelIter get_last_iter ()
Retrieves a ModelIter pointing right
after
the last row in this. - public abstract uint get_n_columns ()
Gets the number of columns in this
- public abstract uint get_n_rows ()
Gets the number of rows in this
- public abstract uint get_position (ModelIter iter)
Get the numeric offset of
iter
into this. - public abstract Variant[] get_row (ModelIter iter, Variant[]? out_row_members = null)
- public unowned Variant[] get_row_static (ModelIter iter, Variant[] out_row_members)
- public abstract unowned string[] get_schema ()
Get a
null
-terminated array of Variant type strings that defines the required formats for the columns of this. - public abstract unowned string get_string (ModelIter iter, uint column)
- public abstract uint8 get_uchar (ModelIter iter, uint column)
- public abstract uint32 get_uint32 (ModelIter iter, uint column)
- public abstract uint64 get_uint64 (ModelIter iter, uint column)
- public abstract Variant get_value (ModelIter iter, uint column)
- public abstract Variant get_value_by_name (ModelIter iter, string column_name)
- public abstract HashTable<unowned string,unowned string> get_vardict_schema (uint num_column)
Get a schema for variant dictionary column previously registered using register_vardict_schema.
- public unowned ModelIter insert (uint pos, ...)
Creates and inserts a new row into a Model, pushing the existing rows down.
- public unowned ModelIter insert_before (ModelIter iter, ...)
Creates and inserts a new row into a Model just before the row pointed to by
iter
. - public abstract unowned ModelIter insert_row (uint pos, Variant[] row_members)
As insert, but intended for language bindings or situations where you work with models on a meta level and may not have a priori knowledge of the column schemas of the models.
- public abstract unowned ModelIter insert_row_before (ModelIter iter, Variant[] row_members)
As insert_before, but intended for language bindings or situations where you work with models on a meta level and may not have a priori knowledge of the column schemas of the models.
- public abstract unowned ModelIter insert_row_sorted (Variant[] row_members, CompareRowFunc cmp_func)
Inserts a row in this according to the sorting specified by
cmp_func
. - public unowned ModelIter insert_row_sorted_with_sizes (Variant[] row_members, CompareRowSizedFunc cmp_func)
Inserts a row in this according to the sorting specified by
cmp_func
. - public unowned ModelIter insert_sorted (CompareRowFunc cmp_func, ...)
Convenience function for calling insert_row_sorted.
- public abstract bool is_first (ModelIter iter)
Checks if
iter
is the very first iter this. - public abstract bool is_last (ModelIter iter)
Whether
iter
is the end iter of this . - public abstract unowned ModelIter next (ModelIter iter)
Returns a ModelIter that points to the next position in the model.
- public unowned ModelIter prepend (...)
Creates and prepends a new row to the beginning of a Model, setting the row values upon creation.
- public abstract unowned ModelIter prepend_row (Variant[] row_members)
Like prepend but intended for language bindings or situations where you work with models on a meta level and may not have a priori knowledge of the column schemas of the models.
- public abstract unowned ModelIter prev (ModelIter iter)
Returns a ModelIter that points to the previous position in the model.
- public abstract void register_vardict_schema (uint num_column, HashTable<string,string> schemas)
Register schema for fields in a model containing column with variant dictionary schema ('a{sv}').
- public abstract void remove (ModelIter iter)
Removes the row at the given position from the model.
- public void set_column_names (string first_column_name, ...)
- public abstract void set_column_names_full (string[] column_names)
Set column names used by this.
- public abstract void set_row (ModelIter iter, Variant[] row_members)
Sets all columns in the row
iter
points to, to those found inrow_members
. - public void set_schema (...)
Set the Variant types and the number of columns used by this.
- public abstract void set_schema_full (string[] column_schemas)
Set the Variant types and the number of columns used by this.
- public abstract void set_value (ModelIter iter, uint column, Variant value)
Sets the data in
column
for the rowiter
points to, tovalue
.
Signals:
- public virtual signal void changeset_finished ()
Connect to this signal to be notified when a changeset that can contain multiple row additions / changes / removals has been committed to the model.
- public virtual signal void changeset_started ()
Connect to this signal to be notified when a changeset that can contain multiple row additions / changes / removals is about to be committed to the model.
- public virtual signal void row_added (ModelIter iter)
Connect to this signal to be notified when a row is added to
self
. - public virtual signal void row_changed (ModelIter iter)
Connect to this signal to be notified when a row is changed.
- public virtual signal void row_removed (ModelIter iter)
Connect to this signal to be notified when a row is removed from
self
.
Inherited Members:
All known members inherited from class GLib.Object