libgda-uimm: Gnome::GdaUI::DataProxy Class Reference

DataProxy - Modifying data in a Gome::Gda::DataModel. More...

#include <libgda-uimm/dataproxy.h>

Inheritance diagram for Gnome::GdaUI::DataProxy:

List of all members.

Public Member Functions

virtual ~DataProxy ()
GdauiDataProxy* gobj ()
 Provides access to the underlying C GObject.

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

Glib::RefPtr

< Gnome::Gda::DataProxy > 
get_proxy ()
 Get a pointer to the Gda::DataProxy being used by iface.

Glib::RefPtr< const

Gnome::Gda::DataProxy > 
get_proxy () const
 Get a pointer to the Gda::DataProxy being used by iface.

Glib::RefPtr< Gtk::ActionGroup > get_actions_group ()
 Each widget imlplementing the Gdaui::DataProxy interface provides actions.

Glib::RefPtr< const

Gtk::ActionGroup > 
get_action_group () const
 Each widget imlplementing the Gdaui::DataProxy interface provides actions.

void perform_action (Action action)
 Forces the widget to perform the selected action, as if the user had pressed on the corresponding action button in the iface widget, if the corresponding action is possible and if the iface widget supports the action.

void set_editable (int column, bool editable)
 Sets if the data entry in the iface widget at column (in the data model iface operates on) can be edited or not.

void show_actions (int column, bool show_actions)
 Sets if the data entry in the iface widget at column (in the data model iface operates on) must show its actions menu or not.

bool set_write_mode (DataProxyWriteMode mode)
 Specifies the way the modifications stored in the Gda::DataProxy used internally by iface are written back to the Gda::DataModel which holds the data displayed in iface.

DataProxyWriteMode get_write_mode () const
 Get the way the modifications stored in the Gda::DataProxy used internally by iface are written back to the Gda::DataModel which holds the data displayed in iface.

Glib::SignalProxy1< void,

const Glib::RefPtr

< Gnome::Gda::DataProxy >& > 
signal_proxy_changed ()
virtual Glib::RefPtr

< Gnome::Gda::DataProxy > 
get_proxy_vfunc () const
virtual void set_editable_vfunc (int column, bool editable)
virtual void show_actions_vfunc (int column, bool show_actions)
virtual Glib::RefPtr

< Gtk::ActionGroup > 
get_action_group_vfunc () const
virtual bool set_write_mode_vfunc (DataProxyWriteMode mode)

Static Public Member Functions

static void add_interface (GType gtype_implementer)

Protected Member Functions

virtual void on_proxy_changed (const Glib::RefPtr< Gnome::Gda::DataProxy >& proxy)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr

