kexi
kexiformmanager.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KEXIFORMMANAGER_H
00021 #define KEXIFORMMANAGER_H
00022
00023 #include <formmanager.h>
00024 #include <kexipart.h>
00025
00026 class KCommand;
00027 class KexiFormView;
00028
00031 class KEXIFORMUTILS_EXPORT KexiFormManager : public KFormDesigner::FormManager
00032 {
00033 Q_OBJECT
00034
00035 public:
00036 KexiFormManager(KexiPart::Part *parent, const char* name = 0);
00037 virtual ~KexiFormManager();
00038
00039 virtual KAction* action( const char* name );
00040 virtual void enableAction( const char* name, bool enable );
00041
00042 public slots:
00044 void setFormDataSource(const QCString& mime, const QCString& name);
00045
00052 void setDataSourceFieldOrExpression(const QString& string, const QString& caption,
00053 KexiDB::Field::Type type);
00054
00056 void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
00057 const QStringList& fields);
00058
00059 protected slots:
00060 void slotHistoryCommandExecuted();
00061
00062 protected:
00063 inline QString translateName( const char* name ) const;
00064
00065 private:
00067 KexiFormView* activeFormViewWidget() const;
00068
00069
00070
00071
00072 KexiPart::Part* m_part;
00073 };
00074
00075 QString KexiFormManager::translateName( const char* name ) const
00076 {
00077 QString n( name );
00078
00079 if (n.startsWith("align_") || n.startsWith("adjust_") || n.startsWith("layout_")
00080 || n=="format_raise" || n=="format_raise" || n=="taborder" | n=="break_layout")
00081 {
00082 n.prepend("formpart_");
00083 }
00084 return n;
00085 }
00086
00087 #endif
|