karbon

whirlpinchplugin.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002, The Karbon Developers
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 __WHIRLPINCHPLUGIN_H__
00021 #define __WHIRLPINCHPLUGIN_H__
00022 
00023 #include <kdialogbase.h>
00024 #include <kparts/plugin.h>
00025 #include <commands/vreplacingcmd.h>
00026 
00027 class KarbonView;
00028 class VWhirlPinchDlg;
00029 
00030 class WhirlPinchPlugin : public KParts::Plugin
00031 {
00032     Q_OBJECT
00033 public:
00034     WhirlPinchPlugin( KarbonView *parent, const char* name, const QStringList & );
00035     virtual ~WhirlPinchPlugin() {}
00036 
00037 private slots:
00038     void slotWhirlPinch();
00039 
00040 private:
00041     VWhirlPinchDlg  *m_whirlPinchDlg;
00042 };
00043 
00044 class KDoubleNumInput;
00045 
00046 class VWhirlPinchDlg : public KDialogBase
00047 {
00048     Q_OBJECT
00049 
00050 public:
00051     VWhirlPinchDlg( QWidget* parent = 0L, const char* name = 0L );
00052 
00053     double angle() const;
00054     double pinch() const;
00055     double radius() const;
00056     void setAngle( double value );
00057     void setPinch( double value );
00058     void setRadius( double value );
00059 
00060 private:
00061     KDoubleNumInput* m_angle;
00062     KDoubleNumInput* m_pinch;
00063     KDoubleNumInput* m_radius;
00064 };
00065 
00066 class VPath;
00067 class VSubpath;
00068 class VSelection;
00069 
00070 class VWhirlPinchCmd : public VReplacingCmd
00071 {
00072 public:
00073     VWhirlPinchCmd( VDocument* doc,
00074         double angle, double pinch, double radius );
00075     virtual ~VWhirlPinchCmd();
00076 
00077     virtual void visitVPath( VPath& composite );
00078     virtual void visitVSubpath( VSubpath& path );
00079 
00080     virtual bool changesSelection() const { return true; }
00081 
00082 protected:
00083     KoPoint m_center;
00084     double m_angle;
00085     double m_pinch;
00086     double m_radius;
00087 };
00088 
00089 #endif
00090 
KDE Home | KDE Accessibility Home | Description of Access Keys