kexi
kexidatasourcepage.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KEXIDATASOURCEPAGE_H
00020 #define KEXIDATASOURCEPAGE_H
00021
00022 #include <qwidget.h>
00023 #include <kexidb/field.h>
00024 #include <kexidb/utils.h>
00025
00026 class KCommand;
00027 class KexiObjectInfoLabel;
00028 class KexiDataSourceComboBox;
00029 class KexiFieldComboBox;
00030 class KexiFieldListView;
00031 class KexiProject;
00032 class QToolButton;
00033 class QLabel;
00034 class QFrame;
00035 namespace KoProperty {
00036 class Set;
00037 }
00038
00040 class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
00041 {
00042 Q_OBJECT
00043
00044 public:
00045 KexiDataSourcePage(QWidget *parent, const char *name = 0);
00046 virtual ~KexiDataSourcePage();
00047
00048 KexiDataSourceComboBox* dataSourceCombo() const { return m_dataSourceCombo; }
00049 KexiObjectInfoLabel* objectInfoLabel() const { return m_objectInfoLabel; }
00050
00051 public slots:
00052 void setProject(KexiProject *prj);
00053 void clearDataSourceSelection();
00054 void clearWidgetDataSourceSelection();
00055
00058 void setDataSource(const QCString& mimeType, const QCString& name);
00059
00061 void assignPropertySet(KoProperty::Set* propertySet);
00062
00063 signals:
00065 void jumpToObjectRequested(const QCString& mime, const QCString& name);
00066
00068 void formDataSourceChanged(const QCString& mime, const QCString& name);
00069
00073 void dataSourceFieldOrExpressionChanged(const QString& string, const QString& caption,
00074 KexiDB::Field::Type type);
00075
00077 void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
00078 const QStringList& fields);
00079
00080 protected slots:
00081 void slotDataSourceTextChanged(const QString & string);
00082 void slotDataSourceSelected();
00083 void slotFieldSelected();
00084 void slotGotoSelected();
00085 void slotInsertSelectedFields();
00086 void slotFieldListViewSelectionChanged();
00087
00088 protected:
00089 void updateSourceFieldWidgetsAvailability();
00090
00091 KexiFieldComboBox *m_sourceFieldCombo;
00092 KexiObjectInfoLabel *m_objectInfoLabel;
00093 KexiDataSourceComboBox* m_dataSourceCombo;
00094 QLabel *m_dataSourceLabel, *m_noDataSourceAvailableLabel,
00095 *m_widgetDSLabel, *m_availableFieldsLabel,
00096 *m_mousePointerLabel, *m_availableFieldsDescriptionLabel;
00097 QToolButton *m_clearWidgetDSButton, *m_clearDSButton, *m_gotoButton, *m_addField;
00098 QFrame *m_dataSourceSeparator;
00099 QString m_noDataSourceAvailableSingleText, m_noDataSourceAvailableMultiText;
00100 bool m_insideClearDataSourceSelection : 1;
00101 #ifdef KEXI_NO_AUTOFIELD_WIDGET
00102 KexiDB::TableOrQuerySchema *m_tableOrQuerySchema;
00103 #else
00104 KexiFieldListView* m_fieldListView;
00105 #endif
00106
00107
00108
00109 };
00110
00111 #endif
|