karbon

whirlpinchplugin.h
1/* This file is part of the KDE project
2 Copyright (C) 2002, The Karbon Developers
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __WHIRLPINCHPLUGIN_H__
21#define __WHIRLPINCHPLUGIN_H__
22
23#include <kdialogbase.h>
24#include <tdeparts/plugin.h>
25#include <commands/vreplacingcmd.h>
26
27class KarbonView;
28class VWhirlPinchDlg;
29
30class WhirlPinchPlugin : public KParts::Plugin
31{
32 TQ_OBJECT
33
34public:
35 WhirlPinchPlugin( KarbonView *parent, const char* name, const TQStringList & );
36 virtual ~WhirlPinchPlugin() {}
37
38private slots:
39 void slotWhirlPinch();
40
41private:
42 VWhirlPinchDlg *m_whirlPinchDlg;
43};
44
45class KDoubleNumInput;
46
47class VWhirlPinchDlg : public KDialogBase
48{
49 TQ_OBJECT
50
51
52public:
53 VWhirlPinchDlg( TQWidget* parent = 0L, const char* name = 0L );
54
55 double angle() const;
56 double pinch() const;
57 double radius() const;
58 void setAngle( double value );
59 void setPinch( double value );
60 void setRadius( double value );
61
62private:
63 KDoubleNumInput* m_angle;
64 KDoubleNumInput* m_pinch;
65 KDoubleNumInput* m_radius;
66};
67
68class VPath;
69class VSubpath;
70class VSelection;
71
72class VWhirlPinchCmd : public VReplacingCmd
73{
74public:
75 VWhirlPinchCmd( VDocument* doc,
76 double angle, double pinch, double radius );
77 virtual ~VWhirlPinchCmd();
78
79 virtual void visitVPath( VPath& composite );
80 virtual void visitVSubpath( VSubpath& path );
81
82 virtual bool changesSelection() const { return true; }
83
84protected:
85 KoPoint m_center;
86 double m_angle;
87 double m_pinch;
88 double m_radius;
89};
90
91#endif
92
virtual bool changesSelection() const
Returns if the command changes the actual document selection.
Definition vcommand.h:84
A composite path consists of one or many subpaths.
Definition vcomposite.h:48
VReplacingCmd is a generic command.
VSelection manages a set of selected vobjects.
Definition vselection.h:62
VSubpath provides a sophisticated list of VSegment.
Definition vpath.h:43