Kexi API Documentation (2.0 alpha)

KexiDataSourcePage Class Reference

#include <kexidatasourcepage.h>

Inheritance diagram for KexiDataSourcePage:

QWidget List of all members.

Detailed Description

A page within form designer's property tabbed pane, providing data source editor.

Definition at line 38 of file kexidatasourcepage.h.

Public Slots

void setProject (KexiProject *prj)
void clearDataSourceSelection (bool alsoClearComboBox=true)
void clearWidgetDataSourceSelection ()
void setDataSource (const QCString &mimeType, const QCString &name)
 Sets data source of a currently selected form.
void assignPropertySet (KoProperty::Set *propertySet)
 Receives a pointer to a new property set (from KexiFormView::managerPropertyChanged()).

Signals

void jumpToObjectRequested (const QCString &mime, const QCString &name)
 Signal emitted when helper button 'go to selected data source' is clicked.
void formDataSourceChanged (const QCString &mime, const QCString &name)
 Signal emitted when form's data source has been changed. It's connected to the Form Manager.
void dataSourceFieldOrExpressionChanged (const QString &string, const QString &caption, KexiDB::Field::Type type)
void insertAutoFields (const QString &sourceMimeType, const QString &sourceName, const QStringList &fields)

Public Member Functions

 KexiDataSourcePage (QWidget *parent, const char *name=0)
virtual ~KexiDataSourcePage ()
KexiDataSourceComboBoxdataSourceCombo () const
KexiObjectInfoLabelobjectInfoLabel () const

Protected Slots

void slotDataSourceTextChanged (const QString &string)
void slotDataSourceChanged ()
void slotFieldSelected ()
void slotGotoSelected ()
void slotInsertSelectedFields ()
void slotFieldListViewSelectionChanged ()
void slotFieldDoubleClicked (const QString &sourceMimeType, const QString &sourceName, const QString &fieldName)

Protected Member Functions

void updateSourceFieldWidgetsAvailability ()

Protected Attributes

KexiFieldComboBoxm_sourceFieldCombo
KexiObjectInfoLabelm_objectInfoLabel
KexiDataSourceComboBoxm_dataSourceCombo
QLabelm_dataSourceLabel
QLabelm_noDataSourceAvailableLabel
QLabelm_widgetDSLabel
QLabelm_availableFieldsLabel
QLabelm_mousePointerLabel
QLabelm_availableFieldsDescriptionLabel
QToolButtonm_clearWidgetDSButton
QToolButtonm_clearDSButton
QToolButtonm_gotoButton
QToolButtonm_addField
QFramem_dataSourceSeparator
QString m_noDataSourceAvailableSingleText
QString m_noDataSourceAvailableMultiText
bool m_insideClearDataSourceSelection: 1
KexiFieldListViewm_fieldListView
QCString m_currentObjectName
 Used only in assignPropertySet() to check whether we already have the set assigned.


Constructor & Destructor Documentation

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

Todo:
allow to hide such helpers by adding global option

Definition at line 46 of file kexidatasourcepage.cpp.

References KexiFieldListView::AllowMultiSelection, clearDataSourceSelection(), clearWidgetDataSourceSelection(), m_addField, m_availableFieldsDescriptionLabel, m_availableFieldsLabel, m_clearDSButton, m_clearWidgetDSButton, m_dataSourceCombo, m_dataSourceLabel, m_fieldListView, m_gotoButton, m_mousePointerLabel, m_noDataSourceAvailableLabel, m_noDataSourceAvailableMultiText, m_noDataSourceAvailableSingleText, m_objectInfoLabel, m_sourceFieldCombo, m_widgetDSLabel, KexiFieldListView::ShowDataTypes, slotDataSourceChanged(), slotDataSourceTextChanged(), slotFieldDoubleClicked(), slotFieldListViewSelectionChanged(), slotFieldSelected(), slotGotoSelected(), and slotInsertSelectedFields().

KexiDataSourcePage::~KexiDataSourcePage  )  [virtual]
 

Definition at line 204 of file kexidatasourcepage.cpp.


Member Function Documentation

