karbon

vroundrecttool.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 __VROUNDRECTTOOL_H__
21#define __VROUNDRECTTOOL_H__
22
23#include <tdelocale.h>
24#include <kdialogbase.h>
25#include <knuminput.h>
26
27
28#include "vshapetool.h"
29
30class KarbonView;
31class KarbonPart;
32class TQLabel;
33class KoUnitDoubleSpinBox;
34
35
36class VRoundRectTool : public VShapeTool
37{
38public:
39 VRoundRectTool( KarbonView *view );
40 virtual ~VRoundRectTool();
41
42 virtual bool showDialog() const;
43 virtual void setup(TDEActionCollection *collection);
44 virtual TQString uiname() { return i18n( "Round Rectangle Tool" ); }
45
46 virtual VPath* shape( bool interactive = false ) const;
47
48 void refreshUnit();
49
50private:
51 class VRoundRectOptionsWidget : public KDialogBase
52 {
53 public:
54 VRoundRectOptionsWidget( KarbonPart *part, TQWidget *parent = 0L, const char *name = 0L );
55
56 double width() const;
57 double height() const;
58 double roundx() const;
59 double roundy() const;
60 void setWidth( double value );
61 void setHeight( double value );
62 void setRoundX( double value );
63 void setRoundY( double value );
64 void refreshUnit ();
65
66 private:
67
68 KoUnitDoubleSpinBox* m_width;
69 KoUnitDoubleSpinBox* m_height;
70 KoUnitDoubleSpinBox* m_roundx;
71 KoUnitDoubleSpinBox* m_roundy;
72
73 KarbonPart* m_part;
74
75 };
76
77 VRoundRectOptionsWidget* m_optionsWidget;
78};
79
80#endif
81
Keeps track of visual per document properties.
Definition karbon_part.h:46
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