00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef HK_KDEQUERY_H
00013 #define HK_KDEQUERY_H
00014
00015 #include <qvariant.h>
00016 #include <kparts/dockmainwindow.h>
00017 #include <kparts/partmanager.h>
00018
00019 #include "hk_kdequerypartwidget.h"
00020
00021 #include "hk_dsquery.h"
00022 #include "hk_datasource.h"
00023 #include "hk_database.h"
00024 class QVBoxLayout;
00025 class QHBoxLayout;
00026 class QGridLayout;
00027 class QButtonGroup;
00028 class QTable;
00029 class QToolButton;
00030 class QMultiLineEdit;
00031
00044 class hk_kdequery : public KParts::DockMainWindow ,public hk_dsquery
00045 {
00046 Q_OBJECT
00047
00048 public:
00049 hk_kdequery(QWidget* w=0,const char* n=0,WFlags f=0);
00050 virtual ~hk_kdequery();
00051 virtual bool set_mode(enum_mode s);
00055 bool in_designmode(void) const ;
00056
00057
00061 void set_nodesignmode(bool n);
00062 virtual void set_datasource(hk_datasource*);
00063
00064 bool save_query(const hk_string& n="",bool ask=true);
00065 bool load_query(void);
00066 void set_autoclose(bool c);
00067 signals:
00068 void signal_closed(QWidget*);
00069
00070 public slots:
00071 void close_query(void);
00072 protected slots:
00073 void part_removed(void);
00074 void createGUI (KParts::Part *part);
00075
00076
00077 protected:
00078 virtual void closeEvent ( QCloseEvent* e);
00079 virtual void before_source_vanishes(void);
00080
00081
00082 private:
00083 void set_caption(void);
00084 KParts::ReadWritePart* p_part;
00085 KParts::PartManager* p_partmanager;
00086 hk_kdequerypartwidget* p_query;
00087 KAction * p_closeaction;
00088
00089
00090 };
00091 #endif