main.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 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 __my_app_h__
21#define __my_app_h__
22
23#include <tqptrlist.h>
24#include <tqstring.h>
25#include <tqobject.h>
26
27#include <klibloader.h>
28#include <tdeparts/plugin.h>
29
30#include <koffice_export.h>
31
32class TQtCalculator;
33class TDEInstance;
34
35namespace KSpread
36{
37class View;
38}
39
40class CalcFactory : public KLibFactory
41{
42 TQ_OBJECT
43
44public:
45 CalcFactory( TQObject* parent = 0, const char* name = 0 );
46 ~CalcFactory();
47
48 virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
49 const char* classname = "TQObject", const TQStringList &args = TQStringList() );
50
51 static TDEInstance* global();
52
53private:
54 static TDEInstance* s_global;
55};
56
57class KSPREAD_EXPORT Calculator : public KParts::Plugin
58{
59 TQ_OBJECT
60
61public:
62 Calculator( View* parent, const char* name = 0 );
63 ~Calculator();
64
65 View* view() { return m_view; }
66
67protected slots:
68 void showCalculator();
69
70protected:
71 bool eventFilter( TQObject*, TQEvent* );
72
73private:
74 TQtCalculator* m_calc;
75 View* m_view;
76};
77
78#endif
The KSpread namespace.
Definition commands.h:39