kexi

kexidbfieldlist.h
1/***************************************************************************
2 * kexidbfieldlist.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_KEXIDB_KEXIDBFIELDLIST_H
21#define KROSS_KEXIDB_KEXIDBFIELDLIST_H
22
23#include <tqstring.h>
24
25#include <api/object.h>
26#include <api/list.h>
27#include <api/class.h>
28
29#include <kexidb/drivermanager.h>
30#include <kexidb/fieldlist.h>
31
32namespace Kross { namespace KexiDB {
33
34 // Forward declarations.
35 class KexiDBField;
36 class KexiDBFieldList;
37
59 class KexiDBFieldList : public Kross::Api::Class<KexiDBFieldList>
60 {
61 public:
62 KexiDBFieldList(::KexiDB::FieldList* fieldlist);
63 virtual ~KexiDBFieldList();
64 virtual const TQString getClassName() const;
65 ::KexiDB::FieldList* fieldlist() { return m_fieldlist; }
66
67 private:
68
70 uint fieldCount();
72 KexiDBField* field(uint index);
74 KexiDBField* fieldByName(const TQString& name);
75
77 Kross::Api::List* fields();
79 bool hasField(KexiDBField* field);
81 const TQStringList names() const;
82
84 void addField(KexiDBField* field);
87 void insertField(uint index, KexiDBField* field);
89 void removeField(KexiDBField* field);
91 void clear();
93 void setFields(KexiDBFieldList* fieldlist);
95 KexiDBFieldList* subList(TQValueList<TQVariant> list);
96
97 private:
98 ::KexiDB::FieldList* m_fieldlist;
99 };
100
101}}
102
103#endif
104
A field in a record.
Definition kexidbfield.h:38
KrossKexiDB provides access to the KexiDB database functionality.