kexi
kexidbfield.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KROSS_KEXIDB_KEXIDBFIELD_H
00021 #define KROSS_KEXIDB_KEXIDBFIELD_H
00022
00023 #include <qstring.h>
00024
00025 #include <api/object.h>
00026 #include <api/list.h>
00027 #include <api/class.h>
00028
00029 #include <kexidb/drivermanager.h>
00030 #include <kexidb/field.h>
00031
00032 namespace Kross { namespace KexiDB {
00033
00037 class KexiDBField : public Kross::Api::Class<KexiDBField>
00038 {
00039 public:
00040 KexiDBField(::KexiDB::Field* field);
00041 virtual ~KexiDBField();
00042 virtual const QString getClassName() const;
00043 ::KexiDB::Field* field() { return m_field; }
00044
00045 private:
00046
00048 const QString type();
00050 void setType(const QString type);
00051
00055 const QString subType();
00057 void setSubType(const QString& subtype);
00058
00060 const QString variantType();
00062 const QString typeGroup();
00063
00065 bool isAutoInc();
00067 void setAutoInc(bool autoinc);
00068
00070 bool isUniqueKey();
00072 void setUniqueKey(bool unique);
00073
00075 bool isPrimaryKey();
00077 void setPrimaryKey(bool primary);
00078
00080 bool isForeignKey();
00082 void setForeignKey(bool foreign);
00083
00085 bool isNotNull();
00087 void setNotNull(bool notnull);
00088
00090 bool isNotEmpty();
00092 void setNotEmpty(bool notempty);
00093
00095 bool isIndexed();
00097 void setIndexed(bool indexed);
00098
00100 bool isUnsigned();
00102 void setUnsigned(bool isunsigned);
00103
00105 const QString name();
00107 void setName(const QString& name);
00108
00110 const QString caption();
00112 void setCaption(const QString& caption);
00113
00115 const QString description();
00117 void setDescription(const QString& desc);
00118
00120 uint length();
00122 void setLength(uint length);
00123
00126 uint precision();
00128 void setPrecision(uint precision);
00129
00132 uint width();
00134 void setWidth(uint width);
00135
00137 QVariant defaultValue();
00139 void setDefaultValue(const QVariant& defaultvalue);
00140
00141 private:
00142 ::KexiDB::Field* m_field;
00143 };
00144
00145 }}
00146
00147 #endif
00148
|