lib Library API Documentation

koChild.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 1998, 1999 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., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 */
00019 #ifndef __koChild_h__
00020 #define __koChild_h__
00021 
00022 #include <qobject.h>
00023 #include <qwmatrix.h>
00024 #include <koffice_export.h>
00036 class KOFFICECORE_EXPORT KoChild : public QObject
00037 {
00038   Q_OBJECT
00039 public:
00040   
00050   enum Gadget { NoGadget, TopLeft, TopMid, TopRight, MidLeft, MidRight,
00051         BottomLeft, BottomMid, BottomRight, Move };
00052 
00053   KoChild( QObject *parent = 0, const char *name = 0 );
00054   virtual ~KoChild();
00055 
00060   virtual void setGeometry( const QRect &rect, bool noEmit = false );
00061 
00070   virtual QRect geometry() const;
00071 
00078   virtual QRegion region( const QWMatrix& = QWMatrix() ) const;
00079 
00086   virtual QPointArray pointArray( const QWMatrix &matrix = QWMatrix() ) const;
00087 
00092   virtual bool contains( const QPoint& ) const;
00093 
00099   virtual QRect boundingRect( const QWMatrix &matrix = QWMatrix() ) const;
00100 
00105   virtual void setScaling( double x, double y );
00106 
00110   virtual double xScaling() const;
00111 
00115   virtual double yScaling() const;
00116 
00120   virtual void setShearing( double x, double y );
00121 
00125   virtual double xShearing() const;
00126 
00130   virtual double yShearing() const;
00131 
00135   virtual void setRotation( double );
00136 
00140   virtual double rotation() const;
00141 
00145   virtual void setRotationPoint( const QPoint& pos );
00146 
00150   virtual QPoint rotationPoint() const;
00151 
00156   virtual bool isRectangle() const;
00157 
00166   virtual void setClipRegion( QPainter& painter, bool combine = true );
00167 
00173   virtual void transform( QPainter& painter );
00174 
00180   virtual void setContentsPos( int x, int y );
00181 
00189   virtual QRect contentRect() const;
00190 
00196   virtual QRegion frameRegion( const QWMatrix& matrix, bool solid = false ) const;
00197 
00202   virtual QPointArray framePointArray( const QWMatrix &matrix = QWMatrix() ) const;
00203 
00210   virtual QWMatrix matrix() const;
00211 
00221   virtual void lock();
00222 
00226   virtual void unlock();
00227 
00239   bool locked() const;  //TODO should this be made virtual?
00240 
00244   virtual QPointArray oldPointArray( const QWMatrix &matrix );
00245 
00253   virtual void setTransparent( bool transparent );
00254 
00260   virtual bool isTransparent() const;
00261 
00272   virtual Gadget gadgetHitTest( const QPoint& p, const QWMatrix& matrix );
00273 
00274 signals:
00275 
00281   void changed( KoChild *thisChild );
00282 
00283 protected:
00284 
00292   virtual QPointArray pointArray( const QRect& r, const QWMatrix& matrix ) const;
00293 
00299   virtual void updateMatrix();
00300 private:
00301 
00302   class KoChildPrivate;
00303   KoChildPrivate *d;
00304 };
00305 
00306 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:39:59 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003