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 void savebutton_clicked(void);
00067 void saveasbutton_clicked(void);
00068
00069 void print(void);
00070 void undo(void);
00071
00072
00073
00074 protected:
00075 virtual void closeEvent ( QCloseEvent* e);
00076 void keyPressEvent ( QKeyEvent * e );
00077 void setResult( int r ) { rescode = r; }
00078
00079
00080 protected slots:
00081 virtual void done(int);
00082 virtual void accept();
00083 virtual void reject();
00084 virtual void select_all();
00085 virtual void clear_selection();
00086 virtual void toggle_insert();
00087 void slot_has_changed(void);
00088 void slot_undo_changed(void);
00089
00090 private:
00091 void set_caption(void);
00092 bool p_autoclose;
00093 bool p_has_changed;
00094
00095
00096
00097 QWidget* p_qbe;
00098 Kate::View* p_designkate;
00099 Kate::Document* p_katepart;
00100 bool highlighting_set;
00101 bool in_loop;
00102 int rescode;
00103 hk_kdeinterpreterdialogprivate* p_private;
00104 };
00105 #endif //HK_KDEINTERPRETERDIALOG_H