kspread_map.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __kspread_map_h__
00021 #define __kspread_map_h__
00022
00023 class KSpreadChanges;
00024 class KSpreadMap;
00025 class KSpreadDoc;
00026
00027 class KoStore;
00028
00029 class DCOPObject;
00030
00031 class QDomElement;
00032 class QDomDocument;
00033 class KoXmlWriter;
00034 class KoGenStyles;
00035 class KoOasisSettings;
00036
00037 #include <qcstring.h>
00038 #include <qptrlist.h>
00039 #include <qstring.h>
00040 #include <qstringlist.h>
00041 #include <qintdict.h>
00042 #include <qobject.h>
00043
00044 #include "kspread_sheet.h"
00045
00050 class KSPREAD_EXPORT KSpreadMap : public QObject
00051 {
00052 Q_OBJECT
00053 public:
00057 KSpreadMap ( KSpreadDoc* doc, const char* name = 0);
00061 virtual ~KSpreadMap();
00062
00063 KSpreadDoc* doc();
00064
00065 QDomElement save( QDomDocument& doc );
00066
00067 void saveOasisSettings( KoXmlWriter &settingsWriter );
00068 void loadOasisSettings( KoOasisSettings &settings );
00069
00070 bool saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles );
00071
00072 bool loadOasis( const QDomElement& mymap, KoOasisStyles& oasisStyles );
00073 bool loadXML( const QDomElement& mymap );
00074 bool loadChildren( KoStore* _store );
00075
00076 bool saveChildren( KoStore* _store );
00077
00078 void password( QCString & passwd ) const { passwd = m_strPassword; }
00079 bool isProtected() const { return !m_strPassword.isNull(); }
00080 void setProtected( QCString const & passwd );
00081 bool checkPassword( QCString const & passwd ) const { return ( passwd == m_strPassword ); }
00082
00087 void moveSheet( const QString & _from, const QString & _to, bool _before = true );
00088
00089 KSpreadSheet* findSheet( const QString & _name );
00090 KSpreadSheet* nextSheet( KSpreadSheet* );
00091 KSpreadSheet* previousSheet( KSpreadSheet* );
00092
00093 KSpreadSheet* initialActiveSheet()const { return m_initialActiveSheet; }
00094 int initialMarkerColumn()const { return m_initialMarkerColumn; }
00095 int initialMarkerRow()const { return m_initialMarkerRow; }
00096
00101 KSpreadSheet * createSheet();
00103 void addSheet( KSpreadSheet *_sheet );
00104
00106 KSpreadSheet *addNewSheet ();
00107
00114 KSpreadSheet* firstSheet() { return m_lstSheets.first(); }
00115
00122 KSpreadSheet* lastSheet() { return m_lstSheets.last(); }
00123
00130 KSpreadSheet* nextSheet() { return m_lstSheets.next(); }
00131
00132 QPtrList<KSpreadSheet>& sheetList() { return m_lstSheets; }
00133
00137 int count()const { return m_lstSheets.count(); }
00138
00139 void update();
00140
00144
00145
00146
00147 virtual DCOPObject* dcopObject();
00148
00149 void takeSheet( KSpreadSheet * sheet );
00150 void insertSheet( KSpreadSheet * sheet );
00151
00152 QStringList visibleSheets() const;
00153 QStringList hiddenSheets() const;
00154
00155 static bool respectCase;
00156
00157 signals:
00158
00162 void sig_addSheet( KSpreadSheet *_table );
00163 private:
00164
00165 KSpreadDoc* m_doc;
00166
00170 QPtrList<KSpreadSheet> m_lstSheets;
00171 QPtrList<KSpreadSheet> m_lstDeletedSheets;
00172
00176 QCString m_strPassword;
00180 KSpreadSheet * m_initialActiveSheet;
00181 int m_initialMarkerColumn;
00182 int m_initialMarkerRow;
00183
00184
00185 int tableId;
00186
00187 DCOPObject* m_dcop;
00188 };
00189
00190 #endif
This file is part of the documentation for kspread Library Version 1.4.2.