libgda-uimm: Gnome::GdaUI::DataSelector Class Reference
DataSelector - Selecting data in a Gnome::Gda::DataModel. More...
#include <libgda-uimm/dataselector.h>
Public Member Functions | |
virtual | ~DataSelector () |
GdauiDataSelector* | gobj () |
Provides access to the underlying C GObject. | |
const GdauiDataSelector* | gobj () const |
Provides access to the underlying C GObject. | |
Glib::RefPtr < Gnome::Gda::DataModel > | get_model () |
Queries the Gda::DataModel from which the data displayed by the widget implementing iface are. | |
Glib::RefPtr< const Gnome::Gda::DataModel > | get_model () const |
Queries the Gda::DataModel from which the data displayed by the widget implementing iface are. | |
void | set_model (const Glib::RefPtr< Gnome::Gda::DataModel >& model) |
Sets the data model from which the data being displayed are. | |
Glib::RefPtr < Gnome::Gda::DataModelIter > | get_data_set () |
Get the Gda::DataModelIter object represented the current selected row in iface. | |
Glib::RefPtr< const Gnome::Gda::DataModelIter > | get_data_set () const |
Get the Gda::DataModelIter object represented the current selected row in iface. | |
bool | select_row (int row) |
Force the selection of a specific row. | |
void | unselect_row (int row) |
Please note that row refers to the "visible" row at the time it's being called, which may change if the widget implementing this interface uses a Gda::DataProxy (as is the case for example for the Gdaui::RawForm, Gdaui::Form, Gdaui::RawGrid and Gdaui::Grid). | |
void | set_column_visible (int column, bool visible) |
Shows or hides the data at column column. | |
Glib::SignalProxy0< void > | signal_selection_changed () |
virtual Glib::RefPtr < Gnome::Gda::DataModel > | get_model_vfunc () const |
virtual void | set_model_vfunc (const Glib::RefPtr< Gnome::Gda::DataModel >& model) |
virtual Glib::RefPtr < Gnome::Gda::DataModelIter > | get_data_set_vfunc () const |
virtual bool | select_row_vfunc (int row) |
virtual void | unselect_row_vfunc (int row) |
virtual void | set_column_visible_vfunc (int column, bool visible) |
Static Public Member Functions | |
static void | add_interface (GType gtype_implementer) |
Protected Member Functions | |
virtual void | on_selection_changed () |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr < Gnome::GdaUI::DataSelector > | wrap (GdauiDataSelector* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
Detailed Description
DataSelector - Selecting data in a Gnome::Gda::DataModel.
The DataSelector interface is implemented by widgets which allow the user to select some data from a Gnome::Gda::DataModel. Depending on the actual widget, the selection can be a single row or more than one row.
This interface allows one to set and get the Gnome::Gda::DataModel from which data is to be selected and offers a few other common behaviours.
Please note that any row number in this interface is in reference to the Gnome::Gda::DataModel returned by the get_model() method.
Constructor & Destructor Documentation
virtual Gnome::GdaUI::DataSelector::~DataSelector | ( | ) | [virtual] |
Member Function Documentation
static void Gnome::GdaUI::DataSelector::add_interface | ( | GType | gtype_implementer | ) | [static] |
Glib::RefPtr<const Gnome::Gda::DataModelIter> Gnome::GdaUI::DataSelector::get_data_set | ( | ) | const |
Get the Gda::DataModelIter object represented the current selected row in iface.
This function may return either 0
or an invalid iterator (see gda_data_model_iter_is_valid()) if the selection cannot be represented by a single selected row.
Note that the returned Gda::DataModelIter is actually an iterator iterating on the Gda::DataModel returned by the get_model() method.
- Returns:
- A pointer to a Gda::DataModelIter object, or
0
.
Glib::RefPtr<Gnome::Gda::DataModelIter> Gnome::GdaUI::DataSelector::get_data_set | ( | ) |
Get the Gda::DataModelIter object represented the current selected row in iface.
This function may return either 0
or an invalid iterator (see gda_data_model_iter_is_valid()) if the selection cannot be represented by a single selected row.
Note that the returned Gda::DataModelIter is actually an iterator iterating on the Gda::DataModel returned by the get_model() method.
- Returns:
- A pointer to a Gda::DataModelIter object, or
0
.
virtual Glib::RefPtr<Gnome::Gda::DataModelIter> Gnome::GdaUI::DataSelector::get_data_set_vfunc | ( | ) | const [virtual] |
Glib::RefPtr<Gnome::Gda::DataModel> Gnome::GdaUI::DataSelector::get_model | ( | ) |
Queries the Gda::DataModel from which the data displayed by the widget implementing iface are.
Beware that the returned data model may be different than the one used when the widget was created in case it uses a Gda::DataProxy.
- Returns:
- The Gda::DataModel.
Glib::RefPtr<const Gnome::Gda::DataModel> Gnome::GdaUI::DataSelector::get_model | ( | ) | const |
Queries the Gda::DataModel from which the data displayed by the widget implementing iface are.
Beware that the returned data model may be different than the one used when the widget was created in case it uses a Gda::DataProxy.
- Returns:
- The Gda::DataModel.
virtual Glib::RefPtr<Gnome::Gda::DataModel> Gnome::GdaUI::DataSelector::get_model_vfunc | ( | ) | const [virtual] |
GdauiDataSelector* Gnome::GdaUI::DataSelector::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::Interface.
Reimplemented in Gnome::GdaUI::Cloud, Gnome::GdaUI::Combo, Gnome::GdaUI::Form, Gnome::GdaUI::Grid, Gnome::GdaUI::ProviderSelector, and Gnome::GdaUI::RawGrid.
const GdauiDataSelector* Gnome::GdaUI::DataSelector::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::Interface.
Reimplemented in Gnome::GdaUI::Cloud, Gnome::GdaUI::Combo, Gnome::GdaUI::Form, Gnome::GdaUI::Grid, Gnome::GdaUI::ProviderSelector, and Gnome::GdaUI::RawGrid.
virtual void Gnome::GdaUI::DataSelector::on_selection_changed | ( | ) | [protected, virtual] |
bool Gnome::GdaUI::DataSelector::select_row | ( | int | row | ) |
Force the selection of a specific row.
Please note that row refers to the "visible" row at the time it's being called, which may change if the widget implementing this interface uses a Gda::DataProxy (as is the case for example for the Gdaui::RawForm, Gdaui::Form, Gdaui::RawGrid and Gdaui::Grid).
- Parameters:
-
row The row to select.
- Returns:
true
if the row has been selected.
virtual bool Gnome::GdaUI::DataSelector::select_row_vfunc | ( | int | row | ) | [virtual] |
void Gnome::GdaUI::DataSelector::set_column_visible | ( | int | column, |
bool | visible | ||
) |
Shows or hides the data at column column.
- Parameters:
-
column A column number, starting at %0. visible Required visibility of the data in the column column.
virtual void Gnome::GdaUI::DataSelector::set_column_visible_vfunc | ( | int | column, |
bool | visible | ||
) | [virtual] |
void Gnome::GdaUI::DataSelector::set_model | ( | const Glib::RefPtr< Gnome::Gda::DataModel > & | model | ) |
Sets the data model from which the data being displayed are.
Also see get_model()
- Parameters:
-
model A Gda::DataModel to use.
virtual void Gnome::GdaUI::DataSelector::set_model_vfunc | ( | const Glib::RefPtr< Gnome::Gda::DataModel > & | model | ) | [virtual] |
Glib::SignalProxy0< void > Gnome::GdaUI::DataSelector::signal_selection_changed | ( | ) |
- Prototype:
void on_my_selection_changed()
void Gnome::GdaUI::DataSelector::unselect_row | ( | int | row | ) |
Please note that row refers to the "visible" row at the time it's being called, which may change if the widget implementing this interface uses a Gda::DataProxy (as is the case for example for the Gdaui::RawForm, Gdaui::Form, Gdaui::RawGrid and Gdaui::Grid).
- Parameters:
-
row The row to unselect.
virtual void Gnome::GdaUI::DataSelector::unselect_row_vfunc | ( | int | row | ) | [virtual] |
Friends And Related Function Documentation
Glib::RefPtr< Gnome::GdaUI::DataSelector > wrap | ( | GdauiDataSelector * | 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.