kspread
kspread_toolbox.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TOOLBOX_H
00021 #define TOOLBOX_H
00022
00023 #include <qframe.h>
00024 #include <qpoint.h>
00025 #include <koffice_export.h>
00026 class QVBoxLayout;
00027 class QSpinBox;
00028
00029 class KoDocumentChild;
00030
00031 namespace KSpread
00032 {
00033
00034 class KOFFICEUI_EXPORT ToolBox : public QFrame
00035 {
00036 Q_OBJECT
00037 public:
00038 ToolBox( QWidget* parent = 0, const char* name = 0 );
00039
00040 public slots:
00041 void setEnabled( bool enable );
00042
00043 protected:
00044
00045 void childEvent( QChildEvent* ev );
00046 void mousePressEvent( QMouseEvent* ev );
00047 void mouseMoveEvent( QMouseEvent* ev );
00048
00049 private:
00050 QVBoxLayout* m_layout;
00051 QPoint m_mousePos;
00052 QPoint m_startPos;
00053 };
00054
00055 class KOFFICEUI_EXPORT KoTransformToolBox : public ToolBox
00056 {
00057 Q_OBJECT
00058 public:
00059 KoTransformToolBox( KoDocumentChild* child, QWidget* parent = 0, const char* name = 0 );
00060
00061 double rotation() const;
00062 double scaling() const;
00063 double xShearing() const;
00064 double yShearing() const;
00065
00066 void setRotation( double );
00067 void setScaling( double );
00068 void setXShearing( double );
00069 void setYShearing( double );
00070
00071 signals:
00072 void rotationChanged( double );
00073 void scalingChanged( double );
00074 void xShearingChanged( double );
00075 void yShearingChanged( double );
00076
00077 public slots:
00078 void setDocumentChild( KoDocumentChild* );
00079
00080 private slots:
00081 void slotRotationChanged( int );
00082 void slotScalingChanged( int );
00083 void slotXShearingChanged( int );
00084 void slotYShearingChanged( int );
00085
00086 private:
00087 QSpinBox* m_rotation;
00088 QSpinBox* m_scale;
00089 QSpinBox* m_shearX;
00090 QSpinBox* m_shearY;
00091 KoDocumentChild* m_child;
00092 class Private;
00093 Private *d;
00094 };
00095
00096 }
00097
00098 #endif
|