kexitablepart.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Lucijan Busch <lucijan@kde.org>
3 Copyright (C) 2002, 2003 Joseph Wenninger <jowenn@kde.org>
4 Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
5
6 This library 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
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KEXITABLEPART_H
23#define KEXITABLEPART_H
24
25#include <kexi.h>
26#include <kexipart.h>
27#include <kexidialogbase.h>
28//#include <kexipartdatasource.h>
29#include <kexipartitem.h>
30#include <kexidb/fieldlist.h>
31
32class KexiMainWin;
34
35class KexiTablePart : public KexiPart::Part
36{
37 TQ_OBJECT
38
39
40 public:
41 KexiTablePart(TQObject *parent, const char *name, const TQStringList &);
42 virtual ~KexiTablePart();
43
44 virtual bool remove(KexiMainWindow *win, KexiPart::Item &item);
45
46 virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item,
47 const TQString& newName);
48
49// virtual KexiPart::DataSource *dataSource();
50
51 class TempData : public KexiDialogTempData
52 {
53 public:
54 TempData(TQObject* parent);
58 bool tableSchemaChangedInPreviousView : 1;
59 };
60
61 static tristate askForClosingObjectsUsingTableSchema(
62 TQWidget *parent, KexiDB::Connection& conn,
63 KexiDB::TableSchema& table, const TQString& msg);
64
65 virtual TQString i18nMessage(const TQCString& englishMessage,
66 KexiDialogBase* dlg) const;
67
68 KexiLookupColumnPage* lookupColumnPage() const;
69
70 protected:
72
73 virtual KexiViewBase* createView(TQWidget *parent, KexiDialogBase* dialog,
74 KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
75
76 virtual void initPartActions();
77 virtual void initInstanceActions();
78
79 virtual void setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow* mainWin);
80
81 virtual KexiDB::SchemaData* loadSchemaData(KexiDialogBase *dlg, const KexiDB::SchemaData& sdata, int viewMode);
82
83 private:
84 class Private;
85 Private* d;
86};
87
88#if 0
89class KexiTableDataSource : public KexiPart::DataSource
90{
91 public:
92 KexiTableDataSource(KexiPart::Part *part);
93 ~KexiTableDataSource();
94
95 virtual KexiDB::FieldList *fields(KexiProject *project, const KexiPart::Item &item);
96 virtual KexiDB::Cursor *cursor(KexiProject *project, const KexiPart::Item &item, bool buffer);
97};
98#endif
99
100#endif
101
Provides database connection, allowing queries and data modification.
Definition connection.h:62
Provides database cursor functionality.
Definition cursor.h:67
Base class for child window of Kexi's main application window.
Privides temporary data shared between KexiDialogBase's views (KexiView's)
A page within table designer's property pane, providing lookup column editor.
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
this class provides a datasource framework for e.g.
virtual KexiDB::Cursor * cursor(KexiProject *project, const KexiPart::Item &i, bool buffer)=0
virtual KexiDB::FieldList * fields(KexiProject *project, const KexiPart::Item &i)=0
Information about a single object that can be instantiated using Kexi Part.
The main class for kexi frontend parts like tables, queries, forms and reports.
Definition kexipart.h:66
virtual void setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow *mainWin)
Definition kexipart.cpp:404
virtual KexiDialogTempData * createTempData(KexiDialogBase *dialog)
Definition kexipart.cpp:393
virtual bool remove(KexiMainWindow *win, KexiPart::Item &item)
Definition kexipart.cpp:385
virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item, const TQString &newName)
Definition kexipart.cpp:420
virtual KexiViewBase * createView(TQWidget *parent, KexiDialogBase *dialog, KexiPart::Item &item, int viewMode=Kexi::DataViewMode, TQMap< TQString, TQString > *staticObjectArgs=0)=0
virtual TQString i18nMessage(const TQCString &englishMessage, KexiDialogBase *dlg) const
Definition kexipart.cpp:398
A project's main controller.
Definition kexiproject.h:68
Base class for single view embeddable of in KexiDialogBase.
3-state logical type with three values: true, false and cancelled and convenient operators.
Definition tristate.h:100