kexi

schemadata.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KEXIDB_SCHEMADATA_H
00021 #define KEXIDB_SCHEMADATA_H
00022 
00023 #include <qvaluelist.h>
00024 #include <qstring.h>
00025 
00026 #include <kexidb/global.h>
00027 #include <kexidb/field.h>
00028 
00029 namespace KexiDB {
00030 
00036 class KEXI_DB_EXPORT SchemaData
00037 {
00038     public:
00039         SchemaData(int obj_type = KexiDB::UnknownObjectType);
00040         virtual ~SchemaData();
00041 
00042         int type() const { return m_type; }
00043         int id() const { return m_id; }
00044         QString name() const { return m_name; }
00046         QString objectName() const { return m_name; }
00047         void setName(const QString& n) { m_name=n; }
00048         QString caption() const { return m_caption; }
00049         void setCaption(const QString& c) { m_caption=c; }
00050         QString description() const { return m_desc; }
00051         void setDescription(const QString& desc) { m_desc=desc; }
00052 
00054         virtual QString schemaDataDebugString() const;
00055         
00071         virtual bool isNative() const { return m_native; }
00072         
00073         /* Sets native flag */
00074         virtual void setNative(bool set) { m_native=set; }
00075 
00076     protected:
00078         void clear();
00079 
00080         int m_type;
00081         int m_id;
00082         QString m_name;
00083         QString m_caption;
00084         QString m_desc;
00085         bool m_native : 1;
00086 
00087     friend class Connection;
00088 };
00089 
00090 } //namespace KexiDB
00091 
00092 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys