Databasehandlingdialogclasses  0.5.3
hk_kdereportpartwidget.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_KDEREPORTPARTWIDGET_H
13 #define HK_KDEREPORTPARTWIDGET_H
14 #include "hk_class.h"
15 #include <qwidget.h>
16 #include "hk_presentation.h"
17 #include <kparts/dockmainwindow.h>
18 
19 class QButtonGroup;
20 class QLabel;
21 class hk_kdesimplereport;
22 class hk_database;
23 class hk_kdetoolbar;
24 class QToolButton;
25 class QVBoxLayout;
26 class QHBoxLayout;
27 class KLibFactory;
28 class KRadioAction;
29 class QWidgetStack;
30 class hk_kdereportpart;
32 
45 class hk_kdereportpartwidget:public KParts::DockMainWindow, public hk_class
46 {
47 friend class hk_kdereportpart;
48  Q_OBJECT
49 
50  public:
51  virtual ~hk_kdereportpartwidget();
52  bool set_presentationdatasource(long n,bool r=true);
53  long presentationdatasource(void);
54  void set_database(hk_database*);
55  hk_database* database(void);
56  void set_nodesignmode(bool);
57  void set_mode(hk_presentation::enum_mode s);
58  hk_presentation::enum_mode mode(void);
59  hk_kdesimplereport* simplereport(void);
60  bool load_report(const hk_string& name="");
61  bool while_executing(void) const;
62  void stop_execution(void);
63 virtual void show_widget(void);
64 virtual void hide_widget(void);
65 virtual bool close_widget(void);
66 
67 
68 
69  void set_caller_form(const hk_string&);
70  hk_string caller_form(void) const;
71 
72  signals:
73  void signal_closed(QWidget*);
74  void signal_setcaption(const QString&);
75  void signal_raise_form(const hk_string&);
76 
77  public slots:
78  void set_designmode(void);
79  void set_viewmode(void);
80  void save_report(void);
81  void saveas_report(void);
82  void close_report(void);
83  void slot_showtoolbar(void);
84  void print_report(void);
85  void select_section(void);
86 
87 
88  protected:
89  hk_kdereportpartwidget( hk_kdereportpart*,QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
90  void closeEvent ( QCloseEvent* e);
91 
92  protected slots:
93  void fieldbutton_clicked(void);
94  void pointerbutton_clicked(void);
95  void viewbutton_clicked(void);
96  void designbutton_clicked(void);
97  void field_created(void);
98  void bulkfont_clicked(void);
99  void bulkforegroundcolour_clicked(void);
100  void bulkbackgroundcolour_clicked(void);
101  void slot_has_changed();
102  void clipboard_changed();
103  void slot_focuswidget_changed();
104 
105 
106  private:
107  KRadioAction* p_pointeraction;
108  KRadioAction* p_fieldaction;
109  KRadioAction* p_designaction;
110  KRadioAction* p_viewaction;
111  KAction* p_printaction;
112  KAction* p_sectionaction;
113  KAction* p_reportpropertyaction;
114  KAction* p_saveaction;
115  KAction* p_saveasaction;
116  KActionMenu* p_bulkaction;
117  KAction* p_bulkfontaction;
118  KAction* p_bulkforegroundcolouraction;
119  KAction* p_bulkbackgroundcolouraction;
120 
121  KAction* p_deleteaction;
122  KAction* p_copyaction;
123  KAction* p_pasteaction;
124  KAction* p_cutaction;
125 
126 
127 
128 
129  KActionMenu* p_resizeaction;
130  KAction* p_minwidthaction;
131  KAction* p_maxwidthaction;
132  KAction* p_minheightaction;
133  KAction* p_maxheightaction;
134  KAction* p_minsizeaction;
135  KAction* p_maxsizeaction;
136  KActionMenu*p_alignaction;
137  KAction* p_alignleftaction;
138  KAction* p_alignrightaction;
139  KAction* p_aligntopaction;
140  KAction* p_alignbottomaction;
141  hk_string p_callerform;
142 
143 
144  void set_reporttoolbar(void);
145 /* QWidget* p_reporttoolbar;
146  QButtonGroup* reportbuttongroup;
147  QToolButton* reportdatabutton;
148  QToolButton* reportpointerbutton;
149  QToolButton* reportsectionbutton;
150 */
151  hk_kdesimplereport* p_report;
152  bool p_nodesignmode;
153  QWidgetStack* p_stack;
154  hk_kdepreviewwindow* p_previewwindow;
155  hk_kdereportpartwidgetscrollview* p_scrollview;
156  hk_kdereportpart* p_reportpart;
157 
158  bool p_whilepreview;
159  bool p_closewindow;
160  void set_caption(void);
161 
162 };
163 #endif
Definition: hk_kdereportpartwidget.cpp:149
KDE high level widget to display and design reports.
Definition: hk_kdereportpartwidget.h:45
Definition: hk_kdetoolbar.h:26
Definition: hk_kdereportpartwidget.cpp:51
KDE Widget to design and execute reports.
Definition: hk_kdesimplereport.h:42