hk_kdeinterpreterdialog.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
00003 // This file is part of the hk_kdeclasses library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file LGPL included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
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       virtual void help_clicked();
00072 
00073 
00074 
00075     protected:
00076         virtual void closeEvent ( QCloseEvent* e);
00077         void    keyPressEvent ( QKeyEvent * e );
00078     void        setResult( int r )      { rescode = r; }
00079 
00080 
00081     protected slots:
00082     virtual void done(int);
00083     virtual void accept();
00084     virtual void reject();
00085     virtual void select_all();
00086     virtual void clear_selection();
00087     virtual void toggle_insert();
00088     void slot_has_changed(void);
00089         void slot_undo_changed(void);
00090 
00091     private:
00092         void set_caption(void);
00093         bool p_autoclose;
00094         bool p_has_changed;
00095 
00096 
00097 //    QMultiLineEdit* p_design;
00098         QWidget*    p_qbe;
00099         Kate::View*    p_designkate;
00100         Kate::Document* p_katepart;
00101         bool highlighting_set;
00102         bool in_loop;
00103         int rescode;
00104 hk_kdeinterpreterdialogprivate* p_private;
00105 };
00106 #endif //HK_KDEINTERPRETERDIALOG_H

Generated on Tue May 2 13:13:59 2006 for Databasehandlingdialogclasses by  doxygen 1.4.6