karbon
vsinustool.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __VSINUSTOOL_H__
00021 #define __VSINUSTOOL_H__
00022
00023 #include <kdialogbase.h>
00024 #include "vshapetool.h"
00025
00026 class KoUnitDoubleSpinBox;
00027 class KIntSpinBox;
00028 class KarbonView;
00029 class QLabel;
00030
00031 class VSinusTool : public VShapeTool
00032 {
00033 public:
00034 VSinusTool( KarbonView *view );
00035 virtual ~VSinusTool();
00036
00037 virtual void setup(KActionCollection *collection);
00038 virtual bool showDialog() const;
00039 virtual QString uiname() { return i18n( "Sinus Tool" ); }
00040
00041 virtual VPath *shape( bool interactive = false ) const;
00042
00043 void refreshUnit();
00044
00045 private:
00046 class VSinusOptionsWidget : public KDialogBase
00047 {
00048 public:
00049 VSinusOptionsWidget( KarbonPart *part, QWidget *parent = 0L, const char *name = 0L );
00050
00051 double width() const;
00052 double height() const;
00053 uint periods() const;
00054 void setWidth( double value );
00055 void setHeight( double value );
00056 void setPeriods( uint value );
00057 void refreshUnit();
00058
00059 private:
00060 KoUnitDoubleSpinBox *m_width;
00061 KoUnitDoubleSpinBox *m_height;
00062 KIntSpinBox *m_periods;
00063 KarbonPart *m_part;
00064 QLabel *m_heightLabel;
00065 QLabel *m_widthLabel;
00066 };
00067
00068 VSinusOptionsWidget *m_optionsWidget;
00069 };
00070
00071 #endif
00072
|