kexi

kexiquerydesignersql.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Lucijan Busch <lucijan@kde.org>
3 Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
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 <kexiviewbase.h>
25#include "kexiquerypart.h"
26
28class KexiQueryDesignerSQLViewPrivate;
29
31
35class KexiQueryDesignerSQLView : public KexiViewBase
36{
37 TQ_OBJECT
38
39
40 public:
41 KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWidget *parent, const char *name = 0);
42 virtual ~KexiQueryDesignerSQLView();
43
44 TQString sqlText() const;
45 KexiQueryDesignerSQLEditor *editor() const;
46
47 virtual bool eventFilter ( TQObject *o, TQEvent *e );
48
49 protected:
50 KexiQueryPart::TempData * tempData() const;
51
52 virtual tristate beforeSwitchTo(int mode, bool &dontStore);
53 virtual tristate afterSwitchFrom(int mode);
54 virtual KexiDB::SchemaData* storeNewData(const KexiDB::SchemaData& sdata, bool &cancel);
55 virtual tristate storeData(bool dontAsk = false);
56
57 void setStatusOk();
58 void setStatusError(const TQString& msg);
59 void setStatusEmpty();
60 void setStatusText(const TQString& text);
61
62 virtual void updateActions(bool activated);
63
64 protected slots:
67 bool slotCheckQuery();
68 void slotUpdateMode();
69 void slotTextChanged();
70// void slotHistoryHeaderButtonClicked(const TQString& buttonIdentifier);
71 void slotSelectQuery();
72
73 signals:
74 void queryShortcut();
75
76 private:
77 class Private;
78 Private *d;
79
80 friend class KexiQueryView; // for storeNewData() and storeData() only
81};
82
83#endif
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
Text editor for entering query statements.
virtual tristate afterSwitchFrom(int mode)
virtual void updateActions(bool activated)
virtual KexiDB::SchemaData * storeNewData(const KexiDB::SchemaData &sdata, bool &cancel)
virtual tristate storeData(bool dontAsk=false)
virtual tristate beforeSwitchTo(int mode, bool &dontStore)
Temporary data kept in memory while switching between Query Dialog's views.
KexiMainWindow * mainWin() const
3-state logical type with three values: true, false and cancelled and convenient operators.
Definition tristate.h:100