karbon

vroundrecttool.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 __VROUNDRECTTOOL_H__
00021 #define __VROUNDRECTTOOL_H__
00022 
00023 #include <klocale.h>
00024 #include <kdialogbase.h>
00025 #include <knuminput.h>
00026 
00027 
00028 #include "vshapetool.h"
00029 
00030 class KarbonView;
00031 class KarbonPart;
00032 class QLabel;
00033 class KoUnitDoubleSpinBox;
00034 
00035 
00036 class VRoundRectTool : public VShapeTool
00037 {
00038 public:
00039     VRoundRectTool( KarbonView *view );
00040     virtual ~VRoundRectTool();
00041 
00042     virtual bool showDialog() const;
00043     virtual void setup(KActionCollection *collection);
00044     virtual QString uiname() { return i18n( "Round Rectangle Tool" ); }
00045 
00046     virtual VPath* shape( bool interactive = false ) const;
00047 
00048     void refreshUnit();
00049 
00050 private:
00051     class VRoundRectOptionsWidget : public KDialogBase
00052     {
00053     public:
00054         VRoundRectOptionsWidget( KarbonPart *part, QWidget *parent = 0L, const char *name = 0L );
00055 
00056         double width() const;
00057         double height() const;
00058         double roundx() const;
00059         double roundy() const;
00060         void setWidth( double value );
00061         void setHeight( double value );
00062         void setRoundX( double value );
00063         void setRoundY( double value );
00064         void refreshUnit ();
00065 
00066     private:
00067 
00068         KoUnitDoubleSpinBox* m_width;
00069         KoUnitDoubleSpinBox* m_height;
00070         KoUnitDoubleSpinBox* m_roundx;
00071         KoUnitDoubleSpinBox* m_roundy;
00072 
00073         KarbonPart* m_part;
00074 
00075     };
00076 
00077     VRoundRectOptionsWidget* m_optionsWidget;
00078 };
00079 
00080 #endif
00081 
KDE Home | KDE Accessibility Home | Description of Access Keys