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_KDEREPORT_H 00013 #define HK_KDEREPORT_H 00014 #include "hk_class.h" 00015 #include <qwidget.h> 00016 #include "hk_presentation.h" 00017 #include <kparts/dockmainwindow.h> 00018 #include "hk_kdereportpartwidget.h" 00019 #include <kparts/dockmainwindow.h> 00020 #include <kparts/partmanager.h> 00021 00022 class QButtonGroup; 00023 class QLabel; 00024 class hk_kdesimplereport; 00025 class hk_database; 00026 class hk_kdetoolbar; 00027 class QToolButton; 00028 class QVBoxLayout; 00029 class QHBoxLayout; 00030 class KLibFactory; 00031 class KRadioAction; 00032 class QWidgetStack; 00033 00045 class hk_kdereport:public KParts::DockMainWindow, public hk_class 00046 { 00047 00048 Q_OBJECT 00049 00050 public: 00051 hk_kdereport( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 00052 virtual ~hk_kdereport(); 00053 bool set_presentationdatasource(long n,bool r=true); 00054 long presentationdatasource(void); 00055 void set_database(hk_database*); 00056 hk_database* database(void); 00057 void set_nodesignmode(bool); 00058 void set_mode(hk_presentation::enum_mode s); 00059 hk_kdesimplereport* simplereport(void); 00060 bool load_report(const hk_string& name=""); 00061 signals: 00062 void signal_closed(QWidget*); 00063 void signal_setcaption(const QString&); 00064 00065 public slots: 00066 void set_designmode(void); 00067 void set_viewmode(void); 00068 void save_report(void); 00069 void saveas_report(void); 00070 void close_report(void); 00071 void slot_showtoolbar(void); 00072 protected: 00073 void closeEvent ( QCloseEvent* e); 00074 00075 protected slots: 00076 void part_removed(void); 00077 00078 00079 private: 00080 00081 KAction* p_closeaction; 00082 KParts::ReadWritePart* p_part; 00083 KParts::PartManager* p_partmanager; 00084 hk_kdereportpartwidget* p_report; 00085 void set_caption(void); 00086 00087 }; 00088 #endif