Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

hk_kdeformfocus.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2004 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 #ifndef HK_KDEFORMFOCUS
00012 #define HK_KDEFORMFOCUS
00013 #include <hk_class.h>
00014 #include <qwidget.h>
00015 #include <qobject.h>
00016 #include <list>
00017 class hk_kdeformfocus;
00018 class hk_kdesimpleform;
00019 class hk_kdesimplereport;
00020 class hk_kdereportsection;
00021 class hk_report;
00022 
00023 class hk_marker :public QWidget,hk_class
00024 {
00025     Q_OBJECT
00026         friend class hk_kdeformfocus;
00027     public:
00028         enum enum_markertype {lo,mo,ro,lm,rm,lu,mu,ru};
00029         hk_marker(hk_kdesimpleform*,hk_kdeformfocus*,hk_marker::enum_markertype);
00030 //  hk_marker(hk_kdesimplereport*,hk_kdeformfocus*,hk_marker::enum_markertype);
00031         hk_marker(hk_kdereportsection*,hk_kdeformfocus*,hk_marker::enum_markertype);
00032         ~hk_marker(void);
00033         void  set_widget(QWidget*);
00034         enum_markertype type(void);
00035         void set_cursors(void);
00036 
00037     protected:
00038         virtual   void paintEvent( QPaintEvent* );
00039         virtual   void mousePressEvent( QMouseEvent*  );
00040         virtual   void mouseMoveEvent( QMouseEvent*  );
00041     private:
00042         enum_markertype p_type;
00043         QWidget* p_widget;
00044         QPoint   p_originalposition;
00045         hk_kdeformfocus* p_focus;
00046         hk_kdesimpleform* p_form;
00047         hk_kdesimplereport* p_report;
00048         hk_kdereportsection* p_section;
00049 };
00050 
00051 class hk_kdeformfocus :public QObject,public hk_class
00052 {
00053     Q_OBJECT
00054         friend class hk_marker;
00055     signals:
00056     void size_changed();
00057 
00058     public:
00059         hk_kdeformfocus(hk_kdesimpleform*);
00060 // hk_kdeformfocus(hk_kdesimplereport*);
00061         hk_kdeformfocus(hk_kdereportsection*);
00062         ~hk_kdeformfocus(void);
00063         void set_widget(QWidget*);
00064         QWidget* widget(void);
00065         void show(void);
00066         void hide(void);
00067         void set_positions(void);
00068         void repaint(void);
00069     protected:
00070         bool eventFilter(QObject* object,QEvent* event);
00071 
00072     private:
00073         QWidget* p_widget;
00074         bool p_markermove;
00075         list<hk_marker*> p_markers;
00076         void marker_moved(void);
00077 // void clearmultiplefocus(void);
00078         hk_kdereportsection* p_section;
00079 };
00080 #endif

Generated on Tue Mar 22 23:28:15 2005 for Databasehandlingdialogclasses by  doxygen 1.4.1