kexi
KexiDBDriverComboBox Class Reference
#include <kexidbdrivercombobox.h>
Detailed Description
Combo box widget for selecting a database driver.This widget provides a combobox for selecting a database driver.
Usage:
KexiDB::DriverManager manager; KexiDB::Driver::InfoMap drvs = manager.driversInfo(); KexiDBDriverComboBox* combo = new KexiDBDriverComboBox(drvs, true, 0);
A more complete example can be found in koffice/kexi/tests/widgets/.
Definition at line 47 of file kexidbdrivercombobox.h.
Public Member Functions | |
KexiDBDriverComboBox (const KexiDB::Driver::InfoMap &driversInfo, bool includeFileBasedDrivers=true, QWidget *parent=0, const char *name=0) | |
~KexiDBDriverComboBox () | |
QStringList | driverNames () const |
QString | selectedDriverName () const |
void | setDriverName (const QString &driverName) |
Protected Attributes | |
QMap< QString, QString > | m_driversMap |
QStringList | m_driverNames |
Constructor & Destructor Documentation
|
Constructs a KexiDBDriverComboBox object. The combobox is populated with the names of the drivers in driversInfo. A suitable value for driversInfo can be obtained from KexiDB::DriverManager::driversInfo(). If includeFileBasedDrivers is set to false, then only those drivers that are for database servers (those which have X-Kexi-DriverType=Network in their .desktop file) are shown. Definition at line 26 of file kexidbdrivercombobox.cpp. |
Member Function Documentation
|
Gets a list of the names of all drivers. Note that this returns just the names of those drivers that are in the combobox: if the includeFileBasedDrivers argument to the constructor was false, this won't include the file based drivers either.
Definition at line 74 of file kexidbdrivercombobox.h. |
|
Get the name of the currrently selected driver. If the combobox is empty, QString::null will be returned.
Definition at line 49 of file kexidbdrivercombobox.cpp. |
|
Set the currrently selected driver. The combobox entry for driverName is selected. If driverName is not listed in the combobox then there is no change. The search is case insensitive. Definition at line 57 of file kexidbdrivercombobox.cpp. |
The documentation for this class was generated from the following files: