karbon
whirlpinchplugin.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
|