hk_kdetablepartwidget.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_KDETABLEPARTWIDGET_H
00013 #define HK_KDETABLEPARTWIDGET_H
00014 
00015 #include <kparts/part.h>
00016 #include <qvariant.h>
00017 #include <qwidget.h>
00018 #include <qwidgetstack.h>
00019 #include <kaction.h>
00020 
00021 #include <hk_dstable.h>
00022 class hk_kdetabledesign;
00023 class hk_kdegrid;
00024 class hk_kdegridpart;
00025 class QVBoxLayout;
00026 class QHBoxLayout;
00027 class QGridLayout;
00028 class QButtonGroup;
00029 class QTable;
00030 class QProgressDialog;
00031 class hk_kdetoolbar;
00032 class hk_kdetablepart;
00033 
00045 class hk_kdetablepartwidget : public QWidgetStack ,public hk_dstable
00046 {
00047 friend class hk_kdetablepart;
00048     Q_OBJECT
00049 
00050         public:
00051         virtual    ~hk_kdetablepartwidget();
00052         virtual bool            set_mode(enum_mode s);
00053 
00057         virtual void set_datasource(hk_datasource*);
00058         hk_datasource* datasource(void);
00064         void set_autoclose(bool c){p_autoclose=c;}
00065         hk_dsgrid* grid(void)const ;
00066         hk_kdegrid* kdegrid(void) const;
00067         hk_kdetoolbar* toolbar(void)const;
00068         KParts::ReadWritePart* gridpart(void) const;
00069         bool in_designmode(void);
00070 
00071 virtual void show_widget(void);
00072 virtual void hide_widget(void);
00073 virtual bool close_widget(void);
00074 
00075         void alter_table(void);
00076     signals:
00077         void signal_closed(QWidget*);
00078 
00079     public slots:
00080         void close_table(void);
00081         void save_table(void);
00082         void slot_has_changed(void);
00083         void designbutton_clicked(void);
00084         void tablebutton_clicked(void);
00085         void set_caption(void);
00086 
00087     protected:
00088         void internal_designbutton_clicked(void);
00089         void internal_tablebutton_clicked(void);
00090         hk_kdetablepartwidget(QWidget* w,const char* n=0,WFlags f=0);
00091         virtual void before_source_vanishes(void);
00092         void closeEvent ( QCloseEvent* e);
00093         hk_kdetoolbar* p_toolbar;
00094         hk_kdegrid* p_grid;
00095         hk_kdetabledesign* p_design;
00096 
00097         KRadioAction* p_designaction;
00098         KRadioAction* p_viewaction;
00099         KAction*      p_filterdefinitionaction;
00100         KToggleAction*    p_filterexecaction;
00101         KAction*  p_printaction;
00102         KAction* p_columndialogaction;
00103         KAction* p_findaction;
00104         KAction* p_copyaction;
00105         KAction* p_pasteaction;
00106         KAction* p_saveaction;
00107  static  bool set_progress(long int,long int,const hk_string&);
00108 
00109     protected slots:
00110             void exec_cancelled(void);
00111 
00112 
00113     private:
00114         bool p_autoclose;
00115         KParts::ReadWritePart* p_gridpart;
00116 static        QProgressDialog* p_progressdialog;
00117          static bool p_cancel;
00118         void before_execute(void);
00119         void after_execute(void);
00120 
00121 };
00122 #endif                                            // HK_KDETABLEPARTWIDGET_H

Generated on Tue Sep 25 22:39:06 2007 for Databasehandlingdialogclasses by  doxygen 1.5.3