~ubuntu-branches/debian/sid/kexi/sid

« back to all changes in this revision

Viewing changes to src/plugins/tables/kexitablepart.h

  • Committer: Package Import Robot
  • Author(s): Pino Toscano
  • Date: 2017-06-24 20:10:10 UTC
  • Revision ID: package-import@ubuntu.com-20170624201010-5lrzd5r2vwthwifp
Tags: upstream-3.0.1.1
Import upstream version 3.0.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
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 <KexiWindow.h>
 
28
#include <KexiWindowData.h>
 
29
#include <kexipartitem.h>
 
30
 
 
31
#include <KDbFieldList>
 
32
 
 
33
class KexiLookupColumnPage;
 
34
 
 
35
class KexiTablePartTempData : public KexiWindowData
 
36
{
 
37
    Q_OBJECT
 
38
public:
 
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;
 
44
};
 
45
 
 
46
//! @short Kexi Table Designer plugin
 
47
class KexiTablePart : public KexiPart::Part
 
48
{
 
49
    Q_OBJECT
 
50
 
 
51
public:
 
52
    KexiTablePart(QObject *parent, const QVariantList &);
 
53
    virtual ~KexiTablePart();
 
54
 
 
55
    virtual tristate remove(KexiPart::Item *item);
 
56
 
 
57
    virtual tristate rename(KexiPart::Item *item, const QString& newName);
 
58
 
 
59
    static tristate askForClosingObjectsUsingTableSchema(
 
60
        QWidget *parent, KDbConnection *conn,
 
61
        KDbTableSchema *table, const QString& msg);
 
62
 
 
63
    virtual KLocalizedString i18nMessage(const QString& englishMessage,
 
64
                                         KexiWindow* window) const;
 
65
 
 
66
    KexiLookupColumnPage* lookupColumnPage() const;
 
67
 
 
68
protected:
 
69
    virtual KexiWindowData* createWindowData(KexiWindow* window);
 
70
 
 
71
    virtual KexiView* createView(QWidget *parent, KexiWindow* window,
 
72
                                 KexiPart::Item *item, Kexi::ViewMode viewMode = Kexi::DataViewMode,
 
73
                                 QMap<QString, QVariant>* staticObjectArgs = 0);
 
74
 
 
75
    virtual void initPartActions();
 
76
    virtual void initInstanceActions();
 
77
 
 
78
    virtual void setupCustomPropertyPanelTabs(QTabWidget *tab);
 
79
 
 
80
    virtual KDbObject* loadSchemaObject(KexiWindow *window, const KDbObject& object,
 
81
            Kexi::ViewMode viewMode, bool *ownedByWindow);
 
82
 
 
83
private:
 
84
    class Private;
 
85
    Private* const d;
 
86
};
 
87
 
 
88
#endif