kformula

kformula_view.h
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
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef __kformula_view_h__
22#define __kformula_view_h__
23
24class TDEAction;
25class KFormulaDoc;
27class KFormulaWidget;
28class TDESelectAction;
29class TQPaintEvent;
30class TQScrollView;
31class DCOPObject;
32
33namespace KFormula {
34 class View;
35}
36
37#include <KoView.h>
38#include <tqptrlist.h>
39#include <tqstringlist.h>
40
44class KFormulaPartView : public KoView
45{
46 TQ_OBJECT
47
48
49public:
50 KFormulaPartView(KFormulaDoc* _doc, TQWidget* _parent=0, const char* _name=0);
51 virtual ~KFormulaPartView();
52 virtual DCOPObject* dcopObject();
53
54 virtual void setupPrinter( KPrinter &printer );
55 virtual void print( KPrinter &printer );
56
57 KFormulaDoc* document() const { return m_pDoc; }
58
59 const KFormula::View* formulaView() const;
60 KFormula::View* formulaView();
61
62 TQStringList readFormulaString( TQString text );
63
64protected:
65
66 virtual void resizeEvent(TQResizeEvent* _ev);
67 virtual void focusInEvent(TQFocusEvent*);
68
69 virtual void updateReadWrite(bool);
70
71protected slots:
72
73 void configure();
74 void cursorChanged(bool visible, bool selecting);
75
76 void formulaString();
77
78 void sizeSelected( int );
79
80 void slotShowTipOnStart();
81 void slotShowTip();
82
83private:
84
88 void setEnabled(bool enabled);
89
90 KFormulaDoc *m_pDoc;
91 KFormulaWidget* formulaWidget;
92 TQScrollView* scrollview;
93
94 TDEAction* cutAction;
95 TDEAction* copyAction;
96 TDEAction* pasteAction;
97
98 TDEAction* addBracketAction;
99 TDEAction* addFractionAction;
100 TDEAction* addRootAction;
101 TDEAction* addSumAction;
102 TDEAction* addProductAction;
103 TDEAction* addIntegralAction;
104 TDEAction* addMatrixAction;
105 TDEAction* addUpperLeftAction;
106 TDEAction* addLowerLeftAction;
107 TDEAction* addUpperRightAction;
108 TDEAction* addLowerRightAction;
109 TDEAction* addGenericUpperAction;
110 TDEAction* addGenericLowerAction;
111 TDEAction* removeEnclosingAction;
112
113 TDEAction* formulaStringAction;
114
115 static bool first_window;
116
117 DCOPObject *m_dcop;
118};
119
120#endif
The part's document.
The parts view.