Databasehandlingdialogclasses  0.5.3
hk_kdesimplereport.h
1 // ****************************************************************************
2 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
3 // This file is part of the hk_kdeclasses library.
4 // This file may be distributed and/or modified under the terms of the
5 // GNU Library Public License version 2 as published by the Free Software
6 // Foundation and appearing in the file LGPL included in the
7 // packaging of this file.
8 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10 // ****************************************************************************
11 
12 #ifndef HK_KDESIMPLEREPORT_H
13 #define HK_KDESIMPLEREPORT_H
14 #include <hk_report.h>
15 #include <qwidget.h>
16 #include <list>
17 
19 class QVBoxLayout;
20 class KAction;
21 class KActionMenu;
22 class hk_kdeformfocus;
24 class hk_kdereport;
26 class QProgressDialog;
27 class QPopupMenu;
42 class hk_kdesimplereport:public QWidget, public hk_report
43 {
44 friend class hk_kdereport;
45 friend class hk_kdereportpartwidget;
46  Q_OBJECT
47 
48  public:
49  hk_kdesimplereport( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
50  virtual ~hk_kdesimplereport();
51 
52  void set_autoclose(bool c);
53  void set_field2create(bool);
54  bool field2create(void);
55  void set_focus(QWidget*,hk_kdereportsection*,bool multiple);
56  void clearfocus(void);
57  hk_kdeformfocus* focus(void);
58  hk_kdeformfocus* formfocus(void);
59  virtual bool load_report(const hk_string& name="");
60  virtual bool set_mode(enum_mode);
61  hk_kdereport* kdereport(void);
62  virtual void script_error(hk_visible*, hk_interpreter::enum_action);
63  //bool ctrl_key_pressed(void) const;
64  bool focus_multipleselected(void) const;
65 virtual void reset_has_changed(void);
66  hk_kdereportpartwidget* reportpartwidget() const;
67 
68  signals:
69  void signalfield_created(void);
70  void signal_has_changed(void);
71  void signal_focuswidget_changed(void);
72 
73  public slots:
74  void field_created(void);
75  void set_focus2property(void);
76  void set_sections(void);
77  void show_property(void);
78  void set_for_all(enum_bulkoperation);
79 
80  protected:
81  virtual void set_has_changed(enum_has_changed forcesetting=standard);
82 
83  virtual hk_reportsection* widget_specific_new_section(void);
84  virtual void keyPressEvent ( QKeyEvent * event );
85  virtual void keyReleaseEvent ( QKeyEvent * event);
86  virtual void widget_specific_after_loadreport(void);
87  virtual bool widget_specific_before_modechanges(enum_mode);
88  bool eventFilter(QObject* object,QEvent* event);
89 
90  bool reporteventFilter(QObject* object,QEvent* event);
91 
92  virtual void before_source_vanishes(void);
93  virtual void database_has_vanished(void);
94  virtual void widget_specific_modechanges(enum_mode s);
95  virtual void widget_specific_before_execute(void);
96  virtual void widget_specific_after_execute(void);
97  virtual bool widget_specific_after_new_page(void);
98  virtual void widget_specific_presentationresize(void);
99  virtual void widget_specific_backgroundcolour_changed(const hk_colour&);
100  virtual void widget_specific_foregroundcolour_changed(const hk_colour&);
101  virtual void widget_specific_fieldresize(hk_visible* v);
102 
103  void mousemenu(QMouseEvent* m);
104  enum enum_adjust {al,ar,at,ab,sminw,smaxw,sminh,smaxh,smaxs,smins};
105  void adjust_widgets(enum_adjust);
106  void resize_widget(QWidget*,enum_adjust,int minw,int maxw,int minh,int maxh,int minx,int maxx,int miny,int maxy);
107  void repaint_focus(void);
108 
109  protected slots:
110  void printing_cancelled(void);
111  void delete_widgets(void);
112  void copy_widgets(void);
113  void paste_widgets(void);
114  void cut_widgets(void);
115  void enable_actions(void);
116 
117  private slots:
118  void align_left(void);
119  void align_right(void);
120  void align_top(void);
121  void align_bottom(void);
122  void adjust_minw(void);
123  void adjust_maxw(void);
124  void adjust_minh(void);
125  void adjust_maxh(void);
126  void adjust_mins(void);
127  void adjust_maxs(void);
128 
129 
130 
131  protected:
132  void set_kdereport(hk_kdereport*);
133  void set_reportpartwidget(hk_kdereportpartwidget*);
134 
135 
136  private:
137  bool is_reportobject(QWidget*);
138  void clearmultiplefocus(void);
139  //void create_propertyeditor(void);
140  void set_actualsection(hk_kdereportsection*);
141  void set_propertyobject(QWidget*);
142  void create_copydata(ostream&,QWidget*);
143  void set_sectionsize(hk_reportsection*);
144  hk_kdesimplereportprivate* p_private;
145 };
146 #endif
KDE high level widget to display and design reports.
Definition: hk_kdereportpartwidget.h:45
Definition: hk_kdereportproperty.h:22
Definition: hk_kdereportsection.h:21
KDE Widget to design and execute reports.
Definition: hk_kdesimplereport.h:42
KDE high level widget to display and design reports.
Definition: hk_kdereport.h:45
Definition: hk_kdeformfocus.h:51
Definition: hk_kdesimplereport.cpp:39