F:/KPlato/koffice/libs/kofficecore/KoContainerHandler.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 1998, 1999, 2000 Torben Weis <weis@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef HANDLER_H
00021 #define HANDLER_H
00022 
00023 #include <QObject>
00024 //Added by qt3to4:
00025 #include <QMouseEvent>
00026 #include <QEvent>
00027 #include <KoDocumentChild.h>
00028 
00029 class QMatrix;
00030 
00031 class KoView;
00032 class KoPartResizeHandlerPrivate;
00033 class KoPartMoveHandlerPrivate;
00034 
00046 class KOFFICECORE_EXPORT KoEventHandler : public QObject
00047 {
00048     Q_OBJECT
00049 public:
00050     KoEventHandler( QObject* target );
00051     ~KoEventHandler();
00052 
00053     QObject* target();
00054 
00055 private:
00056     QObject* m_target;
00057 };
00058 
00063 class KoPartResizeHandler : public KoEventHandler
00064 {
00065     Q_OBJECT
00066 public:
00067     KoPartResizeHandler( QWidget* widget, const QMatrix& matrix, KoView* view, KoChild* child,
00068                        KoChild::Gadget gadget, const QPoint& point );
00069     ~KoPartResizeHandler();
00070 
00071 protected:
00072     void repaint(QRegion &rgn);
00073     bool eventFilter( QObject*, QEvent* );
00074 
00075 private:
00076     KoPartResizeHandlerPrivate *d;
00077 };
00078 
00083 class KoPartMoveHandler : public KoEventHandler
00084 {
00085     Q_OBJECT
00086 public:
00087     KoPartMoveHandler( QWidget* widget, const QMatrix& matrix, KoView* view, KoChild* child,
00088                      const QPoint& point );
00089     ~KoPartMoveHandler();
00090 
00091 protected:
00092     bool eventFilter( QObject*, QEvent* );
00093 
00094 private:
00095     KoPartMoveHandlerPrivate *d;
00096 };
00097 
00112 class KOFFICECORE_EXPORT KoContainerHandler : public KoEventHandler
00113 {
00114     Q_OBJECT
00115 public:
00116     KoContainerHandler( KoView* view, QWidget* widget );
00117     ~KoContainerHandler();
00118 
00119 signals:
00124     void popupMenu( KoChild*, const QPoint& global_pos );
00125 
00129     void deleteChild( KoChild* );
00130 
00131 protected:
00132     bool eventFilter( QObject*, QEvent* );
00133 
00134 private:
00136     KoChild *child(KoChild::Gadget &gadget, QPoint &pos, const QMouseEvent *ev);
00137     KoView* m_view;
00138 };
00139 
00140 #endif

Généré le Wed Nov 22 23:41:02 2006 pour KPlato par  doxygen 1.5.1-p1