KOffice – TDE office suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.5KB

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