Gnome::Gda::DataProxy Class Reference
Data Models

Proxy to hold modifications for any DataModel, providing the DataModel interface itself. More...

Inheritance diagram for Gnome::Gda::DataProxy:
[legend]
Collaboration diagram for Gnome::Gda::DataProxy:
[legend]

## Public Member Functions

| DataProxy (DataProxy&& src) noexcept
DataProxy& | operator= (DataProxy&& src) noexcept
virtual | ~DataProxy () noexcept
GdaDataProxy* | gobj ()
| Provides access to the underlying C GObject. More...
const GdaDataProxy* | gobj () const
| Provides access to the underlying C GObject. More...
GdaDataProxy* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Glib::RefPtr< DataModel > | get_proxied_model ()
| Fetch the Gda::DataModel which proxy does proxy. More...
Glib::RefPtr< const DataModel > | get_proxied_model () const
| Fetch the Gda::DataModel which proxy does proxy. More...
int | get_proxied_model_n_cols () const
| Get the number of columns in the proxied data model. More...
int | get_proxied_model_n_rows () const
| Get the number of rows in the proxied data model. More...
bool | is_read_only () const
ValueVector | get_values (int proxy_row, const std::vector< int >& cols_index) const
| Retrieve a whole list of values from the proxy data model. More...
ValueAttribute | get_value_attributes (int proxy_row, int col) const
| Get the attributes of the value stored at (proxy_row, col) in proxy, which is an ORed value of Gda::ValueAttribute flags. More...
void | alter_value_attributes (int proxy_row, int col, ValueAttribute alter_flags)
| Alters the attributes of the value stored at (proxy_row, col) in proxy. More...
int | get_proxied_model_row (int proxy_row) const
| Get the proxy's proxied model row corresponding to proxy_row. More...
void | erase (int proxy_row)
| Marks the row proxy_row to be deleted. More...
void | unerase (int proxy_row)
| Remove the "to be deleted" mark at the row proxy_row, if it existed. More...
bool | row_is_deleted (int proxy_row) const
| Tells if the row number proxy_row is marked to be deleted. More...
bool | row_is_inserted (int proxy_row) const
| Tells if the row number proxy_row is a row which has been inserted in proxy (and is thus not in the proxied data model). More...
void | cancel_row_changes (int proxy_row, int col)
| Resets data at the corresponding row and column. More...
void | apply_row_changes (int proxy_row)
| Commits the modified data in the proxy back into the Gda::DataModel. More...
bool | has_changed () const
| Tells if proxy contains any modifications not applied to the proxied data model. More...
bool | row_has_changed (int proxy_row) const
| Tells if the row number proxy_row has changed. More...
int | get_n_new_rows () const
| Get the number of rows which have been added to proxy and which are not part of the proxied data model. More...
int | get_n_modified_rows () const
| Get the number of rows which have been modified in the proxy (the sum of rows existing in the proxied data model which have been modified, and new rows). More...
void | set_sample_size (int sample_size)
| Sets the size of each chunk of data to display: the maximum number of rows which can be "displayed" at a time (the maximum number of rows which proxy pretends to have). More...
int | get_sample_size () const
| Get the size of each chunk of data displayed at a time. More...
void | set_sample_start (int sample_start)
| Sets the number of the first row to be available in proxy (in reference to the proxied data model) More...
int | get_sample_start () const
| Get the number of the first row to be available in proxy (in reference to the proxied data model) More...
int | get_sample_end () const
| Get the number of the last row to be available in proxy (in reference to the proxied data model) More...
bool | apply_all_changes ()
| Apply all the changes stored in the proxy to the proxied data model. More...
bool | cancel_all_changes ()
| Cancel all the changes stored in the proxy (the proxy will be reset to its state as it was just after creation). More...
int | get_filtered_n_rows ()
| Get the total number of filtered rows in proxy if a filter has been applied. More...
Glib::ustring | get_filter_expr ()
| Get the current filter expression used by proxy. More...
void | get_filter_expr (const Glib::ustring& filter_expr)
| Sets a filter among the rows presented by proxy. More...
void | set_ordering_column (int col)
| Orders by the col column. More...
Glib::PropertyProxy< Glib::RefPtr< DataModel > > | property_model ()
| Proxied data model. More...
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< DataModel > > | property_model () const
| Proxied data model. More...
Glib::PropertyProxy< bool > | property_prepend_null_entry ()
| Tells if a row composed of NULL values is inserted as the proxy's first row. More...
Glib::PropertyProxy_ReadOnly< bool > | property_prepend_null_entry () const
| Tells if a row composed of NULL values is inserted as the proxy's first row. More...
Glib::PropertyProxy< bool > | property_defer_sync ()
| Tells if changes to the sample of rows displayed is done in background in several steps or if it's done in one step. More...
Glib::PropertyProxy_ReadOnly< bool > | property_defer_sync () const
| Tells if changes to the sample of rows displayed is done in background in several steps or if it's done in one step. More...
Glib::PropertyProxy< int > | property_sample_size ()
| Number of rows which the proxy will contain at any time, like a sliding window on the proxied data model. More...
Glib::PropertyProxy_ReadOnly< int > | property_sample_size () const
| Number of rows which the proxy will contain at any time, like a sliding window on the proxied data model. More...
Glib::SignalProxy2< void, int, bool > | signal_row_delete_changed ()
Glib::SignalProxy2< void, int, int > | signal_sample_changed ()
Glib::SignalProxy1< void, int > | signal_sample_size_changed ()
Glib::SignalProxy0< void > | signal_filter_changed ()
Glib::SignalProxy2< Glib::Error, int, int > | signal_validate_row_changes ()
Glib::SignalProxy2< void, int, int > | signal_row_changes_applied ()
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable ()
| trackable (const trackable &src)
| trackable (trackable &&src) noexcept
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src) noexcept
void | remove_destroy_notify_callback (void *data) const
Public Member Functions inherited from Gnome::Gda::DataModel
| DataModel (DataModel&& src) noexcept
DataModel& | operator= (DataModel&& src) noexcept
virtual | ~DataModel () noexcept
GdaDataModel* | gobj ()
| Provides access to the underlying C GObject. More...
const GdaDataModel* | gobj () const
| Provides access to the underlying C GObject. More...
void | freeze ()
| Disables notifications of changes on the given data model. More...
void | thaw ()
| Re-enables notifications of changes on the given data model. More...
int | get_n_rows () const
int | get_n_columns () const
int | get_column_index (const Glib::ustring& name)
| Get the index of the first column named name in model. More...
Glib::RefPtr< Column > | describe_column (int col)
| Queries the underlying data model implementation for a description of a given column. More...
Glib::RefPtr< const Column > | describe_column (int col) const
| Queries the underlying data model implementation for a description of a given column. More...
Glib::ustring | get_column_title (int col) const
void | set_column_title (int col, const Glib::ustring& title)
| Sets the title of the given col in model. More...
Value | get_value_at (int col, int row) const
| Retrieves the data stored in the given position (identified by the col and row parameters) on a data model. More...
Value | get_typed_value_at (int col, int row, GType expected_type, bool nullok) const
| Upon errors `0` will be returned and error will be assigned a Error from the Gda::DATA_MODEL_ERROR domain. More...
ValueAttribute | get_attributes_at (int col, int row)
| Get the attributes of the value stored at (row, col) in model, which is an ORed value of Gda::ValueAttribute flags. More...
Glib::RefPtr< DataModelIter > | create_iter ()
| Creates a new iterator object Gda::DataModelIter object which can be used to iterate through rows in model. More...
bool | set_value_at (int col, int row, const Value& value)
| Modifies a value in model, at ( col, row). More...
bool | set_values (int row, const std::vector< Value >& values)
| In a similar way to set_value_at(), this method modifies a data model's contents by setting several values at once. More...
DataModelAccessFlags | get_access_flags () const
| Get the attributes of model such as how to access the data it contains if it's modifiable, etc. More...
int | append_values (const std::vector< Value >& values)
| Appends a row to the given data model. More...
bool | append_row ()
| Appends a row to the data model (the new row will possibly have `0` values for all columns, or some other values depending on the data model implementation) More...
bool | remove_row (int row)
| Removes a row from the data model. More...
int | get_row_from_values (const ValueVector& values, const std::vector< int >& cols_index)
| Returns the first row where all the values in values at the columns identified at cols_index match. More...
void | send_hint (DataModelHint hint, const Value& hint_value)
| Sends a hint to the data model. More...
Glib::ustring | export_to_string (DataModelIOFormat format, const std::vector< int >& cols, const std::vector< int >& rows, const Glib::RefPtr< Set >& options)
| Exports data contained in model to the a string; the format is specified using the format argument. More...
bool | export_to_file (DataModelIOFormat format, const std::string& file, const std::vector< int >& cols, const std::vector< int >& rows, const Glib::RefPtr< Set >& options)
| Exports data contained in model to the file; the format is specified using the format argument. More...
bool | import_from_model (const Glib::RefPtr< DataModel >& from, bool overwrite, GHashTable* cols_trans)
| Copy the contents of the from data model to the to data model. More...
bool | import_from_string (const Glib::ustring&string, GHashTable* cols_trans, const Glib::RefPtr< const Set >& options)
| Loads the data from string into model. More...
bool | import_from_file (const std::string& file, GHashTable* cols_trans, const Glib::RefPtr< const Set >& options)
| Imports data contained in the file file into model; the format is detected. More...
void | dump (FILE* to_stream) const
| Dumps a textual representation of the model to the to_stream stream. More...
Glib::ustring | dump_as_string () const
| Dumps a textual representation of the model into a new string. More...
void | set_column_name (int col, const Glib::ustring& name)
| Sets the name of the given col in model, and if its title is not set, also sets the title to name. More...
Glib::ustring | get_column_name (int col) const
bool | iter_move_next_default (const Glib::RefPtr< DataModelIter >& iter)
bool | iter_move_prev_default (const Glib::RefPtr< DataModelIter >& iter)
bool | iter_move_to_row_default (const Glib::RefPtr< DataModelIter >& iter, int row)
Glib::SignalProxy1< void, int > | signal_row_inserted ()
Glib::SignalProxy1< void, int > | signal_row_updated ()
Glib::SignalProxy1< void, int > | signal_row_removed ()
Glib::SignalProxy0< void > | signal_reset ()
Glib::SignalProxy0< void > | signal_changed ()
Public Member Functions inherited from Glib::Interface
| Interface ()
| Interface (Interface &&src) noexcept
Interface & | operator= (Interface &&src) noexcept
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
virtual | ~Interface () noexcept
| Interface (const Interface &)=delete
Interface & | operator= (const Interface &)=delete
GObject * | gobj ()
const GObject * | gobj () const

