Databasehandlingdialogclasses  0.5.3
hk_kdeinterpreterdialog.h
1 // ****************************************************************************
2 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
3 // This file is part of the hk_kdeclasses library.
4 // This file may be distributed and/or modified under the terms of the
5 // GNU Library Public License version 2 as published by the Free Software
6 // Foundation and appearing in the file LGPL included in the
7 // packaging of this file.
8 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10 // ****************************************************************************
11 
12 #ifndef HK_KDEINTERPRETERDIALOG_H
13 #define HK_KDEINTERPRETERDIALOG_H
14 
15 #include <qvariant.h>
16 #include <kparts/mainwindow.h>
17 #include <kate/view.h>
18 #include <kate/document.h>
19 
20 #include "hk_dsvisible.h"
21 #include "hk_datasource.h"
22 #include "hk_database.h"
23 class QVBoxLayout;
24 class QHBoxLayout;
25 class QGridLayout;
26 class QButtonGroup;
27 class QTable;
28 class QToolButton;
29 class QMultiLineEdit;
30 class hk_kdetoolbar;
31 class hk_kdegrid;
32 class hk_kdegridpart;
45 class hk_kdeinterpreterdialog : public KParts::MainWindow
46 {
47  Q_OBJECT
48 
49  public:
50  hk_kdeinterpreterdialog(QWidget* w=0,const char* n=0,WFlags f=0);
52 enum DialogCode { Rejected, Accepted };
57  void set_autoclose(bool c){p_autoclose=c;}
58  int exec(int rownumber,const hk_string& warningmessage);
59  int result(void){return rescode;}
60  hk_string code();
61  void set_code(const hk_string&, bool has_changed=true);
62  void hide();
63  bool has_changed(void){return p_has_changed;}
64  void set_caption(hk_visible*,const hk_string &action);
65  public slots:
66 
67  void print(void);
68  void undo(void);
69  virtual void help_clicked();
70 
71 
72 
73  protected:
74  virtual void closeEvent ( QCloseEvent* e);
75  void keyPressEvent ( QKeyEvent * e );
76  void setResult( int r ) { rescode = r; }
77 
78 
79  protected slots:
80  virtual void done(int);
81  virtual void accept();
82  virtual void reject();
83  virtual void select_all();
84  virtual void clear_selection();
85  virtual void toggle_insert();
86  void slot_has_changed(void);
87  void slot_undo_changed(void);
88 
89  private:
90  bool p_autoclose;
91  bool p_has_changed;
92 
93 
94 // QMultiLineEdit* p_design;
95  Kate::View* p_designkate;
96  Kate::Document* p_katepart;
97  bool highlighting_set;
98  bool in_loop;
99  int rescode;
101 };
102 #endif //HK_KDEINTERPRETERDIALOG_H
virtual void reject()
Definition: hk_kdeinterpreterdialog.cpp:268
KDE high level widget to define queries and see the result.
Definition: hk_kdeinterpreterdialog.h:45
Definition: hk_kdetoolbar.h:26
Definition: hk_kdeinterpreterdialog.cpp:42
void set_autoclose(bool c)
Definition: hk_kdeinterpreterdialog.h:57
shows data in a grid without columnheaders.
Definition: hk_kdegrid.h:45