kexi

kexidatatableview.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003   Lucijan Busch <lucijan@kde.org>
00003    Copyright (C) 2003   Joseph Wenninger <jowenn@kde.org>
00004    Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
00005 
00006    This program is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this program; see the file COPYING.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef KEXIDATATABLEVIEW_H
00023 #define KEXIDATATABLEVIEW_H
00024 
00025 #include "kexitableview.h"
00026 
00027 class KexiTableItem;
00028 class QVariant;
00029 class KXMLGUIClient;
00030 
00031 namespace KexiDB {
00032     class Cursor;
00033 }
00034 
00038 class KEXIDATATABLE_EXPORT KexiDataTableView : public KexiTableView
00039 {
00040     Q_OBJECT
00041 
00042     public:
00046         KexiDataTableView(QWidget *parent, const char *name =0);
00047 
00054         KexiDataTableView(QWidget *parent, const char *name, KexiDB::Cursor *cursor);
00055 
00056         ~KexiDataTableView();
00057 
00058 //      virtual void initActions(KActionCollection *col);
00059 
00062         bool setData(KexiDB::Cursor *cursor);
00063 
00066         KexiDB::Cursor *cursor() { return m_cursor; }
00067 
00072         int recordCount() { return m_data->count(); }
00073 
00074         #ifndef KEXI_NO_PRINT
00075 //      virtual void print(KPrinter &printer);
00076         #endif
00077 
00078     protected:
00079         void init();
00080 
00082 //      virtual bool beforeDeleteItem(KexiTableItem *item);
00083 
00084     protected slots:
00085 //      void slotClearData();
00086 
00087     private:
00088         //db stuff
00089         KexiDB::Cursor  *m_cursor;
00090 
00091 //      QMap<KexiDBUpdateRecord*,KexiTableItem*> m_insertMapping;
00092 };
00093 
00094 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys