kpresenter

KPrVariableCollection.h
1/* This file is part of the KDE project
2 Copyright (C) 2001 Laurent MONTEL <lmontel@mandrakesoft.com>
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 kprvariable_h
21#define kprvariable_h
22
23#include <tqstring.h>
24#include <tqasciidict.h>
25#include <KoVariable.h>
26
27#include "KPrTextDocument.h"
28class KPrDocument;
29class KoVariable;
30class KoPageVariable;
31class KoTextFormat;
32class KoVariableSettings;
33
34class KPrVariableCollection : public KoVariableCollection
35{
36public:
37 KPrVariableCollection(KoVariableSettings *_setting, KoVariableFormatCollection* coll);
38 virtual KoVariable *createVariable( int type, short int subtype, KoVariableFormatCollection * coll,
39 KoVariableFormat *varFormat,KoTextDocument *textdoc, KoDocument * doc,
40 int _correct, bool _forceDefaultFormat=false , bool loadFootNote= true);
41 virtual KoVariable* loadOasisField( KoTextDocument* textdoc, const TQDomElement& tag, KoOasisContext& context );
42};
43
47class KPrPgNumVariable : public KoPageVariable
48{
49public:
50 KPrPgNumVariable( KoTextDocument *textdoc, short int subtype, KoVariableFormat *varFormat,
51 KoVariableCollection *_varColl, KPrDocument *doc );
52
53 virtual void recalc();
54
55private:
56 KPrDocument *m_doc;
57};
58
59
60class KPrStatisticVariable : public KoStatisticVariable
61{
62public:
63 KPrStatisticVariable( KoTextDocument *textdoc, int subtype, KoVariableFormat *varFormat,KoVariableCollection *_varColl, KPrDocument *doc );
64 virtual void recalc();
65 virtual TQString text(bool realValue=false);
66
67protected:
68 KPrDocument *m_doc;
69};
70#endif