void KexiDataSourcePage::assignPropertySet KoProperty::Set *  propertySet  )  [slot]
 

Receives a pointer to a new property set (from KexiFormView::managerPropertyChanged()).

Definition at line 357 of file kexidatasourcepage.cpp.

References m_clearWidgetDSButton, m_currentObjectName, m_noDataSourceAvailableLabel, m_noDataSourceAvailableMultiText, m_noDataSourceAvailableSingleText, m_objectInfoLabel, m_sourceFieldCombo, m_widgetDSLabel, KexiFieldComboBox::setFieldOrExpression(), KexiPropertyEditorView::updateInfoLabelForPropertySet(), and updateSourceFieldWidgetsAvailability().

void KexiDataSourcePage::clearDataSourceSelection bool  alsoClearComboBox = true  )  [slot]
 

Definition at line 214 of file kexidatasourcepage.cpp.

References m_addField, m_clearDSButton, m_dataSourceCombo, m_fieldListView, m_gotoButton, m_insideClearDataSourceSelection, KexiDataSourceComboBox::selectedName(), and KexiDataSourceComboBox::setDataSource().

Referenced by KexiDataSourcePage(), and slotDataSourceTextChanged().

void KexiDataSourcePage::clearWidgetDataSourceSelection  )  [slot]
 

Definition at line 234 of file kexidatasourcepage.cpp.

References m_clearWidgetDSButton, m_sourceFieldCombo, KexiFieldComboBox::setFieldOrExpression(), and slotFieldSelected().

Referenced by KexiDataSourcePage().

KexiDataSourceComboBox* KexiDataSourcePage::dataSourceCombo  )  const [inline]
 

Definition at line 46 of file kexidatasourcepage.h.

void KexiDataSourcePage::dataSourceFieldOrExpressionChanged const QString string,
const QString caption,
KexiDB::Field::Type  type
[signal]
 

Signal emitted when current widget's data source (field/expression) has been changed. It's connected to the Form Manager. caption for this field is also provided (e.g. AutoField form widget use it)

Referenced by slotFieldSelected().

void KexiDataSourcePage::formDataSourceChanged const QCString &  mime,
const QCString &  name
[signal]
 

Signal emitted when form's data source has been changed. It's connected to the Form Manager.

Referenced by slotDataSourceChanged().

void KexiDataSourcePage::insertAutoFields const QString sourceMimeType,
const QString sourceName,
const QStringList &  fields
[signal]
 

Signal emitted when 'insert fields' button has been clicked

Referenced by slotFieldDoubleClicked(), and slotInsertSelectedFields().

void KexiDataSourcePage::jumpToObjectRequested const QCString &  mime,
const QCString &  name
[signal]
 

Signal emitted when helper button 'go to selected data source' is clicked.

Referenced by slotGotoSelected().

KexiObjectInfoLabel* KexiDataSourcePage::objectInfoLabel  )  const [inline]
 

Definition at line 47 of file kexidatasourcepage.h.

void KexiDataSourcePage::setDataSource const QCString &  mimeType,
const QCString &  name
[slot]
 

Sets data source of a currently selected form.

This is performed on form initialization and on activating.

Definition at line 352 of file kexidatasourcepage.cpp.

References m_dataSourceCombo, and KexiDataSourceComboBox::setDataSource().

void KexiDataSourcePage::setProject KexiProject prj  )  [slot]
 

Definition at line 208 of file kexidatasourcepage.cpp.

References m_dataSourceCombo, m_sourceFieldCombo, KexiDataSourceComboBox::setProject(), and KexiFieldComboBox::setProject().

void KexiDataSourcePage::slotDataSourceChanged  )  [protected, slot]
 

Definition at line 290 of file kexidatasourcepage.cpp.

References formDataSourceChanged(), KexiDataSourceComboBox::isSelectionValid(), m_addField, m_clearDSButton, m_dataSourceCombo, m_fieldListView, m_gotoButton, m_sourceFieldCombo, KexiDataSourceComboBox::project(), KexiDB::TableOrQuerySchema::query(), KexiDataSourceComboBox::selectedMimeType(), KexiDataSourceComboBox::selectedName(), KexiFieldListView::setSchema(), KexiFieldComboBox::setTableOrQuery(), slotFieldListViewSelectionChanged(), KexiDB::TableOrQuerySchema::table(), and updateSourceFieldWidgetsAvailability().

Referenced by KexiDataSourcePage().

void KexiDataSourcePage::slotDataSourceTextChanged const QString string  )  [protected, slot]
 

string.isEmpty() && m_dataSourceCombo->selectedName() == string.latin1();

Definition at line 275 of file kexidatasourcepage.cpp.

References clearDataSourceSelection(), KexiDataSourceComboBox::isSelectionValid(), m_dataSourceCombo, KexiDataSourceComboBox::selectedName(), and updateSourceFieldWidgetsAvailability().

Referenced by KexiDataSourcePage().

void KexiDataSourcePage::slotFieldDoubleClicked const QString sourceMimeType,
const QString sourceName,
const QString fieldName
[protected, slot]
 

Definition at line 265 of file kexidatasourcepage.cpp.

References insertAutoFields().

Referenced by KexiDataSourcePage().

void KexiDataSourcePage::slotFieldListViewSelectionChanged  )  [protected, slot]
 

Definition at line 444 of file kexidatasourcepage.cpp.

References m_addField, and m_fieldListView.

Referenced by KexiDataSourcePage(), and slotDataSourceChanged().

void KexiDataSourcePage::slotFieldSelected  )  [protected, slot]
 

Todo:
this should also work for expressions

Definition at line 331 of file kexidatasourcepage.cpp.

References dataSourceFieldOrExpressionChanged(), field, KexiFieldComboBox::fieldOrExpression(), KexiFieldComboBox::fieldOrExpressionCaption(), KexiDB::Field::InvalidType, m_clearWidgetDSButton, m_fieldListView, m_sourceFieldCombo, KexiFieldListView::schema(), and KexiDB::Field::type().

Referenced by clearWidgetDataSourceSelection(), and KexiDataSourcePage().

void KexiDataSourcePage::slotGotoSelected  )  [protected, slot]
 

Definition at line 244 of file kexidatasourcepage.cpp.

References KexiDataSourceComboBox::isSelectionValid(), jumpToObjectRequested(), m_dataSourceCombo, KexiDataSourceComboBox::selectedMimeType(), and KexiDataSourceComboBox::selectedName().

Referenced by KexiDataSourcePage().

void KexiDataSourcePage::slotInsertSelectedFields  )  [protected, slot]
 

Definition at line 253 of file kexidatasourcepage.cpp.

References insertAutoFields(), m_fieldListView, KexiFieldListView::schema(), and KexiFieldListView::selectedFieldNames().

Referenced by KexiDataSourcePage().

void KexiDataSourcePage::updateSourceFieldWidgetsAvailability  )  [protected]
 

m_dataSourceCombo->selectedName().isEmpty();

Definition at line 458 of file kexidatasourcepage.cpp.

References KexiDataSourceComboBox::isSelectionValid(), m_availableFieldsDescriptionLabel, m_availableFieldsLabel, m_dataSourceCombo, m_fieldListView, m_mousePointerLabel, m_sourceFieldCombo, and m_widgetDSLabel.

Referenced by assignPropertySet(), slotDataSourceChanged(), and slotDataSourceTextChanged().


Member Data Documentation

QToolButton * KexiDataSourcePage::m_addField [protected]
 

Definition at line 97 of file kexidatasourcepage.h.

Referenced by clearDataSourceSelection(), KexiDataSourcePage(), slotDataSourceChanged(), and slotFieldListViewSelectionChanged().

QLabel * KexiDataSourcePage::m_availableFieldsDescriptionLabel [protected]
 

Definition at line 94 of file kexidatasourcepage.h.

Referenced by KexiDataSourcePage(), and updateSourceFieldWidgetsAvailability().

QLabel * KexiDataSourcePage::m_availableFieldsLabel [protected]
 

Definition at line 94 of file kexidatasourcepage.h.

Referenced by KexiDataSourcePage(), and updateSourceFieldWidgetsAvailability().

