Gda.DataModelIter¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Current represented row in the data model |
||
r/w/c |
Data model for which the iter is for |
||
r/w |
Overrides the data model the iter is attached to (reserved for internal usage) |
||
r/w |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Gets emitted when iter has reached the end of available data (which means the previous row it was on was the last one). |
|
Gets emitted when the row iter is currently pointing has changed |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
object |
r |
Class Details¶
- class Gda.DataModelIter(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- get_column_for_param(param)¶
- Parameters:
param (
Gda.Holder
) – aGda.Holder
object, listed in self- Returns:
the column number, or param is not valid
- Return type:
Get the column number in the
Gda.DataModel
for which self is an iterator as represented by the param parameterDeprecated since version 5.2: not very useful
- get_holder_for_field(col)¶
- Parameters:
col (
int
) – the requested column- Returns:
the
Gda.Holder
, orNone
if an error occurred- Return type:
Fetch a pointer to the
Gda.Holder
object which is synchronized with data at column col
- get_row()¶
- Returns:
the row number, or -1 if self is invalid
- Return type:
Get the row which self represents in the data model
- get_value_at(col)¶
- Parameters:
col (
int
) – the requested column- Returns:
the
GObject.Value
, orNone
if the value could not be fetched- Return type:
Get the value stored at the column col in self. The returned value must not be modified.
- get_value_at_e(col)¶
- Parameters:
col (
int
) – the requested column- Raises:
- Returns:
the
GObject.Value
, orNone
if the value could not be fetched- Return type:
Get the value stored at the column col in self. The returned value must not be modified.
New in version 4.2.10.
- get_value_for_field(field_name)¶
- Parameters:
field_name (
str
) – the requested column name- Returns:
the
GObject.Value
, orNone
- Return type:
Get the value stored at the column field_name in self
- invalidate_contents()¶
Declare all the parameters in self invalid, without modifying the
Gda.DataModel
self is for or changing the row it represents. This method is for internal usage. Note that forGda.DataModelIter.is_valid
() to returnFalse
, it is also necessary to set the “current-row” property to -1.
- is_valid()¶
-
Tells if self is a valid iterator (if it actually corresponds to a valid row in the model)
- move_next()¶
-
Moves self one row further than where it already is (synchronizes the values of the parameters in self with the values at the new row).
If the iterator was on the data model’s last row, then it can’t be moved forward anymore, and the returned value is
False
; note also that the “current-row” property is set to -1 (which means thatGda.DataModelIter.is_valid
() would returnFalse
)This function can return
False
if it was not allowed to be moved (as it emits the “validate-set” signal before being moved).When this function returns
True
, then self has actually been moved to the next row, but some values may not have been read correctly in the row, in which case the correcspondingGda.Holder
will be left invalid.
- move_prev()¶
-
Moves self one row before where it already is (synchronizes the values of the parameters in self with the values at the new row).
If the iterator was on the data model’s first row, then it can’t be moved backwards anymore, and the returned value is
False
; note also that the “current-row” property is set to -1 (which means thatGda.DataModelIter.is_valid
() would returnFalse
).This function can return
False
if it was not allowed to be moved (as it emits the “validate-set” signal before being moved).When this function returns
True
, then self has actually been moved to the next row, but some values may not have been read correctly in the row, in which case the correcspondingGda.Holder
will be left invalid.
- move_to_row(row)¶
-
Synchronizes the values of the parameters in self with the values at the row row.
If row is not a valid row, then the returned value is
False
, and the “current-row” property is set to -1 (which means thatGda.DataModelIter.is_valid
() would returnFalse
), with the exception that if row is -1, then the returned value isTrue
.This function can return
False
if it was not allowed to be moved (as it emits the “validate-set” signal before being moved).When this function returns
True
, then self has actually been moved to the next row, but some values may not have been read correctly in the row, in which case the correcspondingGda.Holder
will be left invalid.
- set_value_at(col, value)¶
- Parameters:
col (
int
) – the column numbervalue (
GObject.Value
) – aGObject.Value
(notNone
)
- Raises:
- Returns:
True
if no error occurred- Return type:
Sets a value in self, at the column specified by col
- do_end_of_data() virtual¶
Signal Details¶
- Gda.DataModelIter.signals.end_of_data(data_model_iter)¶
- Signal Name:
end-of-data
- Flags:
- Parameters:
data_model_iter (
Gda.DataModelIter
) – The object which received the signal
Gets emitted when iter has reached the end of available data (which means the previous row it was on was the last one).
- Gda.DataModelIter.signals.row_changed(data_model_iter, row)¶
- Signal Name:
row-changed
- Flags:
- Parameters:
data_model_iter (
Gda.DataModelIter
) – The object which received the signalrow (
int
) – the new iter’s row
Gets emitted when the row iter is currently pointing has changed
Property Details¶
- Gda.DataModelIter.props.current_row¶
-
Current represented row in the data model
- Gda.DataModelIter.props.data_model¶
- Name:
data-model
- Type:
- Default Value:
- Flags:
Data model for which the iter is for
- Gda.DataModelIter.props.forced_model¶
- Name:
forced-model
- Type:
- Default Value:
- Flags:
Overrides the data model the iter is attached to (reserved for internal usage)