Databasehandlingdialogclasses  0.5.3
hk_kdemodulepartwidget.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_KDEMODULEPARTWIDGET_H
13 #define HK_KDEMODULEPARTWIDGET_H
14 
15 #include <qvariant.h>
16 #include <qwidgetstack.h>
17 #include <kate/view.h>
18 #include <kate/document.h>
19 
20 #include "hk_datasource.h"
21 #include "hk_database.h"
22 #include "hk_module.h"
23 
24 class QVBoxLayout;
25 class QHBoxLayout;
26 class QGridLayout;
27 class QButtonGroup;
28 class QToolButton;
29 class hk_kdetoolbar;
30 class hk_kdemodulepart;
31 
33 
46 class hk_kdemodulepartwidget : public QWidgetStack ,public hk_module
47 {
48  Q_OBJECT
49  friend class hk_kdemodulepart;
50 
51  public:
52 virtual ~hk_kdemodulepartwidget();
53 
58  void set_autoclose(bool c);
59  bool autoclose(void)const;
60 
61 
62 virtual void reset_has_changed(void);
63 virtual void show_widget(void);
64 virtual void hide_widget(void);
65 virtual bool close_widget(void);
66  bool save_module(const hk_string& n="",bool ask=true);
67  bool load_module(const hk_string& n="");
68  bool has_changed();
69  void set_block_has_changed(bool);
70  signals:
71  void signal_closed(QWidget*);
72 
73  public slots:
74  void module_changed(void);
75  void savebutton_clicked(void);
76  void saveasbutton_clicked(void);
77  void close_module(void);
78  void print(void);
79  void copy_clicked(void);
80  void paste_clicked(void);
81  void replace_clicked(void);
82  void find_clicked(void);
83  void findnext_clicked(void);
84  void findprevious_clicked(void);
85  void cut_clicked(void);
86  void undo_clicked(void);
87  void redo_clicked(void);
88  void selectall_clicked(void);
89  void configeditor_clicked(void);
90 
91 virtual void show ();
92 virtual void showMaximized ();
93 
94 
95  protected:
96  hk_kdemodulepartwidget(hk_kdemodulepart*,QWidget* w=0,const char* n=0,WFlags f=0);
97  virtual void before_source_vanishes(void);
98  virtual void closeEvent ( QCloseEvent* e);
99  void keyPressEvent ( QKeyEvent * e );
100  virtual void set_has_changed(enum_has_changed forcesetting=standard);
101 
102  private:
103  KAction* p_saveaction;
104  KAction* p_saveasaction;
105  KAction* p_printaction;
106 
107  KAction* p_copyaction;
108  KAction* p_cutaction;
109  KAction* p_undoaction;
110  KAction* p_redoaction;
111  KAction* p_pasteaction;
112  KAction* p_replaceaction;
113  KAction* p_findaction;
114  KAction* p_findnextaction;
115  KAction* p_findpreviousaction;
116  KAction* p_selectallaction;
117  KAction* p_storeresultaction;
118  KAction* p_configeditoraction;
119 
120  void set_caption(void);
122 
123 };
124 #endif
Definition: hk_kdemodulepartwidget.cpp:42
Definition: hk_kdetoolbar.h:26
KDE high level widget to define queries and see the result.
Definition: hk_kdemodulepartwidget.h:46
void set_autoclose(bool c)
Definition: hk_kdemodulepartwidget.cpp:299