## Static Public Member Functions

static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static Glib::RefPtr< DataProxy > | create (const Glib::RefPtr< DataModel >& model)
Static Public Member Functions inherited from Gnome::Gda::DataModel
static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...

## Protected Member Functions

| DataProxy (const Glib::RefPtr< DataModel >& model)
virtual void | on_row_delete_changed (int row, bool to_be_deleted)
| This is a default handler for the signal signal_row_delete_changed(). More...
virtual void | on_sample_changed (int sample_start, int sample_end)
| This is a default handler for the signal signal_sample_changed(). More...
virtual void | on_sample_size_changed (int sample_size)
| This is a default handler for the signal signal_sample_size_changed(). More...
virtual void | on_row_changes_applied (int row, int proxied_row)
| This is a default handler for the signal signal_row_changes_applied(). More...
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
virtual | ~Object () noexcept
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
Protected Member Functions inherited from Gnome::Gda::DataModel
| DataModel ()
| You should derive from this class to use it. More...
virtual void | on_row_inserted (int row)
| This is a default handler for the signal signal_row_inserted(). More...
virtual void | on_row_updated (int row)
| This is a default handler for the signal signal_row_updated(). More...
virtual void | on_row_removed (int row)
| This is a default handler for the signal signal_row_removed(). More...
virtual void | on_reset ()
| This is a default handler for the signal signal_reset(). More...
virtual void | on_changed ()
| This is a default handler for the signal signal_changed(). More...

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr< Gnome::Gda::DataProxy > | wrap (GdaDataProxy* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Gnome::Gda::DataModel
Glib::RefPtr< Gnome::Gda::DataModel > | wrap (GdaDataModel* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members

Public Types inherited from Glib::Object
typedef void(* | DestroyNotify) (gpointer data)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify
Public Types inherited from Gnome::Gda::DataModel
typedef std::vector< Value > | ValueVector

## Detailed Description

Proxy to hold modifications for any DataModel, providing the DataModel interface itself.

This object stores modifications made to a DataModel object which is proxied until asked to make the changes inside the DataModel. It also filters the proxied data model to show only a sample (a defined number of continuous rows) of it.

Specifically, for a proxied data model having nb_cols columns and nb_rows rows, the DataProxy object has the following attributes:

- 2 * nb_cols columns:
  - The first (>= 0) nb_cols columns are the current values stored in the proxy (which correspond to the values of the proxied data model if the considered row has not been changed). The associated values are writable.
  - The last nb_cols columns are the values stored in the proxied data model, at column col - nb_cols.
- A variable number of rows depending on the following attributes:
  - Whether the proxy is configured to have an empty row as the first row.
  - Whether the proxy only displays parts of the proxied data model.
  - Whether new rows have been added to the proxy.

Note that unless explicitely mentioned, the columns are read-only.

## Constructor & Destructor Documentation

Gnome::Gda::DataProxy::DataProxy | ( | DataProxy&& | src | ) |

noexcept

virtual Gnome::Gda::DataProxy::~DataProxy | ( |  | ) |

virtual noexcept

Gnome::Gda::DataProxy::DataProxy | ( | const Glib::RefPtr< DataModel >& | model | ) |

explicit protected

## Member Function Documentation

void Gnome::Gda::DataProxy::alter_value_attributes | ( | int | proxy_row,
|  | int | col,
|  | ValueAttribute | alter_flags
| ) |  |

Alters the attributes of the value stored at (proxy_row, col) in proxy.

the alter_flags can only contain the GDA_VALUE_ATTR_IS_NULL, GDA_VALUE_ATTR_IS_DEFAULT and GDA_VALUE_ATTR_IS_UNCHANGED flags (other flags are ignored).

Parameters

  proxy_row | A proxy row number.
  col | A valid column number.
  alter_flags | Flags to alter the attributes.

bool Gnome::Gda::DataProxy::apply_all_changes | ( |  | ) |

Apply all the changes stored in the proxy to the proxied data model.

The changes are done row after row, and if an error occurs, then it is possible that not all the changes to all the rows have been applied.

Returns
  `true` if no error occurred.

void Gnome::Gda::DataProxy::apply_row_changes | ( | int | proxy_row | ) |

Commits the modified data in the proxy back into the Gda::DataModel.

Parameters

  proxy_row | The row number to commit.

Returns
  `true` if no error occurred.

bool Gnome::Gda::DataProxy::cancel_all_changes | ( |  | ) |

Cancel all the changes stored in the proxy (the proxy will be reset to its state as it was just after creation).

Returns
  `true` if no error occurred.

void Gnome::Gda::DataProxy::cancel_row_changes | ( | int | proxy_row,
|  | int | col
| ) |  |

Resets data at the corresponding row and column.

If proxy_row corresponds to a new row, then that new row is deleted from proxy.

Parameters

  proxy_row | The row to cancel changes.
  col | The column to cancel changes, or less than 0 to cancel any change on the row row.

static Glib::RefPtr<DataProxy> Gnome::Gda::DataProxy::create | ( | const Glib::RefPtr< DataModel >& | model | ) |

static

void Gnome::Gda::DataProxy::erase | ( | int | proxy_row | ) |

Marks the row proxy_row to be deleted.

Parameters

  proxy_row | A proxy row number.

Glib::ustring Gnome::Gda::DataProxy::get_filter_expr | ( |  | ) |

Get the current filter expression used by proxy.

Returns
  The current filter expression or `0` if no filter has been set.

void Gnome::Gda::DataProxy::get_filter_expr | ( | const Glib::ustring & | filter_expr | ) |

Sets a filter among the rows presented by proxy.

The filter is defined by a filter expression which can be any SQL valid expression using proxy's columns. For instance if proxy has the "id" and "name" columns, then a filter can be "length(name) < 5" to filter only the rows where the length of the name is strictly inferior to 5, or "id >= 1000 and id < 2000 order by name limit 50" to filter only the rows where the id is between 1000 and 2000, ordered by name and limited to 50 rows.

Note about column names: real column names can be used (double quoted if necessary), but columns can also be named "_<column number>" with column numbers starting at 1.

Note that any previous filter expression is replaced with the new filter_expr if no error occurs (if an error occurs, then any previous filter is left unchanged).

Parameters

  filter_expr | An SQL based expression which will filter the contents of proxy, or `0` to remove any previous filter.

Returns
  `true` if no error occurred.

int Gnome::Gda::DataProxy::get_filtered_n_rows | ( |  | ) |

Get the total number of filtered rows in proxy if a filter has been applied.

As new rows (rows added to the proxy and not yet added to the proxied data model) and rows to remove (rows marked for removal but not yet removed from the proxied data model) are also filtered, the returned number also contains references to new rows and rows to be removed.

Returns
  The number of filtered rows in proxy, or -1 if no filter has been applied.

int Gnome::Gda::DataProxy::get_n_modified_rows | ( |  | ) | const

Get the number of rows which have been modified in the proxy (the sum of rows existing in the proxied data model which have been modified, and new rows).

Returns
  The number of modified rows.

int Gnome::Gda::DataProxy::get_n_new_rows | ( |  | ) | const

Get the number of rows which have been added to proxy and which are not part of the proxied data model.

Returns
  The number of new rows.

Glib::RefPtr<DataModel> Gnome::Gda::DataProxy::get_proxied_model | ( |  | ) |

Fetch the Gda::DataModel which proxy does proxy.

Returns
  The proxied data model.

Glib::RefPtr<const DataModel> Gnome::Gda::DataProxy::get_proxied_model | ( |  | ) | const

Fetch the Gda::DataModel which proxy does proxy.

Returns
  The proxied data model.

int Gnome::Gda::DataProxy::get_proxied_model_n_cols | ( |  | ) | const

Get the number of columns in the proxied data model.

Returns
  The number of columns, or -1 if an error occurred.

int Gnome::Gda::DataProxy::get_proxied_model_n_rows | ( |  | ) | const

Get the number of rows in the proxied data model.

Returns
  The number of rows, or -1 if the number of rows is not known.

int Gnome::Gda::DataProxy::get_proxied_model_row | ( | int | proxy_row | ) | const

Get the proxy's proxied model row corresponding to proxy_row.

Parameters

  proxy_row | A proxy row number.

Returns
  The proxied model's row, or -1 if proxy row which only exists proxy.

int Gnome::Gda::DataProxy::get_sample_end | ( |  | ) | const

Get the number of the last row to be available in proxy (in reference to the proxied data model)

Returns
  The number of the last proxied model's row.

int Gnome::Gda::DataProxy::get_sample_size | ( |  | ) | const

Get the size of each chunk of data displayed at a time.

Returns
  The chunk (or sample) size, or 0 if chunking is disabled.

int Gnome::Gda::DataProxy::get_sample_start | ( |  | ) | const

Get the number of the first row to be available in proxy (in reference to the proxied data model)

Returns
  The number of the first proxied model's row.

static GType Gnome::Gda::DataProxy::get_type | ( |  | ) |

static

Get the GType for this class, for use with the underlying GObject type system.

ValueAttribute Gnome::Gda::DataProxy::get_value_attributes | ( | int | proxy_row,
|  | int | col
| ) |  | const

Get the attributes of the value stored at (proxy_row, col) in proxy, which is an ORed value of Gda::ValueAttribute flags.

Parameters

  proxy_row | A proxy row.
  col | A valid proxy column.

Returns
  The attribute.

ValueVector Gnome::Gda::DataProxy::get_values | ( | int | proxy_row,
|  | const std::vector< int > & | cols_index
| ) |  | const

Retrieve a whole list of values from the proxy data model.

This function calls gda_data_proxy_get_value() for each column index specified in cols_index, and generates a SList on the way.

Parameters

  proxy_row | A proxy row.
  cols_index | Array containing the columns for which the values are requested.
  n_cols | Size of cols_index.

Returns
  A new list of values (the list must be freed, not the values), or `0` if an error occurred.

GdaDataProxy* Gnome::Gda::DataProxy::gobj | ( |  | ) |

inline

Provides access to the underlying C GObject.

const GdaDataProxy* Gnome::Gda::DataProxy::gobj | ( |  | ) | const

inline

Provides access to the underlying C GObject.

GdaDataProxy* Gnome::Gda::DataProxy::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

bool Gnome::Gda::DataProxy::has_changed | ( |  | ) | const

Tells if proxy contains any modifications not applied to the proxied data model.

Returns
  `true` if there are some modifications in proxy.

bool Gnome::Gda::DataProxy::is_read_only | ( |  | ) | const

Returns
  `true` if the proxied data model is itself read-only.

virtual void Gnome::Gda::DataProxy::on_row_changes_applied | ( | int | row,
|  | int | proxied_row
| ) |  |

protected virtual

This is a default handler for the signal signal_row_changes_applied().

virtual void Gnome::Gda::DataProxy::on_row_delete_changed | ( | int | row,
|  | bool | to_be_deleted
| ) |  |

protected virtual

This is a default handler for the signal signal_row_delete_changed().

virtual void Gnome::Gda::DataProxy::on_sample_changed | ( | int | sample_start,
|  | int | sample_end
| ) |  |

protected virtual

This is a default handler for the signal signal_sample_changed().

virtual void Gnome::Gda::DataProxy::on_sample_size_changed | ( | int | sample_size | ) |

protected virtual

This is a default handler for the signal signal_sample_size_changed().

DataProxy& Gnome::Gda::DataProxy::operator= | ( | DataProxy&& | src | ) |

noexcept

Glib::PropertyProxy< bool > Gnome::Gda::DataProxy::property_defer_sync | ( |  | ) |

Tells if changes to the sample of rows displayed is done in background in several steps or if it's done in one step.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gnome::Gda::DataProxy::property_defer_sync | ( |  | ) | const

Tells if changes to the sample of rows displayed is done in background in several steps or if it's done in one step.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< Glib::RefPtr<DataModel> > Gnome::Gda::DataProxy::property_model | ( |  | ) |

Proxied data model.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DataModel> > Gnome::Gda::DataProxy::property_model | ( |  | ) | const

Proxied data model.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gnome::Gda::DataProxy::property_prepend_null_entry | ( |  | ) |

Tells if a row composed of NULL values is inserted as the proxy's first row.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gnome::Gda::DataProxy::property_prepend_null_entry | ( |  | ) | const

Tells if a row composed of NULL values is inserted as the proxy's first row.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy< int > Gnome::Gda::DataProxy::property_sample_size | ( |  | ) |

Number of rows which the proxy will contain at any time, like a sliding window on the proxied data model.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< int > Gnome::Gda::DataProxy::property_sample_size | ( |  | ) | const

Number of rows which the proxy will contain at any time, like a sliding window on the proxied data model.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

bool Gnome::Gda::DataProxy::row_has_changed | ( | int | proxy_row | ) | const

Tells if the row number proxy_row has changed.

Parameters

  proxy_row | A proxy row number.

Returns
  `true` if the row has changed.

bool Gnome::Gda::DataProxy::row_is_deleted | ( | int | proxy_row | ) | const

Tells if the row number proxy_row is marked to be deleted.

Parameters

  proxy_row | A proxy row number.

Returns
  `true` if the row is marked to be deleted.

bool Gnome::Gda::DataProxy::row_is_inserted | ( | int | proxy_row | ) | const

Tells if the row number proxy_row is a row which has been inserted in proxy (and is thus not in the proxied data model).

Parameters

  proxy_row | A proxy row number.

Returns
  `true` if the row is an inserted row.

void Gnome::Gda::DataProxy::set_ordering_column | ( | int | col | ) |

Orders by the col column.

Parameters

  col | The column number to order from.

Returns
  `true` if no error occurred.

void Gnome::Gda::DataProxy::set_sample_size | ( | int | sample_size | ) |

Sets the size of each chunk of data to display: the maximum number of rows which can be "displayed" at a time (the maximum number of rows which proxy pretends to have).

The default value is arbitrary 300 as it is big enough to be able to display quite a lot of data, but small enough to avoid too much data displayed at the same time.

Note
  the rows which have been added but not yet committed will always be displayed regardless of the current chunk of data, and the modified rows which are not visible when the displayed chunk of data changes are still held as modified rows.

To remove the chunking of the data to display, simply pass sample_size the %0 value.

Parameters

  sample_size | The requested size of a chunk, or 0.

void Gnome::Gda::DataProxy::set_sample_start | ( | int | sample_start | ) |

Sets the number of the first row to be available in proxy (in reference to the proxied data model)

Parameters

  sample_start | The number of the first row to be displayed.

Glib::SignalProxy0< void > Gnome::Gda::DataProxy::signal_filter_changed | ( |  | ) |

Slot Prototype:
  `void on_my_filter_changed()`

Glib::SignalProxy2< void,int,int > Gnome::Gda::DataProxy::signal_row_changes_applied | ( |  | ) |

Slot Prototype:
  `void on_my_row_changes_applied(int row, int proxied_row)`

Glib::SignalProxy2< void,int,bool > Gnome::Gda::DataProxy::signal_row_delete_changed | ( |  | ) |

Slot Prototype:
  `void on_my_row_delete_changed(int row, bool to_be_deleted)`

Glib::SignalProxy2< void,int,int > Gnome::Gda::DataProxy::signal_sample_changed | ( |  | ) |

Slot Prototype:
  `void on_my_sample_changed(int sample_start, int sample_end)`

Glib::SignalProxy1< void,int > Gnome::Gda::DataProxy::signal_sample_size_changed | ( |  | ) |

Slot Prototype:
  `void on_my_sample_size_changed(int sample_size)`

Glib::SignalProxy2< Glib::Error,int,int > Gnome::Gda::DataProxy::signal_validate_row_changes | ( |  | ) |

Slot Prototype:
  `Glib::Error on_my_validate_row_changes(int row, int proxied_row)`

void Gnome::Gda::DataProxy::unerase | ( | int | proxy_row | ) |

Remove the "to be deleted" mark at the row proxy_row, if it existed.

Parameters

  proxy_row | A proxy row number.

## Friends And Related Function Documentation

Glib::RefPtr< Gnome::Gda::DataProxy > wrap | ( | GdaDataProxy * | object,
|  | bool | take_copy = `false`
| ) |  |

related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- libgdamm/dataproxy.h