karbon

vspiraltool.h
1/* This file is part of the KDE project
2 Copyright (C) 2001, 2002, 2003 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 __VSPIRALTOOL_H__
21#define __VSPIRALTOOL_H__
22
23#include <kdialogbase.h>
24#include <tdelocale.h>
25
26#include "vshapetool.h"
27
28class KComboBox;
29class KoUnitDoubleSpinBox;
30class KDoubleNumInput;
31class KIntSpinBox;
32class KarbonView;
33
34class VSpiralTool : public VShapeTool
35{
36public:
37 VSpiralTool( KarbonView *view );
38 virtual ~VSpiralTool();
39
40 virtual void setup(TDEActionCollection *collection);
41 virtual bool showDialog() const;
42 virtual TQString uiname() { return i18n( "Spiral Tool" ); }
43
44 virtual VPath* shape( bool interactive = false ) const;
45
46 void refreshUnit();
47
48 virtual void arrowKeyReleased( TQt::Key );
49
50private:
51 class VSpiralOptionsWidget : public KDialogBase
52 {
53 public:
54 VSpiralOptionsWidget( KarbonPart *part, TQWidget *parent = 0L, const char* name = 0L );
55
56 double radius() const;
57 uint segments() const;
58 double fade() const;
59 uint type() const;
60 bool clockwise() const;
61 void setRadius( double value );
62 void setSegments( uint value );
63 void setFade( double value );
64 void setClockwise( bool value );
65
66 void refreshUnit();
67
68 private:
69 KoUnitDoubleSpinBox *m_radius;
70 KIntSpinBox *m_segments;
71 KDoubleNumInput *m_fade;
72 KComboBox *m_type;
73 KComboBox *m_clockwise;
74 KarbonPart *m_part;
75 };
76
77 VSpiralOptionsWidget *m_optionsWidget;
78};
79
80#endif
81
virtual TQString uiname()
The name of the tool.
Definition vtool.h:93
virtual void refreshUnit()
This function is called when the documents unit setting were changed.
Definition vtool.h:138
KarbonView * view() const
Returns the connected karbon part.
Definition vtool.cpp:66
virtual bool showDialog() const
Shows the tools option dialog.
Definition vtool.h:88