GdaDataModel

Name

GdaDataModel -- 

Synopsis



struct      GdaDataModelPrivate;
void        gda_data_model_changed          (GdaDataModel *model);
void        gda_data_model_freeze           (GdaDataModel *model);
void        gda_data_model_thaw             (GdaDataModel *model);
gint        gda_data_model_get_n_rows       (GdaDataModel *model);
gint        gda_data_model_get_n_columns    (GdaDataModel *model);
const gchar* gda_data_model_get_column_title
                                            (GdaDataModel *model,
                                             gint col);
void        gda_data_model_set_column_title (GdaDataModel *model,
                                             gint col,
                                             const gchar *title);
const GdaValue* gda_data_model_get_value_at (GdaDataModel *model,
                                             gint col,
                                             gint row);

Description

Details

struct GdaDataModelPrivate

struct GdaDataModelPrivate;


gda_data_model_changed ()

void        gda_data_model_changed          (GdaDataModel *model);

Notify listeners of the given data model object of changes in the underlying data. Listeners usually will connect themselves to the "changed" signal in the GdaDataModel class, thus being notified of any new data being appended or removed from the data model.

model : a GdaDataModel object.


gda_data_model_freeze ()

void        gda_data_model_freeze           (GdaDataModel *model);

Disable notifications of changes on the given data model. To re-enable notifications again, you should call the gda_data_model_thaw function.

model : a GdaDataModel object.


gda_data_model_thaw ()

void        gda_data_model_thaw             (GdaDataModel *model);

Re-enable notifications of changes on the given data model.

model : a GdaDataModel object.


gda_data_model_get_n_rows ()

gint        gda_data_model_get_n_rows       (GdaDataModel *model);

Return the number of rows in the given data model.

model : a GdaDataModel object.
Returns : 


gda_data_model_get_n_columns ()

gint        gda_data_model_get_n_columns    (GdaDataModel *model);

Return the number of columns in the given data model.

model : a GdaDataModel object.
Returns : 


gda_data_model_get_column_title ()

const gchar* gda_data_model_get_column_title
                                            (GdaDataModel *model,
                                             gint col);

Return the title for the given column in a data model object.

model : a GdaDataModel object.
col : column number.
Returns : 


gda_data_model_set_column_title ()

void        gda_data_model_set_column_title (GdaDataModel *model,
                                             gint col,
                                             const gchar *title);

model : a GdaDataModel object.
col : column number
title : title for the given column.


gda_data_model_get_value_at ()

const GdaValue* gda_data_model_get_value_at (GdaDataModel *model,
                                             gint col,
                                             gint row);

Retrieve the data stored in the given position (identified by the col and row parameters) on a data model.

This is the main function for accessing data in a model.

model : a GdaDataModel object.
col : column number.
row : row number.
Returns : a GdaValue containing the value stored in the given position, or NULL on error (out-of-bound position, etc). The returned value should be freed with gda_value_free