LibreOffice Module dbaccess (master) 1
|
provides images for database objects such as tables, queries, forms, reports ... More...
#include <imageprovider.hxx>
Public Member Functions | |
ImageProvider () | |
creates a semi-functional ImageProvider instance More... | |
ImageProvider (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection) | |
creates an ImageProvider instance More... | |
OUString | getImageId (const OUString &_rName, const sal_Int32 _nDatabaseObjectType) |
returns the image to be used for a database object with the given name More... | |
css::uno::Reference< css::graphic::XGraphic > | getXGraphic (const OUString &_rName, const sal_Int32 _nDatabaseObjectType) |
Static Public Member Functions | |
static OUString | getDefaultImageResourceID (sal_Int32 _nDatabaseObjectType) |
returns the resource ID for the default image to be used for a database object More... | |
static OUString | getFolderImageId (sal_Int32 _nDatabaseObjectType) |
static OUString | getDatabaseImage () |
retrieves the image to be used for a database as a whole. More... | |
Private Attributes | |
css::uno::Reference< css::sdbc::XConnection > | mxConnection |
the connection we work with More... | |
css::uno::Reference< css::container::XNameAccess > | mxViews |
the views of the connection, if the DB supports views More... | |
css::uno::Reference< css::sdb::application::XTableUIProvider > | mxTableUI |
interface for providing table's UI More... | |
provides images for database objects such as tables, queries, forms, reports ...
At the moment, this class cares for small icons only, that is, icons which can be used in a tree control. On the medium term, we should extend it with support for different-sized icons.
Definition at line 35 of file imageprovider.hxx.
dbaui::ImageProvider::ImageProvider | ( | ) |
creates a semi-functional ImageProvider instance
The resulting instance is not able to provide any concrete object images, but only default images.
Definition at line 88 of file imageprovider.cxx.
dbaui::ImageProvider::ImageProvider | ( | const css::uno::Reference< css::sdbc::XConnection > & | _rxConnection | ) |
creates an ImageProvider instance
_rxConnection | denotes the connection to work for. Must not be <NULL>. |
References getDatabaseImage(), getDefaultImageResourceID(), getFolderImageId(), getImageId(), and getXGraphic().
|
static |
retrieves the image to be used for a database as a whole.
Definition at line 185 of file imageprovider.cxx.
Referenced by ImageProvider().
|
static |
returns the resource ID for the default image to be used for a database object
In opposite to getImageId, this method does not check the concrete object for its image, but returns a default image to be used for all objects of the given type.
_nDatabaseObjectType | the type of the object. Must be one of the css.sdb.application.DatabaseObject constants. |
Definition at line 136 of file imageprovider.cxx.
References dbaccess::QUERY, dbaccess::REPORT, and dbaccess::TABLE.
Referenced by ImageProvider().
|
static |
Definition at line 160 of file imageprovider.cxx.
References dbaccess::QUERY, dbaccess::REPORT, and dbaccess::TABLE.
Referenced by ImageProvider().
OUString dbaui::ImageProvider::getImageId | ( | const OUString & | _rName, |
const sal_Int32 | _nDatabaseObjectType | ||
) |
returns the image to be used for a database object with the given name
_nDatabaseObjectType | the type of the object. Must be one of the css.sdb.application.DatabaseObject constants. |
_rName | the name of the object |
Definition at line 109 of file imageprovider.cxx.
References dbaccess::TABLE.
Referenced by ImageProvider().
Reference< XGraphic > dbaui::ImageProvider::getXGraphic | ( | const OUString & | _rName, |
const sal_Int32 | _nDatabaseObjectType | ||
) |
Definition at line 125 of file imageprovider.cxx.
References dbaccess::TABLE.
Referenced by ImageProvider().
|
private |
the connection we work with
Definition at line 98 of file imageprovider.hxx.
|
private |
interface for providing table's UI
Definition at line 102 of file imageprovider.hxx.
|
private |
the views of the connection, if the DB supports views
Definition at line 100 of file imageprovider.hxx.