lib Library API Documentation

koToolBox.h

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., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef TOOLBOX_H 00021 #define TOOLBOX_H 00022 00023 #include <qframe.h> 00024 #include <qpoint.h> 00025 00026 class QVBoxLayout; 00027 class QSpinBox; 00028 00029 class KoDocumentChild; 00030 00031 class KoToolBox : public QFrame 00032 { 00033 Q_OBJECT 00034 public: 00035 KoToolBox( QWidget* parent = 0, const char* name = 0 ); 00036 00037 public slots: 00038 void setEnabled( bool enable ); 00039 00040 protected: 00041 // void paintEvent( QPaintEvent* ); 00042 void childEvent( QChildEvent* ev ); 00043 void mousePressEvent( QMouseEvent* ev ); 00044 void mouseMoveEvent( QMouseEvent* ev ); 00045 00046 private: 00047 QVBoxLayout* m_layout; 00048 QPoint m_mousePos; 00049 QPoint m_startPos; 00050 class KoToolBoxPrivate; 00051 KoToolBoxPrivate *d; 00052 }; 00053 00054 class KoTransformToolBox : public KoToolBox 00055 { 00056 Q_OBJECT 00057 public: 00058 KoTransformToolBox( KoDocumentChild* child, QWidget* parent = 0, const char* name = 0 ); 00059 00060 double rotation() const; 00061 double scaling() const; 00062 double xShearing() const; 00063 double yShearing() const; 00064 00065 void setRotation( double ); 00066 void setScaling( double ); 00067 void setXShearing( double ); 00068 void setYShearing( double ); 00069 00070 signals: 00071 void rotationChanged( double ); 00072 void scalingChanged( double ); 00073 void xShearingChanged( double ); 00074 void yShearingChanged( double ); 00075 00076 public slots: 00077 void setDocumentChild( KoDocumentChild* ); 00078 00079 private slots: 00080 void slotRotationChanged( int ); 00081 void slotScalingChanged( int ); 00082 void slotXShearingChanged( int ); 00083 void slotYShearingChanged( int ); 00084 00085 private: 00086 QSpinBox* m_rotation; 00087 QSpinBox* m_scale; 00088 QSpinBox* m_shearX; 00089 QSpinBox* m_shearY; 00090 KoDocumentChild* m_child; 00091 class KoTransformToolBoxPrivate; 00092 KoTransformToolBoxPrivate *d; 00093 }; 00094 00095 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Sep 28 04:04:02 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003