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 #include <koproperty/set.h>
00026
00027 class KCommand;
00028 class KexiObjectInfoLabel;
00029 class KexiDataSourceComboBox;
00030 class KexiFieldComboBox;
00031 class KexiFieldListView;
00032 class KexiProject;
00033 class QToolButton;
00034 class QLabel;
00035 class QFrame;
00036
00038 class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 KexiDataSourcePage(QWidget *parent, const char *name = 0);
00044 virtual ~KexiDataSourcePage();
00045
00046 KexiDataSourceComboBox* dataSourceCombo() const { return m_dataSourceCombo; }
00047 KexiObjectInfoLabel* objectInfoLabel() const { return m_objectInfoLabel; }
00048
00049 public slots:
00050 void setProject(KexiProject *prj);
00051 void clearDataSourceSelection(bool alsoClearComboBox = true);
00052 void clearWidgetDataSourceSelection();
00053
00056 void setDataSource(const QCString& mimeType, const QCString& name);
00057
00059 void assignPropertySet(KoProperty::Set* propertySet);
00060
00061 signals:
00063 void jumpToObjectRequested(const QCString& mime, const QCString& name);
00064
00066 void formDataSourceChanged(const QCString& mime, const QCString& name);
00067
00071 void dataSourceFieldOrExpressionChanged(const QString& string, const QString& caption,
00072 KexiDB::Field::Type type);
00073
00075 void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
00076 const QStringList& fields);
00077
00078 protected slots:
00079 void slotDataSourceTextChanged(const QString & string);
00080 void slotDataSourceChanged();
00081 void slotFieldSelected();
00082 void slotGotoSelected();
00083 void slotInsertSelectedFields();
00084 void slotFieldListViewSelectionChanged();
00085 void slotFieldDoubleClicked(const QString& sourceMimeType, const QString& sourceName,
00086 const QString& fieldName);
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
00108 QCString m_currentObjectName;
00109
00110 };
00111
00112 #endif
|