< Gnome::GdaUI::DataProxy
wrap (GdauiDataProxy* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Detailed Description

DataProxy - Modifying data in a Gome::Gda::DataModel.

The DataProxy interface is implemented by widgets which allow modifications to a Gnome::Gda::DataModel (through a Gnome::Gda::DataProxy to actually proxy the changes before they are written to the data model).


Constructor & Destructor Documentation

virtual Gnome::GdaUI::DataProxy::~DataProxy ( ) [virtual]

Member Function Documentation

static void Gnome::GdaUI::DataProxy::add_interface ( GType  gtype_implementer) [static]
Glib::RefPtr<const Gtk::ActionGroup> Gnome::GdaUI::DataProxy::get_action_group ( ) const

Each widget imlplementing the Gdaui::DataProxy interface provides actions.

Actions can be triggered using the perform_action() method, but using this method allows for the creation of toolbars, menus, etc calling these actions.

The actions are among: <itemizedlist><listitem>Data edition actions: "ActionNew", "ActionCommit", "ActionDelete, "ActionUndelete, "ActionReset", </listitem> <listitem>Record by record moving: "ActionFirstRecord", "ActionPrevRecord", "ActionNextRecord", "ActionLastRecord",</listitem> <listitem>Chuncks of records moving: "ActionFirstChunck", "ActionPrevChunck", "ActionNextChunck", "ActionLastChunck".</listitem> <listitem>Filtering: "ActionFilter"</listitem></itemizedlist>

Since libgda-uimm 4.2:
Returns:
The Gtk::ActionGroup with all the possible actions on the widget.
virtual Glib::RefPtr<Gtk::ActionGroup> Gnome::GdaUI::DataProxy::get_action_group_vfunc ( ) const [virtual]
Glib::RefPtr<Gtk::ActionGroup> Gnome::GdaUI::DataProxy::get_actions_group ( )

Each widget imlplementing the Gdaui::DataProxy interface provides actions.

Actions can be triggered using the perform_action() method, but using this method allows for the creation of toolbars, menus, etc calling these actions.

The actions are among: <itemizedlist><listitem>Data edition actions: "ActionNew", "ActionCommit", "ActionDelete, "ActionUndelete, "ActionReset", </listitem> <listitem>Record by record moving: "ActionFirstRecord", "ActionPrevRecord", "ActionNextRecord", "ActionLastRecord",</listitem> <listitem>Chuncks of records moving: "ActionFirstChunck", "ActionPrevChunck", "ActionNextChunck", "ActionLastChunck".</listitem> <listitem>Filtering: "ActionFilter"</listitem></itemizedlist>

Since libgda-uimm 4.2:
Returns:
The Gtk::ActionGroup with all the possible actions on the widget.
Glib::RefPtr<Gnome::Gda::DataProxy> Gnome::GdaUI::DataProxy::get_proxy ( )

Get a pointer to the Gda::DataProxy being used by iface.

Since libgda-uimm 4.2:
Returns:
A Gda::DataProxy pointer.
Glib::RefPtr<const Gnome::Gda::DataProxy> Gnome::GdaUI::DataProxy::get_proxy ( ) const

Get a pointer to the Gda::DataProxy being used by iface.

Since libgda-uimm 4.2:
Returns:
A Gda::DataProxy pointer.
virtual Glib::RefPtr<Gnome::Gda::DataProxy> Gnome::GdaUI::DataProxy::get_proxy_vfunc ( ) const [virtual]
DataProxyWriteMode Gnome::GdaUI::DataProxy::get_write_mode ( ) const

Get the way the modifications stored in the Gda::DataProxy used internally by iface are written back to the Gda::DataModel which holds the data displayed in iface.

Since libgda-uimm 4.2:
Returns:
The write mode used by iface.
GdauiDataProxy* Gnome::GdaUI::DataProxy::gobj ( ) [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gnome::GdaUI::Form, Gnome::GdaUI::Grid, and Gnome::GdaUI::RawGrid.

const GdauiDataProxy* Gnome::GdaUI::DataProxy::gobj ( ) const [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gnome::GdaUI::Form, Gnome::GdaUI::Grid, and Gnome::GdaUI::RawGrid.

virtual void Gnome::GdaUI::DataProxy::on_proxy_changed ( const Glib::RefPtr< Gnome::Gda::DataProxy > &  proxy) [protected, virtual]
void Gnome::GdaUI::DataProxy::perform_action ( Action  action)

Forces the widget to perform the selected action, as if the user had pressed on the corresponding action button in the iface widget, if the corresponding action is possible and if the iface widget supports the action.

Since libgda-uimm 4.2:
Parameters:
actionA Gdaui::Action action.
void Gnome::GdaUI::DataProxy::set_editable ( int  column,
bool  editable 
)

Sets if the data entry in the iface widget at column (in the data model iface operates on) can be edited or not.

Since libgda-uimm 4.2:
Parameters:
columnColumn number of the data.
editableSet to true to make the column editable.
virtual void Gnome::GdaUI::DataProxy::set_editable_vfunc ( int  column,
bool  editable 
) [virtual]
bool Gnome::GdaUI::DataProxy::set_write_mode ( DataProxyWriteMode  mode)

Specifies the way the modifications stored in the Gda::DataProxy used internally by iface are written back to the Gda::DataModel which holds the data displayed in iface.

Since libgda-uimm 4.2:
Parameters:
modeThe requested Gdaui::DataProxyWriteMode mode.
Returns:
true if the proposed mode has been taken into account.
virtual bool Gnome::GdaUI::DataProxy::set_write_mode_vfunc ( DataProxyWriteMode  mode) [virtual]
void Gnome::GdaUI::DataProxy::show_actions ( int  column,
bool  show_actions 
)

Sets if the data entry in the iface widget at column (in the data model iface operates on) must show its actions menu or not.

Since libgda-uimm 4.2:
Parameters:
columnColumn number of the data, or -1 to apply the setting to all the columns.
show_actionsSet to true if the actions menu must be shown.
virtual void Gnome::GdaUI::DataProxy::show_actions_vfunc ( int  column,
bool  show_actions 
) [virtual]
Glib::SignalProxy1< void,const Glib::RefPtr<Gnome::Gda::DataProxy>& > Gnome::GdaUI::DataProxy::signal_proxy_changed ( )
Prototype:
void on_my_proxy_changed(const Glib::RefPtr<Gnome::Gda::DataProxy>& proxy)

Friends And Related Function Documentation

Glib::RefPtr< Gnome::GdaUI::DataProxy > wrap ( GdauiDataProxy *  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.