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.

kformula_view.h 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* This file is part of the KDE project
  2. Copyright (C) 2001 Andrea Rizzi <rizzi@kde.org>
  3. Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
  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.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. * Boston, MA 02110-1301, USA.
  16. */
  17. #ifndef __kformula_view_h__
  18. #define __kformula_view_h__
  19. class TDEAction;
  20. class KFormulaDoc;
  21. class KFormulaPartView;
  22. class KFormulaWidget;
  23. class TDESelectAction;
  24. class TQPaintEvent;
  25. class TQScrollView;
  26. class DCOPObject;
  27. namespace KFormula {
  28. class View;
  29. }
  30. #include <KoView.h>
  31. #include <tqptrlist.h>
  32. #include <tqstringlist.h>
  33. /**
  34. * The parts view.
  35. */
  36. class KFormulaPartView : public KoView
  37. {
  38. Q_OBJECT
  39. public:
  40. KFormulaPartView(KFormulaDoc* _doc, TQWidget* _parent=0, const char* _name=0);
  41. virtual ~KFormulaPartView();
  42. virtual DCOPObject* dcopObject();
  43. virtual void setupPrinter( KPrinter &printer );
  44. virtual void print( KPrinter &printer );
  45. KFormulaDoc* document() const { return m_pDoc; }
  46. const KFormula::View* formulaView() const;
  47. KFormula::View* formulaView();
  48. TQStringList readFormulaString( TQString text );
  49. protected:
  50. virtual void resizeEvent(TQResizeEvent* _ev);
  51. virtual void focusInEvent(TQFocusEvent*);
  52. virtual void updateReadWrite(bool);
  53. protected slots:
  54. void configure();
  55. void cursorChanged(bool visible, bool selecting);
  56. void formulaString();
  57. void sizeSelected( int );
  58. void slotShowTipOnStart();
  59. void slotShowTip();
  60. private:
  61. /**
  62. * Enables the actions that modify the formula.
  63. */
  64. void setEnabled(bool enabled);
  65. KFormulaDoc *m_pDoc;
  66. KFormulaWidget* formulaWidget;
  67. TQScrollView* scrollview;
  68. TDEAction* cutAction;
  69. TDEAction* copyAction;
  70. TDEAction* pasteAction;
  71. TDEAction* addBracketAction;
  72. TDEAction* addFractionAction;
  73. TDEAction* addRootAction;
  74. TDEAction* addSumAction;
  75. TDEAction* addProductAction;
  76. TDEAction* addIntegralAction;
  77. TDEAction* addMatrixAction;
  78. TDEAction* addUpperLeftAction;
  79. TDEAction* addLowerLeftAction;
  80. TDEAction* addUpperRightAction;
  81. TDEAction* addLowerRightAction;
  82. TDEAction* addGenericUpperAction;
  83. TDEAction* addGenericLowerAction;
  84. TDEAction* removeEnclosingAction;
  85. TDEAction* formulaStringAction;
  86. static bool first_window;
  87. DCOPObject *m_dcop;
  88. };
  89. #endif