karbon
vstartool.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __VSTARTOOL_H__
00021 #define __VSTARTOOL_H__
00022
00023 #include <klocale.h>
00024 #include <kdialogbase.h>
00025
00026 #include "vshapetool.h"
00027
00028
00029 class KoUnitDoubleSpinBox;
00030 class KIntSpinBox;
00031 class KComboBox;
00032 class KarbonView;
00033
00034 class VStarOptionsWidget : public KDialogBase
00035 {
00036 Q_OBJECT
00037 public:
00038 VStarOptionsWidget( KarbonPart *part, QWidget* parent = 0L, const char* name = 0L );
00039
00040 void refreshUnit();
00041
00042 int edges() const;
00043 double innerRadius() const;
00044 double outerRadius() const;
00045 double roundness() const;
00046 uint type() const;
00047 uint innerAngle() const;
00048 void setInnerRadius( double );
00049
00050 public slots:
00051 void typeChanged( int );
00052 void setEdges( int );
00053 void setOuterRadius( double );
00054
00055 private:
00056 KoUnitDoubleSpinBox *m_innerR;
00057 KoUnitDoubleSpinBox *m_outerR;
00058 KDoubleNumInput *m_roundness;
00059 KIntSpinBox *m_edges;
00060 KIntSpinBox *m_innerAngle;
00061 KComboBox *m_type;
00062 KarbonPart *m_part;
00063 QLabel *m_innerRLabel;
00064 QLabel *m_outerRLabel;
00065 };
00066
00067 class VStarTool : public VShapeTool
00068 {
00069 public:
00070 VStarTool( KarbonView *view );
00071 virtual ~VStarTool();
00072
00073 virtual bool showDialog() const;
00074 virtual void setup(KActionCollection *collection);
00075 virtual QString uiname() { return i18n( "Star Tool" ); }
00076 virtual VPath* shape( bool interactive = false ) const;
00077
00078 void refreshUnit();
00079
00080 virtual void arrowKeyReleased( Qt::Key );
00081
00082 private:
00083 VStarOptionsWidget* m_optionsWidget;
00084 };
00085
00086 #endif
00087
|