cluttermm: Clutter::Model Class Reference

Inheritance diagram for Clutter::Model:
Collaboration diagram for Clutter::Model:

Public Member Functions

virtual ~Model ()
 
ClutterModel* gobj ()
 Provides access to the underlying C GObject. More...

 
const ClutterModel* gobj () const
 Provides access to the underlying C GObject. More...

 
ClutterModel* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...

 
void insert (guint row, guint column, const Glib::ValueBase& value)
 Sets the data in the cell specified by iter and column. More...

 
void remove (guint row)
 Removes the row at the given position from the model. More...

 
guint get_n_rows () const
 Retrieves the number of rows inside model, eventually taking into account any filtering function set using set_filter(). More...

 
guint get_n_columns () const
 Retrieves the number of columns inside model. More...

 
Glib::ustring get_column_name (guint column) const
 Retrieves the name of the column. More...

 
GType get_column_type (guint column) const
 Retrieves the type of the column. More...

 
Glib::SignalProxy1< void,

const Glib::RefPtr< ModelIter >& > 
signal_row_added ()
 
Glib::SignalProxy1< void,

const Glib::RefPtr< ModelIter >& > 
signal_row_removed ()
 
Glib::SignalProxy1< void,

const Glib::RefPtr< ModelIter >& > 
signal_row_changed ()
 
Glib::SignalProxy0< void > signal_sort_changed ()
 
Glib::SignalProxy0< void > signal_filter_changed ()
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 

Protected Member Functions

 Model ()
 
virtual void on_row_added (const Glib::RefPtr< ModelIter >& iter)
 This is a default handler for the signal signal_row_added(). More...

 
virtual void on_row_removed (const Glib::RefPtr< ModelIter >& iter)
 This is a default handler for the signal signal_row_removed(). More...

 
virtual void on_row_changed (const Glib::RefPtr< ModelIter >& iter)
 This is a default handler for the signal signal_row_changed(). More...

 
virtual void on_sort_changed ()
 This is a default handler for the signal signal_sort_changed(). More...

 
virtual void on_filter_changed ()
 This is a default handler for the signal signal_filter_changed(). More...

 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Clutter::Modelwrap (ClutterModel* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...

 

Constructor & Destructor Documentation

virtual Clutter::Model::~Model ( )
virtual
Clutter::Model::Model ( )
protected

Member Function Documentation

Glib::ustring Clutter::Model::get_column_name ( guint  column) const

Retrieves the name of the column.

Since cluttermm 0.6:
Parameters
columnThe column number.
Returns
The name of the column. The model holds the returned string, and it should not be modified or freed.
GType Clutter::Model::get_column_type ( guint  column) const

Retrieves the type of the column.

Since cluttermm 0.6:
Parameters
columnThe column number.
Returns
The type of the column.
guint Clutter::Model::get_n_columns ( ) const

Retrieves the number of columns inside model.

Since cluttermm 0.6:
Returns
The number of columns.
guint Clutter::Model::get_n_rows ( ) const

Retrieves the number of rows inside model, eventually taking into account any filtering function set using set_filter().

Since cluttermm 0.6:
Returns
The length of the model. If there is a filter set, then the length of the filtered model is returned.
static GType Clutter::Model::get_type ( )
static

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

ClutterModel* Clutter::Model::gobj ( )
inline

Provides access to the underlying C GObject.

const ClutterModel* Clutter::Model::gobj ( ) const
inline

Provides access to the underlying C GObject.

ClutterModel* Clutter::Model::gobj_copy ( )

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

void Clutter::Model::insert ( guint  row,
guint  column,
const Glib::ValueBase value 
)

Sets the data in the cell specified by iter and column.

The type of value must be convertable to the type of the column. If the row does not exist then it is created.

Since cluttermm 0.6:
Parameters
rowPosition of the row to modify.
columnColumn to modify.
valueNew value for the cell.
virtual void Clutter::Model::on_filter_changed ( )
protectedvirtual

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

virtual void Clutter::Model::on_row_added ( const Glib::RefPtr< ModelIter >&  iter)
protectedvirtual

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

virtual void Clutter::Model::on_row_changed ( const Glib::RefPtr< ModelIter >&  iter)
protectedvirtual

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

virtual void Clutter::Model::on_row_removed ( const Glib::RefPtr< ModelIter >&  iter)
protectedvirtual

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

virtual void Clutter::Model::on_sort_changed ( )
protectedvirtual

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

void Clutter::Model::remove ( guint  row)

Removes the row at the given position from the model.

Since cluttermm 0.6:
Parameters
rowPosition of row to remove.
Glib::SignalProxy0< void > Clutter::Model::signal_filter_changed ( )
Slot Prototype:
void on_my_filter_changed()

The signal_filter_changed() signal is emitted when a new filter has been applied

Since cluttermm 0.6:
Glib::SignalProxy1< void,const Glib::RefPtr<ModelIter>& > Clutter::Model::signal_row_added ( )
Slot Prototype:
void on_my_row_added(const Glib::RefPtr<ModelIter>& iter)

The signal_row_added() signal is emitted when a new row has been added. The data on the row has already been set when the signal_row_added() signal has been emitted.

Since cluttermm 0.6:
Parameters
iterA Clutter::ModelIter pointing to the new row.
Glib::SignalProxy1< void,const Glib::RefPtr<ModelIter>& > Clutter::Model::signal_row_changed ( )
Slot Prototype:
void on_my_row_changed(const Glib::RefPtr<ModelIter>& iter)

The signal_row_removed() signal is emitted when a row has been changed. The data on the row has already been updated when the signal_row_changed() signal has been emitted.

Since cluttermm 0.6:
Parameters
iterA Clutter::ModelIter pointing to the changed row.
Glib::SignalProxy1< void,const Glib::RefPtr<ModelIter>& > Clutter::Model::signal_row_removed ( )
Slot Prototype:
void on_my_row_removed(const Glib::RefPtr<ModelIter>& iter)

The signal_row_removed() signal is emitted when a row has been removed. The data on the row pointed by the passed iterator is still valid when the signal_row_removed() signal has been emitted.

Since cluttermm 0.6:
Parameters
iterA Clutter::ModelIter pointing to the removed row.
Glib::SignalProxy0< void > Clutter::Model::signal_sort_changed ( )
Slot Prototype:
void on_my_sort_changed()

The signal_sort_changed() signal is emitted after the model has been sorted

Since cluttermm 0.6:

Friends And Related Function Documentation

Glib::RefPtr< Clutter::Model > wrap ( ClutterModel *  object,
bool  take_copy = false 
)
related

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

Parameters
objectThe C instance.
take_copyFalse 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:
  • cluttermm/model.h