Kexi API Documentation (2.0 alpha)

KexiDataSourceComboBox Class Reference

#include <kexidatasourcecombobox.h>

Inheritance diagram for KexiDataSourceComboBox:

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)
 Sets global project that is used to retrieve schema informationm for this combo box.
void setDataSource (const QString &mimeType, const QString &name)

Signals

void dataSourceChanged ()
 Emitted whenever data source changes.

Public Member Functions

 KexiDataSourceComboBox (QWidget *parent, const char *name=0)
 ~KexiDataSourceComboBox ()
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


Constructor & Destructor Documentation

KexiDataSourceComboBox::KexiDataSourceComboBox QWidget parent,
const char *  name = 0
 

Definition at line 72 of file kexidatasourcecombobox.cpp.

References d, slotActivated(), and slotReturnPressed().

KexiDataSourceComboBox::~KexiDataSourceComboBox  ) 
 

Definition at line 86 of file kexidatasourcecombobox.cpp.

References d.


Member Function Documentation

void KexiDataSourceComboBox::dataSourceChanged  )  [signal]
 

Emitted whenever data source changes.

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

Referenced by setDataSource(), slotActivated(), and slotReturnPressed().

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 213 of file kexidatasourcecombobox.cpp.

References d.

Referenced by setDataSource(), slotItemRemoved(), and slotItemRenamed().

void KexiDataSourceComboBox::focusOutEvent QFocusEvent *  e  )  [protected, virtual]
 

Definition at line 325 of file kexidatasourcecombobox.cpp.

References slotReturnPressed().

bool KexiDataSourceComboBox::isSelectionValid  )  const
 

Returns:
true if current selection is valid

Definition at line 296 of file kexidatasourcecombobox.cpp.

References d.

Referenced by selectedName(), KexiDataSourcePage::slotDataSourceChanged(), KexiDataSourcePage::slotDataSourceTextChanged(), KexiDataSourcePage::slotGotoSelected(), and KexiDataSourcePage::updateSourceFieldWidgetsAvailability().

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.

References d.

Referenced by KexiDataSourcePage::slotDataSourceChanged().

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 277 of file kexidatasourcecombobox.cpp.

References d, and selectedName().

Referenced by KexiDataSourcePage::slotDataSourceChanged(), and KexiDataSourcePage::slotGotoSelected().

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 289 of file kexidatasourcecombobox.cpp.

References isSelectionValid().

Referenced by KexiDataSourcePage::clearDataSourceSelection(), selectedMimeType(), KexiDataSourcePage::slotDataSourceChanged(), KexiDataSourcePage::slotDataSourceTextChanged(), and KexiDataSourcePage::slotGotoSelected().

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.

References d, dataSourceChanged(), findItem(), and slotActivated().

Referenced by KexiDataSourcePage::clearDataSourceSelection(), and KexiDataSourcePage::setDataSource().

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.

References d, KexiProject::getSortedItems(), Kexi::partManager(), slotItemRemoved(), slotItemRenamed(), and slotNewItemStored().

Referenced by KexiDataSourcePage::setProject().

void KexiDataSourceComboBox::slotActivated int  index  )  [protected, slot]
 

Definition at line 269 of file kexidatasourcecombobox.cpp.

References d, and dataSourceChanged().

Referenced by KexiDataSourceComboBox(), and setDataSource().

void KexiDataSourceComboBox::slotItemRemoved const KexiPart::Item item  )  [protected, slot]
 

Definition at line 239 of file kexidatasourcecombobox.cpp.

References d, and findItem().

Referenced by setProject().

void KexiDataSourceComboBox::slotItemRenamed const KexiPart::Item item,
const QCString &  oldName
[protected, slot]
 

Definition at line 258 of file kexidatasourcecombobox.cpp.

References findItem(), KexiPart::Item::mimeType(), and KexiPart::Item::name().

Referenced by setProject().

void KexiDataSourceComboBox::slotNewItemStored KexiPart::Item item  )  [protected, slot]
 

Definition at line 189 of file kexidatasourcecombobox.cpp.

References d, KexiPart::Item::mimeType(), and KexiPart::Item::name().

Referenced by setProject().

void KexiDataSourceComboBox::slotReturnPressed const QString text  )  [protected, slot]
 

Definition at line 302 of file kexidatasourcecombobox.cpp.

References dataSourceChanged().

Referenced by focusOutEvent(), and KexiDataSourceComboBox().


Member Data Documentation

Private* KexiDataSourceComboBox::d [protected]
 

Definition at line 84 of file kexidatasourcecombobox.h.

Referenced by findItem(), isSelectionValid(), KexiDataSourceComboBox(), project(), selectedMimeType(), setDataSource(), setProject(), slotActivated(), slotItemRemoved(), slotNewItemStored(), and ~KexiDataSourceComboBox().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:55 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003