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

hk_kdesimplereport.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_KDESIMPLEREPORT_H
00013 #define HK_KDESIMPLEREPORT_H
00014 #include <hk_report.h>
00015 #include <qwidget.h>
00016 #include <list>
00017 
00018 class hk_kdereportproperty;
00019 class QVBoxLayout;
00020 class KAction;
00021 class KActionMenu;
00022 class hk_kdeformfocus;
00023 class hk_kdereportsection;
00024 class hk_kdereport;
00025 class hk_kdereportpartwidget;
00026 class QProgressDialog;
00027 class QPopupMenu;
00028 class hk_kdesimplereportprivate;
00042 class hk_kdesimplereport:public QWidget, public hk_report
00043 {
00044 friend class hk_kdereport;
00045 friend class hk_kdereportpartwidget;
00046     Q_OBJECT
00047 
00048         public:
00049         hk_kdesimplereport( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
00050         virtual    ~hk_kdesimplereport();
00051 
00052         void set_autoclose(bool c);
00053         void set_field2create(bool);
00054         bool field2create(void);
00055         void set_focus(QWidget*,hk_kdereportsection*);
00056         void clearfocus(void);
00057         hk_kdeformfocus* focus(void);
00058         hk_kdeformfocus* formfocus(void);
00059         virtual bool load_report(const hk_string& name="");
00060         virtual bool set_mode(enum_mode);
00061         hk_kdereport* kdereport(void);
00062         virtual void script_error(hk_visible*, hk_interpreter::enum_action);
00063         bool ctrl_key_pressed(void) const;
00064         bool focus_multipleselected(void) const;
00065 virtual void reset_has_changed(void);
00066 
00067         signals:
00068         void signalfield_created(void);
00069         void signal_has_changed(void);
00070         void signal_focuswidget_changed(void);
00071 
00072     public slots:
00073         void field_created(void);
00074         void set_focus2property(void);
00075         void set_sections(void);
00076         void show_property(void);
00077         void set_for_all(enum_bulkoperation);
00078 
00079     protected:
00080          virtual void set_has_changed(enum_has_changed forcesetting=standard);
00081 
00082         virtual hk_reportsection* widget_specific_new_section(void);
00083         virtual void keyPressEvent ( QKeyEvent * event );
00084         virtual void keyReleaseEvent ( QKeyEvent * event);
00085         virtual void widget_specific_after_loadreport(void);
00086         virtual bool widget_specific_before_modechanges(enum_mode);
00087         bool eventFilter(QObject* object,QEvent* event);
00088 
00089         bool reporteventFilter(QObject* object,QEvent* event);
00090 
00091         virtual void before_source_vanishes(void);
00092         virtual void database_has_vanished(void);
00093         virtual void widget_specific_modechanges(enum_mode s);
00094         virtual void    widget_specific_before_execute(void);
00095         virtual void    widget_specific_after_execute(void);
00096         virtual bool widget_specific_after_new_page(void);
00097         virtual void widget_specific_presentationresize(void);
00098         virtual void widget_specific_backgroundcolour_changed(const hk_colour&);
00099         virtual void widget_specific_foregroundcolour_changed(const hk_colour&);
00100         virtual void            widget_specific_fieldresize(hk_visible* v);
00101 
00102         void mousemenu(QMouseEvent* m);
00103         enum enum_adjust {al,ar,at,ab,sminw,smaxw,sminh,smaxh,smaxs,smins};
00104         void adjust_widgets(enum_adjust);
00105         void resize_widget(QWidget*,enum_adjust,int minw,int maxw,int minh,int maxh,int minx,int maxx,int miny,int maxy);
00106         void repaint_focus(void);
00107 
00108     protected slots:
00109         void printing_cancelled(void);
00110         void delete_widgets(void);
00111         void copy_widgets(void);
00112         void paste_widgets(void);
00113         void cut_widgets(void);
00114         void enable_actions(void);
00115     
00116     private slots:
00117         void align_left(void);
00118         void align_right(void);
00119         void align_top(void);
00120         void align_bottom(void);
00121         void adjust_minw(void);
00122         void adjust_maxw(void);
00123         void adjust_minh(void);
00124         void adjust_maxh(void);
00125         void adjust_mins(void);
00126         void adjust_maxs(void);
00127 
00128         
00129         
00130     protected:
00131             void set_kdereport(hk_kdereport*);
00132             void set_reportpartwidget(hk_kdereportpartwidget*);
00133 
00134         
00135     private:
00136         bool is_reportobject(QWidget*);
00137         void clearmultiplefocus(void);
00138         //void create_propertyeditor(void);
00139         void set_actualsection(hk_kdereportsection*);
00140         void set_propertyobject(QWidget*);
00141         void create_copydata(ostream&,QWidget*);
00142         void set_sectionsize(hk_reportsection*);
00143         hk_kdesimplereportprivate* p_private;
00144 };
00145 #endif

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