~ubuntu-branches/ubuntu/edgy/koffice/edgy-updates

« back to all changes in this revision

Viewing changes to karbon/tools/vspiraltool.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040509113300-xi5t1z4yxe7n03x7
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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., 59 Temple Place - Suite 330,
 
17
   Boston, MA 02111-1307, USA.
 
18
*/
 
19
 
 
20
#ifndef __VSPIRALTOOL_H__
 
21
#define __VSPIRALTOOL_H__
 
22
 
 
23
#include <kdialogbase.h>
 
24
#include <klocale.h>
 
25
 
 
26
#include "vshapetool.h"
 
27
 
 
28
class KComboBox;
 
29
class KoUnitDoubleSpinBox;
 
30
class KDoubleNumInput;
 
31
class KIntSpinBox;
 
32
class KarbonPart;
 
33
 
 
34
class VSpiralTool : public VShapeTool
 
35
{
 
36
public:
 
37
        VSpiralTool( KarbonPart *part );
 
38
        virtual ~VSpiralTool();
 
39
 
 
40
        virtual bool showDialog() const;
 
41
        virtual QString name() { return i18n( "Spiral Tool" ); }
 
42
        virtual QString icon() { return "14_spiral"; }
 
43
 
 
44
        virtual VPath* shape( bool interactive = false ) const;
 
45
 
 
46
        void refreshUnit();
 
47
 
 
48
        virtual void arrowKeyReleased( Qt::Key );
 
49
 
 
50
private:
 
51
        class VSpiralOptionsWidget : public KDialogBase
 
52
        {
 
53
        public:
 
54
                VSpiralOptionsWidget( KarbonPart *part, QWidget *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