karbon
vpolygontool.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __VPOLYGONTOOL_H__
00021 #define __VPOLYGONTOOL_H__
00022
00023 #include <kdialogbase.h>
00024
00025 #include "vshapetool.h"
00026
00027 class KoUnitDoubleSpinBox;
00028 class KIntSpinBox;
00029
00030
00031 class VPolygonTool : public VShapeTool
00032 {
00033 public:
00034 VPolygonTool( KarbonView *view );
00035 virtual ~VPolygonTool();
00036
00037 virtual void setup(KActionCollection *collection);
00038 virtual bool showDialog() const;
00039 virtual QString uiname() { return i18n( "Polygon Tool" ); }
00040
00041 virtual VPath *shape( bool interactive = false ) const;
00042
00043 void refreshUnit();
00044
00045 virtual void arrowKeyReleased( Qt::Key );
00046
00047 private:
00048 class VPolygonOptionsWidget : public KDialogBase
00049 {
00050 public:
00051 VPolygonOptionsWidget( KarbonView *view, QWidget *parent = 0L, const char *name = 0L );
00052
00053 double radius() const;
00054 uint edges() const;
00055 void setRadius( double value );
00056 void setEdges( uint value );
00057
00058 void refreshUnit();
00059
00060 private:
00061 KoUnitDoubleSpinBox *m_radius;
00062 KIntSpinBox *m_edges;
00063 KarbonView *m_view;
00064 };
00065
00066 VPolygonOptionsWidget* m_optionsWidget;
00067 };
00068
00069 #endif
00070
|