3.2. Overview of the GNOME-DB widgets

This section contains an overview of what can be done with the widgets provided by the GNOME-DB library. It contains short explanations of the basic functionality and use of each widget.

3.2.1. GnomeDbLogin widget

The GnomeDbLogin widget provides a custom way of visually connecting your application to a GDA provider. It can be added to any container widget, so that you can create, for example, a dialog box, and then add the GnomeDbLogin widget to it.

At initialization, it reads the GDA configuration and provides a combo box containing all user-configured data sources. The user just has to select the data source and provide his/her username and password. It also shows a list of the most recently accessed data sources, so that you can quickly connect to your "favorite" databases.

3.2.2. GnomeDbLoginDlg widget

This is a convenience widget which simply contains a GnomeDbLogin widget. It is a subclass of GnomeDialog, so you'll expect it to have a common look&feel with the rest of your application.

This widget does not only contain the GnomeDbLogin widget, but it catches the containee's signals, so if you use it, you should connect to the GnomeDbLoginDlg's signals instead of the GnomeDbLogin ones.

3.2.3. GnomeDbDsnConfig widget

The GnomeDbDsnConfig widget provides a way of letting the user visually manage GDA data sources. This widget can easily be inserted in a configuration dialog box, for example, and thus provides a visual interface to the GDA configuration files.

This widget is a visual wrapper around the GdaDsn management functions.

3.2.4. GnomeDbBrowser widget

This is a very complete widget that allows to browse the entire database, from tables and views to users and stored procedures. The most simple case where you'll want to use this widget is to create a container and add the GnomeDbBrowser widget to it. Simply doing this will bring a complete database browser to your application.

3.2.5. GnomeDbGrid widget

This is the most used widget in the library. It provides a way to visually inspect a GdaRecordset's contents. The database access part responsibility is taken entirely by the widget. You just have to pass it valid recordsets to show.

Data is loaded asynchronously, so your program won't block the user from accessing other parts of the application. Once the last row has been fetched, the GnomeDbGrid emits its "loaded" signal.

3.2.6. GnomeDbDataset widget

The GnomeDbDataset widget allows you to visually navigate recordsets returned from the database on a one-by-one basis.

3.2.7. GnomeDbCombo widget

This widget is a very useful one. It is mainly used in data input screens, providing a way by which the user can select a value from a list of values for a given field.

It works mainly as the GnomeDbGrid widget, since it works based on the GdaRecordset's you pass to it, but in this case, you must specify which of the columns in the recordset is to be shown.

3.2.8. GnomeDbList widget

The GnomeDbList widget lets you show a list of values for a given field in a recordset. It also lets you decorate the list with icons, resulting in a good looking widget to be included in your database access screens.

3.2.9. GnomeDbReport widget

The GnomeDbReport widget provides a way of presenting to the user customizable reports based on data coming from a GdaConnection. For this, it uses libgda's report engine.

The report structure is stored in XML format, which makes it possible for sharing data with other unrelated applications. This widget just reads this XML file, gets the specified data from a given database and presents it to the user based on the format instructions specified by the report structure.

3.2.10. GnomeDbIconList widget

The GnomeDbIconList widget works as the GnomeDbList and GnomeDbCombo widgets. But, in this case, the values present in a given field are presented as icons. This offers you - the developer - another way of presenting data to the user in your applications.

3.2.11. GnomeDbError widget

The GnomeDbError widget provides a way to browse through all the errors occurred for a given GdaConnection object. You can use it to inform the user whenever an error occurs, or as an informational widget.

3.2.12. GnomeDbErrorDlg widget

As the GnomeDbLoginDlg widget, the GnomeDbErrorDlg widget is just a convenience GnomeDialog subclass which just contains a GnomeDbError widget.