kexi

#include <kexidatasourcecombobox.h>

Inherits KComboBox.

Public Slots

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

Signals

void dataSourceChanged ()
 

Public Member Functions

 KexiDataSourceComboBox (TQWidget *parent, const char *name=0)
 
KexiProject * project () const
 
TQString selectedMimeType () const
 
TQString selectedName () const
 
bool isSelectionValid () const
 
int findItem (const TQString &mimeType, const TQString &name)
 

Protected Slots

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

Protected Member Functions

virtual void focusOutEvent (TQFocusEvent *e)
 

Protected Attributes

Private * d
 

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.

Constructor & Destructor Documentation

◆ KexiDataSourceComboBox()

KexiDataSourceComboBox::KexiDataSourceComboBox ( TQWidget *  parent,
const char *  name = 0 
)

Definition at line 72 of file kexidatasourcecombobox.cpp.

◆ ~KexiDataSourceComboBox()

KexiDataSourceComboBox::~KexiDataSourceComboBox ( )

Definition at line 86 of file kexidatasourcecombobox.cpp.

Member Function Documentation

◆ dataSourceChanged

void KexiDataSourceComboBox::dataSourceChanged ( )
signal

Emitted whenever data source changes.

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

◆ findItem()

int KexiDataSourceComboBox::findItem ( const TQString &  mimeType,
const TQString &  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.

◆ focusOutEvent()

void KexiDataSourceComboBox::focusOutEvent ( TQFocusEvent *  e)
protectedvirtual

Definition at line 327 of file kexidatasourcecombobox.cpp.

◆ isSelectionValid()

bool KexiDataSourceComboBox::isSelectionValid ( ) const
Returns
true if current selection is valid

Definition at line 298 of file kexidatasourcecombobox.cpp.

◆ project()

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.

◆ selectedMimeType()

TQString 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.

◆ selectedName()

TQString 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.

◆ setDataSource

void KexiDataSourceComboBox::setDataSource ( const TQString &  mimeType,
const TQString &  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.

◆ setProject

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.

◆ slotActivated

void KexiDataSourceComboBox::slotActivated ( int  index)
protectedslot

Definition at line 271 of file kexidatasourcecombobox.cpp.

◆ slotItemRemoved

void KexiDataSourceComboBox::slotItemRemoved ( const KexiPart::Item &  item)
protectedslot

Definition at line 241 of file kexidatasourcecombobox.cpp.

◆ slotItemRenamed

void KexiDataSourceComboBox::slotItemRenamed ( const KexiPart::Item &  item,
const TQCString &  oldName 
)
protectedslot

Definition at line 260 of file kexidatasourcecombobox.cpp.

◆ slotNewItemStored

void KexiDataSourceComboBox::slotNewItemStored ( KexiPart::Item &  item)
protectedslot

Definition at line 191 of file kexidatasourcecombobox.cpp.

◆ slotReturnPressed

void KexiDataSourceComboBox::slotReturnPressed ( const TQString &  text)
protectedslot

Definition at line 304 of file kexidatasourcecombobox.cpp.

Member Data Documentation

◆ d

Private* KexiDataSourceComboBox::d
protected

Definition at line 86 of file kexidatasourcecombobox.h.


The documentation for this class was generated from the following files: