Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

hk_kdequerypartwidget.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2004 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_KDEQUERYPARTWIDGET_H
00013 #define HK_KDEQUERYPARTWIDGET_H
00014 
00015 #include <qvariant.h>
00016 #include <qwidgetstack.h>
00017 #include <kate/view.h>
00018 #include <kate/document.h>
00019 
00020 #include "hk_dsquery.h"
00021 #include "hk_datasource.h"
00022 #include "hk_database.h"
00023 
00024 class QVBoxLayout;
00025 class QHBoxLayout;
00026 class QGridLayout;
00027 class QButtonGroup;
00028 class QTable;
00029 class QToolButton;
00030 class QMultiLineEdit;
00031 class hk_kdetoolbar;
00032 class hk_kdegrid;
00033 class hk_kdegridpart;
00034 class hk_kdeqbe;
00035 class hk_kdequerypart;
00036 
00037 class hk_kdequerypartwidgetprivate;
00038 
00051 class hk_kdequerypartwidget : public QWidgetStack ,public hk_dsquery
00052 {
00053     friend class hk_kdequerypart;
00054     Q_OBJECT
00055 
00056         public:
00057 virtual        ~hk_kdequerypartwidget();
00058         virtual bool            set_mode(enum_mode s);
00062         bool in_designmode(void) const ;
00063         virtual void set_datasource(hk_datasource*);
00064  
00069         void set_autoclose(bool c);
00070 
00074         void set_nodesignmode(bool n);
00075 
00076         bool save_query(const hk_string& n="",bool ask=true);
00077         bool load_query(void);
00078         hk_dsgrid *grid(void);
00079         virtual hk_qbe*  qbe(void);
00080         hk_kdeqbe*   kdeqbe(void) const;
00081 virtual void reset_has_changed(void);
00082         
00083     signals:
00084         void signal_closed(QWidget*);
00085         void signal_qbetypechanged(void);
00086     
00087     public slots:
00088         void designbutton_clicked(void);
00089         void querybutton_clicked(void);
00090         void query_changed(void);
00091         void savebutton_clicked(void);
00092         void saveasbutton_clicked(void);
00093         void close_query(void);
00094         void print(void);
00095         void action_useqbe(void);
00096         void copy_clicked(void);
00097         void paste_clicked(void);
00098         void replace_clicked(void);
00099         void find_clicked(void);
00100         void findnext_clicked(void);
00101         void findprevious_clicked(void);
00102         void cut_clicked(void);
00103         void undo_clicked(void);
00104         void redo_clicked(void);
00105         void selectall_clicked(void);
00106         void configeditor_clicked(void);
00107         
00108 virtual void show ();
00109 virtual void showMaximized ();
00110 
00111 
00112     protected:
00113         hk_kdequerypartwidget(hk_kdequerypart*,QWidget* w=0,const char* n=0,WFlags f=0);
00114         virtual void before_source_vanishes(void);
00115         virtual void closeEvent ( QCloseEvent* e);
00116         void    keyPressEvent ( QKeyEvent * e );
00117         virtual void set_has_changed(enum_has_changed forcesetting=standard);
00118     protected slots:    
00119         void qbe_has_changed(void);
00120 
00121     private:
00122         KRadioAction* p_designaction;
00123         KRadioAction* p_viewaction;
00124         KAction*      p_saveaction;
00125         KAction*      p_saveasaction;
00126         KAction*      p_printaction;
00127         
00128         KAction*      p_copyaction;
00129         KAction*      p_cutaction;
00130         KAction*      p_undoaction;
00131         KAction*      p_redoaction;
00132         KAction*      p_pasteaction;
00133         KAction*      p_replaceaction;
00134         KAction*      p_findaction;
00135         KAction*      p_findnextaction;
00136         KAction*      p_findpreviousaction;
00137         KAction*      p_selectallaction;
00138         KAction*      p_configeditoraction;
00139         
00140         KToggleAction*      p_qbeaction;
00141         KAction* p_addaction;
00142         KToggleAction* p_distinctaction;
00143         KWidgetAction* p_qbetypeselectaction; 
00144         QComboBox* p_qbetypeselect;
00145         void set_caption(void);
00146         void internal_set_designmode(void);
00147         void internal_set_viewmode(void);
00148 //    QMultiLineEdit* p_design;
00149         
00150         hk_kdequerypartwidgetprivate* p_private;
00151 
00152 };
00153 #endif

Generated on Tue Mar 22 23:28:15 2005 for Databasehandlingdialogclasses by  doxygen 1.4.1