karbon

vpolygontool.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 __VPOLYGONTOOL_H__
21#define __VPOLYGONTOOL_H__
22
23#include <kdialogbase.h>
24
25#include "vshapetool.h"
26
27class KoUnitDoubleSpinBox;
28class KIntSpinBox;
29
30
31class VPolygonTool : public VShapeTool
32{
33public:
34 VPolygonTool( KarbonView *view );
35 virtual ~VPolygonTool();
36
37 virtual void setup(TDEActionCollection *collection);
38 virtual bool showDialog() const;
39 virtual TQString uiname() { return i18n( "Polygon Tool" ); }
40
41 virtual VPath *shape( bool interactive = false ) const;
42
43 void refreshUnit();
44
45 virtual void arrowKeyReleased( TQt::Key );
46
47private:
48 class VPolygonOptionsWidget : public KDialogBase
49 {
50 public:
51 VPolygonOptionsWidget( KarbonView *view, TQWidget *parent = 0L, const char *name = 0L );
52
53 double radius() const;
54 uint edges() const;
55 void setRadius( double value );
56 void setEdges( uint value );
57
58 void refreshUnit();
59
60 private:
61 KoUnitDoubleSpinBox *m_radius;
62 KIntSpinBox *m_edges;
63 KarbonView *m_view;
64 };
65
66 VPolygonOptionsWidget* m_optionsWidget;
67};
68
69#endif
70
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