00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef HK_KDEINTERPRETERDIALOG_H
00013 #define HK_KDEINTERPRETERDIALOG_H
00014
00015 #include <qvariant.h>
00016 #include <kparts/mainwindow.h>
00017 #include <kate/view.h>
00018 #include <kate/document.h>
00019
00020 #include "hk_dsvisible.h"
00021 #include "hk_datasource.h"
00022 #include "hk_database.h"
00023 class QVBoxLayout;
00024 class QHBoxLayout;
00025 class QGridLayout;
00026 class QButtonGroup;
00027 class QTable;
00028 class QToolButton;
00029 class QMultiLineEdit;
00030 class hk_kdetoolbar;
00031 class hk_kdegrid;
00032 class hk_kdegridpart;
00033 class hk_kdeinterpreterdialogprivate;
00045 class hk_kdeinterpreterdialog : public KParts::MainWindow
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 hk_kdeinterpreterdialog(QWidget* w=0,const char* n=0,WFlags f=0);
00051 ~hk_kdeinterpreterdialog();
00052 enum DialogCode { Rejected, Accepted };
00057 void set_autoclose(bool c){p_autoclose=c;}
00058 int exec(int rownumber,const hk_string& warningmessage);
00059 int result(void){return rescode;}
00060 hk_string code();
00061 void set_code(const hk_string&, bool has_changed=true);
00062 void hide();
00063 bool has_changed(void){return p_has_changed;}
00064 void set_caption(hk_visible*,const hk_string &action);
00065 public slots:
00066
00067 void print(void);
00068 void undo(void);
00069 virtual void help_clicked();
00070
00071
00072
00073 protected:
00074 virtual void closeEvent ( QCloseEvent* e);
00075 void keyPressEvent ( QKeyEvent * e );
00076 void setResult( int r ) { rescode = r; }
00077
00078
00079 protected slots:
00080 virtual void done(int);
00081 virtual void accept();
00082 virtual void reject();
00083 virtual void select_all();
00084 virtual void clear_selection();
00085 virtual void toggle_insert();
00086 void slot_has_changed(void);
00087 void slot_undo_changed(void);
00088
00089 private:
00090 bool p_autoclose;
00091 bool p_has_changed;
00092
00093
00094
00095 Kate::View* p_designkate;
00096 Kate::Document* p_katepart;
00097 bool highlighting_set;
00098 bool in_loop;
00099 int rescode;
00100 hk_kdeinterpreterdialogprivate* p_private;
00101 };
00102 #endif //HK_KDEINTERPRETERDIALOG_H