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

« back to all changes in this revision

Viewing changes to src/plugins/queries/kexiqueryview.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) 2004 Lucijan Busch <lucijan@kde.org>
 
3
   Copyright (C) 2004, 2006 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 KEXIQUERYVIEW_H
 
22
#define KEXIQUERYVIEW_H
 
23
 
 
24
#include <widget/tableview/KexiDataTableView.h>
 
25
 
 
26
class KDbQuerySchema;
 
27
 
 
28
class KexiQueryView : public KexiDataTableView
 
29
{
 
30
    Q_OBJECT
 
31
 
 
32
public:
 
33
    explicit KexiQueryView(QWidget *parent);
 
34
    virtual ~KexiQueryView();
 
35
 
 
36
    /*! \return curent parameters for parametrized query */
 
37
    virtual QList<QVariant> currentParameters() const;
 
38
 
 
39
protected:
 
40
    virtual tristate afterSwitchFrom(Kexi::ViewMode mode);
 
41
 
 
42
    virtual KDbObject* storeNewData(const KDbObject& object,
 
43
                                             KexiView::StoreNewDataOptions options,
 
44
                                             bool *cancel);
 
45
 
 
46
    virtual tristate storeData(bool dontAsk = false);
 
47
 
 
48
    /*! Executes query \a query, filling the table view with query results.
 
49
     \return true on success, false on failure and cancelled when user has
 
50
     cancelled execution (for example when she pressed the Cancel button
 
51
     of the "Enter Query Parameter" input dialog. */
 
52
    tristate executeQuery(KDbQuerySchema *query);
 
53
 
 
54
    class Private;
 
55
    Private * const d;
 
56
};
 
57
 
 
58
#endif
 
59