kexi

KexiDataSourceComboBox Class Reference

#include <kexidatasourcecombobox.h>

Inherits KComboBox.

List of all members.


Detailed Description

A combo box listing availabe data sources (tables and queries) with icons.

"Define query..." item can be also prepended.

Definition at line 34 of file kexidatasourcecombobox.h.


Public Slots

void setProject (KexiProject *prj, bool showTables=true, bool showQueries=true)
void setDataSource (const QString &mimeType, const QString &name)

Signals

void dataSourceChanged ()

Public Member Functions

 KexiDataSourceComboBox (QWidget *parent, const char *name=0)
KexiProjectproject () const
QString selectedMimeType () const
QString selectedName () const
bool isSelectionValid () const
int findItem (const QString &mimeType, const QString &name)

Protected Slots

void slotNewItemStored (KexiPart::Item &item)
void slotItemRemoved (const KexiPart::Item &item)
void slotItemRenamed (const KexiPart::Item &item, const QCString &oldName)
void slotActivated (int index)
void slotReturnPressed (const QString &text)

Protected Member Functions

virtual void focusOutEvent (QFocusEvent *e)

Protected Attributes

Private * d

Member Function Documentation

KexiProject * KexiDataSourceComboBox::project (  )  const

Returns:
global project that is used to retrieve schema informationm for this combo box.

Definition at line 91 of file kexidatasourcecombobox.cpp.

QString KexiDataSourceComboBox::selectedMimeType (  )  const

Returns:
name of selected table or query. Can return null string. You should use isSelectionValid() to check validity of the input.

Definition at line 279 of file kexidatasourcecombobox.cpp.

QString KexiDataSourceComboBox::selectedName (  )  const

Returns:
name of selected table or query. Can return null string or nonexisting name, so you should use isSelectionValid() to check validity of the input.

Definition at line 291 of file kexidatasourcecombobox.cpp.

bool KexiDataSourceComboBox::isSelectionValid (  )  const

Returns:
true if current selection is valid

Definition at line 298 of file kexidatasourcecombobox.cpp.

int KexiDataSourceComboBox::findItem ( const QString &  mimeType,
const QString &  name 
)

Returns:
index of item of mime type mimeType and name name. Returs -1 of no such item exists.

Definition at line 215 of file kexidatasourcecombobox.cpp.

void KexiDataSourceComboBox::setProject ( KexiProject prj,
bool  showTables = true,
bool  showQueries = true 
) [slot]

Sets global project that is used to retrieve schema informationm for this combo box.

Tables visibility can be set using showTables queries visibility using showQueries.

Definition at line 96 of file kexidatasourcecombobox.cpp.

void KexiDataSourceComboBox::setDataSource ( const QString &  mimeType,
const QString &  name 
) [slot]

Sets item for data source described by mimeType and name. If mimeType is empty, either "kexi/table" and "kexi/query" are tried.

Definition at line 165 of file kexidatasourcecombobox.cpp.

void KexiDataSourceComboBox::dataSourceChanged (  )  [signal]

Emitted whenever data source changes.

Even setting invalid data source or clearing it will emit this signal.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys