hk_kdemodulepartwidget.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_KDEMODULEPARTWIDGET_H
00013 #define HK_KDEMODULEPARTWIDGET_H
00014 
00015 #include <qvariant.h>
00016 #include <qwidgetstack.h>
00017 #include <kate/view.h>
00018 #include <kate/document.h>
00019 
00020 #include "hk_datasource.h"
00021 #include "hk_database.h"
00022 #include "hk_module.h"
00023 
00024 class QVBoxLayout;
00025 class QHBoxLayout;
00026 class QGridLayout;
00027 class QButtonGroup;
00028 class QToolButton;
00029 class hk_kdetoolbar;
00030 class hk_kdemodulepart;
00031 
00032 class hk_kdemodulepartwidgetprivate;
00033 
00046 class hk_kdemodulepartwidget : public QWidgetStack ,public hk_module
00047 {
00048     Q_OBJECT
00049     friend class hk_kdemodulepart;
00050 
00051         public:
00052 virtual        ~hk_kdemodulepartwidget();
00053 
00058         void set_autoclose(bool c);
00059         bool autoclose(void)const;
00060 
00061 
00062 virtual void reset_has_changed(void);
00063 virtual void show_widget(void);
00064 virtual void hide_widget(void);
00065 virtual bool close_widget(void);
00066         bool save_module(const hk_string& n="",bool ask=true);
00067         bool load_module(const hk_string& n="");
00068    bool has_changed();
00069    void set_block_has_changed(bool);
00070     signals:
00071         void signal_closed(QWidget*);
00072 
00073     public slots:
00074         void module_changed(void);
00075         void savebutton_clicked(void);
00076         void saveasbutton_clicked(void);
00077         void close_module(void);
00078         void print(void);
00079         void copy_clicked(void);
00080         void paste_clicked(void);
00081         void replace_clicked(void);
00082         void find_clicked(void);
00083         void findnext_clicked(void);
00084         void findprevious_clicked(void);
00085         void cut_clicked(void);
00086         void undo_clicked(void);
00087         void redo_clicked(void);
00088         void selectall_clicked(void);
00089         void configeditor_clicked(void);
00090 
00091 virtual void show ();
00092 virtual void showMaximized ();
00093 
00094 
00095     protected:
00096         hk_kdemodulepartwidget(hk_kdemodulepart*,QWidget* w=0,const char* n=0,WFlags f=0);
00097         virtual void before_source_vanishes(void);
00098         virtual void closeEvent ( QCloseEvent* e);
00099         void    keyPressEvent ( QKeyEvent * e );
00100         virtual void set_has_changed(enum_has_changed forcesetting=standard);
00101 
00102     private:
00103         KAction*      p_saveaction;
00104         KAction*      p_saveasaction;
00105         KAction*      p_printaction;
00106 
00107         KAction*      p_copyaction;
00108         KAction*      p_cutaction;
00109         KAction*      p_undoaction;
00110         KAction*      p_redoaction;
00111         KAction*      p_pasteaction;
00112         KAction*      p_replaceaction;
00113         KAction*      p_findaction;
00114         KAction*      p_findnextaction;
00115         KAction*      p_findpreviousaction;
00116         KAction*      p_selectallaction;
00117         KAction*      p_storeresultaction;
00118         KAction*      p_configeditoraction;
00119 
00120         void set_caption(void);
00121         hk_kdemodulepartwidgetprivate* p_private;
00122 
00123 };
00124 #endif

Generated on Tue Nov 28 00:05:29 2006 for Databasehandlingdialogclasses by  doxygen 1.5.0