kspread

CalculationSettings.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright 2007 Stefan Nikolaus <stefan.nikolaus@kdemail.net>
00003    Copyright 2007 Thorsten Zachmann <zachmann@kde.org>
00004    Copyright 2004 Ariya Hidayat <ariya@kde.org>
00005    Copyright 2002-2003 Norbert Andres <nandres@web.de>
00006    Copyright 2000-2005 Laurent Montel <montel@kde.org>
00007    Copyright 2002 John Dailey <dailey@vt.edu>
00008    Copyright 2002 Phillip Mueller <philipp.mueller@gmx.de>
00009    Copyright 2000 Werner Trobin <trobin@kde.org>
00010    Copyright 1999-2000 Simon Hausmann <hausmann@kde.org>
00011    Copyright 1999 David Faure <faure@kde.org>
00012    Copyright 1998-2000 Torben Weis <weis@kde.org>
00013 
00014    This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Library General Public
00016    License as published by the Free Software Foundation; either
00017    version 2 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Library General Public License for more details.
00023 
00024    You should have received a copy of the GNU Library General Public License
00025    along with this library; see the file COPYING.LIB.  If not, write to
00026    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00027    Boston, MA 02110-1301, USA.
00028 */
00029 
00030 #ifndef KSPREAD_CALCULATION_SETTINGS
00031 #define KSPREAD_CALCULATION_SETTINGS
00032 
00033 #include "kspread_export.h"
00034 
00035 #include <KoXmlReader.h>
00036 
00037 #include <QDate>
00038 
00039 class KLocale;
00040 
00041 class KoXmlWriter;
00042 
00043 namespace KSpread
00044 {
00045 
00049 class KSPREAD_EXPORT CalculationSettings
00050 {
00051 public:
00055     CalculationSettings();
00056 
00060     ~CalculationSettings();
00061 
00065     void loadOdf(const KoXmlElement& body);
00066 
00070     bool saveOdf(KoXmlWriter &settingsWriter) const;
00071 
00076     KLocale *locale() const;
00077 
00084     void setReferenceYear(int year);
00085 
00091     int referenceYear() const;
00092 
00099     void setReferenceDate(const QDate& date);
00100 
00106     QDate referenceDate() const;
00107 
00115     void setDefaultDecimalPrecision(int precision);
00116 
00123     int defaultDecimalPrecision() const;
00124 
00128     void setFileName(const QString& fileName);
00129 
00133     const QString& fileName() const;
00134 
00135 private:
00136     class Private;
00137     Private * const d;
00138 };
00139 
00140 } // namespace KSpread
00141 
00142 #endif // KSPREAD_CALCULATION_SETTINGS