karbon

vspiraltool.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001, 2002, 2003 The Karbon Developers
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef __VSPIRALTOOL_H__
00021 #define __VSPIRALTOOL_H__
00022 
00023 #include <kdialogbase.h>
00024 #include <klocale.h>
00025 
00026 #include "vshapetool.h"
00027 
00028 class KComboBox;
00029 class KoUnitDoubleSpinBox;
00030 class KDoubleNumInput;
00031 class KIntSpinBox;
00032 class KarbonView;
00033 
00034 class VSpiralTool : public VShapeTool
00035 {
00036 public:
00037     VSpiralTool( KarbonView *view );
00038     virtual ~VSpiralTool();
00039 
00040     virtual void setup(KActionCollection *collection);
00041     virtual bool showDialog() const;
00042     virtual QString uiname() { return i18n( "Spiral Tool" ); }
00043 
00044     virtual VPath* shape( bool interactive = false ) const;
00045 
00046     void refreshUnit();
00047 
00048     virtual void arrowKeyReleased( Qt::Key );
00049 
00050 private:
00051     class VSpiralOptionsWidget : public KDialogBase
00052     {
00053     public:
00054         VSpiralOptionsWidget( KarbonPart *part, QWidget *parent = 0L, const char* name = 0L );
00055 
00056         double radius() const;
00057         uint segments() const;
00058         double fade() const;
00059         uint type() const;
00060         bool clockwise() const;
00061         void setRadius( double value );
00062         void setSegments( uint value );
00063         void setFade( double value );
00064         void setClockwise( bool value );
00065 
00066         void refreshUnit();
00067 
00068     private:
00069         KoUnitDoubleSpinBox     *m_radius;
00070         KIntSpinBox         *m_segments;
00071         KDoubleNumInput         *m_fade;
00072         KComboBox           *m_type;
00073         KComboBox           *m_clockwise;
00074         KarbonPart          *m_part;
00075     };
00076 
00077     VSpiralOptionsWidget *m_optionsWidget;
00078 };
00079 
00080 #endif
00081 
KDE Home | KDE Accessibility Home | Description of Access Keys