KexiDBDriverComboBox Class Reference
#include <kexidbdrivercombobox.h>
Inheritance diagram for KexiDBDriverComboBox:

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 Types | |
| enum | Options { ShowFileDrivers = 1, ShowServerDrivers = 2, ShowAll = ShowFileDrivers|ShowServerDrivers } |
Public Member Functions | |
| KexiDBDriverComboBox (QWidget *parent, const KexiDB::Driver::InfoMap &driversInfo, Options options=ShowAll) | |
| ~KexiDBDriverComboBox () | |
| QStringList | driverNames () const |
| QString | selectedDriverName () const |
| void | setDriverName (const QString &driverName) |
Protected Attributes | |
| QMap< QString, QString > | m_driversMap |
| QStringList | m_driverNames |
Member Enumeration Documentation
|
|
Definition at line 52 of file kexidbdrivercombobox.h. |
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. References KexiDB::Driver::Info::caption, foreach, m_driverNames, m_driversMap, KexiDB::Driver::Info::name, ShowFileDrivers, and ShowServerDrivers. |
|
|
Definition at line 71 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 79 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 75 of file kexidbdrivercombobox.cpp. References m_driversMap. |
|
|
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 83 of file kexidbdrivercombobox.cpp. References m_driverNames. Referenced by KexiDBConnectionWidget::setDataInternal(). |
Member Data Documentation
|
|
Definition at line 98 of file kexidbdrivercombobox.h. Referenced by KexiDBDriverComboBox(), and setDriverName(). |
|
|
Definition at line 97 of file kexidbdrivercombobox.h. Referenced by KexiDBDriverComboBox(), and selectedDriverName(). |
The documentation for this class was generated from the following files:
