kspread

krs_doc.h

00001 /*
00002  *  Copyright (c) 2005 Cyrille Berger <cberger@cberger.net>
00003  *  Copyright (c) 2006 Isaac Clerencia <isaac@warp.es>
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU Library General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program 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
00013  *  GNU 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 program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef KSPREAD_KROSS_KRS_DOC_H_
00021 #define KSPREAD_KROSS_KRS_DOC_H_
00022 
00023 #include <kspread_doc.h>
00024 
00025 #include <api/class.h>
00026 
00027 #include <qstring.h>
00028 #include <qstringlist.h>
00029 #include <qdom.h>
00030 
00031 namespace Kross { namespace KSpreadCore {
00032 
00033 class Sheet;
00034 
00043 class Doc : public Kross::Api::Class<Doc>
00044 {
00045     public:
00046         explicit Doc(KSpread::Doc* doc);
00047         virtual ~Doc();
00048         virtual const QString getClassName() const;
00049     private:
00050 
00061         Sheet* currentSheet();
00062 
00072         Sheet* sheetByName(const QString& name);
00073 
00084         QStringList sheetNames();
00085 
00089         bool addSheet(const QString& sheetname);
00090 
00094         bool removeSheet(const QString& sheetname);
00095 
00099         bool loadNativeXML(const QString& xml);
00103         QString saveNativeXML();
00104 
00105 #if 0
00106         bool loadOpenDocXML(const QString& xml);
00107         QString saveOpenDocXML();
00108 #endif
00109 
00110         bool openUrl(const QString& url);
00111         bool saveUrl(const QString& url);
00112         bool import(const QString& url);
00113         bool exp0rt(const QString& url);
00114 
00115     private:
00116         KSpread::Doc* m_doc;
00117 };
00118 }
00119 }
00120 
00121 
00122 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys