kspread

kspread_toolbox.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999, 2000 Torben Weis <weis@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef TOOLBOX_H
21#define TOOLBOX_H
22
23#include <tqframe.h>
24#include <tqpoint.h>
25#include <koffice_export.h>
26class TQVBoxLayout;
27class TQSpinBox;
28
29class KoDocumentChild;
30
31namespace KSpread
32{
33
34class KOFFICEUI_EXPORT ToolBox : public TQFrame
35{
36 TQ_OBJECT
37
38public:
39 ToolBox( TQWidget* parent = 0, const char* name = 0 );
40
41public slots:
42 void setEnabled( bool enable );
43
44protected:
45 // void paintEvent( TQPaintEvent* );
46 void childEvent( TQChildEvent* ev );
47 void mousePressEvent( TQMouseEvent* ev );
48 void mouseMoveEvent( TQMouseEvent* ev );
49
50private:
51 TQVBoxLayout* m_layout;
52 TQPoint m_mousePos;
53 TQPoint m_startPos;
54};
55
56class KOFFICEUI_EXPORT KoTransformToolBox : public ToolBox
57{
58 TQ_OBJECT
59
60public:
61 KoTransformToolBox( KoDocumentChild* child, TQWidget* parent = 0, const char* name = 0 );
62
63 double rotation() const;
64 double scaling() const;
65 double xShearing() const;
66 double yShearing() const;
67
68 void setRotation( double );
69 void setScaling( double );
70 void setXShearing( double );
71 void setYShearing( double );
72
73signals:
74 void rotationChanged( double );
75 void scalingChanged( double );
76 void xShearingChanged( double );
77 void yShearingChanged( double );
78
79public slots:
80 void setDocumentChild( KoDocumentChild* );
81
82private slots:
83 void slotRotationChanged( int );
84 void slotScalingChanged( int );
85 void slotXShearingChanged( int );
86 void slotYShearingChanged( int );
87
88private:
89 TQSpinBox* m_rotation;
90 TQSpinBox* m_scale;
91 TQSpinBox* m_shearX;
92 TQSpinBox* m_shearY;
93 KoDocumentChild* m_child;
94 class Private;
95 Private *d;
96};
97
98} // namespace KSpread
99
100#endif
The KSpread namespace.
Definition commands.h:39