~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kexi/plugins/queries/kexiquerydesignersql.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

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) 2004-2007 Jarosław Staniek <staniek@kde.org>
 
4
 
 
5
   This program is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Library General Public
 
7
   License as published by the Free Software Foundation; either
 
8
   version 2 of the License, or (at your option) any later version.
 
9
 
 
10
   This program is distributed in the hope that it will be useful,
 
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
   Library General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU Library General Public License
 
16
   along with this program; see the file COPYING.  If not, write to
 
17
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
18
 * Boston, MA 02110-1301, USA.
 
19
*/
 
20
 
 
21
#ifndef KEXIQUERYDESIGNERSQL_H
 
22
#define KEXIQUERYDESIGNERSQL_H
 
23
 
 
24
#include "kexiquerypart.h"
 
25
 
 
26
#include <KexiView.h>
 
27
#include <KTitleWidget>
 
28
#include <QEvent>
 
29
 
 
30
class KexiQueryDesignerSQLEditor;
 
31
 
 
32
//! The KexiQueryDesignerSQLView class for editing Queries in text mode.
 
33
/*! It is a view containing SQL text editor
 
34
 and SQL history/status widget split vertically.
 
35
 Depending on user's will, the widget can be in "sql history"
 
36
 mode or in "sql status" mode. */
 
37
class KexiQueryDesignerSQLView : public KexiView
 
38
{
 
39
    Q_OBJECT
 
40
 
 
41
public:
 
42
    KexiQueryDesignerSQLView(QWidget *parent);
 
43
    virtual ~KexiQueryDesignerSQLView();
 
44
 
 
45
    QString sqlText() const;
 
46
    KexiQueryDesignerSQLEditor *editor() const;
 
47
 
 
48
//  virtual bool eventFilter ( QObject *o, QEvent *e );
 
49
 
 
50
protected:
 
51
    KexiQueryPart::TempData * tempData() const;
 
52
 
 
53
    virtual tristate beforeSwitchTo(Kexi::ViewMode mode, bool &dontStore);
 
54
    virtual tristate afterSwitchFrom(Kexi::ViewMode mode);
 
55
    virtual KexiDB::SchemaData* storeNewData(const KexiDB::SchemaData& sdata, bool &cancel);
 
56
    virtual tristate storeData(bool dontAsk = false);
 
57
 
 
58
    void setStatusOk();
 
59
    void setStatusError(const QString& msg);
 
60
    void setStatusEmpty();
 
61
    void setStatusText(const QString& text);
 
62
 
 
63
    virtual void updateActions(bool activated);
 
64
 
 
65
protected slots:
 
66
    /*! Performs query checking (by text parsing). \return true and sets d->parsedQuery
 
67
     to the new query schema object on success. */
 
68
    bool slotCheckQuery();
 
69
    void slotUpdateMode();
 
70
    void slotTextChanged();
 
71
//  void slotHistoryHeaderButtonClicked(const QString& buttonIdentifier);
 
72
    void slotSelectQuery();
 
73
 
 
74
signals:
 
75
    void queryShortcut();
 
76
 
 
77
private:
 
78
    class Private;
 
79
    Private * const d;
 
80
 
 
81
    friend class KexiQueryView; // for storeNewData() and storeData() only
 
82
};
 
83
 
 
84
#endif