Databasehandlingdialogclasses  0.5.3
hk_kdemodule.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_KDEMODULE_H
13 #define HK_KDEMODULE_H
14 #include <hk_module.h>
15 #include <qvariant.h>
16 #include <qwidget.h>
17 #include <hk_presentation.h>
18 //#include <fstream.h>
19 #include <hk_class.h>
20 #include <kparts/dockmainwindow.h>
21 #include <kparts/partmanager.h>
22 
23 #include "hk_kdemodulepartwidget.h"
24 
25 class QVBoxLayout;
26 class QHBoxLayout;
27 class QGridLayout;
28 class QLabel;
29 class QScrollView;
30 class hk_kdesimplemodule;
31 class QToolButton;
32 class QButtonGroup;
33 class hk_kderowselector;
34 class hk_kdetoolbar;
35 class hk_kdeproperty;
36 class hk_kdegridpart;
37 
49 class hk_kdemodule : public KParts::DockMainWindow,public hk_class
50 {
51  Q_OBJECT
52  friend class hk_kdesimplemodule;
53  public:
54  hk_kdemodule( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
55  virtual ~hk_kdemodule();
56 
57  void set_database(hk_database* db);
58  hk_database* database(void);
59  void loaddata(xmlNodePtr);
60  void savedata(ofstream& s);
61  void load_module(const hk_string& n);
67  void set_autoclose(bool c);
71  signals:
72  void signal_closed(QWidget*);
73 
74 
75 
76  protected:
77  virtual void closeEvent ( QCloseEvent* e);
78  virtual void mousePressEvent(QMouseEvent*);
79  KAction * p_closeaction;
80  void save_module_when_changed();
81  protected slots:
82  void part_removed(void);
83  void close_module(void);
84  private:
85  void set_caption(void);
86  KParts::ReadWritePart* p_part;
87  KParts::PartManager* p_partmanager;
88  hk_kdemodulepartwidget* p_module;
89 };
90 #endif
KDE Widget to select a specific row.
Definition: hk_kderowselector.h:32
Definition: hk_kdeproperty.h:21
Definition: hk_kdetoolbar.h:26
KDE high level widget to define queries and see the result.
Definition: hk_kdemodulepartwidget.h:46
KDE high level widget to display and design modules.
Definition: hk_kdemodule.h:49
void set_autoclose(bool c)
Definition: hk_kdemodule.cpp:209
void signal_closed(QWidget *)