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 Jarosław Staniek <staniek@kde.org>
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.
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.
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.
22
#ifndef KEXITABLEPART_H
23
#define KEXITABLEPART_H
27
#include <KexiWindow.h>
28
#include <KexiWindowData.h>
29
#include <kexipartitem.h>
31
#include <KDbFieldList>
33
class KexiLookupColumnPage;
35
class KexiTablePartTempData : public KexiWindowData
39
explicit KexiTablePartTempData(QObject* parent);
40
KDbTableSchema *table;
41
/*! true, if \a table member has changed in previous view. Used on view switching.
42
We're checking this flag to see if we should refresh data for DataViewMode. */
43
bool tableSchemaChangedInPreviousView;
46
//! @short Kexi Table Designer plugin
47
class KexiTablePart : public KexiPart::Part
52
KexiTablePart(QObject *parent, const QVariantList &);
53
virtual ~KexiTablePart();
55
virtual tristate remove(KexiPart::Item *item);
57
virtual tristate rename(KexiPart::Item *item, const QString& newName);
59
static tristate askForClosingObjectsUsingTableSchema(
60
QWidget *parent, KDbConnection *conn,
61
KDbTableSchema *table, const QString& msg);
63
virtual KLocalizedString i18nMessage(const QString& englishMessage,
64
KexiWindow* window) const;
66
KexiLookupColumnPage* lookupColumnPage() const;
69
virtual KexiWindowData* createWindowData(KexiWindow* window);
71
virtual KexiView* createView(QWidget *parent, KexiWindow* window,
72
KexiPart::Item *item, Kexi::ViewMode viewMode = Kexi::DataViewMode,
73
QMap<QString, QVariant>* staticObjectArgs = 0);
75
virtual void initPartActions();
76
virtual void initInstanceActions();
78
virtual void setupCustomPropertyPanelTabs(QTabWidget *tab);
80
virtual KDbObject* loadSchemaObject(KexiWindow *window, const KDbObject& object,
81
Kexi::ViewMode viewMode, bool *ownedByWindow);