karbon

vstartool.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 __VSTARTOOL_H__
21#define __VSTARTOOL_H__
22
23#include <tdelocale.h>
24#include <kdialogbase.h>
25
26#include "vshapetool.h"
27
28
29class KoUnitDoubleSpinBox;
30class KIntSpinBox;
31class KComboBox;
32class KarbonView;
33
34class VStarOptionsWidget : public KDialogBase
35{
36TQ_OBJECT
37
38public:
39 VStarOptionsWidget( KarbonPart *part, TQWidget* parent = 0L, const char* name = 0L );
40
41 void refreshUnit();
42
43 int edges() const;
44 double innerRadius() const;
45 double outerRadius() const;
46 double roundness() const;
47 uint type() const;
48 uint innerAngle() const;
49 void setInnerRadius( double );
50
51public slots:
52 void typeChanged( int );
53 void setEdges( int );
54 void setOuterRadius( double );
55
56private:
57 KoUnitDoubleSpinBox *m_innerR;
58 KoUnitDoubleSpinBox *m_outerR;
59 KDoubleNumInput *m_roundness;
60 KIntSpinBox *m_edges;
61 KIntSpinBox *m_innerAngle;
62 KComboBox *m_type;
63 KarbonPart *m_part;
64 TQLabel *m_innerRLabel;
65 TQLabel *m_outerRLabel;
66};
67
68class VStarTool : public VShapeTool
69{
70public:
71 VStarTool( KarbonView *view );
72 virtual ~VStarTool();
73
74 virtual bool showDialog() const;
75 virtual void setup(TDEActionCollection *collection);
76 virtual TQString uiname() { return i18n( "Star Tool" ); }
77 virtual VPath* shape( bool interactive = false ) const;
78
79 void refreshUnit();
80
81 virtual void arrowKeyReleased( TQt::Key );
82
83private:
84 VStarOptionsWidget* m_optionsWidget;
85};
86
87#endif
88
Keeps track of visual per document properties.
Definition karbon_part.h:46
A composite path consists of one or many subpaths.
Definition vcomposite.h:48
KarbonView * view() const
Returns the connected karbon part.
Definition vtool.cpp:66