QToolButton * KexiDataSourcePage::m_clearDSButton [protected]
 

Definition at line 97 of file kexidatasourcepage.h.

Referenced by clearDataSourceSelection(), KexiDataSourcePage(), and slotDataSourceChanged().

QToolButton* KexiDataSourcePage::m_clearWidgetDSButton [protected]
 

Definition at line 97 of file kexidatasourcepage.h.

Referenced by assignPropertySet(), clearWidgetDataSourceSelection(), KexiDataSourcePage(), and slotFieldSelected().

QCString KexiDataSourcePage::m_currentObjectName [protected]
 

Used only in assignPropertySet() to check whether we already have the set assigned.

Definition at line 108 of file kexidatasourcepage.h.

Referenced by assignPropertySet().

KexiDataSourceComboBox* KexiDataSourcePage::m_dataSourceCombo [protected]
 

Definition at line 93 of file kexidatasourcepage.h.

Referenced by clearDataSourceSelection(), KexiDataSourcePage(), setDataSource(), setProject(), slotDataSourceChanged(), slotDataSourceTextChanged(), slotGotoSelected(), and updateSourceFieldWidgetsAvailability().

QLabel* KexiDataSourcePage::m_dataSourceLabel [protected]
 

Definition at line 94 of file kexidatasourcepage.h.

Referenced by KexiDataSourcePage().

QFrame* KexiDataSourcePage::m_dataSourceSeparator [protected]
 

Definition at line 98 of file kexidatasourcepage.h.

KexiFieldListView* KexiDataSourcePage::m_fieldListView [protected]
 

Definition at line 104 of file kexidatasourcepage.h.

Referenced by clearDataSourceSelection(), KexiDataSourcePage(), slotDataSourceChanged(), slotFieldListViewSelectionChanged(), slotFieldSelected(), slotInsertSelectedFields(), and updateSourceFieldWidgetsAvailability().

QToolButton * KexiDataSourcePage::m_gotoButton [protected]
 

Definition at line 97 of file kexidatasourcepage.h.

Referenced by clearDataSourceSelection(), KexiDataSourcePage(), and slotDataSourceChanged().

bool KexiDataSourcePage::m_insideClearDataSourceSelection [protected]
 

Definition at line 100 of file kexidatasourcepage.h.

Referenced by clearDataSourceSelection().

QLabel * KexiDataSourcePage::m_mousePointerLabel [protected]
 

Definition at line 94 of file kexidatasourcepage.h.

Referenced by KexiDataSourcePage(), and updateSourceFieldWidgetsAvailability().

QLabel * KexiDataSourcePage::m_noDataSourceAvailableLabel [protected]
 

Definition at line 94 of file kexidatasourcepage.h.

Referenced by assignPropertySet(), and KexiDataSourcePage().

QString KexiDataSourcePage::m_noDataSourceAvailableMultiText [protected]
 

Definition at line 99 of file kexidatasourcepage.h.

Referenced by assignPropertySet(), and KexiDataSourcePage().

QString KexiDataSourcePage::m_noDataSourceAvailableSingleText [protected]
 

Definition at line 99 of file kexidatasourcepage.h.

Referenced by assignPropertySet(), and KexiDataSourcePage().

KexiObjectInfoLabel* KexiDataSourcePage::m_objectInfoLabel [protected]
 

Definition at line 92 of file kexidatasourcepage.h.

Referenced by assignPropertySet(), and KexiDataSourcePage().

KexiFieldComboBox* KexiDataSourcePage::m_sourceFieldCombo [protected]
 

Definition at line 91 of file kexidatasourcepage.h.

Referenced by assignPropertySet(), clearWidgetDataSourceSelection(), KexiDataSourcePage(), setProject(), slotDataSourceChanged(), slotFieldSelected(), and updateSourceFieldWidgetsAvailability().

QLabel * KexiDataSourcePage::m_widgetDSLabel [protected]
 

Definition at line 94 of file kexidatasourcepage.h.

Referenced by assignPropertySet(), KexiDataSourcePage(), and updateSourceFieldWidgetsAvailability().


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