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 <tableview/kexitableview.h> 00026 00027 class KexiTableItem; 00028 class QVariant; 00029 class KXMLGUIClient; 00030 00031 namespace KexiDB { 00032 class Cursor; 00033 } 00034 00038 class KEXIEXTWIDGETS_EXPORT KexiDataTableView : public KexiTableView 00039 { 00040 Q_OBJECT 00041 00042 public: 00046 KexiDataTableView(QWidget *parent, const char *name =0); 00053 KexiDataTableView(QWidget *parent, const char *name, KexiDB::Cursor *cursor); 00054 00055 ~KexiDataTableView(); 00056 00057 // virtual void initActions(KActionCollection *col); 00058 00061 bool setData(KexiDB::Cursor *cursor); 00062 00065 KexiDB::Cursor *cursor() { return m_cursor; } 00066 00071 int recordCount() { return m_data->count(); } 00072 00073 #ifndef KEXI_NO_PRINT 00074 // virtual void print(KPrinter &printer); 00075 #endif 00076 00077 protected: 00078 void init(); 00079 00081 // virtual bool beforeDeleteItem(KexiTableItem *item); 00082 00083 protected slots: 00084 // void slotClearData(); 00085 00086 private: 00087 //db stuff 00088 KexiDB::Cursor *m_cursor; 00089 00090 // QMap<KexiDBUpdateRecord*,KexiTableItem*> m_insertMapping; 00091 }; 00092 00093 #endif