hk_kdemodule.h

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_KDEMODULE_H
00013 #define HK_KDEMODULE_H
00014 #include <hk_module.h>
00015 #include <qvariant.h>
00016 #include <qwidget.h>
00017 #include <hk_presentation.h>
00018 //#include <fstream.h>
00019 #include <hk_class.h>
00020 #include <kparts/dockmainwindow.h>
00021 #include <kparts/partmanager.h>
00022 
00023 #include "hk_kdemodulepartwidget.h"
00024 
00025 class QVBoxLayout;
00026 class QHBoxLayout;
00027 class QGridLayout;
00028 class QLabel;
00029 class QScrollView;
00030 class hk_kdesimplemodule;
00031 class QToolButton;
00032 class QButtonGroup;
00033 class hk_kderowselector;
00034 class hk_kdetoolbar;
00035 class hk_kdeproperty;
00036 class hk_kdegridpart;
00037 
00049 class hk_kdemodule : public KParts::DockMainWindow,public hk_class
00050 {
00051     Q_OBJECT
00052      friend class hk_kdesimplemodule;
00053         public:
00054         hk_kdemodule( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
00055         virtual    ~hk_kdemodule();
00056 
00057         void            set_database(hk_database* db);
00058         hk_database*        database(void);
00059         void        loaddata(xmlNodePtr);
00060         void        savedata(ofstream& s);
00061         void        load_module(const hk_string& n);
00067         void set_autoclose(bool c);
00071     signals:
00072         void signal_closed(QWidget*);
00073     
00074         
00075 
00076     protected:
00077         virtual void closeEvent ( QCloseEvent* e);
00078         virtual void        mousePressEvent(QMouseEvent*);
00079         KAction * p_closeaction;
00080         void save_module_when_changed();
00081     protected slots:
00082         void part_removed(void);
00083         void close_module(void);
00084     private:
00085         void set_caption(void);
00086         KParts::ReadWritePart* p_part;
00087         KParts::PartManager* p_partmanager;
00088         hk_kdemodulepartwidget*  p_module;
00089 };
00090 #endif

Generated on Tue Sep 25 22:39:06 2007 for Databasehandlingdialogclasses by  doxygen 1.5.3