kpresenter

KPrVariableCollection.h

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 2001 Laurent MONTEL <lmontel@mandrakesoft.com>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef kprvariable_h
00022 #define kprvariable_h
00023 
00024 #include <qstring.h>
00025 #include <qasciidict.h>
00026 #include <KoVariable.h>
00027 
00028 #include "KPrTextDocument.h"
00029 class KPrDocument;
00030 class KoVariable;
00031 class KoPageVariable;
00032 class KoTextFormat;
00033 class KoVariableSettings;
00034 
00035 class KPrVariableCollection : public KoVariableCollection
00036 {
00037 public:
00038     KPrVariableCollection(KoVariableSettings *_setting, KoVariableFormatCollection* coll);
00039     virtual KoVariable *createVariable( int type, short int subtype, KoVariableFormatCollection * coll,
00040                                         KoVariableFormat *varFormat,KoTextDocument *textdoc, KoDocument * doc,
00041                                         int _correct, bool _forceDefaultFormat=false , bool loadFootNote= true);
00042     virtual KoVariable* loadOasisField( KoTextDocument* textdoc, const QDomElement& tag, KoOasisContext& context );
00043 };
00044 
00048 class KPrPgNumVariable : public KoPageVariable
00049 {
00050 public:
00051     KPrPgNumVariable( KoTextDocument *textdoc, short int subtype, KoVariableFormat *varFormat,
00052                       KoVariableCollection *_varColl, KPrDocument *doc );
00053 
00054     virtual void recalc();
00055 
00056 private:
00057     KPrDocument *m_doc;
00058 };
00059 
00060 
00061 class KPrStatisticVariable : public KoStatisticVariable
00062 {
00063 public:
00064     KPrStatisticVariable( KoTextDocument *textdoc, int subtype, KoVariableFormat *varFormat,KoVariableCollection *_varColl, KPrDocument *doc );
00065     virtual void recalc();
00066     virtual QString text(bool realValue=false);
00067 
00068 protected:
00069     KPrDocument *m_doc;
00070 };
00071 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys