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

hk_kdesimpleform.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_KDESIMPLEFORM_H
00013 #define HK_KDESIMPLEFORM_H
00014 #include "hk_form.h"
00015 #include <qwidget.h>
00016 #include <kparts/partmanager.h>
00017 class hk_kdeformfocus;
00018 class hk_kdeproperty;
00019 class hk_kdeform;
00020 class hk_kdeformpartwidget;
00021 class QPopupMenu;
00022 class KAction;
00023 class KActionMenu;
00024 class hk_kdegridpart;
00025 class hk_kdesimpleformprivate;
00026 class  KActionCollection;
00027 
00041 class hk_kdesimpleform :public QWidget,public hk_form
00042 {
00043     Q_OBJECT
00044 friend class hk_kdeform;
00045 friend class hk_kdeformpartwidget;
00046         public:
00047         hk_kdesimpleform(QWidget* wid,const char* n=0,WFlags f=0);
00048         virtual ~hk_kdesimpleform(void);
00052         void set_autoclose(bool c){p_autoclose=c;}
00053         virtual bool            set_mode(enum_mode s);
00054         hk_kdeproperty*  propertyeditor(void);
00055         hk_kdeform*        kdeform()const ;
00056         hk_kdeformpartwidget* formpartwidget() const;
00057         void set_focus(QWidget*);
00058         virtual void script_error(hk_visible*, hk_interpreter::enum_action);
00059         bool ctrl_key_pressed(void) const;
00060         KParts::PartManager* partsmanager()const{return p_partsmanager;}
00061         bool focus_multipleselected(void) const;
00062         enum enum_adjust {al,ar,at,ab,sminw,smaxw,sminh,smaxh,smaxs,smins};
00063 virtual void reset_has_changed(void);
00064         
00065         
00066         signals:
00067         void mouseclick(const QPoint&);
00068         void field_created(void);
00069         void signal_closed(QWidget*);
00070         void signal_focuswidget_changed(void);
00071         void signal_has_changed(void);
00072 
00073     public slots:
00074         void set_field2create(enum_visibletype);
00075         hk_kdeformfocus* formfocus(void)const {return p_focus;}
00076 virtual        void show_property(void);
00077         void set_for_all(enum_bulkoperation);
00078         void copy(void);
00079         void paste(void);
00080         void cut(void);
00081         void adjust_widgets(enum_adjust);
00082         void align_left(void);
00083         void align_right(void);
00084         void align_top(void);
00085         void align_bottom(void);
00086         void adjust_minw(void);
00087         void adjust_maxw(void);
00088         void adjust_minh(void);
00089         void adjust_maxh(void);
00090         void adjust_mins(void);
00091         void adjust_maxs(void);
00092         void delete_widgets(void);
00093         void copy_widgets(void);
00094         void paste_widgets(void);
00095         void cut_widgets(void);
00096         void enable_actions(void);
00097         void grid_partinfocus(hk_kdegridpart*);
00098         void grid_partoutfocus(hk_kdegridpart*);
00099         void dbdesignaction(void);
00100         void designer_deleted(void);
00101         void            load_form(const hk_string& name="");
00102 
00103     protected:
00104          virtual void set_has_changed(enum_has_changed forcesetting=standard);
00105        void set_kdeform(hk_kdeform*);
00106         void set_formpartwidget(hk_kdeformpartwidget*);
00107         void set_actions(KActionCollection*);
00108 
00109         virtual hk_dsgrid*      widget_specific_new_grid(void);
00110         virtual hk_dsrowselector*   widget_specific_new_rowselector(void);
00111         virtual hk_dslineedit*      widget_specific_new_lineedit(void);
00112         virtual hk_dsboolean*       widget_specific_new_bool(void);
00113         virtual hk_dsmemo*      widget_specific_new_memo(void);
00114         virtual hk_button*      widget_specific_new_button(void);
00115         virtual hk_dscombobox*      widget_specific_new_combobox(void);
00116         virtual hk_label*       widget_specific_new_label(void);
00117         virtual hk_subform*     widget_specific_new_subform(void);
00118         virtual void            widget_specific_fieldresize(hk_visible* v);
00119         virtual void            widget_specific_presentationresize(void);
00120         virtual void            before_source_vanishes(void);
00121         virtual void            widget_specific_modechanges(enum_mode);
00122         virtual void            widget_specific_presentationdatasource(long);
00123         virtual void            widget_specific_after_loadform(void);
00124         virtual void        widget_specific_backgroundcolour_changed(const hk_colour&);
00125         virtual void        widget_specific_foregroundcolour_changed(const hk_colour&);
00126         virtual void            database_has_vanished(void);
00127         
00128         virtual void            paintEvent(QPaintEvent*);
00129         virtual void            mousePressEvent(QMouseEvent*);
00130         virtual void            mouseReleaseEvent(QMouseEvent*);
00131         virtual void            mouseDoubleClickEvent(QMouseEvent*);
00132 
00133         virtual void            keyPressEvent ( QKeyEvent * );
00134         virtual void            keyReleaseEvent ( QKeyEvent * );
00135         bool eventFilter(QObject* object,QEvent* event);
00136         bool formeventFilter(QObject* object,QEvent* event);
00137 
00138     protected slots:
00139     private:
00140     
00141     
00142     private slots:
00143 
00144     private:
00145         bool is_formobject(QWidget*);
00146         void create_field(const QPoint&);
00147         void clearmultiplefocus(void);
00148         void clearfocus(void);
00149         void mousemenu(QMouseEvent*);
00150         void resize_widget(QWidget*,enum_adjust,int minw,int maxw,int minh,int maxh,int minx,int maxx,int miny,int maxy);
00151         void repaint_focus(void);
00152         void create_copydata(ostream&,QWidget*);
00153         bool p_autoclose;
00154         bool p_sourcevanishflag;
00155         enum_visibletype p_field2create;
00156         hk_kdeformfocus* p_focus;
00157         list<hk_kdeformfocus*> p_multiplefocus;
00158         bool p_createflag;
00159         QPoint p_originalposition;
00160         bool p_controlbutton;
00161         hk_kdeproperty* p_property;
00162         hk_kdeform* p_kdeform;
00163         hk_kdeformpartwidget* p_formpartwidget;
00164         QPopupMenu* p_popup;
00165         KParts::PartManager* p_partsmanager;
00166         KAction* p_deleteaction;
00167         KAction* p_copyaction;
00168         KAction* p_pasteaction;
00169         KAction* p_cutaction;
00170         KAction*       p_formpropertyaction;
00171         KActionMenu* p_resizeaction;
00172         KAction* p_minwidthaction;
00173         KAction* p_maxwidthaction;
00174         KAction* p_minheightaction;
00175         KAction* p_maxheightaction;
00176         KAction* p_minsizeaction;
00177         KAction* p_maxsizeaction;
00178         KActionMenu* p_alignaction;
00179         KAction* p_alignleftaction;
00180         KAction* p_alignrightaction;
00181         KAction* p_aligntopaction;
00182         KAction* p_alignbottomaction;
00183         hk_kdesimpleformprivate* p_private;
00184 
00185 //    KAction* p_resizeaction;
00186 //    KAction* p_moveaction;
00187 };
00188 #endif

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